Class FormatXMLElements


  • public final class FormatXMLElements
    extends java.lang.Object
    Functions to transform values into XML elements.
    • Constructor Summary

      Constructors 
      Constructor Description
      FormatXMLElements()
      Construct an element producer.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.w3c.dom.Document document()
      Create a new empty document.
      static org.w3c.dom.Element ofBranding​(org.w3c.dom.Document document, RuntimeRepositoryBranding branding)
      Serialize the given branding, using the given document to create elements.
      static org.w3c.dom.Element ofBuild​(org.w3c.dom.Document document, RuntimeBuild build)
      Serialize the given build, using the given document to create elements.
      static org.w3c.dom.Element ofHash​(org.w3c.dom.Document document, RuntimeHash hash)
      Serialize the given hash, using the given document to create elements.
      org.w3c.dom.Document ofRepository​(RuntimeRepositoryDescription repository)
      Create a new document from the given repository.
      static org.w3c.dom.Element ofRepository​(org.w3c.dom.Document document, RuntimeRepositoryDescription repository)
      Serialize the given repository, using the given document to create elements.
      static org.w3c.dom.Element ofRuntime​(org.w3c.dom.Document document, RuntimeDescription runtime, boolean append_repository)
      Serialize the given runtime, using the given document to create elements.
      static org.w3c.dom.Element ofTag​(org.w3c.dom.Document document, java.lang.String tag)
      Serialize the given tag, using the given document to create elements.
      static org.w3c.dom.Element ofTags​(org.w3c.dom.Document document, java.util.Set<java.lang.String> tags)
      Serialize the given set of tags, using the given document to create elements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormatXMLElements

        public FormatXMLElements()
        Construct an element producer.
    • Method Detail

      • ofRepository

        public static org.w3c.dom.Element ofRepository​(org.w3c.dom.Document document,
                                                       RuntimeRepositoryDescription repository)
        Serialize the given repository, using the given document to create elements.
        Parameters:
        document - The target document
        repository - The repository
        Returns:
        A serialized repository
      • ofBranding

        public static org.w3c.dom.Element ofBranding​(org.w3c.dom.Document document,
                                                     RuntimeRepositoryBranding branding)
        Serialize the given branding, using the given document to create elements.
        Parameters:
        document - The target document
        branding - The branding
        Returns:
        A serialized branding
      • ofRuntime

        public static org.w3c.dom.Element ofRuntime​(org.w3c.dom.Document document,
                                                    RuntimeDescription runtime,
                                                    boolean append_repository)
        Serialize the given runtime, using the given document to create elements.
        Parameters:
        document - The target document
        runtime - The runtime
        append_repository - True if the repository ID should be included in the element
        Returns:
        A serialized runtime
      • ofTags

        public static org.w3c.dom.Element ofTags​(org.w3c.dom.Document document,
                                                 java.util.Set<java.lang.String> tags)
        Serialize the given set of tags, using the given document to create elements.
        Parameters:
        document - The target document
        tags - The set of tags
        Returns:
        A serialized set of tags
      • ofTag

        public static org.w3c.dom.Element ofTag​(org.w3c.dom.Document document,
                                                java.lang.String tag)
        Serialize the given tag, using the given document to create elements.
        Parameters:
        document - The target document
        tag - The tag
        Returns:
        A serialized tag
      • ofHash

        public static org.w3c.dom.Element ofHash​(org.w3c.dom.Document document,
                                                 RuntimeHash hash)
        Serialize the given hash, using the given document to create elements.
        Parameters:
        document - The target document
        hash - The hash
        Returns:
        A serialized hash
      • ofBuild

        public static org.w3c.dom.Element ofBuild​(org.w3c.dom.Document document,
                                                  RuntimeBuild build)
        Serialize the given build, using the given document to create elements.
        Parameters:
        document - The target document
        build - The build
        Returns:
        A serialized build
      • ofRepository

        public org.w3c.dom.Document ofRepository​(RuntimeRepositoryDescription repository)
                                          throws javax.xml.parsers.ParserConfigurationException
        Create a new document from the given repository.
        Parameters:
        repository - The repository
        Returns:
        A document
        Throws:
        javax.xml.parsers.ParserConfigurationException - On configuration errors
      • document

        public org.w3c.dom.Document document()
                                      throws javax.xml.parsers.ParserConfigurationException
        Create a new empty document.
        Returns:
        An empty document
        Throws:
        javax.xml.parsers.ParserConfigurationException - On configuration errors