edu.umd.cfar.lamp.viper.examples.omegahead
Class AttributeWrapperOmega

java.lang.Object
  extended byviper.api.datatypes.InstanceOfConstraint
      extended byedu.umd.cfar.lamp.viper.examples.omegahead.AttributeWrapperOmega
All Implemented Interfaces:
AttrValueParser, AttrValueWrapper, DefaultedAttrValueWrapper

public class AttributeWrapperOmega
extends InstanceOfConstraint
implements AttrValueParser, DefaultedAttrValueWrapper

An attribute wrapper for the omega shape type. Used while parsing and serializing the data, as well as for verification purposes internally.

Author:
davidm

Constructor Summary
AttributeWrapperOmega()
          Creates a new attribute value wrapper for oriented box data.
 
Method Summary
 java.lang.Object getMetaDefault()
          Returns the point at 0,0.
 org.w3c.dom.Element getXMLFormat(org.w3c.dom.Document root, java.lang.Object o)
          Get a new XML Element node representing this Node.
 java.lang.Object setValue(org.w3c.dom.Element el)
          Gets a copy of this attribute with the given value
 
Methods inherited from class viper.api.datatypes.InstanceOfConstraint
equals, getObjectValue, hashCode, setAttributeValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface viper.api.AttrValueWrapper
getObjectValue, setAttributeValue
 

Constructor Detail

AttributeWrapperOmega

public AttributeWrapperOmega()
Creates a new attribute value wrapper for oriented box data.

Method Detail

getXMLFormat

public org.w3c.dom.Element getXMLFormat(org.w3c.dom.Document root,
                                        java.lang.Object o)
Description copied from interface: AttrValueParser
Get a new XML Element node representing this Node.

Specified by:
getXMLFormat in interface AttrValueParser
Parameters:
root - the DOM Document root to use to generate the necessary elements.
o - the attribute value (in encoded format)
Returns:
a new Element representing this Node
See Also:
AttrValueParser.getXMLFormat(org.w3c.dom.Document, java.lang.Object)

setValue

public java.lang.Object setValue(org.w3c.dom.Element el)
Description copied from interface: AttrValueParser
Gets a copy of this attribute with the given value

Specified by:
setValue in interface AttrValueParser
Parameters:
el - the element to parse in
Returns:
the new value for the attribute (as described in the passed xml element) in encoded format. Call AttrValueWrapper.getObjectValue(Object) to get the decoded format.
See Also:
AttrValueParser.setValue(org.w3c.dom.Element)

getMetaDefault

public java.lang.Object getMetaDefault()
Returns the point at 0,0.

Specified by:
getMetaDefault in interface DefaultedAttrValueWrapper
Returns:
See Also:
DefaultedAttrValueWrapper.getMetaDefault()