com.kuka.roboticsAPI
Class TagBasedConfiguration

java.lang.Object
  extended by com.kuka.roboticsAPI.TagBasedConfiguration
All Implemented Interfaces:
Iterable<com.kuka.common.ParameterSet>
Direct Known Subclasses:
AbstractMapperConfiguration, PersistenceConfiguration, RequestHandlerConfiguration

public class TagBasedConfiguration
extends Object
implements Iterable<com.kuka.common.ParameterSet>

Base class for configuration files which load their configuration out of an XML file and are only interested in their own tags.

Only the attributes of the tags are parsed into parameter sets which are available afterwards. Inner elements are ignored.

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 Summary
TagBasedConfiguration(RoboticsAPIContext context, String tagName)
          Creates a new configuration.
 
Method Summary
protected  void addConfigurationItemDescription(com.kuka.common.ParameterSet item)
          Adds the given item to the configuration item descriptions.
protected  void afterLoad()
          Will be called after a new configuration was loaded.
 int getConfigurationItemCount()
          Gets the count of configuration items.
 Iterable<com.kuka.common.ParameterSet> getConfigurationItems()
          Gets the loaded configuration items.
 RoboticsAPIContext getContext()
          Get the context passed at construction.
 Iterator<com.kuka.common.ParameterSet> iterator()
          
 void loadFromDocument(Document doc)
          Loads a configuration from a preloaded document.
 void loadFromElement(Element element)
          Loads a configuration from a preloaded element.
 void loadFromFile(File configFile)
          Loads a configuration from a file.
 void loadFromResource(String resourceName)
          Loads a configuration from a file.
 void loadFromURL(URL configURL)
          Loads a configuration from a URL.
protected  void onLoad()
          Will be called before a new configuration is loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagBasedConfiguration

public TagBasedConfiguration(RoboticsAPIContext context,
                             String tagName)
Creates a new configuration.

Parameters:
context - The context of this configuration.
tagName - The tag name which specifies on which tag the configuration should look.
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

iterator

public Iterator<com.kuka.common.ParameterSet> iterator()

Specified by:
iterator in interface Iterable<com.kuka.common.ParameterSet>
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.

getConfigurationItems

public final Iterable<com.kuka.common.ParameterSet> getConfigurationItems()
Gets the loaded configuration items.

Returns:
The loaded configuration items.
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.

getConfigurationItemCount

public final int getConfigurationItemCount()
Gets the count of configuration items.

Returns:
The count of configuration items.
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 final RoboticsAPIContext getContext()
Get the context passed at construction.

Returns:
The context this configuration is taken from.
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.

loadFromResource

public final void loadFromResource(String resourceName)
Loads a configuration from a file. The Utilities.resolve() method must be able to locate this file.

Parameters:
resourceName - The resource containing the configuration. null is not allowed.
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.

loadFromFile

public final void loadFromFile(File configFile)
Loads a configuration from a file.

Parameters:
configFile - The file containing the configuration. null is not allowed.
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.

loadFromURL

public final void loadFromURL(URL configURL)
Loads a configuration from a URL.

Parameters:
configURL - The URL containing the configuration. null is not allowed.
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.

loadFromDocument

public final void loadFromDocument(Document doc)
Loads a configuration from a preloaded document.

Parameters:
doc - The doc containing the configuration. null is not allowed.
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.

loadFromElement

public final void loadFromElement(Element element)
Loads a configuration from a preloaded element.

Parameters:
element - The element containing the configuration. null is not allowed.
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.

onLoad

protected void onLoad()
Will be called before a new configuration is loaded. The items are already empty.


afterLoad

protected void afterLoad()
Will be called after a new configuration was loaded. The items contain the loaded parameters of the tags.


addConfigurationItemDescription

protected final void addConfigurationItemDescription(com.kuka.common.ParameterSet item)
Adds the given item to the configuration item descriptions.

Parameters:
item - The item which should be added. null is not allowed.


Copyright © 2019. All rights reserved.