Package com.inductiveautomation.rm.base
Class RMXMLReader
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMXMLReader
-
public class RMXMLReader extends java.lang.Object
This class creates an object graph of collections (Map/List) and core Java types from a given XML source. This works best when an RMSchema is provided or antag is present in the xml (otherwise one is generated).
-
-
Constructor Summary
Constructors Constructor Description RMXMLReader()
Creates an uninitialized reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.Map>
getEntityList(java.lang.String aName)
Returns the individual list of maps for the given entity name.java.util.Map<java.lang.String,java.util.List<java.util.Map>>
getEntityLists()
Returns the entity maps.java.lang.String
getName()
Returns the name of the root element.java.util.List<RXElement>
getResources()
Returns the resources read from last source.Schema
getSchema()
Returns a hierarchy of RMEntity objects describing the XML.java.util.Map
readObject(java.lang.Object aSource)
Returns a map loaded from the given XML source.java.util.Map
readObject(java.lang.Object aSource, Schema aSchema)
Returns a map loaded from the given XML source with the given XML schema.
-
-
-
Method Detail
-
readObject
public java.util.Map readObject(java.lang.Object aSource)
Returns a map loaded from the given XML source.
-
readObject
public java.util.Map readObject(java.lang.Object aSource, Schema aSchema)
Returns a map loaded from the given XML source with the given XML schema.
-
getName
public java.lang.String getName()
Returns the name of the root element.
-
getSchema
public Schema getSchema()
Returns a hierarchy of RMEntity objects describing the XML.
-
getResources
public java.util.List<RXElement> getResources()
Returns the resources read from last source.
-
getEntityLists
public java.util.Map<java.lang.String,java.util.List<java.util.Map>> getEntityLists()
Returns the entity maps.
-
getEntityList
public java.util.List<java.util.Map> getEntityList(java.lang.String aName)
Returns the individual list of maps for the given entity name.
-
-