|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagg.attribute.impl.AttrObject
agg.attribute.impl.ManagedObject
agg.attribute.impl.ChainedObserver
agg.attribute.impl.TupleObject
agg.attribute.impl.ValueTuple
public class ValueTuple
Implementation of the interface agg.attribute.AttrInstance; Encapsulates a tuple of attributes, so that a graphical object needs to talk to this one object only;
Field Summary | |
---|---|
protected java.lang.String |
errorMsg
GUI editor for this instance. |
protected DeclTuple |
type
Type reference. |
Fields inherited from class agg.attribute.impl.TupleObject |
---|
members, parent |
Fields inherited from class agg.attribute.impl.ChainedObserver |
---|
MAX_SIZE_OF_EVENT_STACK, sizeOfEventStack |
Fields inherited from class agg.attribute.impl.ManagedObject |
---|
manager |
Fields inherited from class agg.attribute.impl.AttrObject |
---|
classHandlerExpr, classObject, classString, initialized |
Fields inherited from interface agg.attribute.impl.AttrMsgCode |
---|
ATTR_DONT_MATCH, BAD_EXPR_TYPE, EXPR_EVAL_ERR, EXPR_MUST_BE_CONST, EXPR_MUST_BE_CONST_OR_VAR, EXPR_PARSE_ERR, EXPR_REQUIRED, MATCH_TARGETS_DIFFER, NAME_DUPLICATION, NO_SUCH_NAME, NO_SUCH_TYPE, OK, RULE_SOURCES_DIFFER, VAR_NOT_DECLARED |
Fields inherited from interface agg.attribute.AttrObserver |
---|
serialVersionUID |
Constructor Summary | |
---|---|
ValueTuple(AttrTupleManager manager,
DeclTuple type)
|
|
ValueTuple(AttrTupleManager manager,
DeclTuple type,
ContextView context)
|
|
ValueTuple(AttrTupleManager manager,
DeclTuple type,
ContextView context,
ValueTuple parent)
|
Method Summary | |
---|---|
protected void |
adaptToType()
Causes the value container (Vector) size to match the type container size. |
void |
adoptEntriesWhereEmpty(AttrInstance source)
Copying the contents of an attribute instance into another; |
void |
apply(AttrInstance rightSide,
AttrContext attrcontext)
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 attrcontext,
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 attrcontext,
AttrInstance g,
boolean allowVariableWithoutValue)
This method works like apply( AttrInstance, AttrContext, AttrInstance) additionally, allows using variables without value in value of attribute member. |
void |
apply(AttrInstance rightSide,
AttrContext attrcontext,
AttrInstance g,
boolean allowVariableWithoutValue,
boolean similarVariableName)
This method works like apply( AttrInstance, AttrContext, AttrInstance) additionally, allows using variables without value in value of attribute member. |
void |
apply(AttrInstance rightSide,
AttrContext attrcontext,
boolean allowVariableWithoutValue)
This method works like apply( AttrInstance,context ) additionally, allow using variables without value in the value of attribute members |
void |
apply(AttrInstance rightSide,
AttrContext attrcontext,
boolean allowVariableWithoutValue,
boolean equalVariableName)
This method works like apply( AttrInstance,context ) additionally, allow using variables without value in the value of attribute members. |
protected void |
assignParent(TupleObject newParent)
|
boolean |
canMatchChild2Parent(ValueTuple target,
ContextView attrcontext)
|
boolean |
canMatchTo(ValueTuple target,
ContextView attrcontext)
|
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; |
void |
copyEntriesToSimilarMembers(AttrInstance source)
|
java.util.Vector<java.lang.String> |
getAllVariableNames()
|
java.util.Vector<java.lang.String> |
getAllVariableNamesOfExpressions()
|
AttrContext |
getContext()
Retrieving the context of an instance. |
protected ContextView |
getContextView()
|
ValueMember |
getEntryAt(int index)
Getting a single value, referenced by 'index'. |
ValueMember |
getEntryAt(java.lang.String name)
Getting a single value, referenced by 'name'. |
ValueMember |
getEntryWithValueAsText(java.lang.String valueText)
|
java.lang.String |
getErrorMsg()
|
protected java.lang.String |
getLogEntry(int index)
Subprocedure for 'log()', creates a text showing the entry at 'index' |
int |
getNumberOfFreeVariables(AttrContext ctx)
Getting the number of variables declared by this instance which have no value assigned to them yet. |
DeclTuple |
getTupleType()
Retrieving the type of this tuple instance |
java.lang.String |
getValueAsString(int entryIndex)
Getting a simple representation of a value as String. |
java.lang.Object |
getValueAt(java.lang.String name)
Retrieving the value of an entry. |
ValueMember |
getValueMemberAt(int index)
Convenience method for internal operations; works much like the generic getMemberAt( int index ), but returns the appropriate member type. |
ValueMember |
getValueMemberAt(java.lang.String name)
Convenience method for internal operations; works much like the generic getMemberAt( String name ), but returns the appropriate member type. |
boolean |
isEmpty()
|
boolean |
isValueSetAt(int index)
Test, if a value is set or not. |
boolean |
isValueSetAt(java.lang.String name)
Test, if a value is set or not. |
void |
log()
For debugging: displaying itself in the logging window. |
void |
logPrintln(boolean logTopic,
java.lang.String msg)
Print itself and a message if 'logTopic' == 'true'. |
java.lang.String[] |
matchChild2Parent(ValueTuple target,
ContextView attrcontext)
|
java.lang.String[] |
matchTo(ValueTuple target,
ContextView attrcontext)
Performs a match in a per-element-style. |
protected ValueMember |
newMember(DeclMember decl)
|
protected void |
propagateEvent(TupleEvent e)
Propagates the event to the observers, pretending to be the source. |
void |
refreshParents()
|
protected void |
setContextView(ContextView view)
|
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. |
protected void |
setType(DeclTuple type)
|
void |
setValueAt(java.lang.Object value,
java.lang.String name)
Setting the value of an entry directly. |
void |
setValueAt(java.lang.String valueText,
int index)
Setting the value of the specified entry; |
void |
setValueAt(ValueMember value,
int index)
Setting the value of the specified entry; |
void |
showValue()
|
java.lang.String |
toString()
|
void |
unsetValue()
Unset the value of the own attribute members (not of attribute members of its parents). |
void |
updateMemberAdded(TupleEvent e)
Fires the same event. |
void |
updateMemberDeleted(TupleEvent e)
Fires the same event. |
void |
updateMemberRetyped(TupleEvent e)
Fires the same event. |
void |
updateMemberValueChanged(TupleEvent e)
Interface synchronization. |
void |
XreadObject(XMLHelper h)
|
void |
XwriteObject(XMLHelper h)
|
Methods inherited from class agg.attribute.impl.TupleObject |
---|
addMember, addMember, deleteMemberAt, dispose, ensureNonNull, finalize, getForm, getIndexForMember, getIndexForName, getIndexInView, getMemberAt, getMemberAt, getMemberAt, getNameAsString, getNameAsString, getNumberOfEntries, getNumberOfEntries, getParent, getParentInCharge, getParentSize, getSize, getType, getTypeAsString, getTypeAsString, getValueAsString, isSubclassOf, isValid, memberChanged, rawAddMember, rawAddMember, rawDeleteMemberAt, rawGetMemberAt, rawGetSize, setForm |
Methods inherited from class agg.attribute.impl.ChainedObserver |
---|
addObserver, addObserverAtPos, attributeChanged, contains, filterEvent, findObserver, fireAttrChanged, fireAttrChanged, fireAttrChanged, getObservers, isPersistentFor, removeObserver, updateGeneralChange, updateMemberModified, updateMemberRenamed, updateUnknownChange, updateValueCorrectness, updateValueModified |
Methods inherited from class agg.attribute.impl.ManagedObject |
---|
getAttrManager, getManager |
Methods inherited from class agg.attribute.impl.AttrObject |
---|
defaultToString, err, err, getInstRepr, log, log, logEnteredMethod, logPrintln, stdoutPrintOnEnter, stdoutPrintOnExit, update, warn, warn, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface agg.attribute.AttrInstance |
---|
getType |
Methods inherited from interface agg.attribute.AttrTuple |
---|
addObserver, getAttrManager, getIndexForMember, getMemberAt, getMemberAt, getMemberAt, getNameAsString, getNameAsString, getNumberOfEntries, getNumberOfEntries, getTypeAsString, getTypeAsString, getValueAsString, isValid, removeObserver |
Field Detail |
---|
protected DeclTuple type
protected transient java.lang.String errorMsg
Constructor Detail |
---|
public ValueTuple(AttrTupleManager manager, DeclTuple type)
manager
- AttrTupleManager managing this tuple;type
- Type, of which this tuple shall be an instance.public ValueTuple(AttrTupleManager manager, DeclTuple type, ContextView context)
manager
- AttrTupleManager managing this tupletype
- Type, of which this tuple shall be an instancecontext
- The context in which this instance is placedpublic ValueTuple(AttrTupleManager manager, DeclTuple type, ContextView context, ValueTuple parent)
manager
- AttrTupleManager managing this tupletype
- Type, of which this tuple shall be an instancecontext
- The context in which this instance is placedMethod Detail |
---|
protected void propagateEvent(TupleEvent e)
propagateEvent
in class TupleObject
public void refreshParents()
protected void setContextView(ContextView view)
protected ContextView getContextView()
protected void assignParent(TupleObject newParent)
assignParent
in class TupleObject
protected void setType(DeclTuple type)
protected void adaptToType()
protected ValueMember newMember(DeclMember decl)
public java.lang.String getErrorMsg()
public AttrContext getContext()
AttrInstance
getContext
in interface AttrInstance
public void log()
log
in class AttrObject
protected java.lang.String getLogEntry(int index)
public DeclTuple getTupleType()
getTupleType
in interface AttrTuple
getTupleType
in class TupleObject
public void updateMemberAdded(TupleEvent e)
ChainedObserver
updateMemberAdded
in class ChainedObserver
public void updateMemberDeleted(TupleEvent e)
ChainedObserver
updateMemberDeleted
in class ChainedObserver
public void updateMemberRetyped(TupleEvent e)
ChainedObserver
updateMemberRetyped
in class ChainedObserver
public void updateMemberValueChanged(TupleEvent e)
public ValueMember getValueMemberAt(int index)
TupleObject.getMemberAt( int )
public ValueMember getValueMemberAt(java.lang.String name)
TupleObject.getMemberAt( String )
public java.lang.String getValueAsString(int entryIndex)
getValueAsString
in interface AttrTuple
getValueAsString
in class TupleObject
entryIndex
- Index of entry.public void copy(AttrInstance source)
copy
in interface AttrInstance
public void copyEntries(AttrInstance source)
copyEntries
in interface AttrInstance
public void copyEntriesToSimilarMembers(AttrInstance source)
public void adoptEntriesWhereEmpty(AttrInstance source)
public void unsetValue()
unsetValue
in interface AttrInstance
public void apply(AttrInstance rightSide, AttrContext attrcontext, AttrInstance g)
apply
in interface AttrInstance
public void apply(AttrInstance rightSide, AttrContext attrcontext, AttrInstance g, boolean allowVariableWithoutValue)
apply
in interface AttrInstance
public void apply(AttrInstance rightSide, AttrContext attrcontext, AttrInstance g, boolean allowVariableWithoutValue, boolean similarVariableName)
public void apply(AttrInstance rightSide, AttrContext attrcontext)
apply
in interface AttrInstance
public void apply(AttrInstance rightSide, AttrContext attrcontext, boolean allowVariableWithoutValue)
apply
in interface AttrInstance
public void apply(AttrInstance rightSide, AttrContext attrcontext, boolean allowVariableWithoutValue, boolean equalVariableName)
public int getNumberOfFreeVariables(AttrContext ctx)
AttrInstance
getNumberOfFreeVariables
in interface AttrInstance
public void XwriteObject(XMLHelper h)
XwriteObject
in interface XMLObject
public void XreadObject(XMLHelper h)
XreadObject
in interface XMLObject
public boolean canMatchTo(ValueTuple target, ContextView attrcontext)
public boolean canMatchChild2Parent(ValueTuple target, ContextView attrcontext)
public java.lang.String[] matchTo(ValueTuple target, ContextView attrcontext)
public java.lang.String[] matchChild2Parent(ValueTuple target, ContextView attrcontext)
public void logPrintln(boolean logTopic, java.lang.String msg)
AttrObject
logPrintln
in class AttrObject
public java.lang.String toString()
toString
in class AttrObject
public void setValueAt(java.lang.String valueText, int index)
valueText
- String representation of the new value;index
- specifies the entry to change; Used by AttrEditor instances.public void setValueAt(ValueMember value, int index)
value
- the new value;index
- specifies the entry to change; Used by AttrEditor instances.public boolean isValueSetAt(java.lang.String name)
isValueSetAt
in interface AttrInstance
public boolean isValueSetAt(int index)
public java.lang.Object getValueAt(java.lang.String name)
getValueAt
in interface AttrInstance
public void setValueAt(java.lang.Object value, java.lang.String name)
setValueAt
in interface AttrInstance
value
- Any object instance.name
- specifies the entry to change.public boolean isEmpty()
public void setExprValueAt(java.lang.String expr, java.lang.String name)
setExprValueAt
in interface AttrInstance
expr
- textual expression representation;name
- specifies the entry to change.public void setExprAt(java.lang.String expr, java.lang.String name)
setExprAt
in interface AttrInstance
expr
- textual expression representation;name
- specifies the entry to change;public ValueMember getEntryAt(int index)
public ValueMember getEntryAt(java.lang.String name)
public ValueMember getEntryWithValueAsText(java.lang.String valueText)
public java.util.Vector<java.lang.String> getAllVariableNamesOfExpressions()
public java.util.Vector<java.lang.String> getAllVariableNames()
public boolean compareTo(AttrInstance another)
compareTo
in interface AttrInstance
public void showValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |