legacy/src/main/java/thredds/cataloggen/config/CatGenConfigMetadataFactory.java
private org.jdom2.Element createDatasetFilterElement( DatasetFilter dsFilter)
  {
    Element dsfElem = new Element("datasetFilter", CATALOG_GEN_CONFIG_NAMESPACE_0_5);
    if ( dsFilter != null)
    {
      // Add 'name' attribute.
      if ( dsFilter.getName() != null)
      {
        dsfElem.setAttribute( "name", dsFilter.getName());
      }

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

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

      // Add 'matchPatternTarget' attribute.
      if ( dsFilter.getMatchPatternTarget() != null)
      {
        dsfElem.setAttribute( "matchPatternTarget", dsFilter.getMatchPatternTarget());
      }

      // Add 'applyToCollectionDatasets' attribute.
      dsfElem.setAttribute( "applyToCollectionDatasets", String.valueOf( dsFilter.isApplyToCollectionDatasets()));

      // Add 'applyToAtomicDatasets' attribute.
      dsfElem.setAttribute( "applyToAtomicDatasets", String.valueOf( dsFilter.isApplyToAtomicDatasets()));

      // Add 'rejectMatchingDatasets' attribute.
      dsfElem.setAttribute( "rejectMatchingDatasets", String.valueOf( dsFilter.isRejectMatchingDatasets()));

    }

    return( dsfElem);
  }
private org.jdom2.Element createDatasetFilterElement( DatasetFilter dsFilter)
  {
    Element dsfElem = new Element("datasetFilter", CATALOG_GEN_CONFIG_NAMESPACE_0_5);
    if ( dsFilter != null)
    {
      // Add 'name' attribute.
      if ( dsFilter.getName() != null)
      {
        dsfElem.setAttribute( "name", dsFilter.getName());
      }

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

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

      // Add 'matchPatternTarget' attribute.
      if ( dsFilter.getMatchPatternTarget() != null)
      {
        dsfElem.setAttribute( "matchPatternTarget", dsFilter.getMatchPatternTarget());
      }

      // Add 'applyToCollectionDatasets' attribute.
      dsfElem.setAttribute( "applyToCollectionDatasets", String.valueOf( dsFilter.isApplyToCollectionDatasets()));

      // Add 'applyToAtomicDatasets' attribute.
      dsfElem.setAttribute( "applyToAtomicDatasets", String.valueOf( dsFilter.isApplyToAtomicDatasets()));

      // Add 'rejectMatchingDatasets' attribute.
      dsfElem.setAttribute( "rejectMatchingDatasets", String.valueOf( dsFilter.isRejectMatchingDatasets()));

    }

    return( dsfElem);
  }
private org . jdom2 . Element createDatasetFilterElement ( DatasetFilter dsFilter ) { Element dsfElem = new Element ( "datasetFilter" , CATALOG_GEN_CONFIG_NAMESPACE_0_5 ) ; if ( dsFilter != null ) { // Add 'name' attribute. if ( dsFilter . getName ( ) != null ) { dsfElem . setAttribute ( "name" , dsFilter . getName ( ) ) ; } // Add 'type' attribute. if ( dsFilter . getType ( ) != null ) { dsfElem . setAttribute ( "type" , dsFilter . getType ( ) . toString ( ) ) ; } // Add 'matchPattern' attribute. if ( dsFilter . getMatchPattern ( ) != null ) { dsfElem . setAttribute ( "matchPattern" , dsFilter . getMatchPattern ( ) ) ; } // Add 'matchPatternTarget' attribute. if ( dsFilter . getMatchPatternTarget ( ) != null ) { dsfElem . setAttribute ( "matchPatternTarget" , dsFilter . getMatchPatternTarget ( ) ) ; } // Add 'applyToCollectionDatasets' attribute. dsfElem . setAttribute ( "applyToCollectionDatasets" , String . valueOf ( dsFilter . isApplyToCollectionDatasets ( ) ) ) ; // Add 'applyToAtomicDatasets' attribute. dsfElem . setAttribute ( "applyToAtomicDatasets" , String . valueOf ( dsFilter . isApplyToAtomicDatasets ( ) ) ) ; // Add 'rejectMatchingDatasets' attribute. dsfElem . setAttribute ( "rejectMatchingDatasets" , String . valueOf ( dsFilter . isRejectMatchingDatasets ( ) ) ) ; } return ( dsfElem ) ; }
Create a 'DatasetFilter' JDOM element
Create a DatasetFilter JDOM element