public abstract static class MORAxioms.SemanticAxiomsBase<X extends Semantic.SemanticAxiom<S,A>,S extends org.semanticweb.owlapi.model.OWLProperty,A> extends MORAxioms.AxiomsBase<X> implements Semantic.SemanticAxioms<X,A>
Semantic.SemanticAxioms
.
It implements common methods to be used to manage a set of Axioms.
In particular, it define the method of adding and removing set of
data or object properties values with the same semantic. Also,
it implements helping way to obtain the actual value of a property.
Constructors, and common way to manage an HashSet
are based
on MORAxioms.AxiomsBase
.
Semantic.Axioms.SynchronisationIntent<E>
Semantic.SemanticAxioms.SynchronisationMultiIntent<E extends Semantic.SemanticAxiom<?,Y>,Y>, Semantic.SemanticAxioms.SynchroniseContainedIntent<F extends Semantic.SemanticAxiom<?,Y>,Y>
singleton
Constructor and Description |
---|
SemanticAxiomsBase() |
SemanticAxiomsBase(int initialCapacity) |
SemanticAxiomsBase(int initialCapacity,
float loadFactor) |
SemanticAxiomsBase(java.util.Collection<? extends X> c) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(X dataSemantic)
This method modifies the standard adding procedure to a set
by looking if the
Semantic.SemanticAxioms already contains
the semantic (i.e.: data or object property) specified in the
input parameter. |
A |
getLink(S semantic)
Searches in the
Semantic.SemanticAxiom for the given property and
returns one of its values. |
Semantic.Axioms<A> |
getLinks(S semantic)
Searches in the
Semantic.SemanticAxiom for the given property and
returns all its values. |
boolean |
remove(java.lang.Object o)
It removes an entri from the
Semantic.SemanticAxioms . |
java.lang.String |
toString() |
addAll, containsAll, retainAll, toArray, toArray
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
clear, clone, contains, isEmpty, iterator, size, spliterator
isSingleton, setSingleton
finalize, getClass, notify, notifyAll, wait, wait, wait
isSingleton, setSingleton
synchroniseFrom, synchroniseTo
public SemanticAxiomsBase()
public SemanticAxiomsBase(int initialCapacity)
public SemanticAxiomsBase(int initialCapacity, float loadFactor)
public SemanticAxiomsBase(java.util.Collection<? extends X> c)
public Semantic.Axioms<A> getLinks(S semantic)
Semantic.SemanticAxiom
for the given property and
returns all its values.semantic
- the properties to look for.empty
HashSet
if the values is not available.public A getLink(S semantic)
Semantic.SemanticAxiom
for the given property and
returns one of its values. It should be used with a Semantic.Axioms.isSingleton()
axioms, since other values are ignored.semantic
- the properties to look for.null
if the values is not available.public boolean add(X dataSemantic)
Semantic.SemanticAxioms
already contains
the semantic (i.e.: data or object property) specified in the
input parameter. If this is true the given value are added
to the related Semantic.SemanticAxiom.getValues()
. Otherwise
the given object is added as a new element.
Note that if the input parameter describes a singleton
object all the previous contents related to that semantic
are deleted.add
in interface java.util.Collection<X extends Semantic.SemanticAxiom<S,A>>
add
in class java.util.HashSet<X extends Semantic.SemanticAxiom<S,A>>
dataSemantic
- the new semantic to add.true
if this collection changed as a result of the call.public boolean remove(java.lang.Object o)
Semantic.SemanticAxioms
.
The input parameter cna be ether the object describing the
Semantic.SemanticAxiom
with a specific semantic and values
to be removed. Or it can a property. For the latter,
all the values are deleted.remove
in interface java.util.Collection<X extends Semantic.SemanticAxiom<S,A>>
remove
in class java.util.HashSet<X extends Semantic.SemanticAxiom<S,A>>
o
- the object to be removed.true
if the set contained the specified element.public java.lang.String toString()
toString
in class MORAxioms.AxiomsBase<X extends Semantic.SemanticAxiom<S,A>>