Package thredds.catalog2.xml.parser

Examples of thredds.catalog2.xml.parser.TestCatalogParser


  }

  private static DatasetBuilder assertGetDatasetOne( CatalogBuilder catBuilder ) {
    List<DatasetNodeBuilder> datasetNodes = catBuilder.getDatasetNodeBuilders();
    assertEquals( 1, datasetNodes.size() );
    DatasetBuilder dsBldr = (DatasetBuilder) datasetNodes.get( 0 );
    assertEquals( "DS1", dsBldr.getId() );
    return dsBldr;
  }
View Full Code Here


    assertEquals( "DS1", dsBldr.getId() );
    return dsBldr;
  }

  private static DatasetBuilder assertGetDatasetTwo( CatalogBuilder catBuilder ) {
    DatasetBuilder dsBldr = assertGetDatasetOne( catBuilder);

    List<DatasetNodeBuilder> datasetNodes = dsBldr.getDatasetNodeBuilders();
    assertEquals( 1, datasetNodes.size() );
    dsBldr = (DatasetBuilder) datasetNodes.get( 0 );
    assertEquals( "DS2", dsBldr.getId() );
    return dsBldr;
  }
View Full Code Here

            .append( "</dataset>");
    return CatalogXmlUtils.wrapThreddsXmlInCatalogWithCompoundService( sb.toString(), null, null, null );
  }

  private static void assertDatasetOneHasOdapAccess( CatalogBuilder catBuilder ) {
    DatasetBuilder dsBldr = assertGetDatasetOne( catBuilder );
    List<AccessBuilder> accessBldrs = dsBldr.getAccessBuilders();
    assertEquals( 1, accessBldrs.size());
    AccessBuilder access = accessBldrs.get( 0);
    assertOdapAccessToFile1( access );
  }
View Full Code Here

    AccessBuilder access = accessBldrs.get( 0);
    assertOdapAccessToFile1( access );
  }

  private static void assertDatasetTwoHasOdapAccess( CatalogBuilder catBuilder ) {
    DatasetBuilder dsBldr = assertGetDatasetTwo( catBuilder );
    List<AccessBuilder> accessBldrs = dsBldr.getAccessBuilders();
    assertEquals( 1, accessBldrs.size());
    AccessBuilder access = accessBldrs.get( 0);
    assertOdapAccessToFile2( access );
  }
View Full Code Here

    AccessBuilder access = accessBldrs.get( 0);
    assertOdapAccessToFile2( access );
  }

  private static void assertDatasetTwoHasWcsAccess( CatalogBuilder catBuilder ) {
    DatasetBuilder dsBldr = assertGetDatasetTwo( catBuilder );
    List<AccessBuilder> accessBldrs = dsBldr.getAccessBuilders();
    assertEquals( 1, accessBldrs.size());
    AccessBuilder access = accessBldrs.get( 0);
    assertWcsAccess( access );
  }
View Full Code Here

    AccessBuilder access = accessBldrs.get( 0);
    assertWcsAccess( access );
  }

  private static void assertDatasetTwoHasNoAccess( CatalogBuilder catBuilder ) {
    DatasetBuilder dsBldr = assertGetDatasetTwo( catBuilder );
    assertEquals( 0, dsBldr.getAccessBuilders().size());
  }
View Full Code Here

  }

  private static DatasetBuilder assertGetDatasetOne( CatalogBuilder catBuilder ) {
    List<DatasetNodeBuilder> datasetNodes = catBuilder.getDatasetNodeBuilders();
    assertEquals( 1, datasetNodes.size() );
    DatasetBuilder dsBldr = (DatasetBuilder) datasetNodes.get( 0 );
    assertEquals( "DS1", dsBldr.getId() );
    return dsBldr;
  }
View Full Code Here

    assertEquals( "DS1", dsBldr.getId() );
    return dsBldr;
  }

  private static DatasetBuilder assertGetDatasetTwo( CatalogBuilder catBuilder ) {
    DatasetBuilder dsBldr = assertGetDatasetOne( catBuilder);

    List<DatasetNodeBuilder> datasetNodes = dsBldr.getDatasetNodeBuilders();
    assertEquals( 1, datasetNodes.size() );
    dsBldr = (DatasetBuilder) datasetNodes.get( 0 );
    assertEquals( "DS2", dsBldr.getId() );
    return dsBldr;
  }
View Full Code Here

    CatalogBuilder catBuilder = CatalogXmlUtils.parseCatalogIntoBuilder( docBaseUri, catalogXml );

    assertNotNull( catBuilder );

    DatasetBuilder dsBldr = CatalogXmlUtils.assertCatalogWithContainerDatasetAsExpected( catBuilder, docBaseUri );
    ThreddsMetadataBuilder tmdBldr = dsBldr.getThreddsMetadataBuilder();
    tmdBldr.getKeyphraseBuilders();
    List<ThreddsMetadataBuilder.KeyphraseBuilder> kpBldrs = tmdBldr.getKeyphraseBuilders();
    assertNotNull( kpBldrs);
    assertFalse( kpBldrs.isEmpty());
    assertEquals( 1, kpBldrs.size());
View Full Code Here

        CatalogBuilder catBuilder = CatalogXmlUtils.parseCatalogIntoBuilder( docBaseUri, catalogXml );

        assertNotNull( catBuilder );

        DatasetBuilder dsBldr = CatalogXmlUtils.assertCatalogWithContainerDatasetAsExpected( catBuilder, docBaseUri );
        ThreddsMetadataBuilder tmdBldr = dsBldr.getThreddsMetadataBuilder();
        DataFormatType dataFormat = tmdBldr.getDataFormat();
        assertEquals( dataFormat, DataFormatType.NEXRAD2 );
    }
View Full Code Here

TOP

Related Classes of thredds.catalog2.xml.parser.TestCatalogParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.