org.refcodes.factory.MarshalTypeFactory<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
, org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
, org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComposite<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String,InputStream>
, org.refcodes.factory.UnmarshalTypeFactory<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
, org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
, org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComposite<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String,InputStream>
, CanonicalMapFactory
XmlCanonicalMapFactorySingleton
public class XmlCanonicalMapFactory extends AbstractCanonicalMapFactory implements CanonicalMapFactory
CanonicalMapFactory
for parsing the XML
notation.org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<T extends Object,C extends Object>, org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComposite<T extends Object,SRC extends Object,C extends Object>
org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<T extends Object,C extends Object>, org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComposite<T extends Object,SRC extends Object,C extends Object>
Modifier and Type | Field | Description |
---|---|---|
static String |
COMMENT_CLOSE |
|
static String |
COMMENT_OPEN |
|
protected static String |
ROOT_SELECTOR |
COMMENT_PROPERTY, DELIMITER_PROPERTY, SUPPORTED_DELIMITERS_PROPERTY
Constructor | Description |
---|---|
XmlCanonicalMapFactory() |
Modifier and Type | Method | Description |
---|---|---|
org.refcodes.struct.CanonicalMap.CanonicalMapBuilder |
fromMarshaled(InputStream aExternalRepresentation) |
|
org.refcodes.struct.CanonicalMap.CanonicalMapBuilder |
fromMarshaled(InputStream aExternalRepresentation,
Map<String,String> aProperties) |
|
InputStream |
fromUnmarshaled(org.refcodes.struct.CanonicalMap aDataStructure) |
|
InputStream |
fromUnmarshaled(org.refcodes.struct.CanonicalMap aDataStructure,
Map<String,String> aProperties) |
|
protected void |
postProcess(org.refcodes.struct.CanonicalMap.CanonicalMapBuilder aProperties) |
This method takes care on giving nodes with children an own value: E.g.
|
String |
toMarshaled(org.refcodes.struct.CanonicalMap aDataStructure) |
|
String |
toMarshaled(org.refcodes.struct.CanonicalMap aDataStructure,
Map<String,String> aProperties) |
Any path elements found in the
CanonicalMap
beginning with a "@" as of Prefix.ANNOTATION are considered being
attributes of their parent path and are marshaled as XML attributes for
the according XML element. |
toComment, toDelimiter, toInputStream, toString, toSupportedDelimiters, toXml
toUnmarshaled, toUnmarshaled
protected static final String ROOT_SELECTOR
public static final String COMMENT_OPEN
public static final String COMMENT_CLOSE
public org.refcodes.struct.CanonicalMap.CanonicalMapBuilder fromMarshaled(InputStream aExternalRepresentation) throws org.refcodes.exception.UnmarshalException
fromMarshaled
in interface org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
org.refcodes.exception.UnmarshalException
public org.refcodes.struct.CanonicalMap.CanonicalMapBuilder fromMarshaled(InputStream aExternalRepresentation, Map<String,String> aProperties) throws org.refcodes.exception.UnmarshalException
fromMarshaled
in interface org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
org.refcodes.exception.UnmarshalException
public String toMarshaled(org.refcodes.struct.CanonicalMap aDataStructure) throws org.refcodes.exception.MarshalException
toMarshaled
in interface CanonicalMapFactory
toMarshaled
in interface org.refcodes.factory.MarshalTypeFactory<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
org.refcodes.exception.MarshalException
public String toMarshaled(org.refcodes.struct.CanonicalMap aDataStructure, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
CanonicalMap
beginning with a "@" as of Prefix.ANNOTATION
are considered being
attributes of their parent path and are marshaled as XML attributes for
the according XML element. Providing values for the
MarshalParameter.CHARSET
, MarshalParameter.COMMENT
or the
MarshalParameter.VERSION
parameter in the provided properties you
can influence the creation of the
<?xml ecnoding="UTF-8" version="1.0" standalone="yes"?>
declaration in the resulting XML.toMarshaled
in interface CanonicalMapFactory
toMarshaled
in interface org.refcodes.factory.MarshalTypeFactory<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
org.refcodes.exception.MarshalException
public InputStream fromUnmarshaled(org.refcodes.struct.CanonicalMap aDataStructure) throws org.refcodes.exception.MarshalException
fromUnmarshaled
in interface org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
org.refcodes.exception.MarshalException
public InputStream fromUnmarshaled(org.refcodes.struct.CanonicalMap aDataStructure, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
fromUnmarshaled
in interface org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.struct.CanonicalMap.CanonicalMapBuilder,String>
org.refcodes.exception.MarshalException
protected void postProcess(org.refcodes.struct.CanonicalMap.CanonicalMapBuilder aProperties)
this
sub-node assigns a
value to it's parent node. E.g. For "xml", the attribute
this="value"
attached to an element takes care on giving an
XML element with children an own value. See AbstractCanonicalMapFactory.THIS_ATTRIBUTES
.postProcess
in class AbstractCanonicalMapFactory
aProperties
- The properties where the "this" children are to assign
a value to their parents.Copyright © 2021. All rights reserved.