Interface XMLCatalog

All Known Implementing Classes:
DublinCoreCatalog, XMLCatalogImpl

public interface XMLCatalog
Definition for a plain xml catalog.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    includeEmpty(boolean includeEmpty)
    Marshal elements with empty values to support remove existing values during catalog merge.
    Serializes the catalog to a JSON string.
    Serializes the catalog to a DOM.
    void
    toXml(OutputStream out, boolean format)
    Writes an xml representation of this Catalog to a stream.
    Writes an xml representation of this Catalog to a string.
  • Method Details

    • toXml

      Serializes the catalog to a DOM. todo think about hiding technical exceptions
      Throws:
      ParserConfigurationException - if the xml parser environment is not correctly configured
      TransformerException - if serialization of the metadata document fails
      IOException - if an error with catalog file handling occurs
    • toJson

      String toJson() throws IOException
      Serializes the catalog to a JSON string.
      Returns:
      the json string
      Throws:
      IOException - if an error with the catalog file handling occurs
    • toXmlString

      String toXmlString() throws IOException
      Writes an xml representation of this Catalog to a string.
      Returns:
      the Catalog serialized to a string
      Throws:
      IOException
    • toXml

      void toXml(OutputStream out, boolean format) throws IOException
      Writes an xml representation of this Catalog to a stream.
      Parameters:
      out - The output stream
      format - Whether to format the output for readability, or not (false gives better performance)
      Throws:
      IOException
    • includeEmpty

      void includeEmpty(boolean includeEmpty)
      Marshal elements with empty values to support remove existing values during catalog merge.
      Parameters:
      includeEmpty -