Package uk.ac.starlink.vo
Class TapMetaTreeModel
java.lang.Object
uk.ac.starlink.vo.TapMetaTreeModel
- All Implemented Interfaces:
TreeModel
TreeModel for representing a TAP table set.
- Since:
- 11 Feb 2015
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionTapMetaTreeModel
(SchemaMeta[] schemas, TapMetaOrder order) Constructs a tree model to display a given table set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
getChildCount
(Object parent) int
getIndexOfChild
(Object parent, Object child) getOrder()
Returns the node ordering being used by this model.getPathForTableName
(String tname) Returns the path in this tree that corresponds to a given table name.getRoot()
static SchemaMeta
Acquires the schema metadata object, if any, associated with a given tree path.Returns the schemas array that forms the root of this tree model.static TableMeta
Acquires the table metadata object, if any, associated with a given tree path.boolean
void
void
setOrder
(TapMetaOrder order) Sets the node ordering to be used by this model.void
setSchemas
(SchemaMeta[] schemas) Sets the content of this tree.void
valueForPathChanged
(TreePath path, Object newValue)
-
Constructor Details
-
TapMetaTreeModel
Constructs a tree model to display a given table set. Note this may reorder the schemas array in place, and the table ordering within each schema.- Parameters:
schemas
- schema array defining the table metadata to be representedorder
- initial ordering policy for contents
-
-
Method Details
-
setSchemas
Sets the content of this tree. Note this may reorder the schemas array in place, and the table ordering within each schema.- Parameters:
schemas
- schema array defining the table metadata to be represented
-
getOrder
Returns the node ordering being used by this model.- Returns:
- ordering
-
setOrder
Sets the node ordering to be used by this model.- Parameters:
order
- ordering
-
getSchemas
Returns the schemas array that forms the root of this tree model.- Returns:
- schema array
-
getPathForTableName
Returns the path in this tree that corresponds to a given table name.- Parameters:
tname
- table name- Returns:
- path in tree corresponding to table name, or null
-
getRoot
-
isLeaf
-
getChildCount
- Specified by:
getChildCount
in interfaceTreeModel
-
getChild
-
getIndexOfChild
- Specified by:
getIndexOfChild
in interfaceTreeModel
-
valueForPathChanged
- Specified by:
valueForPathChanged
in interfaceTreeModel
-
addTreeModelListener
- Specified by:
addTreeModelListener
in interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListener
in interfaceTreeModel
-
getTable
Acquires the table metadata object, if any, associated with a given tree path.- Parameters:
path
- tree path associated with an instance of this class- Returns:
- associated TableMeta object, or null
-
getSchema
Acquires the schema metadata object, if any, associated with a given tree path.- Parameters:
path
- tree path associated with an instance of this class- Returns:
- associated SchemaMeta object, or null
-