|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.Group
public class Group
A Group is a logical collection of Variables. The Groups in a Dataset form a hierarchical tree, like directories on a disk. A Group has a name and optionally a set of Attributes. There is always at least one Group in a dataset, the root Group, whose name is the empty string.
| Constructor Summary | |
|---|---|
Group(NetcdfFile ncfile,
Group parent,
java.lang.String shortName)
Constructor |
|
| Method Summary | |
|---|---|
void |
addAttribute(Attribute att)
Add new Attribute; replace old if has same name. |
void |
addDimension(Dimension d)
Add a shared Dimension |
void |
addGroup(Group g)
Add a nested Group |
void |
addVariable(Variable v)
Add a Variable |
boolean |
equals(java.lang.Object oo)
Instances which have same content are equal. |
Attribute |
findAttribute(java.lang.String name)
Find an Attribute in this Group by its name. |
Attribute |
findAttributeIgnoreCase(java.lang.String name)
Find an Attribute in this Group by its name, ignore case. |
Dimension |
findDimension(java.lang.String name)
Retrieve a Dimension using its (short) name. |
Dimension |
findDimensionLocal(java.lang.String name)
Retrieve a Dimension using its (short) name, in this group only |
Group |
findGroup(java.lang.String shortName)
Retrieve the Group with the specified (short) name. |
Variable |
findVariable(java.lang.String shortName)
Find the Variable with the specified (short) name in this group. |
Variable |
findVariableRecurse(java.lang.String shortName)
Find the Variable with the specified (short) name in this group or a parent group. |
java.util.List |
getAttributes()
Get the set of attributes contained directly in this Group. |
java.util.List |
getDimensions()
Get the Dimensions contained directly in this group. |
java.util.List |
getGroups()
Get the Groups contained directly in this Group. |
java.lang.String |
getName()
Get the full name, starting from the root Group. |
java.lang.String |
getNameAndAttributes()
Get String with name and attributes. |
Group |
getParentGroup()
Get its parent Group, or null if its the root group. |
java.lang.String |
getShortName()
Get the "short" name, unique within its parent Group. |
java.util.List |
getVariables()
Get the Variables contained directly in this group. |
int |
hashCode()
Override Object.hashCode() to implement equals. |
boolean |
remove(Attribute a)
Remove an Attribute : uses the attribute hashCode to find it. |
boolean |
remove(Dimension d)
Remove an Dimension : uses the dimension hashCode to find it. |
boolean |
remove(Group g)
Remove an Attribute : uses the attribute hashCode to find it. |
boolean |
remove(Variable v)
Remove a Variable : uses the variable hashCode to find it. |
boolean |
removeDimension(java.lang.String dimName)
remove a Dimension using its name, in this group only |
boolean |
removeVariable(java.lang.String varName)
remove a Variable using its (short) name, in this group only |
void |
setName(java.lang.String name)
Set the Group name |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Group(NetcdfFile ncfile,
Group parent,
java.lang.String shortName)
| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getShortName()
public Group getParentGroup()
public java.util.List getVariables()
public Variable findVariable(java.lang.String shortName)
shortName - short name of Variable within this group.
public Variable findVariableRecurse(java.lang.String shortName)
shortName - short name of Variable.
public java.util.List getGroups()
public Group findGroup(java.lang.String shortName)
shortName - short name of the nested group you are looking for.
public java.util.List getDimensions()
public Dimension findDimension(java.lang.String name)
name - Dimension name.
public Dimension findDimensionLocal(java.lang.String name)
name - Dimension name.
public boolean removeDimension(java.lang.String dimName)
dimName - Dimension name.
public boolean removeVariable(java.lang.String varName)
varName - Variable name.
public java.util.List getAttributes()
public Attribute findAttribute(java.lang.String name)
name - the name of the attribute
public Attribute findAttributeIgnoreCase(java.lang.String name)
name - the name of the attribute
public java.lang.String getNameAndAttributes()
public void setName(java.lang.String name)
public void addAttribute(Attribute att)
public void addDimension(Dimension d)
public void addGroup(Group g)
public void addVariable(Variable v)
public boolean remove(Attribute a)
public boolean remove(Dimension d)
public boolean remove(Group g)
public boolean remove(Variable v)
public boolean equals(java.lang.Object oo)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||