Class XMLTransferRequsiteReader
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.alfresco.repo.transfer.requisite.XMLTransferRequsiteReader
-
- All Implemented Interfaces:
org.alfresco.service.namespace.NamespacePrefixResolver,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class XMLTransferRequsiteReader extends DefaultHandler implements ContentHandler, org.alfresco.service.namespace.NamespacePrefixResolver
SAX XML Content Handler to read a transfer manifest XML Stream and delegate processing of the manifest to the specified TransferRequsiteProcessor- Author:
- Mark Rogers
-
-
Constructor Summary
Constructors Constructor Description XMLTransferRequsiteReader(TransferRequsiteProcessor processor)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendDocument()voidendElement(String uri, String localName, String prefixName)End ElementvoidendPrefixMapping(String prefix)StringgetNamespaceURI(String prefix)lookup the prefix for a URI e.g.Collection<String>getPrefixes()Collection<String>getPrefixes(String namespaceURI)Collection<String>getURIs()voidignorableWhitespace(char[] ch, int start, int length)voidprocessingInstruction(String target, String data)voidsetDocumentLocator(Locator locator)voidskippedEntity(String name)voidstartDocument()voidstartElement(String uri, String localName, String prefixName, Attributes atts)Start ElementvoidstartPrefixMapping(String prefix, String uri)-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xml.sax.ContentHandler
characters
-
-
-
-
Constructor Detail
-
XMLTransferRequsiteReader
public XMLTransferRequsiteReader(TransferRequsiteProcessor processor)
Constructor- Parameters:
processor-
-
-
Method Detail
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classDefaultHandler- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Overrides:
endPrefixMappingin classDefaultHandler- Throws:
SAXException
-
getNamespaceURI
public String getNamespaceURI(String prefix) throws org.alfresco.service.namespace.NamespaceException
lookup the prefix for a URI e.g. TRANSFER_URI for xfer- Specified by:
getNamespaceURIin interfaceorg.alfresco.service.namespace.NamespacePrefixResolver- Throws:
org.alfresco.service.namespace.NamespaceException
-
getPrefixes
public Collection<String> getPrefixes(String namespaceURI) throws org.alfresco.service.namespace.NamespaceException
- Specified by:
getPrefixesin interfaceorg.alfresco.service.namespace.NamespacePrefixResolver- Parameters:
namespaceURI-- Returns:
- the prefix
- Throws:
org.alfresco.service.namespace.NamespaceException
-
getPrefixes
public Collection<String> getPrefixes()
- Specified by:
getPrefixesin interfaceorg.alfresco.service.namespace.NamespacePrefixResolver
-
getURIs
public Collection<String> getURIs()
- Specified by:
getURIsin interfaceorg.alfresco.service.namespace.NamespacePrefixResolver
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String prefixName, Attributes atts) throws SAXException
Start Element- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String prefixName) throws SAXException
End Element- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Overrides:
ignorableWhitespacein classDefaultHandler- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Overrides:
processingInstructionin classDefaultHandler- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classDefaultHandler
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Overrides:
skippedEntityin classDefaultHandler- Throws:
SAXException
-
-