|
Metadata |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.metadata.remote.XMLUtil
public class XMLUtil
Contains utility methods for xml processing.
Constructor Summary | |
---|---|
XMLUtil()
|
Method Summary | |
---|---|
static java.lang.String |
createGetMetadataXML(java.util.Map<java.lang.String,java.lang.String> objectMap)
Creates and returns the XML string used for a GetMetadata request. |
static java.lang.String |
createGetMetadataXML(java.lang.String strType,
java.lang.String strFQID,
java.util.List<java.lang.String> simpleAttr,
java.util.List<java.lang.String> complexAttr)
Creates and returns the XML string used for a GetMetadata request. |
static java.lang.String |
createObjectAttributeXML(java.util.Map<java.lang.String,java.lang.String> attributes)
Creates a string of an object's attributes as key/value pairs |
static java.lang.String |
createObjectXML(java.lang.String objectType,
java.lang.String objectID,
java.util.Map<java.lang.String,java.lang.String> attrs)
Creates an xml string for the object including all of its simple attributes. |
static java.lang.String |
formatXML(java.lang.String original)
Format the XML so that we can read it easier. |
static java.lang.String |
normalize(java.lang.String s)
Converts invalid xml characters, such as "<", ">", "\n", "\t" and others, into acceptable xx entities. |
Constructor Detail |
---|
public XMLUtil()
Method Detail |
---|
public static java.lang.String formatXML(java.lang.String original)
original
- String
public static java.lang.String normalize(java.lang.String s)
s
- The string to be normalized
public static java.lang.String createGetMetadataXML(java.lang.String strType, java.lang.String strFQID, java.util.List<java.lang.String> simpleAttr, java.util.List<java.lang.String> complexAttr)
strType
- - XML is generated for this type of metadata object.strFQID
- - Metadata-id, if get is for specific object. May be null or empty.simpleAttr
- - List of simple attributes requested. May be null or empty.complexAttr
- - List of complex attributes requested. May be null or empty.
public static java.lang.String createGetMetadataXML(java.util.Map<java.lang.String,java.lang.String> objectMap)
objectMap
- a map of the objects to retrieve. Keys for the map must be the
metadata object ids and the values must be the metadata object type.
public static java.lang.String createObjectXML(java.lang.String objectType, java.lang.String objectID, java.util.Map<java.lang.String,java.lang.String> attrs)
<objectType Attr1="Value" Attr2="Value" ... />
objectType
- the object's metadata typeobjectID
- the object idattrs
- map of attribute names and values
public static java.lang.String createObjectAttributeXML(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes
- a map of the object's attributes
|
Metadata |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |