Class 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 the CanonicalMapFactory for parsing the XML notation.
    • Constructor Detail

      • XmlCanonicalMapFactory

        public XmlCanonicalMapFactory​()
    • Method Detail

      • fromMarshaled

        public org.refcodes.structure.CanonicalMap.CanonicalMapBuilder fromMarshaled​(InputStream aExternalRepresentation)
                                                                              throws org.refcodes.exception.UnmarshalException
        Specified by:
        fromMarshaled in interface org.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 interface org.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 interface CanonicalMapFactory
        Specified by:
        toMarshaled in interface org.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 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. 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.
        Specified by:
        toMarshaled in interface CanonicalMapFactory
        Specified by:
        toMarshaled in interface org.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 interface org.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 interface org.refcodes.factory.MarshalTypeFactory.MarshalTypeFactoryComplement<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder,String>
        Throws:
        org.refcodes.exception.MarshalException