congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
VariableSimpleIF
Code IndexAdd Tabnine to your IDE (free)

How to use
VariableSimpleIF
in
ucar.nc2

Best Java code snippets using ucar.nc2.VariableSimpleIF (Showing top 20 results out of 315)

origin: edu.ucar/cdm

static public VariableSimpleImpl changeShape(VariableSimpleIF proxy, List<Dimension> dims) {
 VariableSimpleImpl result = new VariableSimpleImpl(proxy.getShortName(), proxy.getDescription(), proxy.getUnitsString(), proxy.getDataType(), dims);
 for (Attribute att : proxy.getAttributes()) result.add(att);
 return result;
}
origin: Unidata/thredds

public ucar.nc2.Attribute findAttributeIgnoreCase(String attName){
 return v.findAttributeIgnoreCase(attName);
}
origin: Unidata/thredds

protected void addCoordinatesExtended(Structure parent, List<VariableSimpleIF> coords) throws IOException {
 for (VariableSimpleIF vs : coords) {
  String dims = Dimension.makeDimensionsString(vs.getDimensions());
  Variable member = writer.addStructureMember(parent, vs.getShortName(), vs.getDataType(), dims);
  if (member == null) {
   logger.warn("Variable already exists =" + vs.getShortName());  // LOOK barf
   continue;
  }
  for (Attribute att : vs.getAttributes())
   member.addAttribute(att);
 }
}
origin: edu.ucar/cdm

private void addDataVariables(List<VariableSimpleIF> list, Table t) {
 if (t.parent != null) addDataVariables(list, t.parent);
 for (VariableSimpleIF col : t.cols.values()) {
  if (t.nondataVars.contains(col.getFullName())) continue;
  if (t.nondataVars.contains(col.getShortName())) continue;  // fishy
  list.add(col);
 }
}
origin: Unidata/thredds

public ThreddsMetadata.VariableGroup extractVariables(FeatureDatasetPoint fd) {
 List<ThreddsMetadata.Variable> vars = new ArrayList<>();
 List<VariableSimpleIF> dataVars = fd.getDataVariables();
 if (dataVars == null)
  return null;
 for (VariableSimpleIF v : dataVars) {
  String name = v.getShortName();
  String desc = v.getDescription();
  String units = v.getUnitsString();
  String vname = null;
  String id = null;
  ucar.nc2.Attribute att = v.findAttributeIgnoreCase("standard_name");
  if (att != null)
   vname = att.getStringValue();
  vars.add(new ThreddsMetadata.Variable(name, desc, vname, units, id));
 }
 Collections.sort(vars);
                      // String vocab, String vocabHref, URI vocabUri, URI mapUri, List<Variable> variables
 return new ThreddsMetadata.VariableGroup("CF-1.0", null, null, vars);
}
origin: Unidata/thredds

protected void replaceDataVars(StructureMembers sm) {
 for (StructureMembers.Member m : sm.getMembers()) {
  VariableSimpleIF org = this.cols.get(m.getName());
  int rank = org.getRank();
  List<Dimension> orgDims = org.getDimensions();
  // only keep the last n
  int n = m.getShape().length;
  List<Dimension> dims = orgDims.subList(rank-n, rank);
  VariableSimpleImpl result = new VariableSimpleImpl(org.getShortName(), org.getDescription(), org.getUnitsString(), org.getDataType(), dims);
  for (Attribute att : org.getAttributes()) result.add(att);
  this.cols.put(m.getName(), result);
 }
}
origin: edu.ucar/cdm

private Element writeVariable(VariableSimpleIF v) {
 Element varElem = new Element("variable");
 varElem.setAttribute("name", v.getShortName());
 ucar.ma2.DataType dt = v.getDataType();
 if (dt != null)
  varElem.setAttribute("type", dt.toString());
 // attributes
 Iterator atts = v.getAttributes().iterator();
 while (atts.hasNext()) {
  ucar.nc2.Attribute att = (ucar.nc2.Attribute) atts.next();
  varElem.addContent(ucar.nc2.ncml.NcMLWriter.writeAttribute(att, "attribute", null));
 }
 return varElem;
}
origin: edu.ucar/cdm

 @Override
 public int compareTo(VariableSimpleIF o) {
  return name.compareTo(o.getShortName()); // ??
 }
}
origin: edu.ucar/cdm

public String getName() { return v.getFullName(); }
public String getShortName() { return v.getShortName(); }
origin: edu.ucar/netcdf

public List<Dimension> getDimensions() { return v.getDimensions(); }
public List<Attribute> getAttributes() { return v.getAttributes(); }
origin: edu.ucar/cdm

public String getDescription() { return v.getDescription(); }
public String getInfo() { return v.toString(); }
origin: Unidata/thredds

public String getUnitsString() { return v.getUnitsString(); }
origin: edu.ucar/cdm

public List<Attribute> getAttributes() { return v.getAttributes(); }
public ucar.nc2.Attribute findAttributeIgnoreCase(String attName){
origin: Unidata/thredds

public DataType getDataType() { return v.getDataType(); }
public String getDescription() { return v.getDescription(); }
origin: edu.ucar/netcdf

public int getRank() {  return v.getRank(); }
public int[] getShape() { return v.getShape(); }
origin: edu.ucar/netcdf

public int[] getShape() { return v.getShape(); }
public List<Dimension> getDimensions() { return v.getDimensions(); }
origin: edu.ucar/cdm

static public ThreddsMetadata.Variables extractVariables(FeatureDatasetPoint fd) {
 ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables("CF-1.5");
 List<VariableSimpleIF> dataVars =  fd.getDataVariables();
 if (dataVars == null)
  return vars;
 for (VariableSimpleIF v : dataVars) {
  ThreddsMetadata.Variable tv = new ThreddsMetadata.Variable();
  vars.addVariable(tv);
  tv.setName(v.getShortName());
  tv.setDescription(v.getDescription());
  tv.setUnits(v.getUnitsString());
  ucar.nc2.Attribute att = v.findAttributeIgnoreCase("standard_name");
  if (att != null)
    tv.setVocabularyName(att.getStringValue());
 }
 vars.sort();
 return vars;
}
origin: edu.ucar/netcdf

private Element writeVariable(VariableSimpleIF v) {
 Element varElem = new Element("variable");
 varElem.setAttribute("name", v.getShortName());
 ucar.ma2.DataType dt = v.getDataType();
 if (dt != null)
  varElem.setAttribute("type", dt.toString());
 // attributes
 Iterator atts = v.getAttributes().iterator();
 while (atts.hasNext()) {
  ucar.nc2.Attribute att = (ucar.nc2.Attribute) atts.next();
  varElem.addContent(ucar.nc2.ncml.NcMLWriter.writeAttribute(att, "attribute", null));
 }
 return varElem;
}
origin: Unidata/thredds

public VariableSimpleIF getDataVariable(String shortName) {
 for (VariableSimpleIF s : dataVariables) {
  String ss = s.getShortName();
  if (shortName.equals(ss)) return s;
 }
 return null;
}
origin: Unidata/thredds

private void addDataVariables(List<VariableSimpleIF> list, Table t) {
 if (t.parent != null) addDataVariables(list, t.parent);
 for (VariableSimpleIF col : t.cols.values()) {
  if (t.nondataVars.contains(col.getFullName())) continue;
  if (t.nondataVars.contains(col.getShortName())) continue;  // fishy
  list.add(col);
 }
}
ucar.nc2VariableSimpleIF

Javadoc

A lightweight abstractions of a Variable.

Most used methods

  • getShortName
    short name of the data Variable
  • getDescription
    description of the Variable
  • getUnitsString
    Units of the Variable. These should be udunits compatible if possible
  • findAttributeIgnoreCase
    find the attribute for the variable with the given name, ignoring case.
  • getAttributes
    Attributes for the variable.
  • getDataType
    Variable's data type
  • getDimensions
    Dimension List. empty for a scalar variable.
  • getFullName
    full, backslash escaped name of the data Variable
  • getRank
    Variable rank
  • getShape
    Variable shape

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now