public class Group extends ucar.nc2.CDMNode implements AttributeContainer
| Modifier and Type | Class and Description |
|---|---|
static class |
Group.Builder
A builder of Groups.
|
| Modifier and Type | Method and Description |
|---|---|
AttributeContainer |
attributes()
The attributes contained by this Group.
|
static Group.Builder |
builder() |
Group |
commonParent(Group other)
Get the common parent of this and the other group.
|
boolean |
equals(Object oo)
Instances which have same name and parent are equal.
|
Attribute |
findAttribute(String name)
Find the attribute by name, return null if not exist
|
String |
findAttributeString(String attName,
String defaultValue)
Find a String-valued Attribute by name (ignore case), return the String value of the Attribute.
|
Dimension |
findDimension(Dimension dim)
Find a Dimension in this or a parent Group, using equals.
|
Dimension |
findDimension(String name)
Find a Dimension in this or a parent Group, matching on short name.
|
Dimension |
findDimensionLocal(String shortName)
Find a Dimension using its (short) name, in this group only
|
EnumTypedef |
findEnumeration(String name)
Find a Enumeration in this or a parent Group, using its short name.
|
Group |
findGroupLocal(String groupShortName)
Retrieve the Group with the specified (short) name.
|
Variable |
findVariableByAttribute(String attName,
String attValue)
Look in this Group and in its nested Groups for a Variable with a String valued Attribute with the given name
and value.
|
Variable |
findVariableLocal(String varShortName)
Find the Variable with the specified (short) name in this group.
|
Variable |
findVariableOrInParent(String varShortName)
Find the Variable with the specified (short) name in this group or a parent group.
|
List<Dimension> |
getDimensions()
Get the shared Dimensions contained directly in this group.
|
com.google.common.collect.ImmutableList<EnumTypedef> |
getEnumTypedefs()
Get the enumerations contained directly in this group.
|
String |
getFullName()
Get the full name of this object.
|
com.google.common.collect.ImmutableList<Group> |
getGroups()
Get the Groups contained directly in this Group.
|
String |
getNameAndAttributes()
Get String with name and attributes.
|
NetcdfFile |
getNetcdfFile()
Get the owning NetcdfFile
|
Group |
getParentGroup()
Get the parent Group, or null if its the root group.
|
List<Variable> |
getVariables()
Get the Variables contained directly in this group.
|
int |
hashCode()
Override Object.hashCode() to implement equals.
|
boolean |
isParent(Group other)
Is this a parent of the other Group?
|
boolean |
isRoot()
Is this the root group?
|
com.google.common.collect.ImmutableList<Dimension> |
makeDimensionsList(String dimString)
Create a dimension list using dimension names.
|
Group.Builder |
toBuilder()
Turn into a mutable Builder.
|
String |
toString() |
filter, findAttributeDouble, findAttributeIgnoreCase, findAttributeInteger, getName, hasAttribute, hasAttributeIgnoreCase, isEmpty, iteratorforEach, spliteratorpublic AttributeContainer attributes()
public static Group.Builder builder()
public Group commonParent(Group other)
other - the other grouppublic boolean equals(Object oo)
@Nullable public Attribute findAttribute(String name)
findAttribute in interface AttributeContainerpublic String findAttributeString(String attName, String defaultValue)
findAttributeString in interface AttributeContainer@Nullable public Dimension findDimension(Dimension dim)
dim - Dimension .@Nullable public Dimension findDimension(String name)
name - Dimension name.@Nullable public Dimension findDimensionLocal(String shortName)
shortName - Dimension name.@Nullable public EnumTypedef findEnumeration(String name)
@Nullable public Group findGroupLocal(String groupShortName)
groupShortName - short name of the nested group you are looking for.@Nullable public Variable findVariableByAttribute(String attName, String attValue)
attName - look for an Attribuite with this name.attValue - look for an Attribuite with this value.@Nullable public Variable findVariableLocal(String varShortName)
varShortName - short name of Variable within this group.@Nullable public Variable findVariableOrInParent(String varShortName)
varShortName - short name of Variable.public List<Dimension> getDimensions()
public com.google.common.collect.ImmutableList<EnumTypedef> getEnumTypedefs()
public String getFullName()
getFullName in class ucar.nc2.CDMNodepublic com.google.common.collect.ImmutableList<Group> getGroups()
public String getNameAndAttributes()
public NetcdfFile getNetcdfFile()
@Nullable public Group getParentGroup()
getParentGroup in class ucar.nc2.CDMNodepublic List<Variable> getVariables()
public int hashCode()
public boolean isParent(Group other)
other - another Grouppublic boolean isRoot()
public com.google.common.collect.ImmutableList<Dimension> makeDimensionsList(String dimString) throws IllegalArgumentException
dimString - : whitespace separated list of dimension names, or '*' for Dimension.UNKNOWN, or number for anon
dimension. null or empty String is a scalar.IllegalArgumentException - if cant find dimension or parse error.public Group.Builder toBuilder()