info.magnolia.importexport.filters
Class ImportXmlRootFilter

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by info.magnolia.importexport.filters.ImportXmlRootFilter
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader

public class ImportXmlRootFilter
extends org.xml.sax.helpers.XMLFilterImpl

XML Filter for cleaning up version store from imported root node files.


Field Summary
 boolean rootNodeFound
           
 
Constructor Summary
ImportXmlRootFilter(XMLReader parent)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String localName, String qName)
           
 boolean rootNodeWasFound()
          Root node was found should be called after parsing to check if a root node was indeed found.
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootNodeFound

public boolean rootNodeFound
Constructor Detail

ImportXmlRootFilter

public ImportXmlRootFilter(XMLReader parent)
Method Detail

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.XMLFilterImpl
Throws:
SAXException
See Also:
XMLFilterImpl.endElement(String, String, String)

rootNodeWasFound

public boolean rootNodeWasFound()
Root node was found should be called after parsing to check if a root node was indeed found.


characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class org.xml.sax.helpers.XMLFilterImpl
Throws:
SAXException
See Also:
XMLFilterImpl.characters(char[], int, int)

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.XMLFilterImpl
Throws:
SAXException
See Also:
XMLFilterImpl.startElement(String, String, String, Attributes)


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.