示例#1
0
  /**
   * 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;
  }