ucar.nc2
Class StructurePseudo

java.lang.Object
  extended by ucar.nc2.Variable
      extended by ucar.nc2.Structure
          extended by ucar.nc2.StructurePseudo
All Implemented Interfaces:
java.lang.Comparable<VariableSimpleIF>, VariableIF, VariableSimpleIF

public class StructurePseudo
extends Structure

Make a collection of variables with the same outer dimension into a fake Structure. Its fake because the variables are not stored contiguously.

  so
   var1(dim, other);
   var2(dim, other);
   var3(dim, other);
 becomes
   struct {
     var1(other);
     var2(other);
     var3(other);
   } name(dim);
 

Author:
caron

Field Summary
 
Fields inherited from class ucar.nc2.Variable
defaultSizeToCache
 
Constructor Summary
StructurePseudo(NetcdfFile ncfile, Group group, java.lang.String shortName, Dimension dim)
          Make a Structure out of all Variables with the named dimension as their outermost dimension.
StructurePseudo(NetcdfFile ncfile, Group group, java.lang.String shortName, java.util.List<java.lang.String> varNames, Dimension dim)
          Make a Structure out of named Variables, each has the same named outermost dimension.
 
Method Summary
 boolean removeMemberVariable(Variable v)
          Remove a Variable : uses the Variable name to find it.
 
Methods inherited from class ucar.nc2.Structure
addMemberVariable, calcElementSize, findVariable, getElementSize, getNameAndAttributes, getStructureIterator, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, readStructure, readStructure, readStructure, replaceMemberVariable, select, select, setCaching, setImmutable, setMemberVariables, setParentGroup, writeCDL
 
Methods inherited from class ucar.nc2.Variable
addAttribute, compareTo, createNewCache, equals, findAttribute, findAttributeIgnoreCase, findDimensionIndex, getAttributes, getDataType, getDescription, getDimension, getDimensions, getDimensionsAll, getDimensionsString, getName, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameEscaped, getParentGroup, getParentStructure, getRanges, getRank, getShape, getShape, getShapeAsSection, getShortName, getSize, getSizeToCache, getSPobject, getUnitsString, hasCachedData, hashCode, invalidateCache, isCoordinateVariable, isImmutable, isMemberOfStructure, isMetadata, isScalar, isUnknownLength, isUnlimited, isUnsigned, isVariableLength, lookupEnumString, read, read, read, read, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToByteChannel, remove, removeAttribute, removeAttributeIgnoreCase, resetDimensions, resetShape, section, section, setCachedData, setDataType, setDimension, setDimensions, setDimensions, setDimensionsAnonymous, setElementSize, setEnumTypedef, setIsScalar, setName, setParentStructure, setSizeToCache, setSPobject, slice, toString, toStringDebug
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructurePseudo

public StructurePseudo(NetcdfFile ncfile,
                       Group group,
                       java.lang.String shortName,
                       Dimension dim)
Make a Structure out of all Variables with the named dimension as their outermost dimension.

Parameters:
ncfile - part of this file
group - part of this group
shortName - short name of this Structure
dim - the existing dimension

StructurePseudo

public StructurePseudo(NetcdfFile ncfile,
                       Group group,
                       java.lang.String shortName,
                       java.util.List<java.lang.String> varNames,
                       Dimension dim)
Make a Structure out of named Variables, each has the same named outermost dimension.

Parameters:
ncfile - part of this file
group - part of this group
shortName - short name of this Structure
varNames - limited to these variables. all must have dim as outer dimension.
dim - the existing dimension
Method Detail

removeMemberVariable

public boolean removeMemberVariable(Variable v)
Description copied from class: Structure
Remove a Variable : uses the Variable name to find it.

Overrides:
removeMemberVariable in class Structure
Parameters:
v - remove this variable as a member of this structure
Returns:
true if was found and removed