Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.SchemaAnnotation$Attribute


                } catch (IOException e) {
                    e.printStackTrace();
                    meanElevation = 0.0;
                }
            } else {
                Attribute data = ds.findGlobalAttribute("Elevation");
                meanElevation = data.getNumericValue().doubleValue();
            }
        }
View Full Code Here


        public float getNyquistFrequency() {
            return 0; // LOOK this may be radial specific
        }

        public float getRangeToFirstGate() {
            Attribute firstGate = ds.findGlobalAttributeIgnoreCase("RangeToFirstGate");
            double gateStart = firstGate.getNumericValue().doubleValue();
            return (float)gateStart;
        }
View Full Code Here

    NetcdfFile nc = NetcdfFile.open(filename);
    Variable v = ncfile.findVariable(helloGreek);
    assert v != null;
    assert v.getShortName().equals(helloGreek);

    Attribute att = v.findAttribute("units");
    assert att != null;
    assert att.isString();
    assert(helloGreek.equals(att.getStringValue()));
    nc.close();   
  }
View Full Code Here

    return maxdist;
  }

  protected void setEarthLocation() {
    Attribute ga = ds.findGlobalAttribute("StationLatitude");
    if(ga != null )
        latv = ga.getNumericValue().doubleValue();
    else
        latv = 0.0;

    ga = ds.findGlobalAttribute("StationLongitude");
    if(ga != null)
        lonv = ga.getNumericValue().doubleValue();
    else
        lonv = 0.0;

    ga = ds.findGlobalAttribute("StationElevationInMeters");
    if(ga != null)
        elev = ga.getNumericValue().doubleValue();
    else
        elev = 0.0;

    origin = new ucar.unidata.geoloc.EarthLocationImpl(latv, lonv, elev);
  }
View Full Code Here

    gridDataset.getTitle();
    gridDatatype.getFullName();

    StringBuilder buf = new StringBuilder();

    Attribute gridMappingAtt = gridDatatype.findAttributeIgnoreCase( "grid_mapping" );
    String gridMapping = gridMappingAtt.getStringValue();
    Variable gridMapVar = gridDataset.getNetcdfFile().getRootGroup().findVariable(gridMapping);

    Attribute gridMappingNameAtt = gridMapVar.findAttributeIgnoreCase( "grid_mapping_name" );
    String gridMappingName = gridMappingNameAtt.getStringValue();
    buf.append( "EPSG:" ).append( ProjectionStandardsInfo.getProjectionByCfName( gridMappingName));


    return buf.toString();
  }
View Full Code Here

  public ucar.unidata.geoloc.EarthLocation getCommonOrigin() {
    return origin;
  }

  public String getRadarID() {
    Attribute ga = ds.findGlobalAttribute("Station");
    if(ga != null)
        return ga.getStringValue();
    else
        return "XXXX";
  }
View Full Code Here

    else
        return "XXXX";
  }

  public String getRadarName() {
    Attribute ga = ds.findGlobalAttribute("StationName");
    if(ga != null)
        return ga.getStringValue();
    else
        return "Unknown Station";
  }
View Full Code Here

  private String lonVarName;
  private String elevVarName;

  static public boolean isValidFile( NetcdfDataset ds)
  {
    Attribute conventionsAtt = ds.findGlobalAttribute( "Conventions");
    if ( conventionsAtt == null)
      conventionsAtt = ds.findGlobalAttributeIgnoreCase( "Conventions");
    if ( conventionsAtt == null) return( false);
    if ( ! conventionsAtt.isString()) return( false);
    if ( ! conventionsAtt.getStringValue().equals( "NCAR-RAF/nimbus" ) ) return( false );

    Attribute versionAtt = ds.findGlobalAttributeIgnoreCase( "Version" );
    if ( versionAtt == null )
    {
      // A bit of a hack for some UWYO KingAir files.
      versionAtt = new Attribute( "Version", "1.3" );
      ds.addAttribute( null, versionAtt );
      ds.finish();

      return ( true );
    }
    if ( ! versionAtt.isString() ) return ( false );
    if ( versionAtt.getStringValue( ).equals( "1.2")) return( true );
    if ( versionAtt.getStringValue( ).equals( "1.3")) return( true );
   
    return( false );
  }
View Full Code Here

  }

  private static Config buildConfig( NetcdfDataset ncd )
  {
    // Check for "zebra_platform" attribute w/ value of "class".
    Attribute attrib = ncd.findGlobalAttributeIgnoreCase( "zebra_platform" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;
    if ( !attrib.getStringValue().equals( "class" ) ) return null;

    // Check for "history" attribute w/ value of "ClassNcFile".
    attrib = ncd.findGlobalAttributeIgnoreCase( "history" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;
    if ( !attrib.getStringValue().equals( "ClassNcFile" ) ) return null;

    // Check for existence of global attribute "AvapsEditorVersion".
    attrib = ncd.findGlobalAttributeIgnoreCase( "AvapsEditorVersion" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;

    // Check for existence of global attribute "SoundingDescription".
    attrib = ncd.findGlobalAttributeIgnoreCase( "SoundingDescription" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;

    // Check that only one dimension and that it is the time dimension.
    List list = ncd.getRootGroup().getDimensions();
    if ( list.size() != 1) return null;
    Dimension d = (Dimension) list.get(0);
View Full Code Here

  }

  private static Config buildConfig( NetcdfDataset ncd )
  {
    // Check for global attribute "ingest_software".
    Attribute attrib = ncd.findGlobalAttributeIgnoreCase( "ingest_software" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;
    if ( attrib.getStringValue().indexOf( "sonde_ingest.c" ) == -1 ) return null;

    // Check for existence of global attribute "sounding_number".
    attrib = ncd.findGlobalAttributeIgnoreCase( "sounding_number" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;

    // Check for existence of global attribute "serial_number".
    attrib = ncd.findGlobalAttributeIgnoreCase( "serial_number" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;

    // Check for existence of global attribute "launch_status".
    attrib = ncd.findGlobalAttributeIgnoreCase( "launch_status" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;

    // Check for global attribute "zeb_platform".
    attrib = ncd.findGlobalAttributeIgnoreCase( "zeb_platform" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;

    // Check for global attribute "history".
    attrib = ncd.findGlobalAttributeIgnoreCase( "history" );
    if ( attrib == null ) return null;
    if ( !attrib.isString() ) return null;
    if ( attrib.getStringValue().indexOf( "Zebra DataStore library" ) == -1
         && attrib.getStringValue().indexOf( "zebra-zeblib" ) == -1 )
      return null;

    // Check that only one dimension and that it is the time dimension.
    List list = ncd.getRootGroup().getDimensions();
    if ( list.size() != 1 ) return null;
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.SchemaAnnotation$Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.