Package java.net

Examples of java.net.URI$Helper


              + ">, skip.");
          continue;
        }
 
        try {
          new URI(curDsUrlString); // syntax check
        } catch (URISyntaxException e) {
          log.error("listDatasets(): Skipping dataset  <"
              + curDsUrlString + "> due to URISyntaxException: "
              + e.getMessage());
          continue;
View Full Code Here


      ThreddsXmlParserIssue issue = StaxThreddsXmlParserUtils.createIssueForException( msg, this.reader, e );
      log.warn( "parseStartElement(): " + issue.getMessage(), e );
      // ToDo Gather issues rather than throw exception.
      throw new ThreddsXmlParserException( issue );
    }
    URI docBaseUri = null;
    try {
      docBaseUri = new URI( docBaseUriString );
    }
    catch ( URISyntaxException e )
    {
      String msg = "Bad catalog base URI [" + docBaseUriString + "].";
      ThreddsXmlParserIssue issue = StaxThreddsXmlParserUtils.createIssueForException( msg, this.reader, e );
View Full Code Here

    }

    // Convenience method
    protected static boolean isRelativeUri(String u) {
        try {
            return isRelativeUri(new URI(u));
        } catch (URISyntaxException e) {
            return false;
        }
    }
View Full Code Here

  @Before
  public void setupCompoundService() throws URISyntaxException
  {
    allName = "all";
    allType = ServiceType.COMPOUND;
    allBaseUri = new URI( "");
    allService = new ServiceImpl( allName, allType, allBaseUri, null );

    odapName = "odap";
    odapType = ServiceType.OPENDAP;
    odapBaseUri = new URI( "http://server/thredds/dodsC/" );
    odapService = (ServiceImpl) allService.addService( odapName, odapType, odapBaseUri );

    wcsName = "wcs";
    wcsType = ServiceType.WCS;
    wcsBaseUri = new URI( "http://server/thredds/wcs/" );
    wcsService = (ServiceImpl) allService.addService( wcsName, wcsType, wcsBaseUri );

    wmsName = "wms";
    wmsType = ServiceType.WMS;
    wmsBaseUri = new URI( "http://server/thredds/wms/" );
    wmsService = (ServiceImpl) allService.addService( wmsName, wmsType, wmsBaseUri );
  }
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

  @Test(expected=IllegalStateException.class)
  public void checkExceptionOnPostBuildAddService()
          throws BuilderException, URISyntaxException
  {
    this.allService.build();
    this.allService.addService( "newService", ServiceType.FILE, new URI( "http://server/thredds/new/"));
  }
View Full Code Here

  }

  protected void setUp()
  {
    try
    { uri = new URI( "http://server/thredds/md.xml" ); }
    catch ( URISyntaxException e )
    { fail("Bad URI syntax: " + e.getMessage()); return; }
    this.title = "metadata title";
    this.content = "<x>some content</x>";
View Full Code Here

  public void setupContainerWithThreeUniquelyNamedServices() throws Exception
  {
    this.globalServiceContainer = new GlobalServiceContainer();
    this.serviceContainer = new ServiceContainer( this.globalServiceContainer );

    this.odapService = this.serviceContainer.addService( "odap", ServiceType.OPENDAP, new URI( "http://server/thredds/dodsC/" ) );
    this.wmsService = this.serviceContainer.addService( "wms", ServiceType.WMS, new URI( "http://server/thredds/wms/" ) );
    this.wcsService = this.serviceContainer.addService( "wcs", ServiceType.WCS, new URI( "http://server/thredds/wcs/" ) );
  }
View Full Code Here

  @Test
  public void checkThatThreeUniqueOneDup()
          throws URISyntaxException
  {
    ServiceImpl dupWmsService = this.serviceContainer.addService( "wms", ServiceType.WCS, new URI( "http://server/thredds/wcs/") );

    assertThatThreeAddedServicesAreContained( 1);
    assertThatThreeAddedServicesAreContainedInOrder( 1);
    assertThatThreeAddedServicesAreContainedGlobally();
View Full Code Here

  @Test
  public void checkThatThreeUniqueOneDupAfterRemoveDup()
          throws URISyntaxException
  {
    ServiceImpl dupWmsService = this.serviceContainer.addService( "wms", ServiceType.WCS, new URI( "http://server/thredds/wcs/" ) );

    this.serviceContainer.removeService( dupWmsService );

    assertThatThreeAddedServicesAreContained( 0);
    assertThatThreeAddedServicesAreContainedInOrder( 0);
View Full Code Here

TOP

Related Classes of java.net.URI$Helper

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.