Class MappingElementRepresentant
java.lang.Object
de.mid.innovator.m2msdk.model.log.MappingElementRepresentant
- All Implemented Interfaces:
MappingElementIF,Serializable,Comparable<MappingElementRepresentant>
public class MappingElementRepresentant
extends Object
implements MappingElementIF, Comparable<MappingElementRepresentant>
Client side proxy of a mapping element. This class gets all the needed
data serialized from a mapping element to show it to the user as a part of
the log model.
- Version:
- 11.4.1
- Author:
- jmback
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneIndexed(int virtualIndex) Creates from the original Element an cloned indexed elementintstatic List<MappingElementRepresentant> create(MappingElementList iList) createElement(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).Get the children of the element.Get the display name of element's type.getElementProperty(ExpressionContext expressionContext, 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, PropertyDescriptorList subDescriptors) Return the element associated.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()setElementProperty(PropertyDescriptorIF descriptor, PropertyValue value) Set the property.toString()
-
Constructor Details
-
MappingElementRepresentant
-
-
Method Details
-
create
-
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
-
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.
-
getChildren
Description copied from interface:MappingElementIFGet the children of the element.- Specified by:
getChildrenin interfaceMappingElementIF- Returns:
- the children elements
-
getDisplayType
Description copied from interface:MappingElementIFGet the display name of element's type.- Specified by:
getDisplayTypein interfaceMappingElementIF- Returns:
- the display name of elements type
-
getElementProperty
public PropertyValue getElementProperty(ExpressionContext expressionContext, PropertyDescriptorIF descriptor) throws M2MException, RemoteException Description copied from interface:MappingElementIFGet the property value for a property descriptor.- Specified by:
getElementPropertyin interfaceMappingElementIF- Parameters:
expressionContext- TODOdescriptor-- Returns:
- the elements property described by the PropertyDescriptor
- 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
-
getMetaModel
- Specified by:
getMetaModelin interfaceMappingElementIF- Throws:
M2MExceptionRemoteException
-
getName
Description copied from interface:MappingElementIFGet the name.- Specified by:
getNamein interfaceMappingElementIF- Returns:
- the elements name
-
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
-
getOwner
Description copied from interface:MappingElementIFGet the owner of the element.- Specified by:
getOwnerin interfaceMappingElementIF- Returns:
- the owning element
-
getOwnerTransitive
Description copied from interface:MappingElementIFGet transitive owner up to a sentinel.- Specified by:
getOwnerTransitivein interfaceMappingElementIF- Parameters:
sentinel- maybe null- Returns:
- gets owner transitive
-
getPath
Description copied from interface:MappingElementIFGet the path of the element inside the model.- Specified by:
getPathin interfaceMappingElementIF- Returns:
- the elements path
-
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
-
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
-
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
-
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
-
toString
-
hashCode
public int hashCode() -
delete
Description copied from interface:MappingElementIFDelete the mapping element.- Specified by:
deletein interfaceMappingElementIF- Throws:
M2MExceptionRemoteException
-
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
-
getBulkInfo
- Specified by:
getBulkInfoin interfaceMappingElementIF
-
getBulkInfoSpecialist
- Specified by:
getBulkInfoSpecialistin interfaceMappingElementIF
-
compareTo
- Specified by:
compareToin interfaceComparable<MappingElementRepresentant>
-