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
HtmlCanonicalMapFactory
, JavaCanonicalMapFactory
, JsonCanonicalMapFactory
, TomlCanonicalMapFactory
, XmlCanonicalMapFactory
, YamlCanonicalMapFactory
public abstract class AbstractCanonicalMapFactory extends Object implements CanonicalMapFactory
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>
COMMENT_PROPERTY, DELIMITER_PROPERTY, SUPPORTED_DELIMITERS_PROPERTY
Constructor | Description |
---|---|
AbstractCanonicalMapFactory() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
postProcess(org.refcodes.struct.CanonicalMap.CanonicalMapBuilder aProperties) |
This method takes care on giving nodes with children an own value: E.g.
|
protected String |
toComment(Map<String,String> aProperties) |
Retrieves the comment to be used in the header of the marshaled
representation.
|
protected char |
toDelimiter(Map<String,String> aProperties,
char aDefaultDelimiter) |
Retrieves the delimiter to be used for the data structure.
|
protected InputStream |
toInputStream(String aString) |
Converts the given
String to an InputStream . |
protected String |
toString(InputStream aInputStream) |
Converts the given
InputStream to a String . |
protected char[] |
toSupportedDelimiters(Map<String,String> aProperties) |
Retrieves the supported delimiters to be used when unmarshaling an
external representation.
|
protected static String |
toXml(org.refcodes.struct.CanonicalMap aCanonicalMap) |
Converts a
CanonicalMap to XML. |
toMarshaled, toMarshaled, toUnmarshaled, toUnmarshaled
fromUnmarshaled, fromUnmarshaled
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 THIS_ATTRIBUTES
.aProperties
- The properties where the "this" children are to assign
a value to their parents.protected String toString(InputStream aInputStream) throws IOException
InputStream
to a String
.aInputStream
- The InputStream
to be converted.String
.IOException
- thrown in case conversion failed.protected InputStream toInputStream(String aString)
String
to an InputStream
.aString
- The String
to be converted.InputStream
.protected char toDelimiter(Map<String,String> aProperties, char aDefaultDelimiter)
aProperties
- The properties from which to retrieve the delimiter.aDefaultDelimiter
- The delimiter to be used when there is none in
the properties defined.PathMap.DELIMITER
if none
was provided in the properties.protected char[] toSupportedDelimiters(Map<String,String> aProperties)
aProperties
- The properties from which to retrieve the supported
delimiters. Them delimiters are provided in a String
.PathMap.DELIMITER
if none was provided in the properties.protected String toComment(Map<String,String> aProperties)
aProperties
- The properties from which to retrieve the comment.CanonicalMapFactory.COMMENT_PROPERTY
if none was provided
in the properties.protected static String toXml(org.refcodes.struct.CanonicalMap aCanonicalMap)
CanonicalMap
to XML.aCanonicalMap
- The CanonicalMap
to marshal.Copyright © 2021. All rights reserved.