org.semanticweb.owlapi.owllink.builtin.response
Interface IndividualSynonyms

All Superinterfaces:
Confirmation, java.lang.Iterable<OWLIndividual>, KBResponse, Response

public interface IndividualSynonyms
extends KBResponse, java.lang.Iterable<OWLIndividual>

Represents a IndivididualSynonyms request of the OWLlink Specification.

The special treatment of individuals is necessary because OWLAPI only considered OWLNamedIndividuals in responses. OWLlink, in contrast, also considers OWLAnonymousIndividuals. Author: Olaf Noppens Date: 24.11.2009


Method Summary
  asNode()
          Converts this object to a Node< OWLNamedIndividual > .
 boolean contains(OWLIndividual individual)
           
 java.util.Set<OWLIndividual> getIndividuals()
           
 OWLIndividual getSingletonElement()
          Gets the one and only element if this set of synonyms is a singleton set
 boolean isNode()
          Determines true if this IndividualSynonyms object can be converted to a Node< OWLNamedIndividual > without any loss, i.e., iff the IndividualSynonyms object only contains OWLNamedIndividuals.
 boolean isSingleton()
          Determines if this set of synonyms is a singleton set.
 
Methods inherited from interface org.semanticweb.owlapi.owllink.builtin.response.Confirmation
getWarning, hasWarning
 
Methods inherited from interface org.semanticweb.owlapi.owllink.Response
accept
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

isSingleton

boolean isSingleton()
Determines if this set of synonyms is a singleton set.

Returns:
true if this synonym set is a singleton set, otherwise false

getSingletonElement

OWLIndividual getSingletonElement()
Gets the one and only element if this set of synonyms is a singleton set

Returns:
the one and only element if this set is a singleton set. If this set is not a singleton set then a runtime exception will be thrown
See Also:
isSingleton()

contains

boolean contains(OWLIndividual individual)

getIndividuals

java.util.Set<OWLIndividual> getIndividuals()

isNode

boolean isNode()
Determines true if this IndividualSynonyms object can be converted to a Node< OWLNamedIndividual > without any loss, i.e., iff the IndividualSynonyms object only contains OWLNamedIndividuals.

Returns:
true if this object can be converted to a Node, otherwise false

asNode

 asNode()
Converts this object to a Node< OWLNamedIndividual > . This is only possible if isNode() returns true.

Returns:
Node<OWLNamedIndividual>
Throws:
org.semanticweb.owlapi.model.OWLRuntimeException - if isNode() returns false