public abstract class Namespacing extends Object
getInstance()
method provides an object which
encapsulates the default namespacing policy.Modifier and Type | Field and Description |
---|---|
static Namespacing |
LAX
Interpret likely-looking elements in any namespace as VOTable ones.
|
static Namespacing |
NONE
No namespace awareness; any namespacing will probably confuse parser.
|
static String |
POLICY_PROP
Name of system property which determines namespacing policy used.
|
static Namespacing |
STRICT
Only elements in namespaces with VOTable URIs are significant.
|
Constructor and Description |
---|
Namespacing(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
configureSAXParserFactory(SAXParserFactory spfact)
Performs any necessary configuration of the namespacing capabilities
of a given parser factory for use with this namespacing policy.
|
static Namespacing |
getInstance()
Returns the default Namespacing instance.
|
String |
getVOTagName(Element el)
Returns the VOTable tagname for an XML element as present in a DOM.
|
abstract String |
getVOTagName(String namespaceURI,
String localName,
String qName)
Returns the VOTable tagname for an XML element as encountered by a
SAX parser.
|
void |
setInstance(Namespacing instance)
Sets the default instance.
|
String |
toString()
Returns the name of this namespacing policy.
|
public static final String POLICY_PROP
none
", "lax
", "strict
"
or the classname of a Namespacing
implementation
which has a no-arg constructor.public static final Namespacing NONE
public static final Namespacing LAX
public static final Namespacing STRICT
public Namespacing(String name)
name
- concise human-readable name describing this policypublic abstract void configureSAXParserFactory(SAXParserFactory spfact)
spfact
- factory to configurepublic abstract String getVOTagName(String namespaceURI, String localName, String qName)
The parameters have the same meanings, and may or may not be
present as for, those in
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
.
namespaceURI
- namespace URIlocalName
- local nameqName
- qualified namepublic String getVOTagName(Element el)
el
- elementpublic String toString()
public static Namespacing getInstance()
POLICY_PROP
system property.
If not otherwise set the default is currently LAX
.public void setInstance(Namespacing instance)
instance
- new default instanceCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.