public class RootElementNameContentWorkerSelector extends org.xml.sax.helpers.DefaultHandler implements ContentWorkerSelector
| Constructor and Description |
|---|
RootElementNameContentWorkerSelector() |
| Modifier and Type | Method and Description |
|---|---|
ContentWorker |
getWorker(org.alfresco.service.cmr.repository.ContentReader reader)
Performs a match of the root element name to find the correct content worker.
|
void |
init()
Checks the configuration.
|
void |
setSupportedMimetypes(java.util.Set supportedMimetypes)
Optionally set the mimetypes supported.
|
void |
setWorkers(java.util.Map workers)
Set the workers to choose from.
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes) |
java.lang.String |
toString() |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningpublic RootElementNameContentWorkerSelector()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setSupportedMimetypes(java.util.Set supportedMimetypes)
supportedMimetypes - the list of mimetypes. The default is text/xml.public void setWorkers(java.util.Map workers)
workers - a map of ContentWorker instances
keyed by root element namepublic void init()
public ContentWorker getWorker(org.alfresco.service.cmr.repository.ContentReader reader)
getWorker in interface ContentWorkerSelectorreader - the content reader, providing the actual stream metadata
and even the stream, if required.public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.