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
ConstructorsConstructorDescriptionConstructs an empty tree model.TapMetaTreeModel
(SchemaMeta[] schemas) 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) 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
setSchemas
(SchemaMeta[] schemas) Sets the content of this tree.void
valueForPathChanged
(TreePath path, Object newValue)
-
Constructor Details
-
TapMetaTreeModel
public TapMetaTreeModel()Constructs an empty tree model. -
TapMetaTreeModel
Constructs a tree model to display a given table set.- Parameters:
schemas
- schema array defining the table metadata to be represented
-
-
Method Details
-
setSchemas
Sets the content of this tree.- Parameters:
schemas
- schema array defining the table metadata to be represented
-
getSchemas
Returns the schemas array that forms the root of this tree model.- Returns:
- schema array
-
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
-