@ParametersAreNonnullByDefault public final class DublinCoreXmlFormat extends org.xml.sax.helpers.DefaultHandler
| Modifier and Type | Field and Description |
|---|---|
static com.entwinemedia.fn.Fn<String,com.entwinemedia.fn.data.Opt<DublinCoreCatalog>> |
readOptFromString
read(String) as a function, returning none on error. |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String localName,
String name) |
void |
error(SAXParseException e) |
void |
fatalError(SAXParseException e) |
static DublinCoreCatalog |
merge(DublinCoreCatalog fromCatalog,
DublinCoreCatalog intoCatalog)
Merge values that are new, changed, or emptied from the "from" catalog into the existing "into" catalog.
|
static DublinCoreCatalog |
read(File xml)
Read an XML encoded catalog from a file.
|
static DublinCoreCatalog |
read(File xml,
boolean includeEmptiedElements) |
static DublinCoreCatalog |
read(InputSource xml) |
static DublinCoreCatalog |
read(InputSource xml,
boolean includeEmptiedElements) |
static DublinCoreCatalog |
read(InputStream xml)
Read an XML encoded catalog from a stream.
|
static DublinCoreCatalog |
read(Node xml) |
static DublinCoreCatalog |
read(Node xml,
boolean includeEmptiedElements) |
static DublinCoreCatalog |
read(String xml)
Read an XML encoded catalog from a string.
|
static DublinCoreCatalog |
read(String xml,
boolean includeEmptiedElements) |
static com.entwinemedia.fn.data.Opt<DublinCoreCatalog> |
readOpt(String xml) |
void |
startElement(String uri,
String localName,
String name,
Attributes attributes)
Read
type attribute from track or catalog element. |
void |
startPrefixMapping(String prefix,
String uri) |
void |
warning(SAXParseException e) |
static Document |
writeDocument(DublinCoreCatalog dc) |
static String |
writeString(DublinCoreCatalog dc) |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDeclpublic static final com.entwinemedia.fn.Fn<String,com.entwinemedia.fn.data.Opt<DublinCoreCatalog>> readOptFromString
read(String) as a function, returning none on error.@Nonnull public static DublinCoreCatalog read(InputStream xml) throws IOException, SAXException, ParserConfigurationException
xml - the input stream containing the DublinCore catalogParserConfigurationException - if setting up the parser failedSAXException - if an error occurred while parsing the documentIOException - if the stream cannot be accessed in a proper way@Nonnull public static DublinCoreCatalog read(File xml) throws IOException, SAXException, ParserConfigurationException
xml - the file containing the DublinCore catalogParserConfigurationException - if setting up the parser failedSAXException - if an error occurred while parsing the documentIOException - if the stream cannot be accessed in a proper way@Nonnull public static DublinCoreCatalog read(String xml) throws IOException, SAXException, ParserConfigurationException
xml - the string containing the DublinCore catalogParserConfigurationException - if setting up the parser failedSAXException - if an error occurred while parsing the documentIOException - if the stream cannot be accessed in a proper waypublic static com.entwinemedia.fn.data.Opt<DublinCoreCatalog> readOpt(String xml)
@Nonnull public static DublinCoreCatalog read(Node xml) throws TransformerException
TransformerException@Nonnull public static DublinCoreCatalog read(InputSource xml) throws IOException, SAXException, ParserConfigurationException
@Nonnull public static DublinCoreCatalog read(String xml, boolean includeEmptiedElements) throws IOException, SAXException, ParserConfigurationException
@Nonnull public static DublinCoreCatalog read(Node xml, boolean includeEmptiedElements) throws TransformerException
TransformerException@Nonnull public static DublinCoreCatalog read(InputSource xml, boolean includeEmptiedElements) throws IOException, SAXException, ParserConfigurationException
@Nonnull public static DublinCoreCatalog read(File xml, boolean includeEmptiedElements) throws IOException, SAXException, ParserConfigurationException
public static DublinCoreCatalog merge(DublinCoreCatalog fromCatalog, DublinCoreCatalog intoCatalog)
fromCatalog - contains targeted new values (new elements, changed element values, emptied element values).intoCatalog - is the existing catalog that merges in the targed changes.public static Document writeDocument(DublinCoreCatalog dc) throws ParserConfigurationException, TransformerException, IOException
public static String writeString(DublinCoreCatalog dc)
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException
type attribute from track or catalog element.startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerSAXExceptionDefaultHandler.startElement(String, String, String, org.xml.sax.Attributes)public void endElement(String uri, String localName, String name) throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void error(SAXParseException e) throws SAXException
error in interface ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void fatalError(SAXParseException e) throws SAXException
fatalError in interface ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void warning(SAXParseException e) throws SAXException
warning in interface ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlerSAXExceptionCopyright © 2009–2019 Opencast Project. All rights reserved.