Class AbstractOsidNode

java.lang.Object
net.okapia.osid.jamocha.spi.AbstractIdentifiable
net.okapia.osid.jamocha.spi.AbstractOsidNode
All Implemented Interfaces:
Containable, Identifiable, OsidNode
Direct Known Subclasses:
AbstractAcademyNode, AbstractAccountNode, AbstractActivityNode, AbstractAddressBookNode, AbstractAgencyNode, AbstractAntimatroidNode, AbstractAuctionHouseNode, AbstractBankNode, AbstractBillingNode, AbstractBinNode, AbstractBlogNode, AbstractBookNode, AbstractBusinessNode, AbstractBusinessNode, AbstractCalendarNode, AbstractCampusNode, AbstractCatalogNode, AbstractCatalogueNode, AbstractChecklistNode, AbstractConfigurationNode, AbstractCookbookNode, AbstractCourseCatalogNode, AbstractDepotNode, AbstractDictionaryNode, AbstractDistributorNode, AbstractEngineNode, AbstractEngineNode, AbstractFamilyNode, AbstractForumNode, AbstractFoundryNode, AbstractFrontOfficeNode, AbstractGradebookNode, AbstractGraphNode, AbstractInquestNode, AbstractJournalNode, AbstractLocationNode, AbstractLogNode, AbstractMailboxNode, AbstractMapNode, AbstractNode, AbstractObjectiveBankNode, AbstractObjectiveNode, AbstractOfficeNode, AbstractOntologyNode, AbstractOrganizationNode, AbstractOublietteNode, AbstractPollsNode, AbstractProcessNode, AbstractProfileNode, AbstractPublisherNode, AbstractQualifierNode, AbstractRealmNode, AbstractRepositoryNode, AbstractStockNode, AbstractStoreNode, AbstractSubjectNode, AbstractSystemNode, AbstractTermNode, AbstractTodoNode, AbstractUtilityNode, AbstractVaultNode, AbstractWarehouseNode

public abstract class AbstractOsidNode extends AbstractIdentifiable implements OsidNode
An abstract template for an OsidNode.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new AbstractOsidNode.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests if this node is a leaf in the hierarchy (has no children).
    boolean
    Tests if this node is a root in the hierarchy (has no parents).
    boolean
    Tests if this Containable is sequestered in that it should not appear outside of its aggregated composition.
    protected void
    Designates this node as a leaf.
    protected void
    Designates this node as a root.
    protected void
    Designates this node as a non-leaf.
    protected void
    Designates this node as a non-root.

    Methods inherited from class AbstractIdentifiable

    current, equals, getId, hashCode, isCurrent, setId, stale, toString
    Modifier and Type
    Method
    Description
    protected void
    Sets the current flag to true.
    final boolean
    Determines if the given Id is equal to this one.
    Gets the Id associated with this instance of this OSID object.
    int
    Returns a hash code value for this OsidObject based on the Id.
    boolean
    Tests to see if the last method invoked retrieved up-to-date data.
    protected void
    setId(Id id)
    Sets the Id associated with this instance of this OSID object.
    protected void
    Sets the current flag to false.
    Returns a string representation of this OsidObject.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface OsidNode

    getChildIds, getParentIds, hasChildren, hasParents
  • Constructor Details

    • AbstractOsidNode

      public AbstractOsidNode()
      Constructs a new AbstractOsidNode.
  • Method Details

    • isSequestered

      @OSID public boolean isSequestered()
      Tests if this Containable is sequestered in that it should not appear outside of its aggregated composition.
      Specified by:
      isSequestered in interface Containable
      Returns:
      true if this containable is sequestered, false if this containable may appear outside its aggregate
    • isRoot

      @OSID public boolean isRoot()
      Tests if this node is a root in the hierarchy (has no parents). A node may have no more parents available in this node structure but is not a root in the hierarchy. If both isRoot() and hasParents() is false, the parents of this node may be accessed thorugh another node structure retrieval.
      Specified by:
      isRoot in interface OsidNode
      Returns:
      true if this node is a root in the hierarchy, false otherwise
    • root

      protected void root()
      Designates this node as a root.
    • unroot

      protected void unroot()
      Designates this node as a non-root.
    • isLeaf

      @OSID public boolean isLeaf()
      Tests if this node is a leaf in the hierarchy (has no children). A node may have no more children available in this node structure but is not a leaf in the hierarchy. If both isLeaf() and hasChildren() is false, the children of this node may be accessed thorugh another node structure retrieval.
      Specified by:
      isLeaf in interface OsidNode
      Returns:
      true if this node is a leaf in the hierarchy, false otherwise
    • leaf

      protected void leaf()
      Designates this node as a leaf.
    • unleaf

      protected void unleaf()
      Designates this node as a non-leaf.