legacy/src/main/java/thredds/cataloggen/config/CatGenConfigMetadataFactory.java
private org.jdom2.Element createDatasetNamerElement( DatasetNamer dsNamer)
  {
    Element dsnElem = new Element("datasetNamer", CATALOG_GEN_CONFIG_NAMESPACE_0_5);
    if ( dsNamer != null)
    {
      // Add 'name' attribute.
      if ( dsNamer.getName() != null)
      {
        dsnElem.setAttribute( "name", dsNamer.getName());
      }

      // Add 'addLevel' attribute.
      dsnElem.setAttribute( "addLevel", Boolean.toString( dsNamer.getAddLevel()));

      // Add 'type' attribute.
      if ( dsNamer.getType() != null)
      {
        dsnElem.setAttribute( "type", dsNamer.getType().toString());
      }

      // Add 'matchPattern' attribute.
      if ( dsNamer.getMatchPattern() != null)
      {
        dsnElem.setAttribute( "matchPattern", dsNamer.getMatchPattern());
      }

      // Add 'subsitutePattern' attribute.
      if ( dsNamer.getSubstitutePattern() != null)
      {
        dsnElem.setAttribute( "substitutePattern", dsNamer.getSubstitutePattern());
      }

      // Add 'attribContainer' attribute.
      if ( dsNamer.getAttribContainer() != null)
      {
        dsnElem.setAttribute( "attribContainer", dsNamer.getAttribContainer());
      }

      // Add 'attribName' attribute.
      if ( dsNamer.getAttribName() != null)
      {
        dsnElem.setAttribute( "attribName", dsNamer.getAttribName());
      }

    }

    return( dsnElem);
  }
private org.jdom2.Element createDatasetNamerElement( DatasetNamer dsNamer)
  {
    Element dsnElem = new Element("datasetNamer", CATALOG_GEN_CONFIG_NAMESPACE_0_5);
    if ( dsNamer != null)
    {
      // Add 'name' attribute.
      if ( dsNamer.getName() != null)
      {
        dsnElem.setAttribute( "name", dsNamer.getName());
      }

      // Add 'addLevel' attribute.
      dsnElem.setAttribute( "addLevel", Boolean.toString( dsNamer.getAddLevel()));

      // Add 'type' attribute.
      if ( dsNamer.getType() != null)
      {
        dsnElem.setAttribute( "type", dsNamer.getType().toString());
      }

      // Add 'matchPattern' attribute.
      if ( dsNamer.getMatchPattern() != null)
      {
        dsnElem.setAttribute( "matchPattern", dsNamer.getMatchPattern());
      }

      // Add 'subsitutePattern' attribute.
      if ( dsNamer.getSubstitutePattern() != null)
      {
        dsnElem.setAttribute( "substitutePattern", dsNamer.getSubstitutePattern());
      }

      // Add 'attribContainer' attribute.
      if ( dsNamer.getAttribContainer() != null)
      {
        dsnElem.setAttribute( "attribContainer", dsNamer.getAttribContainer());
      }

      // Add 'attribName' attribute.
      if ( dsNamer.getAttribName() != null)
      {
        dsnElem.setAttribute( "attribName", dsNamer.getAttribName());
      }

    }

    return( dsnElem);
  }
private org . jdom2 . Element createDatasetNamerElement ( DatasetNamer dsNamer ) { Element dsnElem = new Element ( "datasetNamer" , CATALOG_GEN_CONFIG_NAMESPACE_0_5 ) ; if ( dsNamer != null ) { // Add 'name' attribute. if ( dsNamer . getName ( ) != null ) { dsnElem . setAttribute ( "name" , dsNamer . getName ( ) ) ; } // Add 'addLevel' attribute. dsnElem . setAttribute ( "addLevel" , Boolean . toString ( dsNamer . getAddLevel ( ) ) ) ; // Add 'type' attribute. if ( dsNamer . getType ( ) != null ) { dsnElem . setAttribute ( "type" , dsNamer . getType ( ) . toString ( ) ) ; } // Add 'matchPattern' attribute. if ( dsNamer . getMatchPattern ( ) != null ) { dsnElem . setAttribute ( "matchPattern" , dsNamer . getMatchPattern ( ) ) ; } // Add 'subsitutePattern' attribute. if ( dsNamer . getSubstitutePattern ( ) != null ) { dsnElem . setAttribute ( "substitutePattern" , dsNamer . getSubstitutePattern ( ) ) ; } // Add 'attribContainer' attribute. if ( dsNamer . getAttribContainer ( ) != null ) { dsnElem . setAttribute ( "attribContainer" , dsNamer . getAttribContainer ( ) ) ; } // Add 'attribName' attribute. if ( dsNamer . getAttribName ( ) != null ) { dsnElem . setAttribute ( "attribName" , dsNamer . getAttribName ( ) ) ; } } return ( dsnElem ) ; }
Create a 'DatasetNamer' JDOM element
Create a DatasetNamer JDOM element