tdcommon/src/main/java/thredds/server/catalog/builder/DatasetScanConfigBuilder.java
protected DatasetScanConfig.AddTimeCoverage readDatasetScanAddTimeCoverage(Element addTimeCovElem) {
    String matchName = addTimeCovElem.getAttributeValue("datasetNameMatchPattern");
    String matchPath = addTimeCovElem.getAttributeValue("datasetPathMatchPattern");
    String subst = addTimeCovElem.getAttributeValue("startTimeSubstitutionPattern");
    String duration = addTimeCovElem.getAttributeValue("duration");

    boolean err = false;
    if (subst == null) {
      errlog.format("WARN: readDatasetScanAddTimeCoverage(): must have startTimeSubstitutionPattern elem=<%s>%n", addTimeCovElem);
      err = true;
    } else if (duration == null) {
      errlog.format("WARN: readDatasetScanAddTimeCoverage(): must have duration elem=<%s>%n", addTimeCovElem);
      err = true;
    } else if (matchName == null && matchPath == null) {
      errlog.format("WARN: readDatasetScanAddTimeCoverage(): must have either datasetNameMatchPattern or datasetPathMatchPattern elem=<%s>%n", addTimeCovElem);
      err = true;
    }

    return err ? null : new DatasetScanConfig.AddTimeCoverage(matchName, matchPath, subst, duration);
  }
protected DatasetScanConfig.AddTimeCoverage readDatasetScanAddTimeCoverage(Element addTimeCovElem) {
    String matchName = addTimeCovElem.getAttributeValue("datasetNameMatchPattern");
    String matchPath = addTimeCovElem.getAttributeValue("datasetPathMatchPattern");
    String subst = addTimeCovElem.getAttributeValue("startTimeSubstitutionPattern");
    String duration = addTimeCovElem.getAttributeValue("duration");

    boolean err = false;
    if (subst == null) {
      errlog.format("WARN: readDatasetScanAddTimeCoverage(): must have startTimeSubstitutionPattern elem=<%s>%n", addTimeCovElem);
      err = true;
    } else if (duration == null) {
      errlog.format("WARN: readDatasetScanAddTimeCoverage(): must have duration elem=<%s>%n", addTimeCovElem);
      err = true;
    } else if (matchName == null && matchPath == null) {
      errlog.format("WARN: readDatasetScanAddTimeCoverage(): must have either datasetNameMatchPattern or datasetPathMatchPattern elem=<%s>%n", addTimeCovElem);
      err = true;
    }

    return err ? null : new DatasetScanConfig.AddTimeCoverage(matchName, matchPath, subst, duration);
  }
protected DatasetScanConfig . AddTimeCoverage readDatasetScanAddTimeCoverage ( Element addTimeCovElem ) { String matchName = addTimeCovElem . getAttributeValue ( "datasetNameMatchPattern" ) ; String matchPath = addTimeCovElem . getAttributeValue ( "datasetPathMatchPattern" ) ; String subst = addTimeCovElem . getAttributeValue ( "startTimeSubstitutionPattern" ) ; String duration = addTimeCovElem . getAttributeValue ( "duration" ) ; boolean err = false ; if ( subst == null ) { errlog . format ( "WARN: readDatasetScanAddTimeCoverage(): must have startTimeSubstitutionPattern elem=<%s>%n" , addTimeCovElem ) ; err = true ; } else if ( duration == null ) { errlog . format ( "WARN: readDatasetScanAddTimeCoverage(): must have duration elem=<%s>%n" , addTimeCovElem ) ; err = true ; } else if ( matchName == null && matchPath == null ) { errlog . format ( "WARN: readDatasetScanAddTimeCoverage(): must have either datasetNameMatchPattern or datasetPathMatchPattern elem=<%s>%n" , addTimeCovElem ) ; err = true ; } return err ? null : new DatasetScanConfig . AddTimeCoverage ( matchName , matchPath , subst , duration ) ; }
/*
<xsd:element name="addTimeCoverage">
<xsd:complexType>
<xsd:attribute name="datasetNameMatchPattern" type="xsd:string"/>
<xsd:attribute name="datasetPathMatchPattern" type="xsd:string"/>
<xsd:attribute name="startTimeSubstitutionPattern" type="xsd:string"/>
<xsd:attribute name="duration" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
/ * <xsd : element name = addTimeCoverage > <xsd : complexType > <xsd : attribute name = datasetNameMatchPattern type = xsd : string / > <xsd : attribute name = datasetPathMatchPattern type = xsd : string / > <xsd : attribute name = startTimeSubstitutionPattern type = xsd : string / > <xsd : attribute name = duration type = xsd : string / > < / xsd : complexType > < / xsd : element >