org.apache.jackrabbit.rmi.xml
Class SessionImportContentHandler
java.lang.Object
org.apache.jackrabbit.rmi.xml.ImportContentHandler
org.apache.jackrabbit.rmi.xml.SessionImportContentHandler
- All Implemented Interfaces:
- ContentHandler
public class SessionImportContentHandler
- extends ImportContentHandler
SAX content handler for importing XML data to a JCR Session
.
This utility class can be used to implement the
Session.getImportContentHandler(String, int)
method in terms of the
Session.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 |
SessionImportContentHandler
public SessionImportContentHandler(Session session,
String path,
int uuidBehaviour)
- Creates a SAX content handler for importing XML data to the given
session and path.
- Parameters:
session
- repository sessionpath
- import content pathuuidBehaviour
- UUID behavior mode
importXML
protected void importXML(byte[] xml)
throws Exception
- Imports the serialized XML stream using the standard
Session.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.