String getNetcdfShortName() { return DODSNetcdfFile.makeShortName(getClearName()); }
protected DODSAttribute(String dodsName, String val) { super(DODSNetcdfFile.makeShortName(dodsName), val); setDODSName(DODSNetcdfFile.makeDODSName(dodsName)); }
DODSVariable( DODSNetcdfFile dodsfile, Group parentGroup, Structure parentStructure, String dodsShortName, DodsV dodsV) { super(dodsfile, parentGroup, parentStructure, DODSNetcdfFile.makeShortName(dodsShortName)); setDODSName(DODSNetcdfFile.makeDODSName(dodsShortName)); this.dodsfile = dodsfile; setSPobject(dodsV); }
DODSStructure( DODSNetcdfFile dodsfile, Group parentGroup, Structure parentStructure, String dodsShortName, DodsV dodsV) throws IOException { super(dodsfile, parentGroup, parentStructure, DODSNetcdfFile.makeShortName(dodsShortName)); setDODSName(DODSNetcdfFile.makeDODSName(dodsShortName)); this.dodsfile = dodsfile; this.ds = (DConstructor) dodsV.bt; if (ds instanceof DSequence) { this.dimensions.add( Dimension.VLEN); this.shape = new int[1]; // scalar } else this.shape = new int[0]; // scalar for (DodsV nested : dodsV.children) { dodsfile.addVariable(parentGroup, this, nested); } if (ds instanceof DSequence) isVariableLength = true; setSPobject(dodsV); }
DODSGrid( DODSNetcdfFile dodsfile, Group parentGroup, Structure parentStructure, String dodsShortName, DodsV dodsV) throws IOException { super(dodsfile, parentGroup, parentStructure, dodsShortName, dodsV); DodsV array = dodsV.children.get(0); /* if (!shortName.equals(array.bt.getName())) { this.shortName = shortName + "-" + array.bt.getName(); // LOOK whats this ?? } // so we just map the netcdf grid variable to the dods grid.array this.dodsShortName = shortName + "." + array.bt.getName(); */ // the common case is that the map vectors already exist as a top level variables List<Dimension> dims = new ArrayList<Dimension>(); Formatter sbuff = new Formatter(); for (int i = 1; i < dodsV.children.size(); i++) { DodsV map = dodsV.children.get(i); String name = DODSNetcdfFile.makeShortName(map.bt.getEncodedName()); Dimension dim = parentGroup.findDimension(name); if (dim == null) { logger.warn("DODSGrid cant find dimension = <"+name+">"); } else { dims.add( dim); sbuff.format("%s ", name); } } setDimensions( dims); setDataType( array.getDataType()); /* if (DODSNetcdfFile.isUnsigned( array.bt)) { addAttribute(new Attribute(CDM.UNSIGNED, "true")); } */ DODSAttribute att = new DODSAttribute(_Coordinate.Axes, sbuff.toString()); this.addAttribute( att); }
String shortName = DODSNetcdfFile.makeShortName(map.bt.getEncodedName()); if (useGroups && (parentStructure == null) && isGroup(dstruct)) { // turn into a group if (debugConstruct) System.out.println(" assigned to Group <" + dodsShortName + ">"); Group g = new Group(this, parentGroup, DODSNetcdfFile.makeShortName(dodsShortName)); addAttributes(g, dodsV); parentGroup.addGroup(g);
DODSVariable( DODSNetcdfFile dodsfile, Group parentGroup, Structure parentStructure, String dodsShortName, opendap.dap.BaseType dodsScalar, DodsV dodsV) { super(dodsfile, parentGroup, parentStructure, DODSNetcdfFile.makeShortName(dodsShortName)); setDODSName(DODSNetcdfFile.makeDODSName(dodsShortName)); this.dodsfile = dodsfile; setDataType( dodsV.getDataType()); /* if (DODSNetcdfFile.isUnsigned( dodsScalar)) { addAttribute(new DODSAttribute(CDM.UNSIGNED, "true")); } */ // check for netcdf char array Dimension strlenDim; if ((dataType == DataType.STRING) && (null != (strlenDim = dodsfile.getNetcdfStrlenDim( this)))) { List<Dimension> dims = new ArrayList<Dimension>(); if (strlenDim.getLength() != 0) dims.add( dodsfile.getSharedDimension( parentGroup, strlenDim)); setDimensions(dims); setDataType( DataType.CHAR); } else { shape = new int[0]; } setSPobject(dodsV); }
super(DODSNetcdfFile.makeShortName(dodsName)); setDODSName(DODSNetcdfFile.makeDODSName(dodsName));