Package org.pentaho.di.core.attributes
Class AttributesUtil
- java.lang.Object
-
- org.pentaho.di.core.attributes.AttributesUtil
-
public class AttributesUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
XML_TAG
static String
XML_TAG_ATTRIBUTE
static String
XML_TAG_GROUP
-
Constructor Summary
Constructors Constructor Description AttributesUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getAttributesXml(Map<String,Map<String,String>> attributesMap)
Serialize an attributes group map to XML.static String
getAttributesXml(Map<String,Map<String,String>> attributesMap, String xmlTag)
Serialize an attributes group map to XML.static Map<String,Map<String,String>>
loadAttributes(Node attributesNode)
Load the attribute groups from an XML DOM Node.
-
-
-
Field Detail
-
XML_TAG
public static final String XML_TAG
- See Also:
- Constant Field Values
-
XML_TAG_GROUP
public static final String XML_TAG_GROUP
- See Also:
- Constant Field Values
-
XML_TAG_ATTRIBUTE
public static final String XML_TAG_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAttributesXml
public static String getAttributesXml(Map<String,Map<String,String>> attributesMap)
Serialize an attributes group map to XML.
The information will be encapsulated in the default tag:
XML_TAG
.If a null or empty Map is given, the generated XML will have the default tag (with no content).
Equivalent to:
getAttributesXml( attributesMap, AttributesUtil.XML_TAG )
- Parameters:
attributesMap
- the attribute groups to serialize- Returns:
- the XML serialized attribute groups
- See Also:
getAttributesXml(Map, String)
-
getAttributesXml
public static String getAttributesXml(Map<String,Map<String,String>> attributesMap, String xmlTag)
Serialize an attributes group map to XML.
The information will be encapsulated in the specified tag.
If a null or empty Map is given, the generated XML will have the provided tag (with no content).
- Parameters:
attributesMap
- the attribute groups to serializexmlTag
- the xml tag to use for the generated xml- Returns:
- the XML serialized attribute groups
- See Also:
getAttributesXml(Map)
-
loadAttributes
public static Map<String,Map<String,String>> loadAttributes(Node attributesNode)
Load the attribute groups from an XML DOM Node.
An empty Map will be returned if a null or empty Node is given.
- Parameters:
attributesNode
- the attributes node to read from- Returns:
- the Map with the attribute groups
-
-