Class XmlConfigOptions

java.lang.Object
dev.orne.config.impl.XmlConfigOptions

@API(status=INTERNAL, since="1.0") public class XmlConfigOptions extends Object
Options of XML based configuration builder.
Since:
1.0
Version:
1.0, 2025-07
Author:
(w) Iker Hernaez
See Also:
  • Constructor Details

    • XmlConfigOptions

      public XmlConfigOptions()
      Empty constructor.
    • XmlConfigOptions

      public XmlConfigOptions(XmlConfigOptions copy)
      Copy constructor.
      Parameters:
      copy - The instance to copy.
  • Method Details

    • getDocument

      public Document getDocument()
      Returns the XML document with the configuration properties.
      Returns:
      The XML document with the configuration properties.
    • getPropertySeparator

      public String getPropertySeparator()
      Returns the configuration nested properties separator.
      Returns:
      The configuration nested properties separator.
    • setPropertySeparator

      public void setPropertySeparator(String separator)
      Sets the configuration nested properties separator.
      Parameters:
      separator - The configuration nested properties separator.
    • getAttributePrefix

      public String getAttributePrefix()
      Returns the XML attributes references prefix.
      Returns:
      The XML attributes references prefix.
    • setAttributePrefix

      public void setAttributePrefix(String prefix)
      Sets the XML attributes references prefix.
      Parameters:
      prefix - The XML attributes references prefix.
    • setRootElement

      public void setRootElement(@Nullable String namespaceURI, String localName)
      Creates an empty XML document with the specified root element name as configuration properties container.

      Note that any XML document loaded through load() methods must match the same root element name.

      Parameters:
      namespaceURI - The XML document namespace URI, or null if the XML document does not use namespaces.
      localName - The root element name of the XML document to create.
    • add

      public void add(Document values)
      Adds the specified configuration properties to the configuration properties.
      Parameters:
      values - The configuration properties.
    • load

      public void load(String path)
      Loads the configuration properties from the specified ClassLoader resource.
      Parameters:
      path - The ClassLoader resource path.
    • load

      public void load(Path path)
      Loads the configuration properties from the file in the specified path.
      Parameters:
      path - The file path.
    • load

      public void load(File file)
      Loads the configuration properties from the specified file.
      Parameters:
      file - The file to load.
    • load

      public void load(URL url)
      Loads the configuration properties from the specified URL.
      Parameters:
      url - The URL to load.
    • load

      public void load(InputStream docIS)
      Loads the configuration properties from the specified InputStream.
      Parameters:
      docIS - The XML document input stream.