Class MappingElementBaseImpl
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.MappingElementBaseImpl
- All Implemented Interfaces:
MappingElementIF,Serializable
- Direct Known Subclasses:
MappingElementDummy,MappingElementInnovator,MappingElementJavaBeans,MappingElementText,MappingElementVirtualIndexed
Generic implementation of a mapping element. Extend this class to implement
interface MappingElementIF for your meta model. You have to override the
method toString().
- Version:
- 10.1.1
- Author:
- jmback
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneIndexed(int virtualIndex) Creates from the original Element an cloned indexed elementcreateElement(ModelTransformationStepIF step, CreateDescriptorIF createDescriptor, MappingAnchor anchor) Create a new element in the same model as this element.voiddelete()Delete the mapping element.booleanequals(MappingElementIF obj) Compare two mapping elements (by hash).booleanGet the display name of element's type.getElementProperty(ExpressionContext ec, PropertyDescriptorIF descriptor) Get the property value for a property descriptor.getHash()Get the hash value of the element inside the mapping model.getIcon()Get the icon of the element.getModel()Get the model of the element.getName()Get the name.getObject(ExpressionContext expressionContext, String descriptor) getObject(ExpressionContext expressionContext, String descriptor, PropertyDescriptorList subDescriptors) Return the element associated.getObjects(ExpressionContext expressionContext, String descriptor) getObjects(ExpressionContext expressionContext, String descriptor, PropertyDescriptorList subDescriptors) Return the element associated.getOwner()Get the owner of the element.getOwnerTransitive(MappingElementIF sentinel) Get transitive owner up to a sentinel.getPath()Get the path of the element inside the model.getProperty(ExpressionContext expressionContext, String descriptor) Return the property's value.getProperty(ExpressionContext expressionContext, String descriptor, PropertyDescriptorList subDescriptors) Return the property.Get the targets of the element.getType()Get the name of element's type.getURI()Get the URI.inthashCode()static booleanbooleansetElementProperty(PropertyDescriptorIF descriptor, PropertyValue value) Set the property.voidsetVirtualIndex(int index) Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.mid.innovator.m2msdk.model.transformation.interfaces.MappingElementIF
getChildren, getMetaModel
-
Constructor Details
-
MappingElementBaseImpl
-
-
Method Details
-
isNotNull
-
getSession
-
getObject
public MappingElementIF getObject(ExpressionContext expressionContext, String descriptor) throws M2MException, RemoteException - Throws:
M2MExceptionRemoteException
-
getObjects
public MappingElementList getObjects(ExpressionContext expressionContext, String descriptor) throws M2MException, RemoteException - Throws:
M2MExceptionRemoteException
-
getObject
public MappingElementIF getObject(ExpressionContext expressionContext, String descriptor, PropertyDescriptorList subDescriptors) throws M2MException, RemoteException Description copied from interface:MappingElementIFReturn the element associated.- Specified by:
getObjectin interfaceMappingElementIF- Parameters:
expressionContext- the context in which the navigatable object should be calculated.descriptor- navigation directivesubDescriptors- sub descriptors or parameters of the navigation directive- Returns:
- Element, if found
- Throws:
M2MExceptionRemoteException
-
getObjects
public MappingElementList getObjects(ExpressionContext expressionContext, String descriptor, PropertyDescriptorList subDescriptors) throws M2MException, RemoteException Description copied from interface:MappingElementIFReturn the element associated.- Specified by:
getObjectsin interfaceMappingElementIF- Parameters:
expressionContext- the context in which the related objects should be calculated.descriptor- navigation directivesubDescriptors- sub descriptors or parameters of the navigation directive- Returns:
- List of Elements
- Throws:
M2MExceptionRemoteException
-
getProperty
public PropertyValue getProperty(ExpressionContext expressionContext, String descriptor, PropertyDescriptorList subDescriptors) throws M2MException, RemoteException Description copied from interface:MappingElementIFReturn the property.- Specified by:
getPropertyin interfaceMappingElementIF- Parameters:
expressionContext- TODOdescriptor- property namesubDescriptors- optional list of subdescriptors- Returns:
- primitive, if found
- Throws:
M2MExceptionRemoteException
-
getProperty
public PropertyValue getProperty(ExpressionContext expressionContext, String descriptor) throws M2MException, RemoteException Description copied from interface:MappingElementIFReturn the property's value. Remark: This is the property of type "Property".- Specified by:
getPropertyin interfaceMappingElementIF- Parameters:
expressionContext- TODOdescriptor- property name- Returns:
- primitive, if found
- Throws:
M2MExceptionRemoteException
-
getOwnerTransitive
Description copied from interface:MappingElementIFGet transitive owner up to a sentinel.- Specified by:
getOwnerTransitivein interfaceMappingElementIF- Parameters:
sentinel- maybe null- Returns:
- gets owner transitive
-
getElementProperty
public PropertyValue getElementProperty(ExpressionContext ec, PropertyDescriptorIF descriptor) throws M2MException, RemoteException Description copied from interface:MappingElementIFGet the property value for a property descriptor.- Specified by:
getElementPropertyin interfaceMappingElementIF- Parameters:
ec- TODOdescriptor-- Returns:
- the elements property described by the PropertyDescriptor
- Throws:
M2MExceptionRemoteException
-
hashCode
public int hashCode() -
equals
Description copied from interface:MappingElementIFCompare two mapping elements (by hash).- Specified by:
equalsin interfaceMappingElementIF- Parameters:
obj- other mapping element- Returns:
- true, if same hash code.
-
equals
-
getDisplayType
Description copied from interface:MappingElementIFGet the display name of element's type.- Specified by:
getDisplayTypein interfaceMappingElementIF- Returns:
- the display name of elements type
- Throws:
RemoteException
-
setElementProperty
public OperationResult setElementProperty(PropertyDescriptorIF descriptor, PropertyValue value) throws M2MException, RemoteException Description copied from interface:MappingElementIFSet the property.- Specified by:
setElementPropertyin interfaceMappingElementIF- Parameters:
descriptor- property namevalue-- Returns:
- false on error
- Throws:
M2MExceptionRemoteException
-
createElement
public MappingElementIF createElement(ModelTransformationStepIF step, CreateDescriptorIF createDescriptor, MappingAnchor anchor) throws M2MException, RemoteException Description copied from interface:MappingElementIFCreate a new element in the same model as this element.- Specified by:
createElementin interfaceMappingElementIF- Parameters:
createDescriptor- description what to createanchor- additional anchor elements for the new element- Returns:
- a newly created element with the current element as owner spawned through the additional target elements
- Throws:
M2MExceptionRemoteException
-
delete
Description copied from interface:MappingElementIFDelete the mapping element.- Specified by:
deletein interfaceMappingElementIF- Throws:
M2MExceptionRemoteException
-
getHash
Description copied from interface:MappingElementIFGet the hash value of the element inside the mapping model. Equal elements have same hash. Different elements have different hash.- Specified by:
getHashin interfaceMappingElementIF- Returns:
- the elements hash value unique within one model.
-
getIcon
Description copied from interface:MappingElementIFGet the icon of the element. Either provide the fully qualified file name or the name in the classpath or the file name for Innovator bitmaps.- Specified by:
getIconin interfaceMappingElementIF- Returns:
- the name of the elements icon, if exists
-
getModel
Description copied from interface:MappingElementIFGet the model of the element.- Specified by:
getModelin interfaceMappingElementIF- Returns:
- the elements model
- Throws:
M2MExceptionRemoteException
-
getName
Description copied from interface:MappingElementIFGet the name.- Specified by:
getNamein interfaceMappingElementIF- Returns:
- the elements name
-
getOwner
Description copied from interface:MappingElementIFGet the owner of the element.- Specified by:
getOwnerin interfaceMappingElementIF- Returns:
- the owning element
-
getPath
Description copied from interface:MappingElementIFGet the path of the element inside the model.- Specified by:
getPathin interfaceMappingElementIF- Returns:
- the elements path
-
getTargets
Description copied from interface:MappingElementIFGet the targets of the element.- Specified by:
getTargetsin interfaceMappingElementIF- Returns:
- the target elements ( e.g. dependency or relationship target ) otherwise returns nothing
-
getType
Description copied from interface:MappingElementIFGet the name of element's type.- Specified by:
getTypein interfaceMappingElementIF- Returns:
- the name of elements type
-
getURI
Description copied from interface:MappingElementIFGet the URI. The URI can be used to retrieve an element from the mapping meta model.- Specified by:
getURIin interfaceMappingElementIF- Returns:
- URI of the element
-
isVirtualIndexed
public boolean isVirtualIndexed() -
getVirtualIndex
-
setVirtualIndex
public void setVirtualIndex(int index) -
cloneIndexed
Description copied from interface:MappingElementIFCreates from the original Element an cloned indexed element- Specified by:
cloneIndexedin interfaceMappingElementIF- Parameters:
virtualIndex-- Returns:
- a copy of the mapping element with an index
-
getBulkInfoSpecialist
- Specified by:
getBulkInfoSpecialistin interfaceMappingElementIF
-
getBulkInfo
- Specified by:
getBulkInfoin interfaceMappingElementIF- Throws:
RemoteException
-