Package thredds.catalog2.builder

Examples of thredds.catalog2.builder.ThreddsMetadataBuilder$GeospatialRangeBuilder


  }

  @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


  }

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

    BuilderIssues issues = this.allService.getIssues();
    assertTrue( issues.toString(), issues.isValid() );
    assertFalse( issues.toString(), issues.isEmpty() );
  }
View Full Code Here

    assertTrue( timeCovParserFactory.isEventMyStartElement( reader.peek() ));

    TimeCoverageElementParser parser = timeCovParserFactory.getNewParser( reader, this.fac, this.tmBldr );

    ThreddsBuilder bldr = parser.parse();
    assertNotNull( bldr );

    assertTrue( bldr instanceof ThreddsMetadataBuilder.DateRangeBuilder );
    ThreddsMetadataBuilder.DateRangeBuilder tmBldr = (ThreddsMetadataBuilder.DateRangeBuilder) bldr;
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.");

    ThreddsMetadataBuilder result = builderFactory.newThreddsMetadataBuilder();
    copyThreddsMetadataBuilder( source, result );
    return result;
  }
View Full Code Here

  public static ThreddsMetadataBuilder mergeTwoThreddsMetadata( ThreddsMetadataBuilder first,
                                                                ThreddsMetadataBuilder second,
                                                                ThreddsBuilderFactory builderFactory )
  {
    ThreddsMetadataBuilder mergedResults = builderFactory.newThreddsMetadataBuilder();
    mergeTwoThreddsMetadata( first, second, mergedResults );
    return mergedResults;
  }
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());
    ThreddsMetadataBuilder.KeyphraseBuilder kpBldr = kpBldrs.get( 0 );
    assertNotNull( kpBldr);
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

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

    assertNotNull( catBuilder );

    DatasetBuilder dsBldr = CatalogXmlUtils.assertCatalogWithContainerDatasetAsExpected( catBuilder, docBaseUri );
    ThreddsMetadataBuilder tmdBldr = dsBldr.getThreddsMetadataBuilder();
    assertNotNull( tmdBldr);
    List<ThreddsMetadataBuilder.ProjectNameBuilder> projNameBldrs = tmdBldr.getProjectNameBuilders();
    assertNotNull( projNameBldrs );
    assertFalse( projNameBldrs.isEmpty() );
    assertEquals( 1, projNameBldrs.size() );
    ThreddsMetadataBuilder.ProjectNameBuilder projNameBldr = projNameBldrs.get( 0 );
    assertNotNull( projNameBldr );
View Full Code Here

  @Test
  public void checkCopyThreddsMetadataBuilderVariables()
  {
    ThreddsBuilderFactory fac = new ThreddsBuilderFactoryImpl();

    ThreddsMetadataBuilder srcTmBldr = fac.newThreddsMetadataBuilder();
    ThreddsMetadataBuilder.VariableGroupBuilder srcVarGrpBldr = srcTmBldr.addVariableGroupBuilder();

    String vocabAuthId = "vocabAuthId";
    srcVarGrpBldr.setVocabularyAuthorityId( vocabAuthId );
    String name = "name";
    srcVarGrpBldr.addVariableBuilder( name, "descrip", "units", "vocabId", "vocabName" );

    ThreddsMetadataBuilder recipientTmBldr = fac.newThreddsMetadataBuilder();
    assertNotNull( recipientTmBldr);
    assertTrue( recipientTmBldr.getVariableGroupBuilders().isEmpty());

    ThreddsMetadataBuilderUtils.copyThreddsMetadataBuilder( srcTmBldr, recipientTmBldr );

    List<ThreddsMetadataBuilder.VariableGroupBuilder> recipientVarGrpBldrs = recipientTmBldr.getVariableGroupBuilders();
    assertFalse( recipientVarGrpBldrs.isEmpty() );
    assertEquals( 1, recipientVarGrpBldrs.size());

    ThreddsMetadataBuilder.VariableGroupBuilder recipientVarGrpBldr = recipientVarGrpBldrs.get( 0);
    assertEquals( vocabAuthId, recipientVarGrpBldr.getVocabularyAuthorityId());
View Full Code Here

    try
    {
      XMLInputFactory factory = getFactory();
      XMLEventReader eventReader = factory.createXMLEventReader( source );

      ThreddsBuilderFactory catBuilderFac = new ThreddsBuilderFactoryImpl();
      ThreddsBuilder threddsBuilder = null;
      while ( eventReader.hasNext() )
      {
        XMLEvent event = eventReader.peek();
        if ( event.isEndDocument())
View Full Code Here

TOP

Related Classes of thredds.catalog2.builder.ThreddsMetadataBuilder$GeospatialRangeBuilder

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.