de.uni_paderborn.fujaba.views
Class AbstractFilter

java.lang.Object
  extended byde.uni_paderborn.fujaba.basic.BasicIncrement
      extended byde.uni_paderborn.fujaba.views.AbstractFilter
All Implemented Interfaces:
java.lang.Comparable, Filter, UniqueIdentifier
Direct Known Subclasses:
AbstractConfigurableFilter, AssocFilter, LinkFilter

public abstract class AbstractFilter
extends BasicIncrement
implements Filter

UMLClass: 'AbstractViewFilter'

Version:
$Revision: 1.14 $
Author:
$Author: schneider $

Field Summary
 
Fields inherited from class de.uni_paderborn.fujaba.basic.BasicIncrement
dontUseAccessMethodsInThisClass
 
Constructor Summary
AbstractFilter()
           
 
Method Summary
 boolean addToViewDefinitions(ViewDefinition value)
          Access method for an one to n association.
static boolean containsConnection(java.util.Set context, UMLConnection connection)
           
static boolean containsConnection(UMLDiagram diag, UMLConnection connection)
           
static boolean containsConnectors(java.util.Set context, UMLConnection connection)
           
static boolean containsConnectors(UMLDiagram diag, UMLConnection connection)
           
 java.util.Set get1Context(UMLDiagram diag, java.util.Iterator items)
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Set get1Context(UMLDiagram diag, UMLDiagramItem item)
          No comment provided by developer, please add a comment to improve documentation.
static java.util.Set getConnections(UMLDiagram diag, java.util.Set items, java.lang.Class type)
          Get all UMLConnections in Diagram diag which are of class type and which have a start- and end-item which are in the items-Set
 java.lang.String getName()
          Get the name attribute of the AbstractFilter object
 java.util.Set getNContext(UMLDiagram diag, java.util.Iterator items, int depth)
          Get the nContext attribute of the AbstractFilter object
 java.util.Set getNContext(UMLDiagram diag, UMLDiagramItem item, int depth)
          Get the nContext attribute of the AbstractFilter object
abstract  java.util.Set grow1Context(UMLDiagram diag, UMLDiagramItem item, ItemSet context)
          No comment provided by developer, please add a comment to improve documentation.
 boolean hasInViewDefinitions(ViewDefinition value)
          No comment provided by developer, please add a comment to improve documentation.
 java.util.Iterator iteratorOfViewDefinitions()
          No comment provided by developer, please add a comment to improve documentation.
 void removeAllFromViewDefinitions()
          No comment provided by developer, please add a comment to improve documentation.
 boolean removeFromViewDefinitions(ViewDefinition value)
          No comment provided by developer, please add a comment to improve documentation.
 int sizeOfViewDefinitions()
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String toString()
           
static boolean tryAddConnection(java.util.Set context, UMLConnection connection)
          Add the connection to the context if both ends of the connection are already in the context
static boolean tryAddConnection(java.util.Set context, UMLConnection connection, UMLDiagramItem item)
          Add the connection and the item to the context if the end of the connection that is not the item is already in the context
static UMLDiagramItem tryAddConnection(UMLDiagram diag, java.util.Set context, UMLConnection connection)
          Add the connection to the context if the diagram contains the connection and the context contains at least one of the connections ends.
static boolean tryAddConnection(UMLDiagram diag, java.util.Set context, UMLConnection connection, UMLDiagramItem item)
          Add the connection to the context if the diagram contains the connection and the context contains at least the given item.
 
Methods inherited from class de.uni_paderborn.fujaba.basic.BasicIncrement
compareTo, getID, getUniqueID, getUniqueID, isGenerated, lessUniqueId, readAttributes, readAttributes, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, readFromStringTokenizer, removeYou, resetClassInfos, resetFieldWriteMethods, setAttribValue, setAttribValue, setGenerated, setID, setUniqueId, writeAttributes, writeClassToStringBuffer, writeClassToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer, writeToStringBuffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.uni_paderborn.fujaba.views.Filter
getDescription, isForDiagram
 

Constructor Detail

AbstractFilter

public AbstractFilter()
Method Detail

grow1Context

public abstract java.util.Set grow1Context(UMLDiagram diag,
                                           UMLDiagramItem item,
                                           ItemSet context)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
grow1Context in interface Filter
Parameters:
diag - No description provided
item - No description provided
context - No description provided
Returns:
No description provided
See Also:
Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,int), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator,int)

get1Context

public java.util.Set get1Context(UMLDiagram diag,
                                 UMLDiagramItem item)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
get1Context in interface Filter
Parameters:
diag - No description provided
item - No description provided
Returns:
No description provided
See Also:
Filter.grow1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,ItemSet), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,int), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator,int)

get1Context

public java.util.Set get1Context(UMLDiagram diag,
                                 java.util.Iterator items)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
get1Context in interface Filter
Parameters:
diag - No description provided
items - No description provided
Returns:
No description provided
See Also:
Filter.grow1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,ItemSet), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,int), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator,int)

getNContext

public java.util.Set getNContext(UMLDiagram diag,
                                 UMLDiagramItem item,
                                 int depth)
Get the nContext attribute of the AbstractFilter object

Specified by:
getNContext in interface Filter
Parameters:
diag - No description provided
item - No description provided
depth - No description provided
Returns:
The nContext value
See Also:
Filter.grow1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,ItemSet), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator,int)

getNContext

public java.util.Set getNContext(UMLDiagram diag,
                                 java.util.Iterator items,
                                 int depth)
Get the nContext attribute of the AbstractFilter object

Specified by:
getNContext in interface Filter
Parameters:
diag - No description provided
items - No description provided
depth - No description provided
Returns:
The nContext value
See Also:
Filter.grow1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,ItemSet), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem), Filter.get1Context(de.uni_paderborn.fujaba.uml.UMLDiagram,java.util.Iterator), Filter.getNContext(de.uni_paderborn.fujaba.uml.UMLDiagram,de.uni_paderborn.fujaba.uml.UMLDiagramItem,int)

getName

public java.lang.String getName()
Get the name attribute of the AbstractFilter object

Specified by:
getName in interface Filter
Returns:
The name value
See Also:
FilterManager

toString

public java.lang.String toString()
Returns:
same as getName()

getConnections

public static java.util.Set getConnections(UMLDiagram diag,
                                           java.util.Set items,
                                           java.lang.Class type)
Get all UMLConnections in Diagram diag which are of class type and which have a start- and end-item which are in the items-Set

Parameters:
diag - the diagram
items - the items whose connections are seeked for
type - the type of allowed connections
Returns:
the connections as Set

containsConnectors

public static boolean containsConnectors(UMLDiagram diag,
                                         UMLConnection connection)
Parameters:
diag - the diagram
connection - the connection
Returns:
true if the diagram contains both ends of the connection

containsConnection

public static boolean containsConnection(UMLDiagram diag,
                                         UMLConnection connection)
Parameters:
diag - the diagram
connection - the connection
Returns:
true if the diagram contains both ends of the connection and the connection itself

containsConnectors

public static boolean containsConnectors(java.util.Set context,
                                         UMLConnection connection)
Parameters:
context - the context
connection - the connection
Returns:
true if the context contains both ends of the connection

containsConnection

public static boolean containsConnection(java.util.Set context,
                                         UMLConnection connection)
Parameters:
context - the context
connection - the connection
Returns:
true if the context contains both ends of the connection and the connection itself

tryAddConnection

public static boolean tryAddConnection(java.util.Set context,
                                       UMLConnection connection)
Add the connection to the context if both ends of the connection are already in the context

Parameters:
context - the context
connection - the connection
Returns:
true if the connection was added to the context

tryAddConnection

public static boolean tryAddConnection(java.util.Set context,
                                       UMLConnection connection,
                                       UMLDiagramItem item)
Add the connection and the item to the context if the end of the connection that is not the item is already in the context

Parameters:
context - the context
connection - the connection
item - the item
Returns:
true if the item was added to the context

tryAddConnection

public static UMLDiagramItem tryAddConnection(UMLDiagram diag,
                                              java.util.Set context,
                                              UMLConnection connection)
Add the connection to the context if the diagram contains the connection and the context contains at least one of the connections ends. If the other end is not yet in the context it is added too.

Parameters:
diag - the diagram
context - the context
connection - the connection
Returns:
the item that was added or null if none was added

tryAddConnection

public static boolean tryAddConnection(UMLDiagram diag,
                                       java.util.Set context,
                                       UMLConnection connection,
                                       UMLDiagramItem item)
Add the connection to the context if the diagram contains the connection and the context contains at least the given item. If the other end is not yet in the context it is added too.

Parameters:
diag - the diagram
context - the context
connection - the connection
item - the item
Returns:
true if the connection was added

addToViewDefinitions

public boolean addToViewDefinitions(ViewDefinition value)
Access method for an one to n association.

Specified by:
addToViewDefinitions in interface Filter
Parameters:
value - The object added.
Returns:
No description provided
See Also:
ViewDefinition

hasInViewDefinitions

public boolean hasInViewDefinitions(ViewDefinition value)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
hasInViewDefinitions in interface Filter
Parameters:
value - No description provided
Returns:
No description provided
See Also:
ViewDefinition

iteratorOfViewDefinitions

public java.util.Iterator iteratorOfViewDefinitions()
No comment provided by developer, please add a comment to improve documentation.

Specified by:
iteratorOfViewDefinitions in interface Filter
Returns:
No description provided
See Also:
ViewDefinition

sizeOfViewDefinitions

public int sizeOfViewDefinitions()
No comment provided by developer, please add a comment to improve documentation.

Specified by:
sizeOfViewDefinitions in interface Filter
Returns:
No description provided
See Also:
ViewDefinition

removeFromViewDefinitions

public boolean removeFromViewDefinitions(ViewDefinition value)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
removeFromViewDefinitions in interface Filter
Parameters:
value - No description provided
Returns:
No description provided
See Also:
ViewDefinition

removeAllFromViewDefinitions

public void removeAllFromViewDefinitions()
No comment provided by developer, please add a comment to improve documentation.

Specified by:
removeAllFromViewDefinitions in interface Filter
See Also:
ViewDefinition