com.kuka.roboticsAPI.persistenceModel
Class XmlApplicationDataSource

java.lang.Object
  extended by com.kuka.roboticsAPI.persistenceModel.XmlApplicationDataSource
All Implemented Interfaces:
IApplicationDataSource, IDataSource, IFileStateListener, ISaveableApplicationDataSource

public class XmlApplicationDataSource
extends Object
implements ISaveableApplicationDataSource, IFileStateListener

This data source is able to load frames and tools from a Xml file.

Supported xml file format versions are 2 and 3. This data source reads data of all supported formats and converts it to the newest format.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Field Summary
static int CURRENT_DATA_VERSION
          This is the current data format version.
static String DEFAULT_DATAFILE_NAME
          This is the default config file name.
static String EMPTY_DATAFILE_CONTENT
          This is the xml content for an empty data file.
static String ROBOTICS_API_DATA_ELEMENT_NAME
          This is the xml root element name of the data file.
 
Constructor Summary
XmlApplicationDataSource()
          Creates a new instance of XmlApplicationDataSource.
 
Method Summary
 void addApplicationDataChangedListener(IApplicationDataChanged listener)
          Registers the given listener for application data changes.
 ObjectFrame addFrame(ObjectFrame parent)
          Creates an adds a new frame to the data source.
 void addFrameToTemplate(Object rootTemplate, FrameTemplate addedTemplate)
          Adds a FrameTemplate to the given TemplateElement if possible.
 void addFrameToTemplate(Object rootTemplate, FrameTemplate addedTemplate, boolean doSave)
          Adds a FrameTemplate to the given TemplateElement if possible.
 void addObjectTemplate(TemplateElement templateElement)
          Adds an object template to the data source.
 void addProcessDataListener(IProcessDataListener processDataListener)
          Adds a the given process data listener to all existing process data elements.
 void addTool(ToolData tool)
          Adds the given tool.
 void addUserData(UserData userData)
          Adds the given user data.
 FrameTemplate applyFrameTemplateMeasurement(FrameTemplate frameTemplate, Transformation newTransformation, MeasurementType measurementType, MeasurementMethod measurementMethod, Double calculationError, boolean doSave)
           
 void changeFrameTransformation(ObjectFrame frameToChange, ITransformation newTransformation)
          Changes the frame that belongs to the data source.
 void close()
          Closes the data source.
protected  void closeInternal()
          Closes the data source.
protected  void dispose()
          Dispose method closes file.
 void fileStateChanged(FileWatchState state)
          Called when a file changed.
 void forceLoadFile()
          Forces the Filewatcher to command a reload of the file.
 RoboticsAPIContext getContext()
          Gets the context for this data source.
 URL getDataFile()
          Gets the url of the data file used by this data source.
 String getErrorMessage()
           
 Map<String,Object> getFrameParameters(String name)
          Gets the writable map with the parameters of the frame with the specified name.
 String getName()
          Gets the name of this data source.
 Collection<ToolTemplate> getToolTemplates()
          Gets all the tool templates of the data source.
 boolean hasError()
          Returns true if there was an exception during load.
 boolean isOpen()
          Indicates if this data source is opened.
 boolean isReadOnly()
          Indicates if this data source is read only.
 Collection<? extends ObjectFrame> loadAllFrames()
          Gets all frames known to the data source.
 Collection<IProcessData> loadAllProcessData()
          Gets all process data elements known to the data source., The process data will not be in any specific order.
 Collection<? extends TemplateElement> loadAllTemplates()
          Gets all templates known to the data source.
 Collection<ToolData> loadAllToolDatas()
          Gets all tool data known to the data source.
 Collection<UserData> loadAllUserData()
          Gets all user data keys known to the data source.
 ObjectFrame loadFrame(String path)
          Loads a frame with the specified path.
 ObjectFrame loadFrameById(String id)
          Loads a frame with the specified unique id.
 IProcessData loadProcessData(String key)
          Loads a process data object with the specified identifier.
 TemplateElement loadTemplate(String name)
          Loads a template with the specified name.
 ToolData loadToolData(String name)
          Loads tool data with the specified name.
 UserData loadUserData(String name)
          Gets the user data stored under the given name.
static int loadVersion(Document doc)
          Reads the value of the version attribute from the given document.
 void moveFrame(AbstractFrame frameToMove, ObjectFrame newParent)
          Moves the given frame to the given new parent.
 void moveFrameToElement(Object source, Object target, FrameTemplate frameToMove)
          Move the given frame element from source to target elements.
 void moveFrameToElement(Object source, Object target, FrameTemplate frameToMove, boolean doSave)
          Move the given frame element from source to target elements.
 void open()
          Opens the data source.
 void open(String dataFileName)
          Opens the data source with the specified data file.
protected  void openInternal()
          Opens the data source.
 void persistExternalDataChanges()
          Allows proper persistence handling of data changes that have been done by other classes.
 void removeApplicationDataChangedListener(IApplicationDataChanged listener)
          Unregisters the given listener for application data changes.
 void removeFrame(ObjectFrame frame)
          Removes the given frame.
 void removeFrameFromTemplate(Object rootTemplate, FrameTemplate removedTemplate)
          Removes a FrameTemplate from the given FrameTemplate if possible.
 void removeFrameFromTemplate(Object rootTemplate, FrameTemplate removedTemplate, boolean doSave)
          Removes a FrameTemplate from the given FrameTemplate if possible.
 void removeObjectTemplate(TemplateElement templateElement)
          Removes an object template from the data source.
 void removeTool(ToolData tool)
          Removes the given tool.
 void removeUserData(UserData userData)
          Removes the user data which belongs to the given key.
 void renameFrame(AbstractFrame frameToChange, String newName)
          Changes the name of the given frame to newName.
protected  FrameTemplate renameFrameTemplate(FrameTemplate frameElement, String name)
          Changes the name of a frame element.
protected  TemplateElement renameObjectTemplate(TemplateElement templateElement, String name)
          Changes the name of a template element.
 void renameTool(ToolData tool, String newName)
          Renames the given tool.
 void renameUserData(UserData userData, String newName)
          Renames the given user data.
 void save()
          Please use RoboticsAPIApplication.getApplicationData().save() method in your Application to save the data file.
 void saveFile()
          Saves the current content to the data file.
 void saveFile(boolean silent)
          Saves the current content to the data file.
 void setContext(RoboticsAPIContext context)
          Sets the context for this data source.
 void setFileWatcherExecutor(ScheduledExecutorService executor)
          Sets a scheduled executor to be used by the file watcher of this data source.
 void setParameters(com.kuka.common.ParameterSet attributes)
          Initializes the data source with a set of parameters.
 String toString()
          
 ObjectFrame tryLoadFrame(String path)
          Loads a frame with the specified path.
 IProcessData tryLoadProcessData(String key)
          Loads a process data object with the specified identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ROBOTICS_API_DATA_ELEMENT_NAME

public static final String ROBOTICS_API_DATA_ELEMENT_NAME
This is the xml root element name of the data file.

See Also:
Constant Field Values
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

CURRENT_DATA_VERSION

public static final int CURRENT_DATA_VERSION
This is the current data format version.

See Also:
Constant Field Values
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

DEFAULT_DATAFILE_NAME

public static final String DEFAULT_DATAFILE_NAME
This is the default config file name.

See Also:
Constant Field Values
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

EMPTY_DATAFILE_CONTENT

public static final String EMPTY_DATAFILE_CONTENT
This is the xml content for an empty data file.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
Constructor Detail

XmlApplicationDataSource

public XmlApplicationDataSource()
Creates a new instance of XmlApplicationDataSource.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
Method Detail

loadVersion

public static int loadVersion(Document doc)
Reads the value of the version attribute from the given document.

Parameters:
doc - The document where to get the version from.
Returns:
The read version or 0 if no version can be loaded.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

open

public void open()
Opens the data source. 'setAttributes' will be called before 'open'.

Usually should be uses to connect to the real data source (database, file etc.)

Specified by:
open in interface IDataSource
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

openInternal

protected void openInternal()
Opens the data source. 'setAttributes' will be called before 'open'.

Usually should be uses to connect to the real data source (database, file etc.)

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

open

public void open(String dataFileName)
Opens the data source with the specified data file.

If data source is already open it is closed first. This method is the only possibility to set a data file programatically. The data source should be in closed state to do it. To change the data file please close the data source first and then call this method.

Parameters:
dataFileName - name of the data file. This should either a file name resolvable through the context in which data source is created (see setContext(), or a correct url string representation.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

close

public void close()
Closes the data source.

Closes the connection to the real data source.

Specified by:
close in interface IDataSource
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

closeInternal

protected void closeInternal()
Closes the data source.

Closes the connection to the real data source.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getName

public String getName()
Gets the name of this data source.

Specified by:
getName in interface IDataSource
Returns:
The name of this data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

isOpen

public boolean isOpen()
Indicates if this data source is opened.

Specified by:
isOpen in interface IDataSource
Returns:
True if this data source is opened.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

isReadOnly

public boolean isReadOnly()
Indicates if this data source is read only.

Specified by:
isReadOnly in interface IDataSource
Returns:
True if this data source is read only.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadAllFrames

public Collection<? extends ObjectFrame> loadAllFrames()
Gets all frames known to the data source.

The frames will not be in any specific order.

Specified by:
loadAllFrames in interface IApplicationDataSource
Returns:
All frames known to the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadFrame

public ObjectFrame loadFrame(String path)
Loads a frame with the specified path. Changes on the reference will affect the data source.

The object should always be the same unless the data source get's closed and re-opened.

Specified by:
loadFrame in interface IApplicationDataSource
Parameters:
path - the path to the frame.
Returns:
the loaded frame.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

tryLoadFrame

public ObjectFrame tryLoadFrame(String path)
Loads a frame with the specified path. Changes on the reference will affect the data source.

The object should always be the same unless the data source get's closed and re-opened.

Specified by:
tryLoadFrame in interface IApplicationDataSource
Parameters:
path - The path to the frame.
Returns:
The loaded frame or null if the frame was not found.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadFrameById

public ObjectFrame loadFrameById(String id)
Loads a frame with the specified unique id. Changes on the reference will affect the data source.

The object should always be the same unless the data source get's closed and re-opened.

Specified by:
loadFrameById in interface IApplicationDataSource
Parameters:
id - the unique id to the frame.
Returns:
the loaded frame, or null if a frame with this id is unknown
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

dispose

protected void dispose()
Dispose method closes file.


loadAllTemplates

public Collection<? extends TemplateElement> loadAllTemplates()
Gets all templates known to the data source.

The templates will not be in any specific order.

Specified by:
loadAllTemplates in interface IApplicationDataSource
Returns:
All templates known to the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadAllProcessData

public Collection<IProcessData> loadAllProcessData()
Gets all process data elements known to the data source.,

The process data will not be in any specific order.

Specified by:
loadAllProcessData in interface IApplicationDataSource
Returns:
All process data elements known to the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getToolTemplates

public Collection<ToolTemplate> getToolTemplates()
Gets all the tool templates of the data source.

Specified by:
getToolTemplates in interface IApplicationDataSource
Returns:
all the tool templates of the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadTemplate

public TemplateElement loadTemplate(String name)
Loads a template with the specified name. Changes on the template will affect the data source.

The object should always be the same unless the data source get's closed and re-opened.

Specified by:
loadTemplate in interface IApplicationDataSource
Parameters:
name - The name of the template.
Returns:
The loaded template.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadAllToolDatas

public Collection<ToolData> loadAllToolDatas()
Gets all tool data known to the data source.

The tool data will not be in any specific order.

Specified by:
loadAllToolDatas in interface IApplicationDataSource
Returns:
All tool data known to the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadToolData

public ToolData loadToolData(String name)
Loads tool data with the specified name. Changes on the tool data will affect the data source.

The object should always be the same unless the data source get's closed and re-opened.

Specified by:
loadToolData in interface IApplicationDataSource
Parameters:
name - The name of the tool data.
Returns:
The loaded tool data.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadAllUserData

public Collection<UserData> loadAllUserData()
Gets all user data keys known to the data source. The values can be requested through the loadUserData method.

The user data will not be in any specific order.

Specified by:
loadAllUserData in interface IApplicationDataSource
Returns:
All user data known to the data source.
See Also:
IApplicationDataSource.loadUserData(String)
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadUserData

public UserData loadUserData(String name)
Gets the user data stored under the given name. The user data is a simple key-value pair.

Specified by:
loadUserData in interface IApplicationDataSource
Parameters:
name - The name of the user data.
Returns:
The user data.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

setParameters

public void setParameters(com.kuka.common.ParameterSet attributes)
Initializes the data source with a set of parameters. The context must be set before this method is called.

Specified by:
setParameters in interface IDataSource
Parameters:
attributes - The parameters of the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getDataFile

public URL getDataFile()
Gets the url of the data file used by this data source.

Returns:
the url of the data file used by this data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

fileStateChanged

public void fileStateChanged(FileWatchState state)
Called when a file changed.

Specified by:
fileStateChanged in interface IFileStateListener
Parameters:
state - The state of the file.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

setContext

public void setContext(RoboticsAPIContext context)
Sets the context for this data source.

Specified by:
setContext in interface IDataSource
Parameters:
context - The context for this data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getContext

public RoboticsAPIContext getContext()
Gets the context for this data source.

Specified by:
getContext in interface IDataSource
Returns:
The context for this data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

renameFrame

public void renameFrame(AbstractFrame frameToChange,
                        String newName)
Changes the name of the given frame to newName.

Parameters:
frameToChange - The frame which should be renamed.
newName - The new name of the given frame.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

moveFrame

public void moveFrame(AbstractFrame frameToMove,
                      ObjectFrame newParent)
Moves the given frame to the given new parent.

Parameters:
frameToMove - The frame which should be moved to another parent. Could not be null.
newParent - The new parent where the given frame should be moved.Could not be null.
Throws:
IllegalArgumentException - if frameToMove is null, or newParent is null, or frameToMove == newParent, or parent of the frameToMove is null, or frameToMove does not belong to the data source.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addFrame

public ObjectFrame addFrame(ObjectFrame parent)
Creates an adds a new frame to the data source. The new name will follow the workbench naming convention.

Specified by:
addFrame in interface IApplicationDataSource
Parameters:
parent - The parent where the given frame should be added.
Returns:
returns a newly created frame.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

changeFrameTransformation

public void changeFrameTransformation(ObjectFrame frameToChange,
                                      ITransformation newTransformation)
Changes the frame that belongs to the data source.

Parameters:
frameToChange - frame to change.
newTransformation - new transformation to the parent.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeFrame

public void removeFrame(ObjectFrame frame)
Removes the given frame.

Parameters:
frame - The frame which should be removed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

renameTool

public void renameTool(ToolData tool,
                       String newName)
Renames the given tool.

Parameters:
tool - The tool which should be renamed.
newName - The new name of the tool.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addTool

public void addTool(ToolData tool)
Adds the given tool.

Parameters:
tool - The tool which should be added.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeTool

public void removeTool(ToolData tool)
Removes the given tool.

Parameters:
tool - The tool which should be removed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

renameUserData

public void renameUserData(UserData userData,
                           String newName)
Renames the given user data.

Parameters:
userData - The user data which should be renamed.
newName - The new name of the user data.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addUserData

public void addUserData(UserData userData)
Adds the given user data.

Parameters:
userData - The user data which should be added.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeUserData

public void removeUserData(UserData userData)
Removes the user data which belongs to the given key.

Parameters:
userData - The user data which should be removed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

save

public void save()
Please use RoboticsAPIApplication.getApplicationData().save() method in your Application to save the data file.

Specified by:
save in interface ISaveableApplicationDataSource
See Also:
IApplicationData.save()
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

saveFile

public void saveFile()
Saves the current content to the data file. In case of an error, a SAXException is thrown.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

saveFile

public void saveFile(boolean silent)
Saves the current content to the data file.

Parameters:
silent - If silent is true, no application data changed event will be fired.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getFrameParameters

public Map<String,Object> getFrameParameters(String name)
Gets the writable map with the parameters of the frame with the specified name.

Parameters:
name - name of the frame for which the parameters are requested.
Returns:
the writable map with the parameters of the frame with the specified name.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

hasError

public boolean hasError()
Returns true if there was an exception during load.

Specified by:
hasError in interface ISaveableApplicationDataSource
Returns:
True if there was an exception
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getErrorMessage

public String getErrorMessage()
Specified by:
getErrorMessage in interface ISaveableApplicationDataSource
Returns:
the fileFehler
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

toString

public String toString()

Overrides:
toString in class Object
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addApplicationDataChangedListener

public final void addApplicationDataChangedListener(IApplicationDataChanged listener)
Registers the given listener for application data changes.

Specified by:
addApplicationDataChangedListener in interface IApplicationDataSource
Parameters:
listener - The listener which should be called after application data has changed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeApplicationDataChangedListener

public final void removeApplicationDataChangedListener(IApplicationDataChanged listener)
Unregisters the given listener for application data changes.

Specified by:
removeApplicationDataChangedListener in interface IApplicationDataSource
Parameters:
listener - The registered listener which should be unregistered.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

forceLoadFile

public void forceLoadFile()
                   throws InterruptedException
Forces the Filewatcher to command a reload of the file.

Throws:
InterruptedException - is thrown if the loading could not be executed successful
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

persistExternalDataChanges

public void persistExternalDataChanges()
Allows proper persistence handling of data changes that have been done by other classes.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addObjectTemplate

public void addObjectTemplate(TemplateElement templateElement)
Adds an object template to the data source.

Specified by:
addObjectTemplate in interface ISaveableApplicationDataSource
Parameters:
templateElement - the template to be added
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeObjectTemplate

public void removeObjectTemplate(TemplateElement templateElement)
                          throws SAXException
Removes an object template from the data source.

Parameters:
templateElement - the template to be removed
Throws:
SAXException - an exception in case of an validation error
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

renameObjectTemplate

protected TemplateElement renameObjectTemplate(TemplateElement templateElement,
                                               String name)
Changes the name of a template element.

Parameters:
templateElement - the template element to be changed
name - the new name
Returns:
the changed template element

renameFrameTemplate

protected FrameTemplate renameFrameTemplate(FrameTemplate frameElement,
                                            String name)
Changes the name of a frame element.

Parameters:
frameElement - the template element to be changed
name - the new name
Returns:
the changed template element

addFrameToTemplate

public void addFrameToTemplate(Object rootTemplate,
                               FrameTemplate addedTemplate)
Adds a FrameTemplate to the given TemplateElement if possible.

Parameters:
rootTemplate - The TemplateElement where the new FrameTemplate should be added
addedTemplate - The FrameTemplate to be added
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addFrameToTemplate

public void addFrameToTemplate(Object rootTemplate,
                               FrameTemplate addedTemplate,
                               boolean doSave)
Adds a FrameTemplate to the given TemplateElement if possible.

Parameters:
rootTemplate - The TemplateElement where the new FrameTemplate should be added
addedTemplate - The FrameTemplate to be added
doSave - if true the data will be saved in the data source
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeFrameFromTemplate

public void removeFrameFromTemplate(Object rootTemplate,
                                    FrameTemplate removedTemplate)
Removes a FrameTemplate from the given FrameTemplate if possible.

Parameters:
rootTemplate - The parent of the FrameTemplate that should be removed
removedTemplate - The FrameTemplate that should be removed
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

removeFrameFromTemplate

public void removeFrameFromTemplate(Object rootTemplate,
                                    FrameTemplate removedTemplate,
                                    boolean doSave)
Removes a FrameTemplate from the given FrameTemplate if possible.

Parameters:
rootTemplate - The parent of the FrameTemplate that should be removed
removedTemplate - The FrameTemplate that should be removed
doSave - if true the data will be saved in the data source
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

applyFrameTemplateMeasurement

public FrameTemplate applyFrameTemplateMeasurement(FrameTemplate frameTemplate,
                                                   Transformation newTransformation,
                                                   MeasurementType measurementType,
                                                   MeasurementMethod measurementMethod,
                                                   Double calculationError,
                                                   boolean doSave)

moveFrameToElement

public void moveFrameToElement(Object source,
                               Object target,
                               FrameTemplate frameToMove)
Move the given frame element from source to target elements.

Parameters:
source - may be TemplateElement or FrameElement
target - may be TemplateElement or FrameElement
frameToMove - the frame to move
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

moveFrameToElement

public void moveFrameToElement(Object source,
                               Object target,
                               FrameTemplate frameToMove,
                               boolean doSave)
Move the given frame element from source to target elements.

Parameters:
source - may be TemplateElement or FrameElement
target - may be TemplateElement or FrameElement
frameToMove - the frame to move
doSave - true if movement should automatically be saved in data source
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

loadProcessData

public IProcessData loadProcessData(String key)
Loads a process data object with the specified identifier. Changes on the reference will affect the data source.

Specified by:
loadProcessData in interface IApplicationDataSource
Parameters:
key - the identifier of the process data object.
Returns:
the loaded process data object.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

tryLoadProcessData

public IProcessData tryLoadProcessData(String key)
Loads a process data object with the specified identifier. Changes on the reference will affect the data source.

Specified by:
tryLoadProcessData in interface IApplicationDataSource
Parameters:
key - the identifier of the process data object.
Returns:
the loaded process data object or null if the process data object was not found.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

addProcessDataListener

public void addProcessDataListener(IProcessDataListener processDataListener)
Adds a the given process data listener to all existing process data elements.

Parameters:
processDataListener - the listener to add to all existing process data elements

setFileWatcherExecutor

public void setFileWatcherExecutor(ScheduledExecutorService executor)
Sets a scheduled executor to be used by the file watcher of this data source.

This allows sharing one executor with several data sources aka file watchers.

Parameters:
executor - the scheduled executor


Copyright © 2019. All rights reserved.