|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.XMLFilterImpl info.magnolia.importexport.filters.SkipNodePropertyFilter
public abstract class SkipNodePropertyFilter
A base abstract filter that can be sub-classed in order to easily implement removal of properties based on their name/content.
Nested Class Summary | |
---|---|
static class |
SkipNodePropertyFilter.BufferedElement
Temporary element storage node. |
Field Summary | |
---|---|
protected boolean |
invalue
|
protected String |
lastNodeName
|
protected org.slf4j.Logger |
log
Logger. |
protected boolean |
skipProperty
|
Constructor Summary | |
---|---|
SkipNodePropertyFilter(XMLReader parent)
Instantiates a new filter. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(String uri,
String localName,
String qName)
|
protected abstract boolean |
filter(String propertyValue,
String parentNodeName)
Implement this method to specificy if a given property (given its value and the parent node name) should be removed. |
protected abstract String |
getFilteredPropertyName()
Implement this method to specify the name of the property you want to filter. |
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 |
---|
protected org.slf4j.Logger log
protected String lastNodeName
protected boolean skipProperty
protected boolean invalue
Constructor Detail |
---|
public SkipNodePropertyFilter(XMLReader parent)
parent
- wrapped XMLReaderMethod Detail |
---|
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.XMLFilterImpl
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.XMLFilterImpl
SAXException
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.XMLFilterImpl
SAXException
protected abstract String getFilteredPropertyName()
protected abstract boolean filter(String propertyValue, String parentNodeName)
propertyValue
- property valueparentNodeName
- parent node name
true
if this property should be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |