Package it.poliba.sisinflab.tinyme
Class SemanticDescription
java.lang.Object
it.poliba.sisinflab.tinyme.SemanticDescription
- Direct Known Subclasses:
EntityDescription
public class SemanticDescription extends Object
Models an ALN concept expression as the conjunction of CCN,
CGT, CLT, C∀ components, stored in collections of
AtomicConcept
, CardinalityRole
and UniversalRole
class instances.
Instances of this class are backed by native data structures, and as such they require
special treatment for memory management, therefore they can only be created via the
DataFactory
instance held by Reasoner
(which automatically ties their lifecycle
to that of the enclosing objects).
Unless otherwise stated, SemanticDescription
objects returned by the reasoner
instance should not be mutated unless they have been copied beforehand (via e.g.
DataFactory.copy(SemanticDescription)
), otherwise
IllegalStateException
is thrown.
- See Also:
DataFactory
-
Method Summary
Modifier and Type Method Description void
addAtomicConcept(AtomicConcept concept)
Adds the specified atomic concept to this description.void
addAtomicConcept(IRI iri)
Refer toaddAtomicConcept(AtomicConcept)
.void
addAtomicConcept(OWLClass owlClass)
Refer toaddAtomicConcept(AtomicConcept)
.void
addAtomicConcepts(Iterable<AtomicConcept> concepts)
Refer toaddAtomicConcept(AtomicConcept)
.void
addGreaterThanRole(CardinalityRole role)
Adds the specified minimum cardinality restriction to this description.void
addGreaterThanRole(IRI iri, long cardinality)
Refer toaddGreaterThanRole(CardinalityRole)
.void
addGreaterThanRole(OWLObjectProperty property, long cardinality)
Refer toaddGreaterThanRole(CardinalityRole)
.void
addGreaterThanRoles(Iterable<CardinalityRole> roles)
Refer toaddGreaterThanRole(CardinalityRole)
.void
addLessThanRole(CardinalityRole role)
Adds the specified maximum cardinality restriction to this description.void
addLessThanRole(IRI iri, long cardinality)
Refer toaddLessThanRole(CardinalityRole)
.void
addLessThanRole(OWLObjectProperty property, long cardinality)
Refer toaddLessThanRole(CardinalityRole)
.void
addLessThanRoles(Iterable<CardinalityRole> roles)
Refer toaddLessThanRole(CardinalityRole)
.void
addNegatedConcept(AtomicConcept concept)
Adds the specified negated concept to this description.void
addNegatedConcept(IRI iri)
Refer toaddNegatedConcept(AtomicConcept)
.void
addNegatedConcept(OWLClass owlClass)
Refer toaddNegatedConcept(AtomicConcept)
.void
addNegatedConcepts(Iterable<AtomicConcept> concepts)
Refer toaddNegatedConcept(AtomicConcept)
.void
addUniversalRole(UniversalRole role)
Adds the specified value restriction to this description.void
addUniversalRole(IRI iri, SemanticDescription filler)
Refer toaddUniversalRole(UniversalRole)
.void
addUniversalRole(OWLObjectProperty property, SemanticDescription filler)
Refer toaddUniversalRole(UniversalRole)
.void
addUniversalRoles(Iterable<UniversalRole> roles)
Refer toaddUniversalRole(UniversalRole)
.Stream<AtomicConcept>
getAtomicConcepts()
Returns the atomic concept conjuncts referenced in this description.Stream<CardinalityRole>
getGreaterThanRoles()
Returns the minimum cardinality restriction conjuncts referenced in this description.Stream<CardinalityRole>
getLessThanRoles()
Returns the maximum cardinality restriction conjuncts referenced in this description.Stream<AtomicConcept>
getNegatedConcepts()
Returns the negated atomic concept conjuncts referenced in this description.Stream<UniversalRole>
getUniversalRoles()
Returns the value restriction conjuncts referenced in this description.void
intersect(SemanticDescription other)
Performs the intersection between this description and another.boolean
isOwned()
void
setOwned(boolean owned)
String
toString()
-
Method Details
-
isOwned
public boolean isOwned() -
setOwned
public void setOwned(boolean owned) -
getAtomicConcepts
Returns the atomic concept conjuncts referenced in this description.- Returns:
- The atomic concepts.
-
getNegatedConcepts
Returns the negated atomic concept conjuncts referenced in this description.- Returns:
- The negated atomic concepts.
-
getGreaterThanRoles
Returns the minimum cardinality restriction conjuncts referenced in this description.- Returns:
- The minimum cardinality restrictions.
-
getLessThanRoles
Returns the maximum cardinality restriction conjuncts referenced in this description.- Returns:
- The maximum cardinality restrictions.
-
getUniversalRoles
Returns the value restriction conjuncts referenced in this description.- Returns:
- The value restrictions.
-
addAtomicConcept
Adds the specified atomic concept to this description.- Parameters:
concept
- Concept to add.
-
addAtomicConcept
Refer toaddAtomicConcept(AtomicConcept)
.- Parameters:
owlClass
- Class representing the concept.
-
addAtomicConcept
Refer toaddAtomicConcept(AtomicConcept)
.- Parameters:
iri
- IRI of the concept.
-
addAtomicConcepts
Refer toaddAtomicConcept(AtomicConcept)
.- Parameters:
concepts
- Concepts to add.
-
addNegatedConcept
Adds the specified negated concept to this description.- Parameters:
concept
- Negated concept to add.
-
addNegatedConcept
Refer toaddNegatedConcept(AtomicConcept)
.- Parameters:
owlClass
- Class representing the negated concept.
-
addNegatedConcept
Refer toaddNegatedConcept(AtomicConcept)
.- Parameters:
iri
- IRI of the negated concept.
-
addNegatedConcepts
Refer toaddNegatedConcept(AtomicConcept)
.- Parameters:
concepts
- Negated concepts to add.
-
addGreaterThanRole
Adds the specified minimum cardinality restriction to this description.- Parameters:
role
- Restriction to add.
-
addGreaterThanRole
Refer toaddGreaterThanRole(CardinalityRole)
.- Parameters:
property
- Property of the role.cardinality
- Cardinality of the role.
-
addGreaterThanRole
Refer toaddGreaterThanRole(CardinalityRole)
.- Parameters:
iri
- IRI of the property.cardinality
- Cardinality of the role.
-
addGreaterThanRoles
Refer toaddGreaterThanRole(CardinalityRole)
.- Parameters:
roles
- Roles to add.
-
addLessThanRole
Adds the specified maximum cardinality restriction to this description.- Parameters:
role
- Restriction to add.
-
addLessThanRole
Refer toaddLessThanRole(CardinalityRole)
.- Parameters:
property
- Property of the role.cardinality
- Cardinality of the role.
-
addLessThanRole
Refer toaddLessThanRole(CardinalityRole)
.- Parameters:
iri
- IRI of the property.cardinality
- Cardinality of the role.
-
addLessThanRoles
Refer toaddLessThanRole(CardinalityRole)
.- Parameters:
roles
- Roles to add.
-
addUniversalRole
Adds the specified value restriction to this description.- Parameters:
role
- Value restriction to add.
-
addUniversalRole
Refer toaddUniversalRole(UniversalRole)
.- Parameters:
property
- Property of the role.filler
- Filler of the role.
-
addUniversalRole
Refer toaddUniversalRole(UniversalRole)
.- Parameters:
iri
- IRI of the property.filler
- Filler of the role.
-
addUniversalRoles
Refer toaddUniversalRole(UniversalRole)
.- Parameters:
roles
- Roles to add.
-
intersect
Performs the intersection between this description and another. Only the current instance is mutated.- Parameters:
other
- Description to perform the intersection with.
-
toString
-