context.arch.discoverer.componentDescription
Class AbstractDescriptionElement

java.lang.Object
  extended bycontext.arch.discoverer.componentDescription.AbstractDescriptionElement
Direct Known Subclasses:
AttributeElement, CallbackElement, ClassnameElement, HostnameElement, IdElement, InAttributeElement, OutAttributeElement, PortElement, ServiceElement, SubscriberElement, TypeElement

public abstract class AbstractDescriptionElement
extends java.lang.Object

Author:
Agathe

Field Summary
static java.lang.String ABSTRACT_DESCRIPTION_ELEMENT
          Tag for DataObject version
protected  java.lang.String elementName
          The name of this description element
static java.lang.String NAME
          Tag for DataObject version
protected  java.lang.Object value
          Value of this element
static java.lang.String VALUE
          Tag for DataObject version
 
Constructor Summary
protected AbstractDescriptionElement()
           
protected AbstractDescriptionElement(java.lang.String elementName)
          Creates new AbstractDescriptionElement
protected AbstractDescriptionElement(java.lang.String elementName, java.lang.Object value)
          Creates new AbstractDescriptionElement
 
Method Summary
abstract  java.lang.Object extractElement(java.lang.Object componentDescription)
          Returns the element from the componentDescription corresponding to this description element
static AbstractDescriptionElement factory(java.lang.String name, java.lang.Object value)
          Returns the AbstracDescriptionElement corresponding to the specified name
static AbstractDescriptionElement fromDataObject(DataObject data)
          Takes a DataObject and return an AbstractDescriptionElement object
 java.lang.String getElementName()
          Returns the name of this element
 java.lang.Object getValue()
          Returns the value of this element
abstract  boolean processQueryItem(java.lang.Object componentDescription, AbstractComparison comparison)
          Returns true if the comparison between the value of this object and the value of the corresponding field of the componentDescription returns true
 void setValue(java.lang.Object value)
          Sets the value of this element
 DataObject toDataObject()
          Returns the DataObject version
 java.lang.String toString()
          Returns a printable version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ABSTRACT_DESCRIPTION_ELEMENT

public static final java.lang.String ABSTRACT_DESCRIPTION_ELEMENT
Tag for DataObject version

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Tag for DataObject version

See Also:
Constant Field Values

VALUE

public static final java.lang.String VALUE
Tag for DataObject version

See Also:
Constant Field Values

elementName

protected java.lang.String elementName
The name of this description element


value

protected java.lang.Object value
Value of this element

Constructor Detail

AbstractDescriptionElement

protected AbstractDescriptionElement(java.lang.String elementName)
Creates new AbstractDescriptionElement


AbstractDescriptionElement

protected AbstractDescriptionElement(java.lang.String elementName,
                                     java.lang.Object value)
Creates new AbstractDescriptionElement


AbstractDescriptionElement

protected AbstractDescriptionElement()
Method Detail

getElementName

public java.lang.String getElementName()
Returns the name of this element


getValue

public java.lang.Object getValue()
Returns the value of this element


setValue

public void setValue(java.lang.Object value)
Sets the value of this element


extractElement

public abstract java.lang.Object extractElement(java.lang.Object componentDescription)
Returns the element from the componentDescription corresponding to this description element

Parameters:
componentDescription -
Returns:
Object

processQueryItem

public abstract boolean processQueryItem(java.lang.Object componentDescription,
                                         AbstractComparison comparison)
Returns true if the comparison between the value of this object and the value of the corresponding field of the componentDescription returns true

Parameters:
componentDescription - The component to compare to this object
comparison - The comparison element to use
Returns:
boolean

toString

public java.lang.String toString()
Returns a printable version


toDataObject

public DataObject toDataObject()
Returns the DataObject version


fromDataObject

public static AbstractDescriptionElement fromDataObject(DataObject data)
Takes a DataObject and return an AbstractDescriptionElement object

Parameters:
data -
Returns:
AbstractDescriptionElement

factory

public static AbstractDescriptionElement factory(java.lang.String name,
                                                 java.lang.Object value)
Returns the AbstracDescriptionElement corresponding to the specified name

Returns: