Interface WorkModelInterface
- All Superinterfaces:
Remote,Serializable
- All Known Implementing Classes:
WorkModel
Interface for work models. A work model is a part of the source or the target
model. It is separated in stores.
- Version:
- 11.2.1
- Author:
- jmback
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddElements(ExtensionStore iStore, MappingElementList iList) Add uniquely the elements to this work model in the given store.voidclearElements(ExtensionStore iStore) Clear the elements in this work model in the given store.org.jdom2.DocumentgetDocument(ExtensionStore iStore, int iChunk) Get all model elements that are in this work model and in the specified store.getElements(ExtensionStore iStore) Get all model elements that are in this work model and in the specified store.getElementsAsUri(ExtensionStore iStore) Get all model elements that are in this work model and in the specified store.Get mapping model of this work model.Get meta model of work model.getRole()Get the role of the work model.getUnique(MappingElementIF iElement) Get the unique mapping element by checking its hash code.voidinitialize(MappingModel model) voidinitialize(org.jdom2.Document document) Initialize the work model based on a given Document.voidinitialize(org.jdom2.Document iDoc, ExtensionStore store, String nameElement) Initialize the work model based on a given Document.booleanisPassiveSelectedElement(MappingElementIF iElement) Is the element in the passive selection of this work model.voidremoveElements(ExtensionStore iStore, MappingElementList iList) Remove the elements from this work model in the given store.voidsetElements(ExtensionStore iStore, MappingElementList elements) voidsetMetaModel(String iMetaModel) Set meta model of work model.
-
Method Details
-
initialize
Initialize the work model based on a given Document.- Parameters:
document- containing the mapping elements- Throws:
AbortExceptionM2MExceptionRemoteException
-
initialize
void initialize(org.jdom2.Document iDoc, ExtensionStore store, String nameElement) throws M2MException, RemoteException Initialize the work model based on a given Document.- Parameters:
iDoc- containing the mapping elementsstore- store to read tonameElement- name of the element to read- Throws:
M2MExceptionRemoteException
-
getDocument
org.jdom2.Document getDocument(ExtensionStore iStore, int iChunk) throws M2MException, RemoteException Get all model elements that are in this work model and in the specified store.- Parameters:
iStore- store within the work model. If no store is specified, all elements are returned.iChunk- chunk number to get a specific chunk. Use zero (0) to get all model elements in chunks and minus one (-1) to get all model elements not chunked.- Returns:
- XML with URI of all model elements. If the number of model elements is to large, you will get chunks instead.
- Throws:
M2MExceptionRemoteException- error in communication with remote server
-
getElements
Get all model elements that are in this work model and in the specified store.- Parameters:
iStore- store within the work model.- Returns:
- list of model elements
- Throws:
M2MExceptionRemoteException- error in communication with remote server
-
getElementsAsUri
Get all model elements that are in this work model and in the specified store.- Parameters:
iStore- store within the work model.- Returns:
- comma separated list of URIs of all model elements
- Throws:
M2MExceptionRemoteException- error in communication with remote server
-
addElements
void addElements(ExtensionStore iStore, MappingElementList iList) throws M2MException, RemoteException Add uniquely the elements to this work model in the given store.- Parameters:
iStore- specified storeiList- list of model elements- Throws:
M2MExceptionRemoteException- error in communication with remote server
-
removeElements
void removeElements(ExtensionStore iStore, MappingElementList iList) throws M2MException, RemoteException Remove the elements from this work model in the given store.- Parameters:
iStore- specified storeiList- list of model elements- Throws:
M2MExceptionRemoteException- error in communication with remote server
-
clearElements
Clear the elements in this work model in the given store.- Parameters:
iStore- specified store- Throws:
M2MExceptionRemoteException
-
getMetaModel
Get meta model of work model.- Returns:
- meta model
- Throws:
RemoteException- error in communication with remote server
-
setMetaModel
Set meta model of work model.- Parameters:
iMetaModel- name of meta model- Throws:
RemoteException- error in communication with remote serverM2MException
-
getMappingModel
Get mapping model of this work model.- Returns:
- mapping model containing the elements of this work model
- Throws:
AbortException- critical errorM2MExceptionRemoteExceptionRemoteException- error in communication with remote server
-
isPassiveSelectedElement
Is the element in the passive selection of this work model.- Parameters:
iElement-- Returns:
- true, if the element is in passive, but not in active selection.
- Throws:
RemoteException
-
getRole
Get the role of the work model.- Returns:
- source or target
- Throws:
RemoteException
-
setElements
-
getExtensionStore
ExtensionStoreElements getExtensionStore() -
initialize
- Throws:
RemoteExceptionM2MException
-
getUnique
Get the unique mapping element by checking its hash code.- Parameters:
iElement- mapping element to check- Returns:
- same mapping element or one with same hash
- Throws:
RemoteExceptionM2MException
-