Class XmlCanonicalMapFactory
- java.lang.Object
-
- org.refcodes.structure.ext.factory.AbstractCanonicalMapFactory
-
- org.refcodes.structure.ext.factory.XmlCanonicalMapFactory
-
- All Implemented Interfaces:
org.refcodes.factory.MarshalTypeFactory<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
,org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
,org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComposite<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String,InputStream>
,org.refcodes.factory.UnmarshalTypeFactory<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
,org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
,org.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComposite<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String,InputStream>
,CanonicalMapFactory
- Direct Known Subclasses:
XmlCanonicalMapFactorySingleton
public class XmlCanonicalMapFactory extends AbstractCanonicalMapFactory implements CanonicalMapFactory
Implementation of theCanonicalMapFactory
for parsing the XML notation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.factory.MarshalTypeFactory
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>
-
Nested classes/interfaces inherited from interface org.refcodes.factory.UnmarshalTypeFactory
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>
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMMENT_CLOSE
static String
COMMENT_OPEN
protected static String
ROOT_SELECTOR
-
Fields inherited from interface org.refcodes.structure.ext.factory.CanonicalMapFactory
COMMENT_PROPERTY, DELIMITER_PROPERTY, SUPPORTED_DELIMITERS_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description XmlCanonicalMapFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
fromMarshaled(InputStream aExternalRepresentation)
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
fromMarshaled(InputStream aExternalRepresentation, Map<String,String> aProperties)
InputStream
fromUnmarshaled(org.refcodes.structure.CanonicalMap aDataStructure)
InputStream
fromUnmarshaled(org.refcodes.structure.CanonicalMap aDataStructure, Map<String,String> aProperties)
String
toMarshaled(org.refcodes.structure.CanonicalMap aDataStructure)
String
toMarshaled(org.refcodes.structure.CanonicalMap aDataStructure, Map<String,String> aProperties)
Any path elements found in theCanonicalMap
beginning with a "@" as ofPrefix.ANNOTATION
are considered being attributes of their parent path and are marshaled as XML attributes for the according XML element.-
Methods inherited from class org.refcodes.structure.ext.factory.AbstractCanonicalMapFactory
postProcessAttributes, toComment, toDelimiter, toInputStream, toString, toSupportedDelimiters, toXml
-
Methods inherited from interface org.refcodes.structure.ext.factory.CanonicalMapFactory
toUnmarshaled, toUnmarshaled
-
-
-
-
Field Detail
-
ROOT_SELECTOR
protected static final String ROOT_SELECTOR
- See Also:
- Constant Field Values
-
COMMENT_OPEN
public static final String COMMENT_OPEN
- See Also:
- Constant Field Values
-
COMMENT_CLOSE
public static final String COMMENT_CLOSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromMarshaled
public org.refcodes.structure.CanonicalMap.CanonicalMapBuilder fromMarshaled(InputStream aExternalRepresentation) throws org.refcodes.exception.UnmarshalException
- Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromMarshaled
public org.refcodes.structure.CanonicalMap.CanonicalMapBuilder fromMarshaled(InputStream aExternalRepresentation, Map<String,String> aProperties) throws org.refcodes.exception.UnmarshalException
- Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
- Throws:
org.refcodes.exception.UnmarshalException
-
toMarshaled
public String toMarshaled(org.refcodes.structure.CanonicalMap aDataStructure) throws org.refcodes.exception.MarshalException
- Specified by:
toMarshaled
in interfaceCanonicalMapFactory
- Specified by:
toMarshaled
in interfaceorg.refcodes.factory.MarshalTypeFactory<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
- Throws:
org.refcodes.exception.MarshalException
-
toMarshaled
public String toMarshaled(org.refcodes.structure.CanonicalMap aDataStructure, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
Any path elements found in theCanonicalMap
beginning with a "@" as ofPrefix.ANNOTATION
are considered being attributes of their parent path and are marshaled as XML attributes for the according XML element. Providing values for theMarshalParameter.CHARSET
,MarshalParameter.COMMENT
or theMarshalParameter.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.- Specified by:
toMarshaled
in interfaceCanonicalMapFactory
- Specified by:
toMarshaled
in interfaceorg.refcodes.factory.MarshalTypeFactory<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
- Throws:
org.refcodes.exception.MarshalException
-
fromUnmarshaled
public InputStream fromUnmarshaled(org.refcodes.structure.CanonicalMap aDataStructure) throws org.refcodes.exception.MarshalException
- Specified by:
fromUnmarshaled
in interfaceorg.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
- Throws:
org.refcodes.exception.MarshalException
-
fromUnmarshaled
public InputStream fromUnmarshaled(org.refcodes.structure.CanonicalMap aDataStructure, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
- Specified by:
fromUnmarshaled
in interfaceorg.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
- Throws:
org.refcodes.exception.MarshalException
-
-