Package java.net

Examples of java.net.URI


  public void checkDatasetNotInheritingIdAuthorityFromParentMetadataAuthorityElement()
          throws URISyntaxException,
                 ThreddsXmlParserException
  {
    String docBaseUriString = "http://test/thredds/catalog2/xml/parser/IdAuthorityInheritanceTest/notInheritFromParentMetadataAuthorityElement.xml";
    URI docBaseUri = new URI( docBaseUriString );
    String catalogAsString = setupDatasetNotInheritingIdAuthorityFromParentMetadataAuthorityElement();

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

    CatalogXmlUtils.assertCatalogAsExpected( catBuilder, docBaseUri, null );
View Full Code Here


  public void checkDatasetInheritingIdAuthorityFromParentInheritedMetadataAuthorityElement()
          throws URISyntaxException,
                 ThreddsXmlParserException
  {
    String docBaseUriString = "http://test/thredds/catalog2/xml/parser/IdAuthorityInheritanceTest/inheritFromParentInheritedMetadataAuthorityElement.xml";
    URI docBaseUri = new URI( docBaseUriString );
    String catalogAsString = setupDatasetInheritingIdAuthorityFromParentInheritedMetadataAuthorityElement();

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

    CatalogXmlUtils.assertCatalogAsExpected( catBuilder, docBaseUri, null );
View Full Code Here

  public void checkDatasetOverridingInheritedIdAuthorityWithAttribute()
          throws URISyntaxException,
                 ThreddsXmlParserException
  {
    String docBaseUriString = "http://test/thredds/catalog2/xml/parser/IdAuthorityInheritanceTest/overrideInheritedWithAttribute.xml";
    URI docBaseUri = new URI( docBaseUriString );
    String catalogAsString = setupDatasetOverridingInheritedIdAuthorityWithAttribute();

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

    CatalogXmlUtils.assertCatalogAsExpected( catBuilder, docBaseUri, null );
View Full Code Here

  public void checkDatasetOverridingInheritedIdAuthorityWithChildElement()
          throws URISyntaxException,
                 ThreddsXmlParserException
  {
    String docBaseUriString = "http://test/thredds/catalog2/xml/parser/IdAuthorityInheritanceTest/overrideInheritedWithElement.xml";
    URI docBaseUri = new URI( docBaseUriString );
    String catalogAsString = setupDatasetOverridingInheritedIdAuthorityWithChildElement();

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

    CatalogXmlUtils.assertCatalogAsExpected( catBuilder, docBaseUri, null );
View Full Code Here

  public void checkDatasetOverridingInheritedIdAuthorityWithChildMetadataElement()
          throws URISyntaxException,
                 ThreddsXmlParserException
  {
    String docBaseUriString = "http://test/thredds/catalog2/xml/parser/IdAuthorityInheritanceTest/overrideInheritedWithchildMetadataElement.xml";
    URI docBaseUri = new URI( docBaseUriString );
    String catalogAsString = setupDatasetOverridingInheritedIdAuthorityWithChildMetadataElement();

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

    CatalogXmlUtils.assertCatalogAsExpected( catBuilder, docBaseUri, null );
View Full Code Here

  public void checkDatasetOverridingInheritedIdAuthorityWithChildInheritedMetadataElement()
          throws URISyntaxException,
                 ThreddsXmlParserException
  {
    String docBaseUriString = "http://test/thredds/catalog2/xml/parser/IdAuthorityInheritanceTest/overrideInheritedWithchildInheritedMetadataElement.xml";
    URI docBaseUri = new URI( docBaseUriString );
    String catalogAsString = setupDatasetOverridingInheritedIdAuthorityWithChildInheritedMetadataElement();

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

    CatalogXmlUtils.assertCatalogAsExpected( catBuilder, docBaseUri, null );
View Full Code Here

  {
    GlobalServiceContainer globalServiceContainer = new GlobalServiceContainer();

    assertTrue( globalServiceContainer.isEmpty());

    ServiceImpl odapService = new ServiceImpl( "odap", ServiceType.OPENDAP, new URI( "http://server/thredds/dodsC/" ), null );
    ServiceImpl wmsService = new ServiceImpl( "wms", ServiceType.WMS, new URI( "http://server/thredds/wms/" ), null );
    ServiceImpl wcsService = new ServiceImpl( "wcs", ServiceType.WCS, new URI( "http://server/thredds/wcs/" ), null );

    globalServiceContainer.addService( odapService );
    globalServiceContainer.addService( wmsService );
    globalServiceContainer.addService( wcsService );
View Full Code Here

  public void addServiceWithDuplicateName()
          throws URISyntaxException
  {
    GlobalServiceContainer globalServiceContainer = new GlobalServiceContainer();

    ServiceImpl odapService = new ServiceImpl( "odap", ServiceType.OPENDAP, new URI( "http://server/thredds/dodsC/" ), null );
    ServiceImpl wmsService = new ServiceImpl( "wms", ServiceType.WMS, new URI( "http://server/thredds/wms/" ), null );
    // Create a service with duplicate name.
    ServiceImpl wcsService = new ServiceImpl( "wms", ServiceType.WCS, new URI( "http://server/thredds/wcs/" ), null );

    globalServiceContainer.addService( odapService );
    globalServiceContainer.addService( wmsService );
    globalServiceContainer.addService( wcsService );
View Full Code Here

  protected void setUp()
  {
    parentCatName = "parent catalog";
    try
    {
      parentCatDocBaseUri = new URI( "http://server/thredds/aCat.xml" );
      catRefUri = new URI( "http://server/thredds/anotherCat.xml");
      sbu1 = new URI( "http://server/thredds/dodsC/");
      sbu2 = new URI( "http://server/thredds/wcs/");
    }
    catch ( URISyntaxException e )
    {
      fail( "Bad URI syntax: " + e.getMessage() );
      return;
View Full Code Here

  }

  private void expandConfigDoc( String configDocFilename )
  {
    File configDocFile = new File( configDocFilename);
    URI configDocUri = configDocFile.toURI();

    InputStream configDocIs = null;
    try
    {
      configDocIs = new FileInputStream( configDocFile);
    }
    catch ( FileNotFoundException e )
    {
      String tmpMsg = "FileNotFoundException when creating InputStream on file <" + configDocFile.getAbsolutePath() + ">: " + e.getMessage();
      log.debug( "expandConfigDoc(): " + tmpMsg, e);
      assertTrue( tmpMsg, false);
    }

    // Create the CatalogGen with the config doc InputStream
    try
    {
      me = new CatalogGen( configDocIs, configDocUri.toURL());
    }
    catch ( MalformedURLException e )
    {
      String tmpMsg = "MalformedURLException thrown creating URL w/ resource URI <" + configDocUri.toString() + ">: " + e.getMessage();
      log.debug( "expandConfigDoc(): " + tmpMsg, e);
      assertTrue( tmpMsg, false);
    }

    // Check that CatalogGen is valid.
View Full Code Here

TOP

Related Classes of java.net.URI

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.