org.cip4.jdflib.elementwalker
Class EnsureNSUri
java.lang.Object
org.cip4.jdflib.elementwalker.ElementWalker
org.cip4.jdflib.elementwalker.BaseElementWalker
org.cip4.jdflib.elementwalker.EnsureNSUri
public class EnsureNSUri
- extends BaseElementWalker
- Author:
- Dr. Rainer Prosi, Heidelberger Druckmaschinen AG
ensures correct ns uri
|
Nested Class Summary |
class |
EnsureNSUri.WalkElement
the resource walker note the naming convention Walkxxx so that it is automagically instantiated by the super classes |
nsMap
protected final BiHashMap<String,String> nsMap
aliasMap
protected final HashMap<String,String> aliasMap
EnsureNSUri
public EnsureNSUri()
addNS
public void addNS(String prefix,
String uri)
- add a prefix / uri pair
- Parameters:
prefix - the namespace prefix - may be null for empty namespaceuri - the URI must not be null
- Throws:
IllegalArgumentException - if uri is null
addAlias
public void addAlias(String badPrefix,
String goodPrefix)
- add a an alias
- Parameters:
badPrefix - the ns prefix to rename (e.g. ns1)goodPrefix - the destination prefix
walk
public void walk(KElement root)
- Parameters:
root -
getFactory
protected BaseWalkerFactory getFactory()
- Overrides:
getFactory in class BaseElementWalker
- Returns:
- the factory for this worker
Copyright © 2013. All Rights Reserved.