org.cip4.jdflib.elementwalker
Class AttributeReplacer
java.lang.Object
org.cip4.jdflib.elementwalker.ElementWalker
org.cip4.jdflib.elementwalker.BaseElementWalker
org.cip4.jdflib.elementwalker.AttributeReplacer
public class AttributeReplacer
- extends BaseElementWalker
- Author:
- Dr. Rainer Prosi, Heidelberger Druckmaschinen AG
June 9, 2008
replaces all instances of an attribute in all matching elements
theMap
protected JDFAttributeMap theMap
- fills this into the factory
AttributeReplacer
public AttributeReplacer(String attributeName,
String newValue,
String elementExpression)
- Parameters:
attributeName - the attribute to replacenewValue - the new value, if null the attribute is removedelementExpression - the elements to match, if null all match
AttributeReplacer
public AttributeReplacer(JDFAttributeMap setMap,
String elementExpression)
- Parameters:
setMap - the map of attributes to setelementExpression - the elements to match, if null all match
replace
public void replace(KElement root)
- erase all unlinked resources that are in n
- Parameters:
root - the element to clean
getFactory
protected BaseWalkerFactory getFactory()
- Overrides:
getFactory in class BaseElementWalker
- Returns:
- the factory for this worker
setMap
public void setMap(JDFAttributeMap map)
- Parameters:
map - the attribute map to set
Copyright © 2013. All Rights Reserved.