Class DefaultNode<E extends OWLObject>
java.lang.Object
org.semanticweb.owlapi.reasoner.impl.DefaultNode<E>
- Type Parameters:
E
- the type of entities in the node
- Direct Known Subclasses:
OWLClassNode
,OWLDataPropertyNode
,OWLDatatypeNode
,OWLNamedIndividualNode
,OWLObjectPropertyNode
- Since:
- 3.0.0
- Author:
- Matthew Horridge, The University of Manchester, Information Management Group
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultNode
(E entity) DefaultNode
(Collection<E> entities) DefaultNode
(Stream<E> entities) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
Determines if this node contains the specified entity.entities()
Gets the entities contained in this node.boolean
Gets the entities contained in this node minus the specified entitye
.Gets the entities contained in this node minus the bottom entity.Gets the entities contained in this node minus the top entity.Gets one of the entities contained in this entity set.int
getSize()
Gets the number of entities contained in thisNode
.int
hashCode()
boolean
Determines if this node represents the bottom node (in a hierarchy).boolean
Determines if thisNode
contains just one entity.boolean
Determines if this node represents the top node (in a hierarchy).iterator()
toString()
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.semanticweb.owlapi.reasoner.Node
getEntities
-
Constructor Details
-
DefaultNode
- Parameters:
entity
- the entity to add
-
DefaultNode
- Parameters:
entities
- the entities to add
-
DefaultNode
- Parameters:
entities
- the entities to add
-
-
Method Details
-
add
- Parameters:
entity
- entity to be added
-
isTopNode
public boolean isTopNode()Description copied from interface:Node
Determines if this node represents the top node (in a hierarchy). For a named class node, the top node is the node that containsowl:Thing
. For an object property node, the top node is the node that containsowl:topObjectProperty
. For a data property node, the top node is the node that containsowl:topDataProperty
- Specified by:
isTopNode
in interfaceNode<E extends OWLObject>
- Returns:
true
if this node is anOWLClass
node and it containsowl:Thing
.
true
if this node is anOWLObjectProperty
node and it containsowl:topObjectProperty
.
true
if this node is anOWLDataProperty
node and it containsowl:topDataProperty
.
false
if none of the above.
-
isBottomNode
public boolean isBottomNode()Description copied from interface:Node
Determines if this node represents the bottom node (in a hierarchy). For a named class node, the bottom node is the node that containsowl:Nothing
. For an object property node, the bottom node is the node that containsowl:bottomObjectProperty
. For a data property node, the bottom node is the node that containsowl:bottomDataProperty
- Specified by:
isBottomNode
in interfaceNode<E extends OWLObject>
- Returns:
true
if this node is anOWLClass
node and it containsowl:Nothing
.
true
if this node is anOWLObjectProperty
node and it containsowl:bottomObjectProperty
.
true
if this node is anOWLDataProperty
node and it containsowl:bottomDataProperty
.
false
if none of the above.
-
entities
Description copied from interface:Node
Gets the entities contained in this node. The entities are equivalent to each other. -
getSize
public int getSize()Description copied from interface:Node
Gets the number of entities contained in thisNode
. -
contains
Description copied from interface:Node
Determines if this node contains the specified entity. -
getEntitiesMinus
Description copied from interface:Node
Gets the entities contained in this node minus the specified entitye
. This essentially returns the entities that are returned byNode.getEntities()
minus the specified entitye
- Specified by:
getEntitiesMinus
in interfaceNode<E extends OWLObject>
- Parameters:
e
- The entity that, is contained within this node, but should not be included in the return set.- Returns:
- The set of entities that are contained in this node minus the specified entity,
e
. Ife
is not contained within this node then the full set of entities returned is the same as that returned byNode.getEntities()
-
getEntitiesMinusTop
Description copied from interface:Node
Gets the entities contained in this node minus the top entity. For a node of named classes the top entity isowl:Thing
. For a node of object properties the top entity isowl:topObjectProperty
. For a node of data properties the top entity isowl:topDataProperty
- Specified by:
getEntitiesMinusTop
in interfaceNode<E extends OWLObject>
- Returns:
- The set of entities contained within this node minus the top entity. If this node
does not contain the top entity then the set of entities returned is the same as that
returned by
Node.getEntities()
.
-
getEntitiesMinusBottom
Description copied from interface:Node
Gets the entities contained in this node minus the bottom entity. For a node of named classes the bottom entity isowl:Nothing
. For a node of object properties the bottom entity isowl:bottomObjectProperty
. For a node of data properties the bottom entity isowl:bottomDataProperty
- Specified by:
getEntitiesMinusBottom
in interfaceNode<E extends OWLObject>
- Returns:
- The set of entities contained within this node minus the bottom entity. If this node
does not contain the bottom entity then the set of entities returned is the same as
that returned by
Node.getEntities()
.
-
isSingleton
public boolean isSingleton()Description copied from interface:Node
Determines if thisNode
contains just one entity.- Specified by:
isSingleton
in interfaceNode<E extends OWLObject>
- Returns:
true
if thisNode
contains just one entity, otherwisefalse
-
getRepresentativeElement
Description copied from interface:Node
Gets one of the entities contained in this entity set. If this is a singleton set it will be the one and only entity.- Specified by:
getRepresentativeElement
in interfaceNode<E extends OWLObject>
- Returns:
- An entity from the set of entities contained within this node
-
iterator
-
toString
-
equals
-
hashCode
public int hashCode()
-