Package org.opencastproject.mediapackage
Interface XMLCatalog
- All Known Implementing Classes:
XMLCatalogImpl
public interface XMLCatalog
Definition for a plain xml catalog.
-
Method Summary
Modifier and TypeMethodDescriptionvoidincludeEmpty(boolean includeEmpty) Marshal elements with empty values to support remove existing values during catalog merge.toJson()Serializes the catalog to a JSON string.toXml()Serializes the catalog to a DOM.voidtoXml(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 configuredTransformerException- if serialization of the metadata document failsIOException- if an error with catalog file handling occurs
-
toJson
Serializes the catalog to a JSON string.- Returns:
- the json string
- Throws:
IOException- if an error with the catalog file handling occurs
-
toXmlString
Writes an xml representation of this Catalog to a string.- Returns:
- the Catalog serialized to a string
- Throws:
IOException
-
toXml
Writes an xml representation of this Catalog to a stream.- Parameters:
out- The output streamformat- 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-
-