agg.attribute
Interface AttrInstance

All Superinterfaces:
AttrTuple, java.io.Serializable, XMLObject
All Known Subinterfaces:
AttrConditionTuple, AttrVariableTuple
All Known Implementing Classes:
CondTuple, LoneTuple, ValueTuple, VarTuple

public interface AttrInstance
extends AttrTuple, XMLObject

Interface of tuples of attribute values.


Method Summary
 void apply(AttrInstance rightSide, AttrContext context)
          Applying a rule; the substitutions occur "in-place" (in the recipient); In Graph Transformation, this method is applied to attributes of host graph objects, "rightSide" being an attribute of the right side of the rule and "context" being the "match"-context built up by subsequently matching the attributes of corresponding graphical objects.
 void apply(AttrInstance rightSide, AttrContext context, AttrInstance g)
          Applying a rule; the substitutions occur "in-place" (in the recipient); In Graph Transformation, this method is applied to attributes of host graph objects, "rightSide" being an attribute of the right side of the rule and "context" being the "match"-context built up by subsequently matching the attributes of corresponding graphical objects.
 void apply(AttrInstance rightSide, AttrContext context, AttrInstance g, boolean allowVariableWithoutValue)
          This method works like public void apply( AttrInstance rightSide, AttrContext context, AttrInstance g ) but also allows using variables without value in value of attribute member as expression
 void apply(AttrInstance rightSide, AttrContext context, boolean allowVariableWithoutValue)
          This method works like public void apply( AttrInstance rightSide, AttrContext context ) but also allows using variables without value in value of attribute member as expression
 boolean compareTo(AttrInstance another)
           
 void copy(AttrInstance source)
          Copying the contents of an attribute instance into another; The reference to the attribute type is shared.
 void copyEntries(AttrInstance source)
          Copying the contents of an attribute instance into another.
 AttrContext getContext()
          Retrieving the context of an instance.
 int getNumberOfFreeVariables(AttrContext context)
          Getting the number of variables declared by this instance which have no value assigned to them yet.
 AttrType getType()
          Retrieving the type of an instance.
 java.lang.Object getValueAt(java.lang.String name)
          Retrieving the value of an entry.
 boolean isValueSetAt(java.lang.String name)
          Test, if a value is set or not.
 void setExprAt(java.lang.String expr, java.lang.String name)
          Setting an expression as an entry without immediate evaluation.
 void setExprValueAt(java.lang.String expr, java.lang.String name)
          Evaluating an expression and setting its value as an entry.
 void setValueAt(java.lang.Object value, java.lang.String name)
          Setting the value of an entry directly.
 void unsetValue()
          Unset the value of the own attribute members (not of attribute members of its parents).
 
Methods inherited from interface agg.attribute.AttrTuple
addObserver, getAttrManager, getIndexForMember, getMemberAt, getMemberAt, getMemberAt, getNameAsString, getNameAsString, getNumberOfEntries, getNumberOfEntries, getTupleType, getTypeAsString, getTypeAsString, getValueAsString, getValueAsString, isValid, removeObserver
 
Methods inherited from interface agg.util.XMLObject
XreadObject, XwriteObject
 

Method Detail

getType

AttrType getType()
Retrieving the type of an instance.


getContext

AttrContext getContext()
Retrieving the context of an instance.


isValueSetAt

boolean isValueSetAt(java.lang.String name)
Test, if a value is set or not.


getValueAt

java.lang.Object getValueAt(java.lang.String name)
Retrieving the value of an entry. If the result is 'null', the reason can be: 1. The value is set as 'null'; 2. The value is not set at all. For testing, if the value was set as 'null' or not set at all, use 'isValueSetAt()' of this class.


setValueAt

void setValueAt(java.lang.Object value,
                java.lang.String name)
Setting the value of an entry directly.

Parameters:
value - Any object instance.
name - specifies the entry to change.

setExprValueAt

void setExprValueAt(java.lang.String expr,
                    java.lang.String name)
Evaluating an expression and setting its value as an entry.

Parameters:
expr - textual expression representation;
name - specifies the entry to change.

setExprAt

void setExprAt(java.lang.String expr,
               java.lang.String name)
Setting an expression as an entry without immediate evaluation. Syntax and type checking are performed.

Parameters:
expr - textual expression representation;
name - specifies the entry to change;

copy

void copy(AttrInstance source)
Copying the contents of an attribute instance into another; The reference to the attribute type is shared.


copyEntries

void copyEntries(AttrInstance source)
Copying the contents of an attribute instance into another.


getNumberOfFreeVariables

int getNumberOfFreeVariables(AttrContext context)
Getting the number of variables declared by this instance which have no value assigned to them yet. Each variable name is counted only once, even if it is used more than once in this tuple.

Returns:
The number of free variables.

apply

void apply(AttrInstance rightSide,
           AttrContext context)
Applying a rule; the substitutions occur "in-place" (in the recipient); In Graph Transformation, this method is applied to attributes of host graph objects, "rightSide" being an attribute of the right side of the rule and "context" being the "match"-context built up by subsequently matching the attributes of corresponding graphical objects.


apply

void apply(AttrInstance rightSide,
           AttrContext context,
           AttrInstance g)
Applying a rule; the substitutions occur "in-place" (in the recipient); In Graph Transformation, this method is applied to attributes of host graph objects, "rightSide" being an attribute of the right side of the rule and "context" being the "match"-context built up by subsequently matching the attributes of corresponding graphical objects. Needs the graphobject from the graph G.


apply

void apply(AttrInstance rightSide,
           AttrContext context,
           AttrInstance g,
           boolean allowVariableWithoutValue)
This method works like public void apply( AttrInstance rightSide, AttrContext context, AttrInstance g ) but also allows using variables without value in value of attribute member as expression


apply

void apply(AttrInstance rightSide,
           AttrContext context,
           boolean allowVariableWithoutValue)
This method works like public void apply( AttrInstance rightSide, AttrContext context ) but also allows using variables without value in value of attribute member as expression


compareTo

boolean compareTo(AttrInstance another)

unsetValue

void unsetValue()
Unset the value of the own attribute members (not of attribute members of its parents). The value of its attribute member is null after this.