public class RobotConfigXMLReader extends Object implements org.jflux.api.common.rk.services.ConfigurationLoader<ServoRobotConfig,org.apache.commons.configuration.HierarchicalConfiguration>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_TYPE
Config format version name.
|
static String |
CONFIG_VERSION
Config format version number.
|
static org.jflux.api.common.rk.config.VersionProperty |
VERSION
Config format VersionProperty.
|
static String |
XML_CONFIG_VERSION_TYPE
Config format VersionProperty type attribute.
|
static String |
XML_CONTROLLER
ServoController XML Element.
|
static String |
XML_CONTROLLER_TYPE_VERSION
Controller Type VersionProperty type attribute.
|
static String |
XML_CONTROLLERS
JointControllers XML Element.
|
static String |
XML_JOINT
Joint config XML Element.
|
static String |
XML_JOINT_CONFIG
Joint configs XML Element.
|
static String |
XML_JOINT_JOINT_ID
Joint id XML attribute.
|
static String |
XML_JOINT_NAME
Joint name XML attribute.
|
static String |
XML_JOINT_SERVO_CONTROLLER_ID
Joint id XML attribute.
|
static String |
XML_JOINT_SERVO_ID
Joint id XML attribute.
|
static String |
XML_ROBOT_CONFIG
Robot XML Element.
|
static String |
XML_ROBOT_ID
Robot XML Id.
|
static String |
XML_SERVO_CONTROLLER_CONFIG
Controller parameters XML element name.
|
static String |
XML_VERSION_PROPERTIES
Version properties XML element name.
|
| Constructor and Description |
|---|
RobotConfigXMLReader(org.osgi.framework.BundleContext context) |
| Modifier and Type | Method and Description |
|---|---|
Class<ServoRobotConfig> |
getConfigurationClass() |
org.jflux.api.common.rk.config.VersionProperty |
getConfigurationFormat() |
Class<org.apache.commons.configuration.HierarchicalConfiguration> |
getParameterClass() |
ServoRobotConfig |
loadConfiguration(org.apache.commons.configuration.HierarchicalConfiguration param) |
static ServoRobotConfig |
readConfig(org.osgi.framework.BundleContext context,
org.apache.commons.configuration.HierarchicalConfiguration xml)
Reads a RobotConfig from the XML node.
|
static ServoRobotConfig |
readConfig(org.osgi.framework.BundleContext context,
String path)
Reads a RobotConfig from the file path.
|
public static final String CONFIG_TYPE
public static final String CONFIG_VERSION
public static final org.jflux.api.common.rk.config.VersionProperty VERSION
public static final String XML_ROBOT_CONFIG
public static final String XML_ROBOT_ID
public static final String XML_JOINT_CONFIG
public static final String XML_JOINT
public static final String XML_JOINT_JOINT_ID
public static final String XML_JOINT_SERVO_CONTROLLER_ID
public static final String XML_JOINT_SERVO_ID
public static final String XML_JOINT_NAME
public static final String XML_CONTROLLERS
public static final String XML_CONTROLLER
public static final String XML_VERSION_PROPERTIES
public static final String XML_CONTROLLER_TYPE_VERSION
public static final String XML_CONFIG_VERSION_TYPE
public static final String XML_SERVO_CONTROLLER_CONFIG
public RobotConfigXMLReader(org.osgi.framework.BundleContext context)
public static ServoRobotConfig readConfig(org.osgi.framework.BundleContext context, String path)
context - BundleContext to use for loading a config readerpath - path to the XML filepublic static ServoRobotConfig readConfig(org.osgi.framework.BundleContext context, org.apache.commons.configuration.HierarchicalConfiguration xml)
context - BundleContext to use for loading a config readerxml - XML nodepublic org.jflux.api.common.rk.config.VersionProperty getConfigurationFormat()
getConfigurationFormat in interface org.jflux.api.common.rk.services.ConfigurationLoader<ServoRobotConfig,org.apache.commons.configuration.HierarchicalConfiguration>public ServoRobotConfig loadConfiguration(org.apache.commons.configuration.HierarchicalConfiguration param)
loadConfiguration in interface org.jflux.api.common.rk.services.ConfigurationLoader<ServoRobotConfig,org.apache.commons.configuration.HierarchicalConfiguration>public Class<ServoRobotConfig> getConfigurationClass()
getConfigurationClass in interface org.jflux.api.common.rk.services.ConfigurationLoader<ServoRobotConfig,org.apache.commons.configuration.HierarchicalConfiguration>public Class<org.apache.commons.configuration.HierarchicalConfiguration> getParameterClass()
getParameterClass in interface org.jflux.api.common.rk.services.ConfigurationLoader<ServoRobotConfig,org.apache.commons.configuration.HierarchicalConfiguration>Copyright © 2011-2014. All Rights Reserved.