cz.cmc.tcgui.dataif
Interface TCExport

All Known Implementing Classes:
TCEditor

public interface TCExport

Title: interface TCExport

Description: via TCExport it is possible to get the structure and data of the TC schema

Copyright: Copyright (c) 2003

Company: CMC Computers


Method Summary
 ClassfulQDisc getAncestorClassfulQDisc(Class c)
          Returns classfull qdisc which is (possibly indirect) parent of the given Class.
 QDisc getAttachedQDisc(Class c)
          Returns QDisc attached to the given class.
 Class getClassMatch(FilterElement fe)
          Get Class matching the given FilterElement
 DataDefinition getDataDefinition()
          Get DataDefinition instance which defines TCObjects and their attributes
 String getDevice()
           
 Filter getFilter(FilterElement fe)
          Returns filter the filter element is in.
 FilterContainer getFilterContainer(Filter f)
          Returns filter container the filter is in.
 FilterElement[] getFilterElements(Filter f)
          Returns filter elements in the given filter.
 FilterElement[] getFilterMatch(Class c)
          Get FilterElements matching the given Class
 Filter[] getFilters(FilterContainer fc)
          Return filters attached to the given FilterContainer (ClassfulQDisc or Class) in the correct order.
 Class getParentClass(QDisc qd)
          Returns the Class the given qdisc is attached on.
 SubclassableTCObject getParentSubclassableTCObject(Class c)
          Returns ClassfulQDisc or class which is parent of the given class.
 TCObject[] getRootTCObjects()
           
 Class[] getSubclasses(SubclassableTCObject stco)
          Gets all subclasses of the specified SubclassableTCObject.
 Map getTCAttributes(TCObject tco)
          Get attributes for given TCObject The returned map should not be changed since it is guaranteed to be copied at the return time.
 TCObject getTCObjectForID(int id)
          Returns TCObject with the given id.
 Map getViewAttributes(TCObject tco)
          Returns view attributes for the given TCObject The returned map should not be changed since it is guaranteed to be copied at the return time.
 boolean isLeafClass(Class c)
          Returns whether the Class is Leaf (has no subclasses).
 

Method Detail

getDataDefinition

public DataDefinition getDataDefinition()
Get DataDefinition instance which defines TCObjects and their attributes

Returns:
instance of DataDefinition interface

getDevice

public String getDevice()
Returns:
device name for which the tc schema stands for

getTCObjectForID

public TCObject getTCObjectForID(int id)
Returns TCObject with the given id.


getRootTCObjects

public TCObject[] getRootTCObjects()
Returns:
array of tc objects which do not have tree input edge

getTCAttributes

public Map getTCAttributes(TCObject tco)
Get attributes for given TCObject The returned map should not be changed since it is guaranteed to be copied at the return time. Keys are AttributeInstances or Strings, values are basic java objects as Float, Boolean, Integer, String, java.util.Set; the datadef object has key TCGraphConstants.DATADEFINITION

Parameters:
tco - TCObject to get attributes for
Returns:
Map key => value

getViewAttributes

public Map getViewAttributes(TCObject tco)
Returns view attributes for the given TCObject The returned map should not be changed since it is guaranteed to be copied at the return time. Keys are strings, values are basic java objects as Float, Boolean, Integer, String, java.awt.Rectangle, java.awt.Point

Parameters:
tco - TCObject to return view attributes for
Returns:
Map key => value

getSubclasses

public Class[] getSubclasses(SubclassableTCObject stco)
Gets all subclasses of the specified SubclassableTCObject. Returns null if stco is a leaf class. Returns empty array if stco is a classfull qdisc without classes.

Parameters:
stco - Class or ClassfulQDisc to return subclasses for
Returns:
subclasses of the specified SubclassableTCObject
See Also:
getAttachedQDisc(Class), getParentClass(QDisc)

isLeafClass

public boolean isLeafClass(Class c)
Returns whether the Class is Leaf (has no subclasses).

Parameters:
c - Class
Returns:
true if the given Class has no subclasses

getParentSubclassableTCObject

public SubclassableTCObject getParentSubclassableTCObject(Class c)
Returns ClassfulQDisc or class which is parent of the given class.

Parameters:
c - class to return parent for
Returns:
parent SubclassableTCObject

getAncestorClassfulQDisc

public ClassfulQDisc getAncestorClassfulQDisc(Class c)
Returns classfull qdisc which is (possibly indirect) parent of the given Class.


getAttachedQDisc

public QDisc getAttachedQDisc(Class c)
Returns QDisc attached to the given class. Returns null if the class is not leaf or if there is no QDisc attached.

Parameters:
c - class to get attched QDisc for
Returns:
QDisc attached to the given class

getParentClass

public Class getParentClass(QDisc qd)
Returns the Class the given qdisc is attached on.

Parameters:
qd - attached QDisc
Returns:
Class the given qdisc is attached on

getFilters

public Filter[] getFilters(FilterContainer fc)
Return filters attached to the given FilterContainer (ClassfulQDisc or Class) in the correct order.

Parameters:
fc - FilterContainer to return filters
Returns:
filters in the given filter container

getFilterContainer

public FilterContainer getFilterContainer(Filter f)
Returns filter container the filter is in.

Parameters:
f - filter
Returns:
filter container the filter is in

getFilterElements

public FilterElement[] getFilterElements(Filter f)
Returns filter elements in the given filter.

Parameters:
f - Filter to return filter elements for
Returns:
filter elements in the given Filter

getFilter

public Filter getFilter(FilterElement fe)
Returns filter the filter element is in.

Parameters:
fe - filter element
Returns:
filter the filter element is in

getClassMatch

public Class getClassMatch(FilterElement fe)
Get Class matching the given FilterElement

Parameters:
fe - filter element to return matching Class for
Returns:
Class matching the given FilterElement or null

getFilterMatch

public FilterElement[] getFilterMatch(Class c)
Get FilterElements matching the given Class

Parameters:
c - Class to return matching FilterElement for
Returns:
FilterElements matching the given Class