tdcommon/src/main/java/thredds/server/catalog/builder/DatasetScanConfigBuilder.java
protected List<DatasetScanConfig.Namer> readDatasetScanNamer(Element namerElem) {
    List<DatasetScanConfig.Namer> result = new ArrayList<>();
    if (namerElem == null) return result;

    for (Element curElem : namerElem.getChildren()) {
      String regExp = curElem.getAttributeValue("regExp");
      String replaceString = curElem.getAttributeValue("replaceString");

      boolean onName = curElem.getName().equals("regExpOnName");
      boolean onPath = curElem.getName().equals("regExpOnPath");
      if (!onName && !onPath) {
        errlog.format("WARN: readDatasetScanNamer(): namer child '%s'%n", curElem.getName());
        continue;
      }
      result.add(new DatasetScanConfig.Namer(onName, regExp, replaceString));
    }
    return result;
  }
protected List<DatasetScanConfig.Namer> readDatasetScanNamer(Element namerElem) {
    List<DatasetScanConfig.Namer> result = new ArrayList<>();
    if (namerElem == null) return result;

    for (Element curElem : namerElem.getChildren()) {
      String regExp = curElem.getAttributeValue("regExp");
      String replaceString = curElem.getAttributeValue("replaceString");

      boolean onName = curElem.getName().equals("regExpOnName");
      boolean onPath = curElem.getName().equals("regExpOnPath");
      if (!onName && !onPath) {
        errlog.format("WARN: readDatasetScanNamer(): namer child '%s'%n", curElem.getName());
        continue;
      }
      result.add(new DatasetScanConfig.Namer(onName, regExp, replaceString));
    }
    return result;
  }
protected List < DatasetScanConfig . Namer > readDatasetScanNamer ( Element namerElem ) { List < DatasetScanConfig . Namer > result = new ArrayList <> ( ) ; if ( namerElem == null ) return result ; for ( Element curElem : namerElem . getChildren ( ) ) { String regExp = curElem . getAttributeValue ( "regExp" ) ; String replaceString = curElem . getAttributeValue ( "replaceString" ) ; boolean onName = curElem . getName ( ) . equals ( "regExpOnName" ) ; boolean onPath = curElem . getName ( ) . equals ( "regExpOnPath" ) ; if ( ! onName && ! onPath ) { errlog . format ( "WARN: readDatasetScanNamer(): namer child '%s'%n" , curElem . getName ( ) ) ; continue ; } result . add ( new DatasetScanConfig . Namer ( onName , regExp , replaceString ) ) ; } return result ; }
/*
<xsd:element name="namer">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="regExpOnName" type="NamerSelectorType"/>
<xsd:element name="regExpOnPath" type="NamerSelectorType"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>

<xsd:complexType name="NamerSelectorType">
<xsd:attribute name="regExp" type="xsd:string"/>
<xsd:attribute name="replaceString" type="xsd:string"/>
</xsd:complexType>
/ * <xsd : element name = namer > <xsd : complexType > <xsd : choice maxOccurs = unbounded > <xsd : element name = regExpOnName type = NamerSelectorType / > <xsd : element name = regExpOnPath type = NamerSelectorType / > < / xsd : choice > < / xsd : complexType > < / xsd : element >