info.magnolia.importexport.filters
Class UselessNameFilter
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
info.magnolia.importexport.filters.SkipNodePropertyFilter
info.magnolia.importexport.filters.UselessNameFilter
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader
public class UselessNameFilter
- extends SkipNodePropertyFilter
A filter that can be used to remove optional "name" attributes in template, dialogs or paragraph nodes. The name
attribute was required in magnolia 2, magnolia 3 makes use of the name of the containing node. This filter can be
used to cleanup old configurations that survived to copy and paste. Not enabled by default, you need to modify
DataTransporter in order to use it (see the comments in DataTransporter.importXmlStream())
- Version:
- $Revision: $ ($Author: $)
- Author:
- fgiust
Method Summary |
protected 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 String |
getFilteredPropertyName()
Implement this method to specify the name of the property you want to filter. |
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 |
UselessNameFilter
public UselessNameFilter(XMLReader parent)
- Instantiates a new filter.
- Parameters:
parent
- wrapped XMLReader
getFilteredPropertyName
protected String getFilteredPropertyName()
- Description copied from class:
SkipNodePropertyFilter
- Implement this method to specify the name of the property you want to filter.
- Specified by:
getFilteredPropertyName
in class SkipNodePropertyFilter
- Returns:
- filtered property name
filter
protected boolean filter(String propertyValue,
String parentNodeName)
- Description copied from class:
SkipNodePropertyFilter
- Implement this method to specificy if a given property (given its value and the parent node name) should be
removed.
- Specified by:
filter
in class SkipNodePropertyFilter
- Parameters:
propertyValue
- property valueparentNodeName
- parent node name
- Returns:
true
if this property should be removed
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.