Interface InstanceEnumerationPredicate
- All Superinterfaces:
InstancePredicate
- All Known Subinterfaces:
InstanceTaxonomyOrderPredicate
,InstanceTotalOrderPredicate
,InstanceValueOrderPredicate
- All Known Implementing Classes:
InstanceEnumerationPredicateImpl
,InstanceTaxonomyOrderPredicateImpl
,InstanceTotalOrderPredicateImpl
,InstanceValueOrderPredicateImpl
AtomicClass
. Additionally, these values can be
ordered as a taxonomy or as a total order.
To add value to the predicate use the addValue(AtomicObject)
method and to remove a
value use the removeValue(AtomicObject)
method. Both methods do not propagate the value
to including value orders. Consequently, an inconsistency can occur between the predicate and the
value orders that should be avoided.
Furthermore, both methods using AtomicObject
s
as values that can not be of the same type because current
AtomicClass
is not finished and cannot be
instantiated. Therefore, the AtomicObject
can
be an instance of the system super class (@link
de.uni_trier.wi2.procake.data.model.DataClass#getSystemSuperClass()}.
Another constraint that must be fulfilled is that the values of the predicate must be a sub set or equal of the values of the predicate of the super class. Of course, this only true if the super class contains a predicate.
Another constraint that must be fulfilled is that the values of the predicate must be a sub set or equal of the values of the predicate of the super class. Of course, this only true if the super class contains a predicate.
- Author:
- Rainer Maximini
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue
(AtomicObject newValue) Adds the value to the value set.getValues.boolean
hasValueOrder.boolean
Specifies whether the values of the superclass are to be inheritedvoid
removeValue
(AtomicObject value) Removes the object from the value set if the value exists.void
setInheritance
(boolean value) Updates the inheritance value to true or falsevoid
updateValue
(AtomicObject oldValue, AtomicObject newValue) Updates the value in this predicate as well as in all including orders.Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.InstancePredicate
getAtomicClass, holdsFor, isEnumerationPredicate, isIntervalPredicate, isOntologyOrderPredicate, isTaxonomyOrderPredicate, isTotalOrderPredicate
-
Field Details
-
LOG_SUPER_PREDICATE_MUST_BE_DEFINED_IN_INHERITED_PREDICATE
- See Also:
-
-
Method Details
-
addValue
Adds the value to the value set. The add command is not propagated to including orders.- Parameters:
newValue
- aAtomicObject
object
-
getValues
List<AtomicObject> getValues()getValues.
- Returns:
- An array of all values in this predicate.
-
hasValueOrder
boolean hasValueOrder()hasValueOrder.
- Returns:
true
if a value order is defined, otherwisefalse
- See Also:
-
removeValue
Removes the object from the value set if the value exists. The remove command is not propagated to including orders.- Parameters:
value
- aAtomicObject
object
-
updateValue
Updates the value in this predicate as well as in all including orders. The update is only be done if the old value exists and the new one not.In opposite to
addValue(AtomicObject)
andremoveValue(AtomicObject)
this method propagates the update to all included value orders.- Parameters:
oldValue
- aAtomicObject
objectnewValue
- aAtomicObject
object
-
isInherited
boolean isInherited()Specifies whether the values of the superclass are to be inherited- Returns:
false
by default
-
setInheritance
void setInheritance(boolean value) Updates the inheritance value to true or false- Parameters:
value
-
-