gov.lanl.Web
Class Content

java.lang.Object
  |
  +--gov.lanl.Web.Content
All Implemented Interfaces:
java.io.Serializable

public class Content
extends java.lang.Object
implements java.io.Serializable

COAS ObservationDataStruct container bean This class facilitiates the incremental construction of the tree of data that makes up the ObservationDataStruct. It also provides a mechanism to convert it to a DOM Document which is an intermediate step in the conversion process.

Version:
Author:
dwf
See Also:
Serialized Form

Constructor Summary
Content()
          Creates new Content
Content(org.omg.DsObservationAccess.ObservationDataStruct od)
          Construct content from ObservationDataStruct
 
Method Summary
 void addContent(Content oData)
          Add content and try to attach to appropriate container
 void addContent(Content[] data)
          Add an array of content
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addQualifier(Content qualifier)
          add qualifier to this content object
 org.w3c.dom.Node applyXSL(java.lang.String xslfile, java.lang.String[] params)
          get proper Document translated by xsl stylesheet
 void delContent(java.lang.String code)
          Remove an element by name
 java.lang.String getCode()
           
 java.util.Vector getContent()
          return composite vector
 Content getContent(java.lang.String code)
          Look up code in composite or qualifier
static org.w3c.dom.Document getDocument()
          return static document value
 org.w3c.dom.Node getNode()
          return DOM Node for current Content object and children
 java.util.Vector getQualifiers()
          get qualifiers
 ObservationValue_ getValue()
           
static java.lang.String getXsl()
          get the Xsl file for translation
 void init(java.lang.String aCode, java.lang.String aValue)
           
static void initDOM()
          initializer for DOM model
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setCode(java.lang.String value)
           
 void setValue(ObservationValue_ aValue)
          set the Observation Value
static void setXsl(java.lang.String xslfile)
           
 org.w3c.dom.Document toDom()
          Build DOM tree from this Content object
 org.omg.DsObservationAccess.ObservationDataStruct[] toDOMObsDataSeq()
          Convert into ObservationDataStruct[] via Document Model
 org.omg.DsObservationAccess.ObservationDataStruct toObsData()
          Convert Content to COAS ObservationDataStruct directly
 org.omg.DsObservationAccess.ObservationDataStruct[] toObsDataSeq()
           
 java.lang.String toString()
          Serialize Content to String
 java.lang.String toString(org.w3c.dom.Node node)
           
 void write(java.lang.String file)
          Serialize Content to a file as XML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Content

public Content()
Creates new Content


Content

public Content(org.omg.DsObservationAccess.ObservationDataStruct od)
Construct content from ObservationDataStruct

Method Detail

initDOM

public static void initDOM()
initializer for DOM model


init

public void init(java.lang.String aCode,
                 java.lang.String aValue)

getCode

public java.lang.String getCode()

setCode

public void setCode(java.lang.String value)

getValue

public ObservationValue_ getValue()

getDocument

public static org.w3c.dom.Document getDocument()
return static document value


setValue

public void setValue(ObservationValue_ aValue)
set the Observation Value

Parameters:
aValue -

addContent

public void addContent(Content[] data)
Add an array of content

Parameters:
data - array of content to be added

addContent

public void addContent(Content oData)
Add content and try to attach to appropriate container

Parameters:
oData - with content to be added to be added

getContent

public Content getContent(java.lang.String code)
Look up code in composite or qualifier

Parameters:
code -
Returns:
Content

delContent

public void delContent(java.lang.String code)
Remove an element by name

Parameters:
code -

addQualifier

public void addQualifier(Content qualifier)
add qualifier to this content object


getQualifiers

public java.util.Vector getQualifiers()
get qualifiers


getContent

public java.util.Vector getContent()
return composite vector


getNode

public org.w3c.dom.Node getNode()
return DOM Node for current Content object and children


toDom

public org.w3c.dom.Document toDom()
Build DOM tree from this Content object


write

public void write(java.lang.String file)
Serialize Content to a file as XML

Parameters:
file -

toString

public java.lang.String toString()
Serialize Content to String

Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(org.w3c.dom.Node node)

toDOMObsDataSeq

public org.omg.DsObservationAccess.ObservationDataStruct[] toDOMObsDataSeq()
Convert into ObservationDataStruct[] via Document Model

Returns:
array of observationdata structs.

toObsDataSeq

public org.omg.DsObservationAccess.ObservationDataStruct[] toObsDataSeq()

toObsData

public org.omg.DsObservationAccess.ObservationDataStruct toObsData()
Convert Content to COAS ObservationDataStruct directly

Returns:
ObservationDataStruct

setXsl

public static void setXsl(java.lang.String xslfile)

getXsl

public static java.lang.String getXsl()
get the Xsl file for translation

Returns:
See Also:

applyXSL

public org.w3c.dom.Node applyXSL(java.lang.String xslfile,
                                 java.lang.String[] params)
get proper Document translated by xsl stylesheet


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)


Copyright © 2000 University of California. All Rights Reserved.