Class URIClassImpl
- All Implemented Interfaces:
AtomicClass
,URIClass
,DataClass
,PropertyHandler
URIClass
.- Author:
- Tobias Dahlem
-
Field Summary
Fields inherited from class de.uni_trier.wi2.procake.data.model.base.impl.AtomicClassImpl
defaultValue
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.AtomicClass
CLASS_NAME, LOG_CANNOT_HANDLE_NATIVE_VALUES, LOG_INTERVAL_BORDERS_INCOMPATIBLE, LOG_PARSING_NATIVE_VALUE, LOG_UNKNOWN_NATIVE_VALUE, LOG_UNKNOWN_VALUE_IN_ORDER, LOG_VALUE_RANGE_INCOMPATIBLE
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
CLASS_NAME, LOG_ABSTRACT_CLASS_NOT_INSTANTIABLE, LOG_ABSTRACT_SYSTEM_SUBCLASS_CREATION_FAILED, LOG_CLASS_NOT_EDITABLE, LOG_CLASS_NOT_INSTANTIABLE, LOG_EDITABLE_CLASS_NOT_INSTANTIABLE, LOG_FINISH_EDIT_FAILED, LOG_GET_SUPERCLASSES_FAILED, LOG_SUBCLASS_CREATION_FAILED
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.URIClass
CLASS_NAME, LOG_ONTOLOGY_NAME_NOT_FOUND
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method only checks if it is possible to finish the class and does not change any internal status.createSubclass
(String name) This method creates none system sub classes that are defined by the user.protected void
createSystemSubClasses.Class<? extends DataObject>
getObjectClass.getOntologyName.boolean
isURI()
isURI.nativeFromString
(String value) Converts a String to the native object of the correspondingAtomicObject
nativeToString
(Object value) Converts a native object of the correspondingAtomicObject
to a String.Creates a newDataObject
and initialize it.Creates a newURIObject
.void
setOntologyName
(String ontologyName) setOntologyName.Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.AtomicClassImpl
addAtomicObject, createNewInstanceEnumerationPredicate, createNewInstanceIntervalPredicate, createNewInstanceOntologyOrderPredicate, createNewInstanceTaxonomyOrderPredicate, createNewInstanceTotalOrderPredicate, finishEditing, getAtomicObjects, getDefaultValue, getInstanceEnumerationPredicate, getInstanceIntervalPredicate, getInstanceOntologyOrderPredicate, getInstancePredicate, getInstanceTaxonomyOrderPredicate, getInstanceTotalOrderPredicate, getInternalDefaultValue, getNativeValueFromPredicate, hasEnumerationRange, hasIntervalRange, hasTaxonomyRange, hasTotalOrderRange, isAtomic, removeInstancePredicate, setDefaultValue
Methods inherited from class de.uni_trier.wi2.procake.data.model.impl.AbstractDataClassImpl
addProperty, addProperty, addSubclass, addSubClass, beSystemClass, checkEditability, checkInstantiability, clearSubClasses, createSystemClassTree, getAllProperties, getAllPropertyNodes, getModel, getName, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, getRootClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, hasProperties, includeClass, isAbstract, isAdaptationCase, isAggregate, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTAdaptationQuery, isNESTAdaptationRule, isNESTAdaptationSession, isNESTAdaptationStep, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTQuery, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isVoid, isWorkflow, isWorkflowCase, isWorkflowItem, removeProperty, removeSubclass, removeSubClass, setAbstract, setName, setPropertyRootNode, setSuperClass, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.AtomicClass
addAtomicObject, createNewInstanceEnumerationPredicate, createNewInstanceIntervalPredicate, createNewInstanceOntologyOrderPredicate, createNewInstanceTaxonomyOrderPredicate, createNewInstanceTotalOrderPredicate, getAtomicObjects, getDefaultValue, getInstanceEnumerationPredicate, getInstanceIntervalPredicate, getInstanceOntologyOrderPredicate, getInstancePredicate, getInstanceTaxonomyOrderPredicate, getInstanceTotalOrderPredicate, hasEnumerationRange, hasIntervalRange, hasTaxonomyRange, hasTotalOrderRange, removeInstancePredicate, setDefaultValue
Methods inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
addSubclass, checkInstantiability, finishEditing, getModel, getName, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, includeClass, isAbstract, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isVoid, isWorkflow, isWorkflowItem, removeSubclass, setAbstract, setName
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty, setPropertyRootNode
-
Constructor Details
-
URIClassImpl
public URIClassImpl()Constructor for URIClassImpl.
-
-
Method Details
-
createSystemSubClasses
protected void createSystemSubClasses()createSystemSubClasses.
- Overrides:
createSystemSubClasses
in classAtomicClassImpl
-
isURI
public boolean isURI()isURI.
- Specified by:
isURI
in interfaceDataClass
- Overrides:
isURI
in classAbstractDataClassImpl
- Returns:
true
if the data class can be casted toURIClass
-
newObject
Creates a newDataObject
and initialize it.DataObject
s can not be created directly because they depend on theDataClass
that defines the object.The creation of a new object is only be possible if
DataClass.checkInstantiability()
throws no exception.- Specified by:
newObject
in interfaceDataClass
- Overrides:
newObject
in classAbstractDataClassImpl
- Returns:
- a new
DataObject
- Throws:
IllegalInstantiationException
- is thrown if it is not possible to create an object this data class
-
getObjectClass
getObjectClass.
- Specified by:
getObjectClass
in interfaceDataClass
- Overrides:
getObjectClass
in classAbstractDataClassImpl
- Returns:
- Class of the corresponding data object
-
newURIObject
Creates a newURIObject
. This is the same likeDataClass.newObject()
but returns aURIObject
instead of aDataObject
.- Specified by:
newURIObject
in interfaceURIClass
- Returns:
- a new
URIObject
- Throws:
IllegalInstantiationException
- See Also:
-
getOntologyName
getOntologyName.
- Specified by:
getOntologyName
in interfaceURIClass
- Returns:
- a
String
object
-
setOntologyName
setOntologyName.
- Specified by:
setOntologyName
in interfaceURIClass
- Parameters:
ontologyName
- aString
object- Throws:
ProCAKENameNotFoundException
-
createSubclass
This method creates none system sub classes that are defined by the user. It is not possible to create sub-classes for abstract system classes. In that case aIllegalInstantiationException
will be thrown.Each data class has a unique name. This name must be given to this method. If the name already exists, a
NameAlreadyExistsException
will be thrown. The name can be used to access the data class from the data model by using the methodModel.getClass(String)
.The class is automatically added to the model. To remove the class again you must use the method
Model.removeClass(String)
.- Specified by:
createSubclass
in interfaceDataClass
- Overrides:
createSubclass
in classAbstractDataClassImpl
- Parameters:
name
- The uniqe name of the new sub class.- Returns:
- The new sub class.
- See Also:
-
checkFinishEditing
This method only checks if it is possible to finish the class and does not change any internal status. To initialize internal caches use the methodAbstractDataClassImpl.finishEditing()
.Sub classes are allowed to overwrite this method with own code but they must follow some instructions. It is very important to call the
AbstractDataClassImpl.checkFinishEditing()
method in the super class. This can be done before or after the own check methods. But it is advisable to implement the methods like inAbstractDataClassImpl.finishEditing()
where first the super class is called. For example:protected void checkFinishEditing() throws ClassHierarchyConsistencyException { super.checkFinishEditing(); // put your code here }
- Overrides:
checkFinishEditing
in classAtomicClassImpl
- Throws:
ClassHierarchyConsistencyException
- See Also:
-
nativeFromString
Converts a String to the native object of the correspondingAtomicObject
- Specified by:
nativeFromString
in interfaceAtomicClass
- Overrides:
nativeFromString
in classAtomicClassImpl
- Parameters:
value
- The String representation of the value- Returns:
- a new Object representing the
value
- Throws:
InvalidNativeValueException
-
nativeToString
Converts a native object of the correspondingAtomicObject
to a String.- Specified by:
nativeToString
in interfaceAtomicClass
- Overrides:
nativeToString
in classAtomicClassImpl
- Parameters:
value
- The native object that should be converted.- Returns:
- a String representation of the
value
- Throws:
InvalidNativeValueException
-