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

How to use
addChild
method
in
ucar.nc2.ft.point.standard.TableConfig

Best Java code snippets using ucar.nc2.ft.point.standard.TableConfig.addChild (Showing top 20 results out of 315)

origin: edu.ucar/cdm

private void checkIfTrajectory(TableConfig st) {
 // deal with possible trajectory - only do this if dataset has metadata
 FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds);
 if (ft == FeatureType.TRAJECTORY) {
  st.featureType = FeatureType.TRAJECTORY;
  TableConfig pc = new TableConfig(Table.Type.Top, "single");
  st.parent = pc;
  pc.addChild(st);
 } else
  st.featureType = FeatureType.POINT;
}
origin: Unidata/thredds

private void checkIfTrajectory(TableConfig st) {
 // deal with possible trajectory - only do this if dataset has metadata
 FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds);
 if (ft == FeatureType.TRAJECTORY) {
  st.featureType = FeatureType.TRAJECTORY;
  TableConfig pc = new TableConfig(Table.Type.Top, "single");
  st.parent = pc;
  pc.addChild(st);
 } else
  st.featureType = FeatureType.POINT;
}
origin: edu.ucar/netcdf

private void checkIfTrajectory(TableConfig st) {
 // deal with possible trajectory - only do this if dataset has metadata
 FeatureType ft = FeatureDatasetFactoryManager.findFeatureType(ds);
 if (ft == FeatureType.TRAJECTORY) {
  st.featureType = FeatureType.TRAJECTORY;
  TableConfig pc = new TableConfig(Table.Type.Top, "single");
  st.parent = pc;
  pc.addChild(st);
 } else
  st.featureType = FeatureType.POINT;
}
origin: edu.ucar/netcdf

public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) {
 VNames vn = getVariableNames(ds, errlog);
 TableConfig trajTable = new TableConfig(Table.Type.Construct, "trajectory");
 trajTable.featureType = FeatureType.TRAJECTORY;
 trajTable.feature_id = TRAJ_ID;
 TableConfig obs = new TableConfig(Table.Type.ParentId, "record");
 obs.parentIndex = TRAJ_ID;
 obs.dimName = Evaluator.getDimensionName(ds, "recNum", errlog);
 obs.time = vn.obsTime;
 obs.timeNominal = vn.nominalTime;
 //obs.stnId = vn.stnId;
 //obs.stnDesc = vn.stnDesc;
 obs.lat = vn.lat;
 obs.lon = vn.lon;
 obs.elev = vn.elev;
 trajTable.addChild(obs);
 return trajTable;
}
origin: Unidata/thredds

public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) {
 VNames vn = getVariableNames(ds, errlog);
 TableConfig trajTable = new TableConfig(Table.Type.Construct, "trajectory");
 trajTable.featureType = FeatureType.TRAJECTORY;
 trajTable.feature_id = TRAJ_ID;
 TableConfig obs = new TableConfig(Table.Type.ParentId, "record");
 obs.parentIndex = TRAJ_ID;
 obs.dimName = Evaluator.getDimensionName(ds, "recNum", errlog);
 obs.time = vn.obsTime;
 obs.timeNominal = vn.nominalTime;
 //obs.stnId = vn.stnId;
 //obs.stnDesc = vn.stnDesc;
 obs.lat = vn.lat;
 obs.lon = vn.lon;
 obs.elev = vn.elev;
 trajTable.addChild(obs);
 return trajTable;
}
origin: edu.ucar/cdm

public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) {
 VNames vn = getVariableNames(ds, errlog);
 TableConfig trajTable = new TableConfig(Table.Type.Construct, "trajectory");
 trajTable.featureType = FeatureType.TRAJECTORY;
 trajTable.feature_id = TRAJ_ID;
 TableConfig obs = new TableConfig(Table.Type.ParentId, "record");
 obs.parentIndex = TRAJ_ID;
 obs.dimName = Evaluator.getDimensionName(ds, "recNum", errlog);
 obs.time = vn.obsTime;
 obs.timeNominal = vn.nominalTime;
 //obs.stnId = vn.stnId;
 //obs.stnDesc = vn.stnDesc;
 obs.lat = vn.lat;
 obs.lon = vn.lon;
 obs.elev = vn.elev;
 trajTable.addChild(obs);
 return trajTable;
}
origin: edu.ucar/cdm

protected TableConfig getStationProfileConfig(NetcdfDataset ds, Formatter errlog) throws IOException {
 TableConfig stnTable = getStationConfig(ds, errlog);
 if (stnTable == null) return null;
 stnTable.featureType = FeatureType.STATION_PROFILE;
 TableConfig timeSeries = stnTable.children.get(0);
 Structure obsv = (Structure) ds.findVariable(timeSeries.name);
 Structure profile = null;
 for (Variable v : obsv.getVariables()) {
  if (v.getDataType() == DataType.SEQUENCE)
   profile = (Structure) v;
 }
 TableConfig profileTc = new TableConfig(Table.Type.NestedStructure, profile.getFullName());
 profileTc.nestedTableName = profile.getShortName();
 Variable elev = findZAxisNotStationAlt(ds);
 profileTc.elev = elev.getShortName();
  if (profileTc.elev == null) {
  errlog.format("Must have a level coordinate%n");
  return null;
 }
 timeSeries.addChild(profileTc);
 return stnTable;
}
origin: edu.ucar/netcdf

protected TableConfig getStationProfileConfig(NetcdfDataset ds, Formatter errlog) throws IOException {
 TableConfig stnTable = getStationConfig(ds, errlog);
 if (stnTable == null) return null;
 stnTable.featureType = FeatureType.STATION_PROFILE;
 TableConfig timeSeries = stnTable.children.get(0);
 Structure obsv = (Structure) ds.findVariable(timeSeries.name);
 Structure profile = null;
 for (Variable v : obsv.getVariables()) {
  if (v.getDataType() == DataType.SEQUENCE)
   profile = (Structure) v;
 }
 TableConfig profileTc = new TableConfig(Table.Type.NestedStructure, profile.getFullName());
 profileTc.nestedTableName = profile.getShortName();
 Variable elev = findZAxisNotStationAlt(ds);
 profileTc.elev = elev.getShortName();
  if (profileTc.elev == null) {
  errlog.format("Must have a level coordinate%n");
  return null;
 }
 timeSeries.addChild(profileTc);
 return stnTable;
}
origin: edu.ucar/cdm

public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException {
 TableConfig nt = new TableConfig(Table.Type.ArrayStructure, "station");
 nt.featureType = FeatureType.STATION_PROFILE;
 nt.structName = "station";
 nt.stnId = STN_NAME;
 nt.lat = STN_LAT;
 nt.lon = STN_LON;
 nt.elev = STN_ELEV;
 // make the station array structure in memory
 // nt.as = makeIndex(ds);
 TableConfig obs = new TableConfig(Table.Type.Structure, "obsRecord");
 obs.structName = "record";
 obs.dimName = Evaluator.getDimensionName(ds, "record", errlog);
 obs.lat = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Lat);
 obs.lon = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Lon);
 obs.elev = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Height);
 obs.time = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Time);
 obs.stnId = Evaluator.getVariableName(ds, "name", errlog);
 //obs.join = new TableConfig.JoinConfig(Join.Type.Index);
 // create an IndexJoin and attach to the obs.join
 //indexJoin = new IndexJoin(obs.join);
 nt.addChild(obs);
 TableConfig levels = new TableConfig(Table.Type.Structure, "seq1");
 levels.structName = "seq1";
 levels.elev = UnidataPointDatasetHelper.getCoordinateName(ds, AxisType.Height);
 //levels.join = new TableConfig.JoinConfig(Join.Type.NestedStructure);
 obs.addChild(levels);
 return nt;
}
origin: edu.ucar/netcdf

private void findNestedStructures(Structure s, TableConfig parent) {
 for (Variable v : s.getVariables()) {
  if (v instanceof Structure) {  // handles Sequences too
   TableConfig nestedTable = new TableConfig(Table.Type.NestedStructure, v.getFullName());
   nestedTable.structName = v.getFullName();
   nestedTable.nestedTableName = v.getShortName();
   addTable(nestedTable);
   parent.addChild(nestedTable);
   // LOOK why not add the join(parent,child) here ?
   //nestedTable.join = new TableConfig.JoinConfig(Join.Type.NestedStructure);
   //joins.add(nestedTable.join);
   findNestedStructures((Structure) v, nestedTable); // look for nested structures
  }
 }
}
origin: edu.ucar/cdm

private void findNestedStructures(Structure s, TableConfig parent) {
 for (Variable v : s.getVariables()) {
  if (v instanceof Structure) {  // handles Sequences too
   TableConfig nestedTable = new TableConfig(Table.Type.NestedStructure, v.getFullName());
   nestedTable.structName = v.getFullName();
   nestedTable.nestedTableName = v.getShortName();
   addTable(nestedTable);
   parent.addChild(nestedTable);
   // LOOK why not add the join(parent,child) here ?
   //nestedTable.join = new TableConfig.JoinConfig(Join.Type.NestedStructure);
   //joins.add(nestedTable.join);
   findNestedStructures((Structure) v, nestedTable); // look for nested structures
  }
 }
}
origin: Unidata/thredds

private void findNestedStructures(Structure s, TableConfig parent) {
 for (Variable v : s.getVariables()) {
  if (v instanceof Structure) {  // handles Sequences too
   TableConfig nestedTable = new TableConfig(Table.Type.NestedStructure, v.getFullName());
   nestedTable.structName = v.getFullName();
   nestedTable.nestedTableName = v.getShortName();
   addTable(nestedTable);
   parent.addChild(nestedTable);
   // LOOK why not add the join(parent,child) here ?
   //nestedTable.join = new TableConfig.JoinConfig(Join.Type.NestedStructure);
   //joins.add(nestedTable.join);
   findNestedStructures((Structure) v, nestedTable); // search for nested structures
  }
 }
}
origin: edu.ucar/netcdf

 public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException {
  TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory");

  CoordinateAxis coordAxis = CoordSysEvaluator.findCoordByType(ds, AxisType.Time);
  if (coordAxis == null) {
   errlog.format("Cant find a time coordinate");
   return null;
  }
  Dimension innerDim = coordAxis.getDimension(0);
  boolean obsIsStruct = Evaluator.hasRecordStructure(ds) && innerDim.isUnlimited();

  TableConfig obsTable = new TableConfig(Table.Type.Structure, innerDim.getShortName());
  obsTable.dimName = innerDim.getShortName();
  obsTable.time = coordAxis.getFullName();
  obsTable.structName = obsIsStruct ? "record" : innerDim.getShortName();
  obsTable.structureType = obsIsStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure;
  CoordSysEvaluator.findCoordWithDimension(obsTable, ds, innerDim); 

  topTable.addChild(obsTable);
  return topTable;
 }
}
origin: edu.ucar/cdm

 public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException {
  TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory");

  CoordinateAxis coordAxis = CoordSysEvaluator.findCoordByType(ds, AxisType.Time);
  if (coordAxis == null) {
   errlog.format("Cant find a time coordinate");
   return null;
  }
  final Dimension innerDim = coordAxis.getDimension(0);
  boolean obsIsStruct = Evaluator.hasNetcdf3RecordStructure(ds) && innerDim.isUnlimited();

  TableConfig obsTable = new TableConfig(Table.Type.Structure, innerDim.getShortName());
  obsTable.dimName = innerDim.getShortName();
  obsTable.time = coordAxis.getFullName();
  obsTable.structName = obsIsStruct ? "record" : innerDim.getShortName();
  obsTable.structureType = obsIsStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure;
  CoordSysEvaluator.findCoords(obsTable, ds, new CoordSysEvaluator.Predicate() {
   public boolean match(CoordinateAxis axis) {
    return innerDim.equals(axis.getDimension(0));
   }
  });

  topTable.addChild(obsTable);
  return topTable;
 }
}
origin: Unidata/thredds

 public TableConfig getConfig(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException {
  TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory");

  CoordinateAxis coordAxis = CoordSysEvaluator.findCoordByType(ds, AxisType.Time);
  if (coordAxis == null) {
   errlog.format("Cant find a time coordinate");
   return null;
  }
  final Dimension innerDim = coordAxis.getDimension(0);
  boolean obsIsStruct = Evaluator.hasNetcdf3RecordStructure(ds) && innerDim.isUnlimited();

  TableConfig obsTable = new TableConfig(Table.Type.Structure, innerDim.getShortName());
  obsTable.dimName = innerDim.getShortName();
  obsTable.time = coordAxis.getFullName();
  obsTable.structName = obsIsStruct ? "record" : innerDim.getShortName();
  obsTable.structureType = obsIsStruct ? TableConfig.StructureType.Structure : TableConfig.StructureType.PsuedoStructure;
  CoordSysEvaluator.findCoords(obsTable, ds, new CoordSysEvaluator.Predicate() {
   public boolean match(CoordinateAxis axis) {
    return innerDim.equals(axis.getDimension(0));
   }
  });

  topTable.addChild(obsTable);
  return topTable;
 }
}
origin: edu.ucar/bufr

protected TableConfig getTrajectoryConfig(NetcdfDataset ds, Formatter errlog) {
 TableConfig topTable = new TableConfig(Table.Type.Top, "singleTrajectory");
 // the profile values are the inner sequence
 TableConfig obsTable = new TableConfig(Table.Type.Structure, BufrIosp.obsRecord);
 Structure obsStruct = (Structure) ds.findVariable(BufrIosp.obsRecord);
 obsTable.structName = obsStruct.getName();
 obsTable.nestedTableName = obsStruct.getShortName();
 obsTable.lat = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Lat.toString());
 obsTable.lon = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Lon.toString());
 obsTable.elev = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Height.toString());
 obsTable.time = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Time.toString());
 topTable.addChild(obsTable);
 return topTable;
}
origin: edu.ucar/bufr

protected TableConfig getStationProfileConfig(NetcdfDataset ds, Formatter errlog) {
 // construct the station table by reading through the timeseries
 TableConfig stnTable = new TableConfig(Table.Type.Construct, "station");
 stnTable.featureType = FeatureType.STATION_PROFILE;
 stnTable.structName = BufrIosp.obsRecord;
 // the time series is just the outer structure
 TableConfig timeTable = new TableConfig(Table.Type.ParentId, BufrIosp.obsRecord);
 Structure stnStruct = (Structure) ds.findVariable(BufrIosp.obsRecord);
 timeTable.lat = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lat.toString());
 timeTable.lon = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lon.toString());
 timeTable.stnAlt = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Height.toString());
 timeTable.stnId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_ID);
 timeTable.stnWmoId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_WMOID);
 if (timeTable.stnId == null) timeTable.stnId = timeTable.stnWmoId;
 timeTable.parentIndex = timeTable.stnId;
 timeTable.time = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Time.toString());
 timeTable.structName = BufrIosp.obsRecord;
 stnTable.addChild(timeTable);
 // the profile values are the inner sequence
 TableConfig obsTable = new TableConfig(Table.Type.NestedStructure, "levels");
 Structure obsStruct = (Structure) stnStruct.findVariable("seq1"); // kludgerino
 if (obsStruct == null)
  obsStruct = (Structure) stnStruct.findVariable("struct1");
 obsTable.structName = obsStruct.getName();
 obsTable.nestedTableName = obsStruct.getShortName();
 obsTable.elev = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Height.toString());
 timeTable.addChild(obsTable);
 return stnTable;
}
origin: Unidata/thredds

obs.dimName = obsDim.getShortName();
obs.time = CoordSysEvaluator.findCoordNameByType(ds, AxisType.Time);
nt.addChild(obs);
origin: edu.ucar/bufr

protected TableConfig getStationConfig(NetcdfDataset ds, Formatter errlog) {
  // construct the station table by reading through the timeseries
  TableConfig stnTable = new TableConfig(Table.Type.Construct, "station");
  stnTable.featureType = FeatureType.STATION;
  stnTable.structName = BufrIosp.obsRecord;
  // the time series is just the outer structure
  TableConfig timeTable = new TableConfig(Table.Type.ParentId, BufrIosp.obsRecord);
  Structure stnStruct = (Structure) ds.findVariable(BufrIosp.obsRecord);
  timeTable.lat = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lat.toString());
  timeTable.lon = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Lon.toString());
  timeTable.stnAlt = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Height.toString());
  timeTable.stnId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_ID);
  timeTable.stnWmoId = Evaluator.getNameOfVariableWithAttribute(stnStruct, CF.STANDARD_NAME, CF.STATION_WMOID);
  if (timeTable.stnId == null) timeTable.stnId = timeTable.stnWmoId;
  timeTable.parentIndex = timeTable.stnId;
  timeTable.time = Evaluator.getNameOfVariableWithAttribute(stnStruct, _Coordinate.AxisType, AxisType.Time.toString());
  timeTable.structName = BufrIosp.obsRecord;
  stnTable.addChild(timeTable);
  return stnTable;
 }
origin: edu.ucar/bufr

protected TableConfig getProfileConfig(NetcdfDataset ds, Formatter errlog) {
  // construct the station table by reading through the timeseries
  TableConfig profileTable = new TableConfig(Table.Type.Structure, "profile");
  profileTable.featureType = FeatureType.PROFILE;
  profileTable.structName = BufrIosp.obsRecord;
  Structure profileStruct = (Structure) ds.findVariable(BufrIosp.obsRecord);
  profileTable.lat = Evaluator.getNameOfVariableWithAttribute(profileStruct, _Coordinate.AxisType, AxisType.Lat.toString());
  profileTable.lon = Evaluator.getNameOfVariableWithAttribute(profileStruct, _Coordinate.AxisType, AxisType.Lon.toString());
  profileTable.time = Evaluator.getNameOfVariableWithAttribute(profileStruct, _Coordinate.AxisType, AxisType.Time.toString());
  // the time series is just the outer structure
  TableConfig obsTable = new TableConfig(Table.Type.NestedStructure, "struct5");
  Structure obsStruct = (Structure) profileStruct.findVariable("struct5");
  obsTable.structName = obsStruct.getName();
  obsTable.nestedTableName = obsStruct.getShortName();
  obsTable.elev = Evaluator.getNameOfVariableWithAttribute(obsStruct, _Coordinate.AxisType, AxisType.Pressure.toString()); // HEY not height
  profileTable.addChild(obsTable);
 
  return profileTable;
 }
ucar.nc2.ft.point.standardTableConfigaddChild

Popular methods of TableConfig

  • <init>
    Constructor
  • addJoin
  • findCoordinateVariableName
  • setCoordinateVariableName
  • getNumRecords
  • getStart

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • 21 Best Atom Packages for 2021
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