agg.attribute
Interface AttrManager

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AttrTupleManager

public interface AttrManager
extends java.io.Serializable

Factory class interface for attribute-related objects; Provides creating services needed by graphical components.


Field Summary
static long serialVersionUID
           
 
Method Summary
 void checkIfReadyToMatch(AttrContext ruleContext)
          Checking if matching can be performed with respect to a given rule context.
 void checkIfReadyToTransform(AttrContext matchContext)
          Checking if a transformation can be performed with the attributes with respect to a given context.
 void checkIfReadyToTransform(AttrContext matchContext, boolean checkOnlyVariables)
           
 AttrViewSetting getDefaultMaskedView()
          Obtaining the masked view of the default view setting ('masked' meaning: it considers permutations as well as hiding of members;).
 AttrViewSetting getDefaultOpenView()
          Obtaining the open view of the default view setting ('open' meaning: it considers permutations, but not hiding of members;).
 java.lang.String getErrorMsg()
          Returns an error message if something gone wrong, otherwise - empty message.
 AttrHandler getHandler(java.lang.String name)
          Getting an attribute handler by name.
 AttrHandler[] getHandlers()
          Getting all attribute handlers that have been registered.
 java.lang.String isClassName(java.lang.String name)
          Returns a class name if the specified name is a class name, otherwise - null.
 AttrContext newContext(int mapStyle)
          Creating a new attribute context which is the root of a context tree;
 AttrContext newContext(int mapStyle, AttrContext parent)
          Creating a new attribute context which extends an existing one.
 AttrInstance newInstance(AttrType type)
          Creating a new attribute instance of the required type, without a context.
 AttrInstance newInstance(AttrType type, AttrContext context)
          Creating a new attribute instance of the required type and in the given context or a context view.
 AttrContext newLeftContext(AttrContext context)
          Creating a left rule side view for an existing rule context; Here, variables can be declared, but the assignment of complex expressions to single attribute values is forbidden.
 AttrMapping newMapping(AttrContext mappingContext, AttrInstance source, AttrInstance target)
          Mapping between two attribute instances; The mapping is done according to the context mapping property (match/plain) and is integrated into the context;
 AttrContext newRightContext(AttrContext context)
          Creating a right rule side view for an existing rule context, through which variables cannot be declared; complex expressions as attribute values are allowed, but only declared variables may be used.
 AttrType newType()
          Creating a new attribute type.
 AttrViewSetting newViewSetting()
          Creating a new mediator instance for loose coupling of attribute objects with their visual representation.
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

newContext

AttrContext newContext(int mapStyle)
Creating a new attribute context which is the root of a context tree;

Parameters:
mapStyle - The kind of mapping that is done within this context; it is one of:
-
'AttrMapping.PLAIN_MAP': In Graph Transform.: rule mapping
-
'AttrMapping.MATCH_MAP': In Graph Transformation: matching
Returns:
The new attribute root context
See Also:
AttrContext, AttrMapping

newContext

AttrContext newContext(int mapStyle,
                       AttrContext parent)
Creating a new attribute context which extends an existing one. In Graph Transformation, the setting of variables by matching corresponding graphical objects requires such a construction. It allows for keeping more that one rule match at a given time;

Parameters:
mapStyle - The kind of mapping that is done within this context; it is one of:
-
'AttrMapping.PLAIN_MAP': In Graph Transform.: rule mapping
-
'AttrMapping.MATCH_MAP': In Graph Transformation: matching
parent - The context to extend
Returns:
The new attribute context child
See Also:
AttrContext, AttrMapping

newLeftContext

AttrContext newLeftContext(AttrContext context)
Creating a left rule side view for an existing rule context; Here, variables can be declared, but the assignment of complex expressions to single attribute values is forbidden.

Parameters:
context - The context to generate the view on
Returns:
The new attribute context view
See Also:
AttrContext

newRightContext

AttrContext newRightContext(AttrContext context)
Creating a right rule side view for an existing rule context, through which variables cannot be declared; complex expressions as attribute values are allowed, but only declared variables may be used.

Parameters:
context - The context to generate the view on
Returns:
The new attribute context view
See Also:
AttrContext

getHandler

AttrHandler getHandler(java.lang.String name)
Getting an attribute handler by name.

Returns:
The attribute handler.

getHandlers

AttrHandler[] getHandlers()
Getting all attribute handlers that have been registered.


newType

AttrType newType()
Creating a new attribute type.

Returns:
The new attribute type

newInstance

AttrInstance newInstance(AttrType type)
Creating a new attribute instance of the required type, without a context. Note that for such attributes, expressions must be constants. In Graph Transformation, it is used for creating a new attribute in the host graph.

Parameters:
type - The type to use
Returns:
The new attribute instance

newInstance

AttrInstance newInstance(AttrType type,
                         AttrContext context)
Creating a new attribute instance of the required type and in the given context or a context view. In Graph Transformation, it is used for creating a new attribute in a rule.

Parameters:
type - The type to use
context - The context to use
Returns:
The new attribute instance

checkIfReadyToMatch

void checkIfReadyToMatch(AttrContext ruleContext)
                         throws AttrException
Checking if matching can be performed with respect to a given rule context. If the rule context in question is without inconsistencies, this method remains 'silent'. Otherwise, it throws an exception whose message text describes the reason.

Throws:
AttrException

newMapping

AttrMapping newMapping(AttrContext mappingContext,
                       AttrInstance source,
                       AttrInstance target)
                       throws AttrException
Mapping between two attribute instances; The mapping is done according to the context mapping property (match/plain) and is integrated into the context;

Parameters:
mappingContext - The context to include the mapping in
source - Mapping source attribute
target - Mapping target attribute
Returns:
A handle to the mapping; it can be used to undo the mapping (remove()) or to proceed to the next possible one (next()). If the mapping style for mappingContext is "MATCH_MAP", a match is tried and necessary checks concerning non-injectiveness are performed. If this fails, "null" is returned.
Throws:
AttrException

checkIfReadyToTransform

void checkIfReadyToTransform(AttrContext matchContext)
                             throws AttrException
Checking if a transformation can be performed with the attributes with respect to a given context. If the match context in question is complete and without inconsistencies, this method remains 'silent'. Otherwise, it throws an exception whose message text describes the reason.

Throws:
AttrException

checkIfReadyToTransform

void checkIfReadyToTransform(AttrContext matchContext,
                             boolean checkOnlyVariables)
                             throws AttrException
Throws:
AttrException

newViewSetting

AttrViewSetting newViewSetting()
Creating a new mediator instance for loose coupling of attribute objects with their visual representation.


getDefaultOpenView

AttrViewSetting getDefaultOpenView()
Obtaining the open view of the default view setting ('open' meaning: it considers permutations, but not hiding of members;).


getDefaultMaskedView

AttrViewSetting getDefaultMaskedView()
Obtaining the masked view of the default view setting ('masked' meaning: it considers permutations as well as hiding of members;).


getErrorMsg

java.lang.String getErrorMsg()
Returns an error message if something gone wrong, otherwise - empty message.


isClassName

java.lang.String isClassName(java.lang.String name)
Returns a class name if the specified name is a class name, otherwise - null.