com.waveset.object
Class MetaViewSource

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.MetaViewSource
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject

public class MetaViewSource
extends AbstractXmlObject

A class that represents a source for a MetaViewAttribute.

Version:
$Revision: 1.3 $

Field Summary
static java.lang.String ATT_SOURCE_ATTRIBUTE_NAME
           
static java.lang.String code_id
           
static java.lang.String EL_CONSTANT_VALUE
           
static java.lang.String ELEMENT
           
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace
 
Constructor Summary
MetaViewSource()
           
MetaViewSource(org.w3c.dom.Element e)
          Construct from an XML element.
MetaViewSource(java.lang.Object constantValue)
          Constructor.
MetaViewSource(ObjectRef source, java.lang.String sourceAttributeName)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Object getConstantValue()
          Get the constant value of this source.
 java.lang.String getElementName()
          Return the element name.
 java.util.List getReferences()
          Return all ObjectRefs referenced by this source.
 java.lang.String getSourceAttributeName()
          Return the name of the attribute on the source resource.
 ObjectRef getSourceRef()
          Return the source ObjectRef, or null if this source is a constant value.
 int hashCode()
           
 void parseXml(org.w3c.dom.Element e)
          Parse the given XML into a MetaViewTarget.
 void setConstantValue(java.lang.Object constant)
          Set the constant value of the source.
 void setSourceAttributeName(java.lang.String name)
          Set the name of the attribute on the source resource.
 void setSourceRef(ObjectRef source)
          Set the ObjectRef to that of the source or to null if we are dealing with a constant value.
 java.lang.String toString()
           
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize into a buffer with optional indentation.
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

ELEMENT

public static final java.lang.String ELEMENT
See Also:
Constant Field Values

ATT_SOURCE_ATTRIBUTE_NAME

public static final java.lang.String ATT_SOURCE_ATTRIBUTE_NAME
See Also:
Constant Field Values

EL_CONSTANT_VALUE

public static final java.lang.String EL_CONSTANT_VALUE
See Also:
Constant Field Values
Constructor Detail

MetaViewSource

public MetaViewSource()

MetaViewSource

public MetaViewSource(ObjectRef source,
                      java.lang.String sourceAttributeName)
Constructor.

Parameters:
source - The ObjectRef of the source. This can be a Resource or a Rule.
sourceAttributeName - The name of the attribute on the source (if the source is a Resource).

MetaViewSource

public MetaViewSource(java.lang.Object constantValue)
Constructor.

Parameters:
constantValue - The constant value of this source.

MetaViewSource

public MetaViewSource(org.w3c.dom.Element e)
               throws WavesetException
Construct from an XML element.

Method Detail

getReferences

public java.util.List getReferences()
Return all ObjectRefs referenced by this source.

Returns:
All ObjectRefs referenced by this source.
See Also:
PersistentObject.getReferences()

getSourceRef

public ObjectRef getSourceRef()
Return the source ObjectRef, or null if this source is a constant value.

Returns:
The target ObjectRef, or null if this source is a constant value. the MetaView itself.

setSourceRef

public void setSourceRef(ObjectRef source)
Set the ObjectRef to that of the source or to null if we are dealing with a constant value.

Parameters:
source - The ObjectRef or null

getSourceAttributeName

public java.lang.String getSourceAttributeName()
Return the name of the attribute on the source resource.

Returns:
The name of the attribute on the source resource.

setSourceAttributeName

public void setSourceAttributeName(java.lang.String name)
Set the name of the attribute on the source resource. This is only set if the source is a Resource.

Parameters:
name - The name of the attribute on the source resource.

getConstantValue

public java.lang.Object getConstantValue()
Get the constant value of this source.

Returns:
The constant value of this source.

setConstantValue

public void setConstantValue(java.lang.Object constant)
Set the constant value of the source.

Parameters:
constant -

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getElementName

public java.lang.String getElementName()
Description copied from class: AbstractXmlObject
Return the element name.

Specified by:
getElementName in interface XmlObject
Specified by:
getElementName in class AbstractXmlObject

toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Description copied from class: AbstractXmlObject
Serialize into a buffer with optional indentation. This must be implemented by the subclass.

Specified by:
toXml in interface XmlObject
Specified by:
toXml in class AbstractXmlObject

parseXml

public void parseXml(org.w3c.dom.Element e)
              throws WavesetException
Parse the given XML into a MetaViewTarget.

Parameters:
e - The XML element to parse.
Throws:
WavesetException