spase.parser130
Class Instrument

java.lang.Object
  extended by spase.parser130.XMLParser
      extended by spase.parser130.Resource
          extended by spase.parser130.Instrument

public class Instrument
extends Resource

A container of Instrument information.


Constructor Summary
Instrument()
           
Instrument(boolean forEdit)
           
Instrument(org.w3c.dom.Node node)
           
 
Method Summary
 java.lang.String getCaveats()
           
 java.util.ArrayList<Extension> getExtension()
           
 java.util.ArrayList<java.lang.String> getInstrumentType()
           
 java.lang.String getInvestigationName()
           
 XMLParser getMemberNode(java.lang.String name)
          Retrieve the code nodes in the class.
 java.lang.String getObservatoryID()
           
 ResourceHeader getResourceHeader()
           
 java.lang.String getResourceID()
           
 java.lang.String getXMLDocument(int n)
          Create an XML representation of the resource.
 java.lang.String getXMLDocument(int n, boolean inUseOnly)
          Return a string containing an XML representation of this instance.
 java.lang.String getXMLDocument(int n, java.lang.String path, int key)
          Create an XML representation of the resource.
 java.lang.String getXMLDocument(int n, java.lang.String path, int key, boolean inUseOnly)
          Return a string containing an XML representation of this isntance.
static java.util.ArrayList<Pair> getXPathPairs(java.lang.String prefix, java.util.ArrayList<Instrument> list)
           
 java.util.ArrayList<Pair> getXPathPairs(java.lang.String prefix, int index)
          Return an ArrayList of string Pairs which contains for each node in the XML document an XPath as the "left" value of the pair and the value as the "right" value of pair.
static void main(java.lang.String[] args)
           
 void makeEditNodes()
          Make an instance of every node for use in an editor
 void makeNewMember(java.lang.String item)
          Create a new member.
 void makeSkeletonNodes()
          Create skeleton nodes for all resources.
 void removeMember(java.lang.String item, int index)
          Remove an elment of a member.
 void reset()
           
 void setCaveats(java.lang.String value)
           
 void setCaveats(java.lang.String[] value)
           
 void setExtension(org.w3c.dom.Node node)
           
 void setInstrumentType(java.lang.String value)
           
 void setInstrumentType(java.lang.String[] value)
           
 void setInvestigationName(java.lang.String value)
           
 void setInvestigationName(java.lang.String[] value)
           
 void setObservatoryID(java.lang.String value)
           
 void setObservatoryID(java.lang.String[] value)
           
 void setRequired()
           
 void setResourceHeader(org.w3c.dom.Node node)
           
 void setResourceID(java.lang.String value)
           
 void setResourceID(java.lang.String[] value)
           
 
Methods inherited from class spase.parser130.Resource
makeNew
 
Methods inherited from class spase.parser130.XMLParser
addRequired, dump, dumpData, dumpNode, entityEncode, findNode, getAllValues, getBranchText, getClassName, getDefaultStyleSheet, getDocument, getElementPath, getMemberName, getMemberNodeIndex, getMemberNodeName, getMemberParent, getMemberPath, getNodes, getNodes, getNodes, getNodeText, getPath, getPathName, getRequired, getStringReader, getTagClose, getTaggedList, getTaggedList, getTaggedValue, getTaggedValue, getTagOpen, getTopParent, getValues, getValues, getWords, getXPathList, getXPathPairs, indent, isCommonWord, isInList, isInList, isInList, isInUse, isMatch, isRequired, load, load, load, makeTagContent, parseWords, parseXML, parseXML, parseXMLString, printXML, processNode, setClassName, setMember, setMember, setMember, splitMixed, toImproperCase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Instrument

public Instrument()

Instrument

public Instrument(boolean forEdit)

Instrument

public Instrument(org.w3c.dom.Node node)
           throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

main

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

reset

public void reset()
Overrides:
reset in class Resource

setRequired

public void setRequired()

makeEditNodes

public void makeEditNodes()
Description copied from class: Resource
Make an instance of every node for use in an editor

Overrides:
makeEditNodes in class Resource

makeSkeletonNodes

public void makeSkeletonNodes()
Description copied from class: Resource
Create skeleton nodes for all resources.

Overrides:
makeSkeletonNodes in class Resource

getMemberNode

public XMLParser getMemberNode(java.lang.String name)
Description copied from class: Resource
Retrieve the code nodes in the class. Derived classes must implement this method to retrieve added member nodes.

Overrides:
getMemberNode in class Resource
Parameters:
name - the name associated with a member.

makeNewMember

public void makeNewMember(java.lang.String item)
Description copied from class: XMLParser
Create a new member. To be implemented in each derived class.

Overrides:
makeNewMember in class XMLParser
Parameters:
item - the name of the member to create.

removeMember

public void removeMember(java.lang.String item,
                         int index)
Description copied from class: XMLParser
Remove an elment of a member. To be implemented in each derived class.

Overrides:
removeMember in class XMLParser
Parameters:
item - the name of the member to create.
index - the index of the element to remove.

getXMLDocument

public java.lang.String getXMLDocument(int n)
Description copied from class: Resource
Create an XML representation of the resource. The dervied class should full implement this method.

Overrides:
getXMLDocument in class Resource
Parameters:
n - the number of levels to indent the document.

getXMLDocument

public java.lang.String getXMLDocument(int n,
                                       boolean inUseOnly)
Description copied from class: XMLParser
Return a string containing an XML representation of this instance. To be implemented in each derived class.

Overrides:
getXMLDocument in class XMLParser
Parameters:
n - the number of levels to indent the document.
inUseOnly - indicates whether to include only those elements currently in use.

getXMLDocument

public java.lang.String getXMLDocument(int n,
                                       java.lang.String path,
                                       int key)
Description copied from class: Resource
Create an XML representation of the resource. The dervied class should full implement this method.

Overrides:
getXMLDocument in class Resource
Parameters:
n - the number of levels to indent the document.
path - the path to the element.
key - the index (key) of the element at the path.

getXMLDocument

public java.lang.String getXMLDocument(int n,
                                       java.lang.String path,
                                       int key,
                                       boolean inUseOnly)
Description copied from class: XMLParser
Return a string containing an XML representation of this isntance. To be implemented in each derived class.

Overrides:
getXMLDocument in class XMLParser
Parameters:
n - the number of levels to indent the document.
path - the path to the element.
key - the index (key) of the element at the path.

setResourceID

public void setResourceID(java.lang.String value)
Overrides:
setResourceID in class Resource

setResourceID

public void setResourceID(java.lang.String[] value)
Overrides:
setResourceID in class Resource

getResourceID

public java.lang.String getResourceID()
Overrides:
getResourceID in class Resource

setResourceHeader

public void setResourceHeader(org.w3c.dom.Node node)
                       throws java.lang.Exception
Overrides:
setResourceHeader in class Resource
Throws:
java.lang.Exception

getResourceHeader

public ResourceHeader getResourceHeader()
Overrides:
getResourceHeader in class Resource

setInstrumentType

public void setInstrumentType(java.lang.String value)

setInstrumentType

public void setInstrumentType(java.lang.String[] value)

getInstrumentType

public java.util.ArrayList<java.lang.String> getInstrumentType()

setInvestigationName

public void setInvestigationName(java.lang.String value)

setInvestigationName

public void setInvestigationName(java.lang.String[] value)

getInvestigationName

public java.lang.String getInvestigationName()

setObservatoryID

public void setObservatoryID(java.lang.String value)

setObservatoryID

public void setObservatoryID(java.lang.String[] value)

getObservatoryID

public java.lang.String getObservatoryID()

setCaveats

public void setCaveats(java.lang.String value)

setCaveats

public void setCaveats(java.lang.String[] value)

getCaveats

public java.lang.String getCaveats()

setExtension

public void setExtension(org.w3c.dom.Node node)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getExtension

public java.util.ArrayList<Extension> getExtension()

getXPathPairs

public java.util.ArrayList<Pair> getXPathPairs(java.lang.String prefix,
                                               int index)
Description copied from class: XMLParser
Return an ArrayList of string Pairs which contains for each node in the XML document an XPath as the "left" value of the pair and the value as the "right" value of pair. The Prefix will be added to each path. If index is other than zero then the prefix will be modified to include the index.

Overrides:
getXPathPairs in class XMLParser
Parameters:
prefix - the leading path to add to each XPath.
index - the index of the item if part of an array. Indexes start a 1, a value of 0 indicates it is not part of an array.

getXPathPairs

public static java.util.ArrayList<Pair> getXPathPairs(java.lang.String prefix,
                                                      java.util.ArrayList<Instrument> list)