D
- the type of the DataPropertyExpression
descriptors instantiated during
Individual.DataLink.buildDataProperties()
through #getNewDataProperty(ExpressionEntity, Object)
.public static interface IndividualExpression.DataLink<D extends DataPropertyExpression> extends Individual.DataLink<it.emarolab.amor.owlInterface.OWLReferences,org.semanticweb.owlapi.model.OWLNamedIndividual,DataLinks,org.semanticweb.owlapi.model.OWLDataProperty,D>, IndividualExpression
Individual.DataLink
expression for a Descriptor
whose ground is OWLNamedIndividual
.
It specifies how to queryDataProperties()
and writeAxioms()
for the
data properties associated to the ground Individual Axiom.Descriptor.getInstance()
.
It also implements common function to populate the ExpressionEntitySet
(of type DataLinks
) that specify the data properties of this individualDescriptor
that are synchronised with this Descriptor
. For efficiency,
this descriptor does not map all the properties of an individualDescriptor but only for the
Expressions
that have been initialised in the ExpressionEntity
.
On the other hand, if the set of ExpressionEntitySet
is left empty during
Individual.DataLink.readAxioms()
, it maps all the object properties applied to the described
individualDescriptor
IndividualExpression.DataLink<D extends DataPropertyExpression>, IndividualExpression.Disjoint<D extends IndividualExpression>, IndividualExpression.Equivalent<D extends IndividualExpression>, IndividualExpression.ObjectLink<D extends ObjectPropertyExpression>, IndividualExpression.Type<D extends ClassExpression>
Axiom.Descriptor.OntologyReference
DescriptorGroundInterface.ConceptGroundInstance, DescriptorGroundInterface.DataGroundInstance, DescriptorGroundInterface.GroundInstance<J extends org.semanticweb.owlapi.model.OWLObject>, DescriptorGroundInterface.IndividualGroundInstance, DescriptorGroundInterface.ObjectGroundInstance
Axiom.Descriptor<O,J>, Axiom.EntitySet<Y>, Axiom.ExpressionEntity<S,Y>, Axiom.ExpressionEntitySet<F extends Axiom.ExpressionEntity<?,Y>,Y>, Axiom.Ground<O,J>, Axiom.MappingIntent<I extends Axiom.Ground,C>
Modifier and Type | Method and Description |
---|---|
default boolean |
addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor . |
default boolean |
addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
boolean singleton)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor . |
default boolean |
addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
org.semanticweb.owlapi.model.OWLLiteral value)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor with a particular value. |
default boolean |
addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
org.semanticweb.owlapi.model.OWLLiteral value,
boolean singleton)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor with a particular value. |
default boolean |
addData(java.lang.String dataProperty)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor . |
default boolean |
addData(java.lang.String dataProperty,
boolean singleton)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor . |
default boolean |
addData(java.lang.String dataProperty,
java.lang.Object value)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor with a particular value. |
default boolean |
addData(java.lang.String dataProperty,
java.lang.Object value,
boolean singleton)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor with a particular value. |
default boolean |
addObject(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
java.util.Set<org.semanticweb.owlapi.model.OWLLiteral> values)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor with a particular set of values. |
default boolean |
addObject(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
java.util.Set<org.semanticweb.owlapi.model.OWLLiteral> values,
boolean singleton)
Add a new semantic (i.e.: data dataProperty) to this
Descriptor with a particular set of values. |
DataLinkSet |
getDataProperties()
Returns the
EntitySet that describes the specified data properties applied to
this Individual ; from a no OOP point of view. |
default org.semanticweb.owlapi.model.OWLLiteral |
getLiteralFromDataProperty(org.semanticweb.owlapi.model.OWLDataProperty instance)
A shortcut for
getDataProperties().getLink( semantic) |
default org.semanticweb.owlapi.model.OWLLiteral |
getLiteralFromDataProperty(java.lang.String dataPropertyName)
A shortcut for
getDataProperties().getLink( getOntology().getOWLDataProperty( semanticName) |
default Axiom.EntitySet<org.semanticweb.owlapi.model.OWLLiteral> |
getLiteralsFromDataProperty(org.semanticweb.owlapi.model.OWLDataProperty instance)
A shortcut for
getDataProperties().getLinks( semantic) |
default Axiom.EntitySet<org.semanticweb.owlapi.model.OWLLiteral> |
getLiteralsFromDataProperty(java.lang.String dataPropertyName)
A shortcut for
getDataProperties().getLinks( getOntology().getOWLDataProperty( semanticName)) |
default DataLinkSet |
queryDataProperties()
Queries to the OWL representation for the data properties applied to
this Descriptor . |
default boolean |
removeData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty)
|
default boolean |
removeData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
org.semanticweb.owlapi.model.OWLLiteral value)
Remove the
ExpressionEntity#getExpression() of the given dataProperty, with a specific value, from this
Descriptor . |
default boolean |
removeData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty,
java.util.Set<org.semanticweb.owlapi.model.OWLLiteral> values) |
default boolean |
removeData(java.lang.String dataProperty)
|
default boolean |
removeData(java.lang.String dataProperty,
java.lang.Object value)
Remove the
ExpressionEntity#getExpression() of the given dataProperty, with a specific value, from this
Descriptor . |
default java.util.List<Axiom.MappingIntent> |
writeAxioms()
This method is used to update the ontology with a specific
Axiom.EntitySet (or Axiom.ExpressionEntitySet )
by synchronizing the OWL representation with the internal state of the descriptor, such that they are equal. |
buildDataProperties, getNewDataProperty, readAxioms, synchroniseDataPropertiesFromExpressionAxioms, synchroniseDataPropertiesToExpressionAxioms
getGroundInstance, getGroundOntology
activateAMORlogging, getChangingIntent, getGround, getGroundInstanceName, getInstance, getIntent, getOntologyReference, groundReason, writeAxiomsReasonReadAxioms, writeAxiomsReasonReadAxioms
getOntologyName, getOWLClass, getOWLDataFactory, getOWLDataProperty, getOWLDataType, getOWLIndividual, getOWLLiteral, getOWLName, getOWLName, getOWLObjectProperty, getOWLOntology, getOWLReasoner, isCompleteQuery, isReasonedQuery, reason, saveOntology, saveOntology, setCompleteQuery, setReasonedQuery
copyGround
default boolean removeData(java.lang.String dataProperty)
ExpressionEntity
of the given semantic (DataLinks.getExpression()
)
from the Descriptor
. This call may remove multiple value attached to that
semantic. It will no longer be used during Individual.DataLink.readAxioms()
and writeAxioms()
.dataProperty
- a dataProperty name contained in an element of getDataProperties()
to be removed.true
if an element was removed as a result of this call.default boolean removeData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty)
ExpressionEntity
of the given semantic (DataLinks.getExpression()
)
from the Descriptor
. This call may remove multiple value attached to that
semantic. It will no longer be used during Individual.DataLink.readAxioms()
and writeAxioms()
.dataProperty
- a dataProperty contained in an element of getDataProperties()
to be removed.true
if an element was removed as a result of this call.default boolean removeData(java.lang.String dataProperty, java.lang.Object value)
ExpressionEntity#getExpression()
of the given dataProperty, with a specific value, from this
Descriptor
. This call does not remove the semantic from this object, and it may be
repopulate (or completely removed) by calling: Individual.DataLink.readAxioms()
.
The class of the specified value represents its data type, supported OWLLiteral
are:
Integer
, Boolean
, Double
, Float
and Long
(see DescriptorGroundInterface.getOWLLiteral(Object)
).dataProperty
- the name of the dataProperty which value, contained in getDataProperties()
, will be removed.value
- the dataProperty value to be removed from the DataLinks.getValues()
set.true
if an element was removed as a result of this call.default boolean removeData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, org.semanticweb.owlapi.model.OWLLiteral value)
ExpressionEntity#getExpression()
of the given dataProperty, with a specific value, from this
Descriptor
. This call does not remove the semantic from this object, and it may be
repopulate (or completely removed) by calling: Individual.DataLink.readAxioms()
.dataProperty
- the dataProperty which value, contained in getDataProperties()
, will be removed.value
- the specific dataProperty literal to be removed from the DataLinks.getValues()
set.true
if an element was removed as a result of this call.default boolean removeData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, java.util.Set<org.semanticweb.owlapi.model.OWLLiteral> values)
default boolean addData(java.lang.String dataProperty)
Descriptor
.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to false
anyway.
On the other hand, it does not assign any value to the properties that are automatically
queried during Individual.DataLink.readAxioms()
.dataProperty
- the name of the dataProperty to synchronise.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty)
Descriptor
.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to false
anyway.
On the other hand, it does not assign any value to the properties that are automatically
queried during Individual.DataLink.readAxioms()
.dataProperty
- the dataProperty to synchronise.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(java.lang.String dataProperty, boolean singleton)
Descriptor
.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
to the specified value anyway.
On the other hand, it does not assign any value to the properties that are automatically
queried during Individual.DataLink.readAxioms()
.dataProperty
- the name of the dataProperty to synchronise.singleton
- the flag to enable the synchronisation of only one element of the set,
others will be discarded.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, boolean singleton)
Descriptor
.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
to the specified value anyway.
On the other hand, it does not assign any value to the properties that are automatically
queried during Individual.DataLink.readAxioms()
.dataProperty
- the dataProperty to synchronise.singleton
- the flag to enable the synchronisation of only one element of the set,
others will be discarded.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(java.lang.String dataProperty, java.lang.Object value)
Descriptor
with a particular value.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to false
anyway.
The class of the specified value represents its data type, supported OWLLiteral
are:
Integer
, Boolean
, Double
, Float
and Long
(see DescriptorGroundInterface.getOWLLiteral(Object)
).dataProperty
- the name of the dataProperty to synchronise.value
- the specific data to be added to the DataLinks.getValues()
set.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, org.semanticweb.owlapi.model.OWLLiteral value)
Descriptor
with a particular value.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to false
anyway.dataProperty
- the dataProperty to synchronise.value
- the literal to be added to the DataLinks.getValues()
set.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(java.lang.String dataProperty, java.lang.Object value, boolean singleton)
Descriptor
with a particular value.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to specified boolean anyway.
The class of the specified value represents its data type, supported OWLLiteral
are:
Integer
, Boolean
, Double
, Float
and Long
(see DescriptorGroundInterface.getOWLLiteral(Object)
).dataProperty
- the name of the dataProperty to synchronise.value
- the specific data to be added to the DataLinks.getValues()
set.singleton
- the flag specifying if the new Literals
should contains only one element.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addData(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, org.semanticweb.owlapi.model.OWLLiteral value, boolean singleton)
Descriptor
with a particular value.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to specified boolean anyway.
If getDataProperties()
represents a singleton set this call clear the
previous contents.dataProperty
- the dataProperty to synchronise.value
- the specific dataProperty literal to be added to the DataLinks.getValues()
set.singleton
- the flag specifying if the new Literals
should contains only one element.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addObject(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, java.util.Set<org.semanticweb.owlapi.model.OWLLiteral> values, boolean singleton)
Descriptor
with a particular set of values.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to specified boolean anyway.
If getDataProperties()
represents a singleton set this call clear the
previous contents.dataProperty
- the dataProperty to synchronise.values
- the specific set of dataProperty literal to be added to the DataLinks.getValues()
set.singleton
- the flag specifying if the new Literals
should contains only one element.true
if an element was added as a result of this call
(a change of singleton value is not considered).default boolean addObject(org.semanticweb.owlapi.model.OWLDataProperty dataProperty, java.util.Set<org.semanticweb.owlapi.model.OWLLiteral> values)
Descriptor
with a particular set of values.
In case it already exists, this will set the DescriptorEntitySet.EntitySetBase.isSingleton()
value to specified boolean anyway.
If getDataProperties()
represents a singleton set this call clear the
previous contents.
This call, automatically sets the singleton
flag to false.dataProperty
- the dataProperty to synchronise.values
- the specific set of dataProperty literal to be added to the DataLinks.getValues()
set.true
if an element was added as a result of this call
(a change of singleton value is not considered).DataLinkSet getDataProperties()
Individual.DataLink
EntitySet
that describes the specified data properties applied to
this
Individual
; from a no OOP point of view.getDataProperties
in interface Individual.DataLink<it.emarolab.amor.owlInterface.OWLReferences,org.semanticweb.owlapi.model.OWLNamedIndividual,DataLinks,org.semanticweb.owlapi.model.OWLDataProperty,D extends DataPropertyExpression>
this
individualDescriptor.default org.semanticweb.owlapi.model.OWLLiteral getLiteralFromDataProperty(org.semanticweb.owlapi.model.OWLDataProperty instance)
getDataProperties().getLink( semantic)
instance
- the data dataProperty to look for its values.Null
if is not available.default org.semanticweb.owlapi.model.OWLLiteral getLiteralFromDataProperty(java.lang.String dataPropertyName)
getDataProperties().getLink( getOntology().getOWLDataProperty( semanticName)
dataPropertyName
- the name of the data dataProperty to look for its values.Null
if is not available.default Axiom.EntitySet<org.semanticweb.owlapi.model.OWLLiteral> getLiteralsFromDataProperty(org.semanticweb.owlapi.model.OWLDataProperty instance)
getDataProperties().getLinks( semantic)
instance
- the data dataProperty to look for its values.empty
HashSet
if is not available.default Axiom.EntitySet<org.semanticweb.owlapi.model.OWLLiteral> getLiteralsFromDataProperty(java.lang.String dataPropertyName)
getDataProperties().getLinks( getOntology().getOWLDataProperty( semanticName))
dataPropertyName
- the name of the data dataProperty to look for its values.empty
HashSet
if is not available.default DataLinkSet queryDataProperties()
Individual.DataLink
this
Descriptor
.queryDataProperties
in interface Individual.DataLink<it.emarolab.amor.owlInterface.OWLReferences,org.semanticweb.owlapi.model.OWLNamedIndividual,DataLinks,org.semanticweb.owlapi.model.OWLDataProperty,D extends DataPropertyExpression>
ExpressionEntitySet
contained the data properties of Axiom.Descriptor.getInstance()
;
into the OWL structure.default java.util.List<Axiom.MappingIntent> writeAxioms()
Axiom.Descriptor
Axiom.EntitySet
(or Axiom.ExpressionEntitySet
)
by synchronizing the OWL representation with the internal state of the descriptor, such that they are equal.
It is based on EntitySet#synchroniseTo(EntitySet)
.writeAxioms
in interface Axiom.Descriptor<it.emarolab.amor.owlInterface.OWLReferences,org.semanticweb.owlapi.model.OWLNamedIndividual>
Axiom.MappingIntent.getOntologyChanges()
field
initialised (i.e.: OWLOntologyChange
).