Modifier and Type | Field and Description |
---|---|
List<EnumTypedef> |
enumTypedefs |
List<Group.Builder> |
gbuilders |
String |
shortName |
List<Variable.Builder<?>> |
vbuilders |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Group.Builder |
addAttribute(Attribute att) |
Group.Builder |
addAttributes(Iterable<Attribute> atts) |
Group.Builder |
addDimension(Dimension dim)
Add Dimension with error if it already exists
|
boolean |
addDimensionIfNotExists(Dimension dim)
Add Dimension if it doesnt already exist
|
Group.Builder |
addDimensions(Collection<Dimension> dims)
Add Dimensions with error if any already exist
|
Group.Builder |
addEnumTypedef(EnumTypedef typedef) |
Group.Builder |
addEnumTypedefs(Collection<EnumTypedef> typedefs) |
Group.Builder |
addGroup(Group.Builder nested)
Add a nested Group.
|
Group.Builder |
addGroups(Collection<Group.Builder> groups) |
Group.Builder |
addVariable(Variable.Builder<?> variable)
Add a Variable, throw error if one of the same name if it exists.
|
Group.Builder |
addVariables(Collection<Variable.Builder<?>> vars)
Add Variables, throw error if one of the same name if it exists.
|
Group |
build()
Build the root group, with parent = null.
|
Group.Builder |
commonParent(Group.Builder other)
Find the common parent with the other group ?
|
boolean |
contains(Dimension want)
Is the Dimension contained within this Group or a parent Group
|
Optional<Dimension> |
findDimension(String name)
Find Dimension in this Group or a parent Group
|
Optional<Dimension> |
findDimensionLocal(String name)
Find Dimension local to this Group
|
Optional<EnumTypedef> |
findEnumTypedef(String name) |
Optional<Group.Builder> |
findGroupLocal(String shortName) |
Optional<Group.Builder> |
findGroupNested(String reletiveName)
Find a subgroup of this Group, with the specified reletive name.
|
EnumTypedef |
findOrAddEnumTypedef(String name,
Map<Integer,String> map)
Add a EnumTypedef if it does not already exist.
|
Optional<Variable.Builder<?>> |
findVariableLocal(String name) |
Optional<Variable.Builder<?>> |
findVariableNested(String reletiveName)
Find a Variable, with the specified reletive name.
|
Optional<Variable.Builder<?>> |
findVariableOrInParent(String varShortName)
Find the Variable with the specified (short) name in this group or a parent group.
|
AttributeContainerMutable |
getAttributeContainer() |
Iterable<Dimension> |
getDimensions() |
NetcdfFile |
getNcfile()
Deprecated.
|
Group.Builder |
getParentGroup() |
boolean |
isParent(Group.Builder other)
Is this group a parent of the other group ?
|
void |
makeDimensionMap(Group.Builder parent,
com.google.common.collect.Multimap<Dimension,Variable.Builder<?>> dimUsedMap)
Make a multimap of Dimensions and all the variables that reference them, in this group and its nested groups.
|
com.google.common.collect.ImmutableList<Dimension> |
makeDimensionsList(String dimString)
Make list of dimensions by looking in this Group or parent groups
|
String |
makeFullName()
Make the full name of the this group.
|
boolean |
removeDimension(String name)
Remove dimension, if it exists.
|
void |
removeDimensionFromAllGroups(Group.Builder group,
Dimension remove)
Remove the given dimension from this group and any subgroups
|
boolean |
removeGroup(String name)
Remove group, if it exists.
|
boolean |
removeVariable(String name)
Remove variable, if it exists.
|
boolean |
replaceDimension(Dimension dim)
Replace dimension if it exists, else just add it.
|
boolean |
replaceVariable(Variable.Builder<?> vb)
Replace variable of same name, if it exists, else just add it.
|
Group.Builder |
setName(String shortName) |
Group.Builder |
setNcfile(NetcdfFile ncfile) |
Group.Builder |
setParentGroup(Group.Builder parentGroup) |
public List<Group.Builder> gbuilders
public List<Variable.Builder<?>> vbuilders
public String shortName
public List<EnumTypedef> enumTypedefs
public Group.Builder setParentGroup(@Nullable Group.Builder parentGroup)
@Nullable public Group.Builder getParentGroup()
public Group.Builder addAttribute(Attribute att)
public Group.Builder addAttributes(Iterable<Attribute> atts)
public AttributeContainerMutable getAttributeContainer()
public Group.Builder addDimension(Dimension dim)
public boolean addDimensionIfNotExists(Dimension dim)
public Group.Builder addDimensions(Collection<Dimension> dims)
public boolean replaceDimension(Dimension dim)
public boolean removeDimension(String name)
public Optional<Dimension> findDimensionLocal(String name)
public boolean contains(Dimension want)
public Optional<Dimension> findDimension(String name)
public Group.Builder addGroup(Group.Builder nested)
public Group.Builder addGroups(Collection<Group.Builder> groups)
public boolean removeGroup(String name)
public Optional<Group.Builder> findGroupLocal(String shortName)
public Optional<Group.Builder> findGroupNested(String reletiveName)
reletiveName
- eg "group/subgroup/wantGroup".public boolean isParent(Group.Builder other)
public Group.Builder commonParent(Group.Builder other)
public Group.Builder addEnumTypedef(EnumTypedef typedef)
public Group.Builder addEnumTypedefs(Collection<EnumTypedef> typedefs)
public EnumTypedef findOrAddEnumTypedef(String name, Map<Integer,String> map)
public Optional<EnumTypedef> findEnumTypedef(String name)
public Group.Builder addVariable(Variable.Builder<?> variable)
public Group.Builder addVariables(Collection<Variable.Builder<?>> vars)
public boolean replaceVariable(Variable.Builder<?> vb)
public boolean removeVariable(String name)
public Optional<Variable.Builder<?>> findVariableLocal(String name)
public Optional<Variable.Builder<?>> findVariableNested(String reletiveName)
reletiveName
- eg "group/subgroup/varname".public Optional<Variable.Builder<?>> findVariableOrInParent(String varShortName)
varShortName
- short name of Variable.public Group.Builder setNcfile(NetcdfFile ncfile)
public Group.Builder setName(String shortName)
@Deprecated public NetcdfFile getNcfile()
public com.google.common.collect.ImmutableList<Dimension> makeDimensionsList(String dimString) throws IllegalArgumentException
IllegalArgumentException
public String makeFullName()
public void removeDimensionFromAllGroups(Group.Builder group, Dimension remove)
public void makeDimensionMap(Group.Builder parent, com.google.common.collect.Multimap<Dimension,Variable.Builder<?>> dimUsedMap)
public Group build()