public class DOMToCustomMetaConvertor extends Object
CustomMeta
instances.Constructor and Description |
---|
DOMToCustomMetaConvertor() |
Modifier and Type | Method and Description |
---|---|
static void |
addTypeInfo(Element element,
Map<String,String> typeMap)
Takes an XML representation of custom meta-data, and adds new attributes
that represent the type of each custom meta-data value to the XML data
based on the type-map.
|
static Map<String,com.tridion.meta.NameValuePair> |
aggregateNameValuePairs(List<com.tridion.meta.NameValuePair> nameValuePairsList)
Aggregates multiple name value pairs by the key name.
|
static com.tridion.meta.CustomMeta |
getCustomMeta(Document document,
Map typeMap)
Transforms a document and it's children to a tree of CustomMeta objects.
|
static com.tridion.meta.CustomMeta |
getCustomMeta(Element element,
Map<String,String> typeMap)
Transforms an element and it's children to a tree of CustomMeta objects.
|
static Document |
getStrippedCustomMeta(Node metadataNode,
boolean namespaceAware) |
static MetadataType |
getType(Map<String,String> typeMap,
Element childElement)
Determines the type of an element.
|
public static com.tridion.meta.CustomMeta getCustomMeta(Document document, Map typeMap)
document
- The element to be converted into a CustomMeta
object.typeMap
- The typemap to be used for lookup up the types of elements.public static com.tridion.meta.CustomMeta getCustomMeta(Element element, Map<String,String> typeMap)
element
- The element to be converted into a CustomMeta
object.typeMap
- The typemap to be used for lookup up the types of elements.public static Map<String,com.tridion.meta.NameValuePair> aggregateNameValuePairs(List<com.tridion.meta.NameValuePair> nameValuePairsList)
nameValuePairsList
- List of name value pairs to be aggregated.public static MetadataType getType(Map<String,String> typeMap, Element childElement)
childElement
- The element for which the type should be determined.typeMap
- The typemap to be used for lookup up the type of an element.NameValuePair
public static void addTypeInfo(Element element, Map<String,String> typeMap)
element
- An element representing custom-meta type.typeMap
- Mapping of (String) custom-meta-name -> (String) typenameCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries