Package thredds.catalog2.simpleImpl

Examples of thredds.catalog2.simpleImpl.ThreddsBuilderFactoryImpl


    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

    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

  }

  @Test
  public void testAddGetRemoveServices() throws URISyntaxException
  {
    ServiceBuilder sb1 = this.allService.addService( "one", ServiceType.HTTPServer, new URI( "http://server/thredds/httpServer/") );
    ServiceBuilder sb2 = this.allService.addService( "two", ServiceType.HTTP, new URI( "http://server/thredds/two/") );

    assertCompoundServiceAsExpected( 2 );

    assertEquals( sb1, this.allService.getServiceBuilderByName( "one" ));
    assertEquals( sb2, this.allService.getServiceBuilderByName( "two" ));
View Full Code Here

TOP

Related Classes of thredds.catalog2.simpleImpl.ThreddsBuilderFactoryImpl

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.