public abstract class DapNode extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,DapAttribute> |
attributes
DAP Attributes attached to this node (as opposed to the xml attributes)
|
protected DapDataset |
dataset |
protected String |
escapedname
Escaped version of shortname
|
protected String |
fqn
Fully qualified name; note that this is always backslash escaped
|
protected int |
index
Assign unique id to all nodes.
|
protected DapNode |
parent
Parent DapNode; may be:
Group, Structure, Grid, Sequence (for e.g.
|
protected String |
shortname
Unqualified (short) name of this node wrt the tree
|
protected DapSort |
sort
Assign a "sort" to this node to avoid
use of instanceof().
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(DapAttribute attr) |
DapAttribute |
findAttribute(String name) |
Map<String,DapAttribute> |
getAttributes() |
DapNode |
getContainer()
Closest containing group, structure
sequence or Grid.
|
List<DapNode> |
getContainerPath()
Get the transitive list of containers
Not including this node
|
DapDataset |
getDataset() |
String |
getEscapedShortName() |
String |
getFQN() |
DapGroup |
getGroup()
Closest containing group
|
List<DapGroup> |
getGroupPath()
Get the transitive list of containing groups
Possibly including this node
|
int |
getIndex() |
DapNode |
getParent() |
List<DapNode> |
getPath()
Compute the path to the root dataset.
|
String |
getShortName() |
DapSort |
getSort() |
boolean |
isTopLevel() |
void |
removeAttribute(DapAttribute attr)
Used by AbstractDSP to suppress certain attributes.
|
DapAttribute |
setAttribute(DapAttribute attr) |
void |
setAttributes(Map<String,DapAttribute> alist) |
void |
setDataset(DapDataset dataset) |
void |
setIndex(int index) |
void |
setParent(DapNode parent)
Set the parent DapNode; may sometimes be same as container,
but not always (think attributes or maps).
|
void |
setShortName(String shortname) |
void |
setSort(DapSort sort) |
String |
toString() |
protected DapSort sort
protected int index
protected String shortname
protected String escapedname
protected DapNode parent
protected DapDataset dataset
protected String fqn
protected Map<String,DapAttribute> attributes
public DapNode()
public DapNode(String shortname)
public Map<String,DapAttribute> getAttributes()
public void setAttributes(Map<String,DapAttribute> alist)
public DapAttribute setAttribute(DapAttribute attr) throws DapException
DapException
public void addAttribute(DapAttribute attr) throws DapException
DapException
public void removeAttribute(DapAttribute attr) throws DapException
attr
- DapException
public DapAttribute findAttribute(String name)
public DapSort getSort()
public void setSort(DapSort sort)
public int getIndex()
public void setIndex(int index)
public DapDataset getDataset()
public void setDataset(DapDataset dataset)
public DapGroup getGroup()
public DapNode getContainer()
public DapNode getParent()
public void setParent(DapNode parent)
parent
- the proposed parent nodepublic String getShortName()
public void setShortName(String shortname)
public String getEscapedShortName()
public String getFQN()
public List<DapNode> getPath()
public List<DapNode> getContainerPath()
public List<DapGroup> getGroupPath()
public boolean isTopLevel()
Copyright © 1999–2016 UCAR/Unidata. All rights reserved.