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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassthe link and ref walkerclassthe link and ref walker -
Field Summary
FieldsFields inherited from class org.cip4.jdflib.elementwalker.ElementWalker
theFactory -
Constructor Summary
ConstructorsConstructorDescriptionAttributeReplacer(String attributeName, String newValue, String elementExpression) AttributeReplacer(JDFAttributeMap setMap, String elementExpression) -
Method Summary
Modifier and TypeMethodDescriptionvoiderase all unlinked resources that are in nvoidsetMap(JDFAttributeMap map) Methods inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
getFactoryMethods inherited from class org.cip4.jdflib.elementwalker.ElementWalker
toString, walkTree, walkTreeKidsFirst
-
Field Details
-
theMap
fills this into the factory
-
-
Constructor Details
-
AttributeReplacer
- Parameters:
attributeName- the attribute to replacenewValue- the new value, if null the attribute is removedelementExpression- the elements to match, if null all match
-
AttributeReplacer
- Parameters:
setMap- the map of attributes to setelementExpression- the elements to match, if null all match
-
-
Method Details
-
replace
erase all unlinked resources that are in n- Parameters:
root- the element to clean
-
setMap
- Parameters:
map- the attribute map to set
-