Package thredds.catalog2.xml.writer

Examples of thredds.catalog2.xml.writer.ThreddsXmlWriterException


    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

    if ( source == null )
      throw new IllegalArgumentException( "Source builder may not be null." );
    if ( builderFactory == null )
      throw new IllegalArgumentException( "Builder factory may not be null.");

    MetadataBuilder result = builderFactory.newMetadataBuilder();
    copyMetadataBuilder( source, result );
    return result;
  }
View Full Code Here

  }

  @Test
  public void checkCompoundServiceWhenContainingServiceWithNonuniqueName()
  {
    ServiceBuilder dupService = this.allService.addService( this.odapName, this.wcsType, this.wcsBaseUri );

    assertCompoundServiceAsExpected( 1 );

    assertEquals( dupService, this.allService.getServiceBuilders().get(3));
  }
View Full Code Here

TOP

Related Classes of thredds.catalog2.xml.writer.ThreddsXmlWriterException

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.