org.apache.jackrabbit.rmi.xml
Class WorkspaceImportContentHandler
java.lang.Object
org.apache.jackrabbit.rmi.xml.ImportContentHandler
org.apache.jackrabbit.rmi.xml.WorkspaceImportContentHandler
- All Implemented Interfaces:
- ContentHandler
public class WorkspaceImportContentHandler
- extends ImportContentHandler
SAX content handler for importing XML data to a JCR Workspace
.
This utility class can be used to implement the
Workspace.getImportContentHandler(String, int)
method in terms of the
Workspace.importXML(String, InputStream, int)
method.
Methods inherited from class org.apache.jackrabbit.rmi.xml.ImportContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkspaceImportContentHandler
public WorkspaceImportContentHandler(Workspace workspace,
String path,
int uuidBehaviour)
- Creates a SAX content handler for importing XML data to the given
workspace and path using the given UUID behavior.
- Parameters:
workspace
- repository workspacepath
- import content pathuuidBehaviour
- UUID behavior
importXML
protected void importXML(byte[] xml)
throws Exception
- Imports the serialized XML stream using the standard
Workspace.importXML(String, InputStream, int)
method.
Imports the given XML data. This method is called by the
endDocument()
method after the received
XML stream has been serialized.
Subclasses must implement this method to provide the actual
import mechanism.
- Specified by:
importXML
in class ImportContentHandler
- Parameters:
xml
- the XML data to import
- Throws:
Exception
- on import errors
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.