public class YangXmlUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
org.slf4j.Logger |
log |
| Modifier | Constructor and Description |
|---|---|
protected |
YangXmlUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected InputStream |
getCfgInputStream(String file) |
static YangXmlUtils |
getInstance()
Single Instance of Yang utilities retriever.
|
String |
getString(org.apache.commons.configuration.XMLConfiguration cfg)
Return the string representation of the XMLConfig without header
and configuration element.
|
org.apache.commons.configuration.XMLConfiguration |
getXmlConfiguration(String file,
List<YangElement> elements)
Retrieves a valid XML configuration for a specific XML path for multiple
instance of YangElements objects.
|
org.apache.commons.configuration.XMLConfiguration |
getXmlConfiguration(String file,
Map<String,String> values)
Retrieves a valid XML configuration for a specific XML path for a single
instance of the Map specified key-value pairs.
|
org.apache.commons.configuration.XMLConfiguration |
loadXml(InputStream xmlStream)
Method to read an input stream into a XMLConfiguration.
|
List<YangElement> |
readXmlConfiguration(org.apache.commons.configuration.HierarchicalConfiguration cfg,
String path)
Reads a valid XML configuration and returns a Map containing XML field name.
|
public org.apache.commons.configuration.XMLConfiguration getXmlConfiguration(String file, Map<String,String> values)
file - path of the file to be used.values - map of key and values to set under the generic path.public org.apache.commons.configuration.XMLConfiguration getXmlConfiguration(String file, List<YangElement> elements)
file - path of the file to be used.elements - List of YangElements that are to be set.protected InputStream getCfgInputStream(String file)
public List<YangElement> readXmlConfiguration(org.apache.commons.configuration.HierarchicalConfiguration cfg, String path)
cfg - the Configuration to read.path - path of the information to be read.public static YangXmlUtils getInstance()
public String getString(org.apache.commons.configuration.XMLConfiguration cfg)
cfg - the XML to convertpublic org.apache.commons.configuration.XMLConfiguration loadXml(InputStream xmlStream)
xmlStream - inputstream containing XML description