|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ivoa.registry.search.Metadata
public class Metadata
this class provides convenient access to information inside a DOM Node
Field Summary | |
---|---|
protected java.util.HashMap |
cache
|
protected static java.lang.String |
XSI_NS
|
Constructor Summary | |
---|---|
Metadata(org.w3c.dom.Node el)
wrap a DOM Node |
|
Metadata(org.w3c.dom.Node el,
java.lang.String path)
wrap a DOM element |
Method Summary | |
---|---|
void |
clearCache()
clear the internal parameter cache. |
protected java.util.List |
findBlocks(java.lang.String path)
return all metadata blocks that match a given path name as a List |
Metadata[] |
getBlocks(java.lang.String path)
return all Metadata blocks that match a given path name. |
org.w3c.dom.Node |
getDOMNode()
return the wrapped Node |
java.lang.String |
getParameter(java.lang.String path)
return the first value matching the given parameter name |
java.lang.String[] |
getParameters(java.lang.String path)
return values of all parameters with a given name |
java.lang.String |
getPathName()
return the pathname configured with this element |
java.lang.String |
getXSIType()
return the value of the xsi:type attribute if it exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap cache
protected static final java.lang.String XSI_NS
Constructor Detail |
---|
public Metadata(org.w3c.dom.Node el)
el
- the node to wrappublic Metadata(org.w3c.dom.Node el, java.lang.String path)
el
- the element to wrappath
- a path name to assume for the elementMethod Detail |
---|
public org.w3c.dom.Node getDOMNode()
public java.lang.String getPathName()
protected java.util.List findBlocks(java.lang.String path) throws java.lang.IllegalArgumentException
path
- the path to the desired XML node. This is a
slash-delimited string in which each field between
slashes is usually an element name. The last field
may either be the name of an element or an attribute.
If the last field begins with an "at" character (@),
only a matching attribute will be returned.
java.lang.IllegalArgumentException
- if any field except the last one
contains an "@" characterpublic Metadata[] getBlocks(java.lang.String path) throws java.lang.IllegalArgumentException
path
- the path to the desired XML node. This is a
slash-delimited string in which each field between
slashes is usually an element name. The last field
may either be the name of an element or an attribute.
If the last field begins with an "at" character (@),
only a matching attribute will be returned.
java.lang.IllegalArgumentException
- if any field except the last one
contains an "@" characterpublic java.lang.String[] getParameters(java.lang.String path)
path
- the path to the desired parameter. This is a
slash-delimited string in which each field between
slashes is usually an element name. The last field
may either be the name of an element or an attribute.
If the last field begins with an "at" character (@),
only a matching attribute will be returned.
java.lang.IllegalArgumentException
- if any field except the last one
contains an "@" characterpublic java.lang.String getParameter(java.lang.String path)
path
- the path to the desired parameter. This is a
slash-delimited string in which each field between
slashes is usually an element name. The last field
may either be the name of an element or an attribute.
If the last field begins with an "at" character (@),
only a matching attribute will be returned.
java.lang.IllegalArgumentException
- if any field except the last one
contains an "@" characterpublic java.lang.String getXSIType()
public void clearCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |