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,
java.lang.String elementExpression) |
AttributeReplacer(java.lang.String attributeName,
java.lang.String newValue,
java.lang.String elementExpression) |
| Modifier and Type | Method and Description |
|---|---|
void |
replace(KElement root)
erase all unlinked resources that are in n
|
void |
setMap(JDFAttributeMap map) |
getFactorytoString, walkTree, walkTreeKidsFirstprotected JDFAttributeMap theMap
public AttributeReplacer(java.lang.String attributeName,
java.lang.String newValue,
java.lang.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, java.lang.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 set