public class AttributeReplacer extends BaseElementWalker
Modifier and Type | Class and Description |
---|---|
class |
AttributeReplacer.WalkAttributeReplacer
the link and ref walker
|
class |
AttributeReplacer.WalkDefault
the link and ref walker
|
Modifier and Type | Field and Description |
---|---|
protected JDFAttributeMap |
theMap
fills this into the factory
|
log
theFactory
Constructor and Description |
---|
AttributeReplacer(JDFAttributeMap setMap,
String elementExpression) |
AttributeReplacer(String attributeName,
String newValue,
String elementExpression) |
Modifier and Type | Method and Description |
---|---|
void |
replace(KElement root)
erase all unlinked resources that are in n
|
void |
setMap(JDFAttributeMap map) |
getFactory
toString, walkTree, walkTreeKidsFirst
protected JDFAttributeMap theMap
public AttributeReplacer(String attributeName, String newValue, String elementExpression)
attributeName
- the attribute to replacenewValue
- the new value, if null the attribute is removedelementExpression
- the elements to match, if null all matchpublic AttributeReplacer(JDFAttributeMap setMap, String elementExpression)
setMap
- the map of attributes to setelementExpression
- the elements to match, if null all matchpublic void replace(KElement root)
root
- the element to cleanpublic void setMap(JDFAttributeMap map)
map
- the attribute map to setCopyright © 2018. All rights reserved.