|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.TagBasedConfiguration
public class TagBasedConfiguration
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.
| 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 |
|---|
public TagBasedConfiguration(RoboticsAPIContext context,
String tagName)
context - The context of this configuration.tagName - The tag name which specifies on which tag the configuration
should look.| Method Detail |
|---|
public Iterator<com.kuka.common.ParameterSet> iterator()
iterator in interface Iterable<com.kuka.common.ParameterSet>public final Iterable<com.kuka.common.ParameterSet> getConfigurationItems()
public final int getConfigurationItemCount()
public final RoboticsAPIContext getContext()
public final void loadFromResource(String resourceName)
resourceName - The resource containing the configuration. null is not allowed.public final void loadFromFile(File configFile)
configFile - The file containing the configuration. null is not allowed.public final void loadFromURL(URL configURL)
configURL - The URL containing the configuration. null is not allowed.public final void loadFromDocument(Document doc)
doc - The doc containing the configuration. null is not allowed.public final void loadFromElement(Element element)
element - The element containing the configuration. null is not allowed.protected void onLoad()
protected void afterLoad()
protected final void addConfigurationItemDescription(com.kuka.common.ParameterSet item)
item - The item which should be added. null is not allowed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||