edu.ucsb.nceas.morpho.datapackage
Class MetadataObject

java.lang.Object
  extended byedu.ucsb.nceas.morpho.datapackage.MetadataObject
Direct Known Subclasses:
AbstractDataPackage

public class MetadataObject
extends java.lang.Object

class that represents a data package.


Field Summary
protected static org.w3c.dom.Document doc
          Document node of the in-memory DOM structure
protected  java.lang.String grammar
          the specific grammar value; i.e.
protected  java.lang.String grammarType
          specifies the general type of the grammar used to specify the schema; currently, the allowed types are "publicID", "systemID", "namespace", "rootname", and "unknown"
protected  org.w3c.dom.Node metadataNode
          A DOM Node is the basic datastructure.
protected  org.w3c.dom.Node metadataPathNode
          paths is designed to provide a 'map' between generic paths and specific locations in a tree (Node) structure.
protected static org.w3c.dom.Node root
          root node of the in-memory DOM structure
 
Constructor Summary
MetadataObject()
           
MetadataObject(org.w3c.dom.Node node)
           
MetadataObject(org.w3c.dom.Node node, org.w3c.dom.Node nd)
           
MetadataObject(org.w3c.dom.Node node, org.w3c.dom.Node nd, java.lang.String grammartype, java.lang.String grammar)
           
MetadataObject(org.w3c.dom.Node node, java.lang.String grammartype, java.lang.String grammar)
           
 
Method Summary
 java.lang.String getGenericValue(java.lang.String genericName)
           
 org.w3c.dom.Node getMetadataNode()
           
 org.w3c.dom.Node getMetadataPath()
           
 java.lang.String getXPathValue(java.lang.String path)
           
static void main(java.lang.String[] args)
           
 void setGenericValue(java.lang.String genericName, java.lang.String genericValue)
           
 void setMetadataNode(org.w3c.dom.Node nd)
           
 void setMetadataPath(org.w3c.dom.Node nd)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

doc

protected static org.w3c.dom.Document doc
Document node of the in-memory DOM structure


root

protected static org.w3c.dom.Node root
root node of the in-memory DOM structure


metadataNode

protected org.w3c.dom.Node metadataNode
A DOM Node is the basic datastructure. This may be the root of a DOM or it may be the top level node of a subtree. Working with the Node allows several Metadata objects to share a DOM and avoids the need to move Nodes between DOMs


metadataPathNode

protected org.w3c.dom.Node metadataPathNode
paths is designed to provide a 'map' between generic paths and specific locations in a tree (Node) structure. This allows one to get items like 'name' from paths that may occur in different locations in the tree for different schemas It was decided to use a DOM structure for storing this information since this is more general than a map and tools for getting data from a DOM are already in use (see XMLUtilites)


grammarType

protected java.lang.String grammarType
specifies the general type of the grammar used to specify the schema; currently, the allowed types are "publicID", "systemID", "namespace", "rootname", and "unknown"


grammar

protected java.lang.String grammar
the specific grammar value; i.e. publicID, namespace value, etc

Constructor Detail

MetadataObject

public MetadataObject()

MetadataObject

public MetadataObject(org.w3c.dom.Node node)

MetadataObject

public MetadataObject(org.w3c.dom.Node node,
                      java.lang.String grammartype,
                      java.lang.String grammar)

MetadataObject

public MetadataObject(org.w3c.dom.Node node,
                      org.w3c.dom.Node nd)

MetadataObject

public MetadataObject(org.w3c.dom.Node node,
                      org.w3c.dom.Node nd,
                      java.lang.String grammartype,
                      java.lang.String grammar)
Method Detail

setMetadataNode

public void setMetadataNode(org.w3c.dom.Node nd)

getMetadataNode

public org.w3c.dom.Node getMetadataNode()

getMetadataPath

public org.w3c.dom.Node getMetadataPath()

setMetadataPath

public void setMetadataPath(org.w3c.dom.Node nd)

getGenericValue

public java.lang.String getGenericValue(java.lang.String genericName)

getXPathValue

public java.lang.String getXPathValue(java.lang.String path)

setGenericValue

public void setGenericValue(java.lang.String genericName,
                            java.lang.String genericValue)

main

public static void main(java.lang.String[] args)

toString

public java.lang.String toString()


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.