|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.votable.Namespacing
public abstract class Namespacing
Determines how namespaces are handled in VOTable documents.
The static getInstance()
method provides an object which
encapsulates the default namespacing policy.
Field Summary | |
---|---|
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 java.lang.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 Summary | |
---|---|
Namespacing(java.lang.String name)
Constructor. |
Method Summary | |
---|---|
abstract void |
configureSAXParserFactory(javax.xml.parsers.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. |
java.lang.String |
getVOTagName(org.w3c.dom.Element el)
Returns the VOTable tagname for an XML element as present in a DOM. |
abstract java.lang.String |
getVOTagName(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Returns the VOTable tagname for an XML element as encountered by a SAX parser. |
void |
setInstance(Namespacing instance)
Sets the default instance. |
java.lang.String |
toString()
Returns the name of this namespacing policy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String POLICY_PROP
none
", "lax
", "strict
"
or the classname of a Namespacing implementation
which has a no-arg constructor.
- See Also:
- Constant Field Values
public static final Namespacing NONE
public static final Namespacing LAX
public static final Namespacing STRICT
Constructor Detail |
---|
public Namespacing(java.lang.String name)
name
- concise human-readable name describing this policyMethod Detail |
---|
public abstract void configureSAXParserFactory(javax.xml.parsers.SAXParserFactory spfact)
spfact
- factory to configurepublic abstract java.lang.String getVOTagName(java.lang.String namespaceURI, java.lang.String localName, java.lang.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 name
public java.lang.String getVOTagName(org.w3c.dom.Element el)
el
- element
public java.lang.String toString()
toString
in class java.lang.Object
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 instance
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |