/** * Override Object.hashCode() to implement equals. */ public int hashCode() { if (hashCode == 0) { int result = 17; if (null != getVocabulary()) result = 37 * result + getVocabulary().hashCode(); if (null != getVocabUri()) result = 37 * result + getVocabUri().hashCode(); if (null != getMapUri()) result = 37 * result + getMapUri().hashCode(); if (null != getVariableList()) result = 37 * result + getVariableList().hashCode(); hashCode = result; } return hashCode; }
/** * get Variables from the specified vocabulary * * @param vocab look for this vocabulary * @return Variables from the specified vocabulary, may be null */ public ThreddsMetadata.Variables getVariables(String vocab) { ThreddsMetadata.Variables result = new ThreddsMetadata.Variables(vocab, null, null, null, null); if (variables == null) return result; for (ThreddsMetadata.Variables vs : variables) { if (vs.getVocabulary().equals(vocab)) result.getVariableList().addAll(vs.getVariableList()); } return result; }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Variables)) return false; return o.hashCode() == this.hashCode(); }
if (t.getVocabUri() != null) { URI uri = t.getVocabUri(); String vocabLink = resolveRelativeUrls ? makeHrefResolve(ds, uri.toString(), t.getVocabulary()) : makeHref(uri.toString(), t.getVocabulary()); buff.append(vocabLink); } else { buff.append(StringUtil2.quoteHtmlContent(t.getVocabulary())); java.util.List<ThreddsMetadata.Variable> vlist = t.getVariableList(); if (vlist.size() > 0) { for (ThreddsMetadata.Variable v : vlist) {
if (t.getVocabUri() != null) { URI uri = t.getVocabUri(); String vocabLink = resolveRelativeUrls ? makeHrefResolve(ds, uri.toString(), t.getVocabulary()) : makeHref(uri.toString(), t.getVocabulary()); buff.append(vocabLink); } else { buff.append(StringUtil2.quoteHtmlContent(t.getVocabulary())); java.util.List<ThreddsMetadata.Variable> vlist = t.getVariableList(); if (vlist.size() > 0) { for (ThreddsMetadata.Variable v : vlist) {
if (t.getVocabUri() != null) { URI uri = t.getVocabUri(); String vocabLink = resolveRelativeUrls ? makeHrefResolve(ds, uri.toString(), t.getVocabulary()) : makeHref(uri.toString(), t.getVocabulary()); buff.append(vocabLink); } else { buff.append(StringUtil2.quoteHtmlContent(t.getVocabulary())); java.util.List<ThreddsMetadata.Variable> vlist = t.getVariableList(); if (vlist.size() > 0) { for (ThreddsMetadata.Variable v : vlist) {
boolean hasVocab = (vs != null) && (vs.getVariableList().size() != 0); if (hasVocab) { List vlist = vs.getVariableList(); for (int j = 0; j < vlist.size(); j++) { ThreddsMetadata.Variable v = (ThreddsMetadata.Variable) vlist.get(j); if ((vs != null) && (vs.getVariableList().size() != 0)) { Iterator iter = translateGribVocabulary(vs, true, mess); while (iter.hasNext()) { if ((vs != null) && (vs.getVariableList().size() != 0)) { Iterator iter = translateGribVocabulary(vs, false, mess); while ((iter != null) && iter.hasNext()) {
boolean hasVocab = (vs != null) && (vs.getVariableList().size() != 0); if (hasVocab) { for (ThreddsMetadata.Variable v : vs.getVariableList()) { writeVariable( rootElem, v); if ((vs != null) && (vs.getVariableList().size() != 0)) { Iterator iter = translateGribVocabulary(vs, true, mess); while (iter.hasNext()) { if ((vs != null) && (vs.getVariableList().size() != 0)) { Iterator iter = translateGribVocabulary(vs, false, mess); while ((iter != null) && iter.hasNext()) {
boolean hasVocab = (vs != null) && (vs.getVariableList().size() != 0); if (hasVocab) { for (ThreddsMetadata.Variable v : vs.getVariableList()) { writeVariable( rootElem, v); if ((vs != null) && (vs.getVariableList().size() != 0)) { Iterator iter = translateGribVocabulary(vs, true, mess); while (iter.hasNext()) { if ((vs != null) && (vs.getVariableList().size() != 0)) { Iterator iter = translateGribVocabulary(vs, false, mess); while ((iter != null) && iter.hasNext()) {
System.out.println(" threddsMD.getVariables() = " + variables); for (thredds.catalog.ThreddsMetadata.Variables variable : variables) { System.out.println(" variable.getMapHref() = " + variable.getMapHref()); System.out.println(" variable.getVocabHref() = " + variable.getVocabHref()); System.out.println(" variable.getVocabulary() = " + variable.getVocabulary()); System.out.println(" variable.getMapUri() = " + variable.getMapUri());
ThreddsMetadata.Variables variables = new ThreddsMetadata.Variables(vocab, vocabHref, vocabUri, mapHref, mapUri); variables.addVariable(v); for (Element e : list) { ThreddsMetadata.Variable v = readVariable(e); variables.addVariable(v);
ThreddsMetadata.Variables variables = new ThreddsMetadata.Variables(vocab, vocabHref, vocabUri, mapHref, mapUri); variables.addVariable(v); for (Element e : list) { ThreddsMetadata.Variable v = readVariable(e); variables.addVariable(v);
ThreddsMetadata.Variables variables = new ThreddsMetadata.Variables( vocab, vocabHref, vocabUri, mapHref, mapUri); variables.addVariable( v); for ( Element e : list) { ThreddsMetadata.Variable v = readVariable(e); variables.addVariable(v);
if ((vs == null) || (vs.getVariableList().size() == 0)) vs = ds.getVariables("GRIB-1"); if ((vs == null) || (vs.getVariableList().size() == 0)) vs = ds.getVariables("GRIB-2"); if ((vs == null) || (vs.getVariableList().size() == 0)) { ok = false; sbuff.append(" missing Variables with DIF or GRIB compatible vocabulary\n");
ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables("CF-1.0"); for (VariableSimpleIF vs : pobsDataset.getDataVariables()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable(); vars.addVariable( v); v.setVocabularyName(att.getStringValue()); vars.sort(); return vars;
if ((vs == null) || (vs.getVariableList().size() == 0)) vs = ds.getVariables("GRIB-1"); if ((vs == null) || (vs.getVariableList().size() == 0)) vs = ds.getVariables("GRIB-2"); if ((vs == null) || (vs.getVariableList().size() == 0)) { ok = false; sbuff.append(" missing Variables with DIF or GRIB compatible vocabulary\n");
ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables("CF-1.0"); for (VariableSimpleIF vs : pobsDataset.getDataVariables()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable(); vars.addVariable( v); v.setVocabularyName(att.getStringValue()); vars.sort(); return vars;
if ((vs == null) || (vs.getVariableList().size() == 0)) vs = ds.getVariables("GRIB-1"); if ((vs == null) || (vs.getVariableList().size() == 0)) vs = ds.getVariables("GRIB-2"); if ((vs == null) || (vs.getVariableList().size() == 0)) { ok = false; sbuff.append(" missing Variables with DIF or GRIB compatible vocabulary\n");
ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables("CF-1.0"); for (VariableSimpleIF vs : pobsDataset.getDataVariables()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable(); vars.addVariable( v); v.setVocabularyName(att.getStringValue()); vars.sort(); return vars;
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(); v.setVocabularyId(att); vars.addVariable(v); vars.sort(); return vars; ThreddsMetadata.Variables vars = new ThreddsMetadata.Variables("CF-1.0"); for (GridDatatype grid : gridDataset.getGrids()) { ThreddsMetadata.Variable v = new ThreddsMetadata.Variable(); vars.addVariable(v); v.setVocabularyName(att.getStringValue()); vars.sort(); return vars;