public String getFileTypeId() { return DataFormatType.GINI.toString(); }
/** * Return a DataFormatType for the given name by either matching * a known type (ignoring case) or creating an unknown type. * * @param name name of the desired DataFormatType. * @return the named DataFormatType or null if given name is null. */ public static DataFormatType getType(String name) { if (name == null) return null; DataFormatType t = findType( name ); return t != null ? t : new DataFormatType( name, false); }
public void setDataFormat( String dataFormat ) { this.setDataFormat( DataFormatType.getType( dataFormat)); }
static public ThreddsMetadata.Variables extractVariables(thredds.catalog.DataFormatType fileFormat, GridDataset gridDataset) { if ((fileFormat != null) && (fileFormat.equals(DataFormatType.GRIB1) || fileFormat.equals(DataFormatType.GRIB2))) { boolean isGrib1 = fileFormat.equals(DataFormatType.GRIB1); boolean isGrib2 = fileFormat.equals(DataFormatType.GRIB2); ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables(fileFormat.toString()); for (GridDatatype grid : gridDataset.getGrids()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable();
String dataFormatTypeName = dataFormatElem.getText(); if ((dataFormatTypeName != null) && (dataFormatTypeName.length() > 0)) { DataFormatType dataFormatType = DataFormatType.findType( dataFormatTypeName); if (dataFormatType == null) { dataFormatType = DataFormatType.getType( dataFormatTypeName ); factory.appendWarning(" ** warning: non-standard dataFormat type = "+dataFormatTypeName+"\n");
/** DataFormatType with same name are equal. */ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DataFormatType)) return false; return o.hashCode() == this.hashCode(); }
static public ThreddsMetadata.Variables extractVariables(thredds.catalog.DataFormatType fileFormat, GridDataset gridDataset) { if ((fileFormat != null) && (fileFormat.equals(DataFormatType.GRIB1) || fileFormat.equals(DataFormatType.GRIB2))) { ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables(fileFormat.toString()); for (GridDatatype grid : gridDataset.getGrids()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable();
String dataFormatTypeName = dataFormatElem.getText(); if ((dataFormatTypeName != null) && (dataFormatTypeName.length() > 0)) { DataFormatType dataFormatType = DataFormatType.findType(dataFormatTypeName); if (dataFormatType == null) { dataFormatType = DataFormatType.getType(dataFormatTypeName); factory.appendWarning(" ** warning: non-standard dataFormat type = " + dataFormatTypeName + "\n");
/** DataFormatType with same name are equal. */ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DataFormatType)) return false; return o.hashCode() == this.hashCode(); }
@Override public String getFileTypeId() { return DataFormatType.NETCDF.toString(); }
static public ThreddsMetadata.Variables extractVariables(thredds.catalog.DataFormatType fileFormat, GridDataset gridDataset) { if ((fileFormat != null) && (fileFormat.equals(DataFormatType.GRIB1) || fileFormat.equals(DataFormatType.GRIB2))) { ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables(fileFormat.toString()); for (GridDatatype grid : gridDataset.getGrids()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable();
/** * Return a DataFormatType for the given name by either matching * a known type (ignoring case) or creating an unknown type. * * @param name name of the desired DataFormatType. * @return the named DataFormatType or null if given name is null. */ public static DataFormatType getType(String name) { if (name == null) return null; DataFormatType t = findType( name ); return t != null ? t : new DataFormatType( name, false); }
String dataFormatTypeName = dataFormatElem.getText(); if ((dataFormatTypeName != null) && (dataFormatTypeName.length() > 0)) { DataFormatType dataFormatType = DataFormatType.findType(dataFormatTypeName); if (dataFormatType == null) { dataFormatType = DataFormatType.getType(dataFormatTypeName); factory.appendWarning(" ** warning: non-standard dataFormat type = " + dataFormatTypeName + "\n");
/** DataFormatType with same name are equal. */ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DataFormatType)) return false; return o.hashCode() == this.hashCode(); }
public void setDataFormat( String dataFormat ) { this.setDataFormat( DataFormatType.getType( dataFormat)); }
public String getFileTypeId() { return DataFormatType.NETCDF.toString(); }
/** * Return a DataFormatType for the given name by either matching * a known type (ignoring case) or creating an unknown type. * * @param name name of the desired DataFormatType. * @return the named DataFormatType or null if given name is null. */ public static DataFormatType getType(String name) { if (name == null) return null; DataFormatType t = findType( name ); return t != null ? t : new DataFormatType( name, false); }
public int hashCode() { if (hashCode == 0) { int result = 17; long temp; result = 37 * result + (inherited ? 1 : 0); result = 29 * result + (creators != null ? creators.hashCode() : 0); result = 29 * result + (contributors != null ? contributors.hashCode() : 0); result = 29 * result + (dates != null ? dates.hashCode() : 0); result = 29 * result + (docs != null ? docs.hashCode() : 0); result = 29 * result + (keywords != null ? keywords.hashCode() : 0); result = 29 * result + (metadata != null ? metadata.hashCode() : 0); result = 29 * result + (projects != null ? projects.hashCode() : 0); result = 29 * result + (properties != null ? properties.hashCode() : 0); result = 29 * result + (publishers != null ? publishers.hashCode() : 0); result = 29 * result + (variables != null ? variables.hashCode() : 0); result = 29 * result + (gc != null ? gc.hashCode() : 0); result = 29 * result + (timeCoverage != null ? timeCoverage.hashCode() : 0); result = 29 * result + (authorityName != null ? authorityName.hashCode() : 0); result = 29 * result + (serviceName != null ? serviceName.hashCode() : 0); result = 29 * result + (dataType != null ? dataType.hashCode() : 0); result = 29 * result + (dataFormat != null ? dataFormat.hashCode() : 0); temp = dataSize != +0.0d ? Double.doubleToLongBits(dataSize) : 0l; result = 29 * result + (int) (temp ^ (temp >>> 32)); hashCode = result; } return hashCode; }
void parseStartElement() throws ThreddsXmlParserException { StartElement startElement = this.getNextEventIfStartElementIsMine(); if ( this.parentDatasetBuilder != null ) this.selfBuilder = this.parentDatasetBuilder.addAccessBuilder(); else throw new ThreddsXmlParserException( "" ); Attribute serviceNameAtt = startElement.getAttributeByName( AccessElementNames.AccessElement_ServiceName ); if ( serviceNameAtt != null ) { String serviceName = serviceNameAtt.getValue(); ServiceBuilder serviceBuilder = this.parentDatasetBuilder.getParentCatalogBuilder().findServiceBuilderByNameGlobally( serviceName ); this.selfBuilder.setServiceBuilder( serviceBuilder ); } Attribute urlPathAtt = startElement.getAttributeByName( AccessElementNames.AccessElement_UrlPath ); String urlPath = urlPathAtt.getValue(); this.selfBuilder.setUrlPath( urlPath ); Attribute dataFormatAtt = startElement.getAttributeByName( AccessElementNames.AccessElement_DataFormat ); if ( dataFormatAtt != null ) { this.selfBuilder.setDataFormat( DataFormatType.getType( dataFormatAtt.getValue() ) ); } return; }
public String getFileTypeId() { return DataFormatType.NEXRAD2.toString(); }