E
- the type of entities in the nodepublic abstract class DefaultNode<E extends OWLObject> extends java.lang.Object implements Node<E>
Modifier and Type | Field and Description |
---|---|
protected static OWLClass |
BOTTOM_CLASS |
protected static OWLDataPropertyNode |
BOTTOM_DATA_NODE |
protected static OWLDataProperty |
BOTTOM_DATA_PROPERTY |
protected static OWLClassNode |
BOTTOM_NODE |
protected static OWLObjectPropertyNode |
BOTTOM_OBJECT_NODE |
protected static OWLObjectProperty |
BOTTOM_OBJECT_PROPERTY |
protected static OWLClass |
TOP_CLASS |
protected static OWLDataPropertyNode |
TOP_DATA_NODE |
protected static OWLDataProperty |
TOP_DATA_PROPERTY |
protected static OWLDatatype |
TOP_DATATYPE |
protected static OWLClassNode |
TOP_NODE |
protected static OWLObjectPropertyNode |
TOP_OBJECT_NODE |
protected static OWLObjectProperty |
TOP_OBJECT_PROPERTY |
Modifier | Constructor and Description |
---|---|
protected |
DefaultNode() |
|
DefaultNode(E entity) |
|
DefaultNode(java.util.Set<E> entities) |
Modifier and Type | Method and Description |
---|---|
void |
add(E entity) |
boolean |
contains(E entity)
Determines if this node contains the specified entity.
|
boolean |
equals(java.lang.Object obj) |
protected abstract E |
getBottomEntity() |
java.util.Set<E> |
getEntities()
Gets the entities contained in this node.
|
java.util.Set<E> |
getEntitiesMinus(E E)
Gets the entities contained in this node minus the specified entitie
e . |
java.util.Set<E> |
getEntitiesMinusBottom()
Gets the entities contained in this node minus the bottom entity.
|
java.util.Set<E> |
getEntitiesMinusTop()
Gets the entities contained in this node minus the top entity.
|
E |
getRepresentativeElement()
Gets one of the entities contained in this entity set.
|
int |
getSize()
Gets the number of entities contained in this
Node |
protected abstract E |
getTopEntity() |
int |
hashCode() |
boolean |
isBottomNode()
Determines if this node represents the bottom node (in a hierarchy).
|
boolean |
isSingleton()
Determines if this
Node contains just one entity. |
boolean |
isTopNode()
Determines if this node represents the top node (in a hierarchy).
|
java.util.Iterator<E> |
iterator() |
java.lang.String |
toString() |
protected static final OWLClass TOP_CLASS
protected static final OWLClassNode TOP_NODE
protected static final OWLClass BOTTOM_CLASS
protected static final OWLClassNode BOTTOM_NODE
protected static final OWLDataProperty TOP_DATA_PROPERTY
protected static final OWLDataPropertyNode TOP_DATA_NODE
protected static final OWLDataProperty BOTTOM_DATA_PROPERTY
protected static final OWLDataPropertyNode BOTTOM_DATA_NODE
protected static final OWLDatatype TOP_DATATYPE
protected static final OWLObjectProperty TOP_OBJECT_PROPERTY
protected static final OWLObjectPropertyNode TOP_OBJECT_NODE
protected static final OWLObjectProperty BOTTOM_OBJECT_PROPERTY
protected static final OWLObjectPropertyNode BOTTOM_OBJECT_NODE
public DefaultNode(E entity)
entity
- the entity to addpublic DefaultNode(java.util.Set<E> entities)
entities
- the set of entities to addprotected DefaultNode()
protected abstract E getTopEntity()
protected abstract E getBottomEntity()
public void add(E entity)
entity
- entity to be addedpublic boolean isTopNode()
Node
owl:Thing
. For an object property node, the top node
is the node that contains owl:topObjectProperty
. For a data property node, the top node is the
node that contains owl:topDataProperty
isTopNode
in interface Node<E extends OWLObject>
true
if this node is an OWLClass
node and it contains owl:Thing
.
true
if this node is an OWLObjectProperty
node and it contains owl:topObjectProperty
.
true
if this node is an OWLDataProperty
node and it contains owl:topDataProperty
.
false
if none of the above.public boolean isBottomNode()
Node
owl:Nothing
. For an object property node, the bottom node
is the node that contains owl:bottomObjectProperty
. For a data property node, the bottom node is the
node that contains owl:bottomDataProperty
isBottomNode
in interface Node<E extends OWLObject>
true
if this node is an OWLClass
node and it contains owl:Nothing
.
true
if this node is an OWLObjectProperty
node and it contains owl:bottomObjectProperty
.
true
if this node is an OWLDataProperty
node and it contains owl:bottomDataProperty
.
false
if none of the above.public java.util.Set<E> getEntities()
Node
getEntities
in interface Node<E extends OWLObject>
Node
.public int getSize()
Node
Node
public boolean contains(E entity)
Node
public java.util.Set<E> getEntitiesMinus(E E)
Node
e
. This essentially
returns the entities that are returned by Node.getEntities()
minus the specified entity e
getEntitiesMinus
in interface Node<E extends OWLObject>
E
- The entity that, is contained within this node, but should not be included in the return set.e
. If
e
is not contained within this node then the full set of entities returned is the same as that
returned by Node.getEntities()
public java.util.Set<E> getEntitiesMinusTop()
Node
owl:Thing
.
For a node of object properties the top entity is owl:topObjectProperty
.
For a node of data properties the top entity is owl:topDataProperty
getEntitiesMinusTop
in interface Node<E extends OWLObject>
Node.getEntities()
.public java.util.Set<E> getEntitiesMinusBottom()
Node
owl:Nothing
.
For a node of object properties the bottom entity is owl:bottomObjectProperty
.
For a node of data properties the bottom entity is owl:bottomDataProperty
getEntitiesMinusBottom
in interface Node<E extends OWLObject>
Node.getEntities()
.public boolean isSingleton()
Node
Node
contains just one entity.isSingleton
in interface Node<E extends OWLObject>
true
if this Node
contains just one entity, otherwise false
public E getRepresentativeElement()
Node
getRepresentativeElement
in interface Node<E extends OWLObject>
public java.util.Iterator<E> iterator()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object