Package 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAttributeReplacer.WalkAttributeReplacerthe link and ref walkerclassAttributeReplacer.WalkDefaultthe link and ref walker
-
Field Summary
Fields Modifier and Type Field Description protected JDFAttributeMaptheMapfills this into the factory-
Fields inherited from class org.cip4.jdflib.elementwalker.ElementWalker
theFactory
-
-
Constructor Summary
Constructors Constructor Description AttributeReplacer(java.lang.String attributeName, java.lang.String newValue, java.lang.String elementExpression)AttributeReplacer(JDFAttributeMap setMap, java.lang.String elementExpression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreplace(KElement root)erase all unlinked resources that are in nvoidsetMap(JDFAttributeMap map)-
Methods inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
getFactory
-
Methods inherited from class org.cip4.jdflib.elementwalker.ElementWalker
toString, walkTree, walkTreeKidsFirst
-
-
-
-
Field Detail
-
theMap
protected JDFAttributeMap theMap
fills this into the factory
-
-
Constructor Detail
-
AttributeReplacer
public AttributeReplacer(java.lang.String attributeName, java.lang.String newValue, java.lang.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, java.lang.String elementExpression)
- Parameters:
setMap- the map of attributes to setelementExpression- the elements to match, if null all match
-
-
Method Detail
-
replace
public void replace(KElement root)
erase all unlinked resources that are in n- Parameters:
root- the element to clean
-
setMap
public void setMap(JDFAttributeMap map)
- Parameters:
map- the attribute map to set
-
-