Examples of toExternalForm()


Examples of java.net.URL.toExternalForm()

    Repository rep2 = new SailRepository(new MemoryStore());
    rep2.initialize();

    RepositoryConnection con2 = rep2.getConnection();

    con2.add(new StringReader(writer.toString()), ciaFacts.toExternalForm(),
        rdfWriterFactory.getRDFFormat());
    long after = con2.size();
    con2.close();

    assertEquals("result of serialization and re-upload should be equal to original", before, after);
View Full Code Here

Examples of java.net.URL.toExternalForm()

    TestSuite suite = new TestSuite(TurtleParserTestCase.class.getName());

    // Add the N-Triples test
    String testName = "N-Triples tests";
    URL url = TurtleParserTestCase.class.getResource(NTRIPLES_TEST_FILE);
    String inputURL = url.toExternalForm();
    String outputURL = inputURL;
    String baseURL = NTRIPLES_TEST_URL;
    suite.addTest(new PositiveParserTest(testName, inputURL, outputURL, baseURL));

    // Add the manifest for positive test cases to a repository and query it
View Full Code Here

Examples of java.net.URL.toExternalForm()

    Repository repository = new SailRepository(new MemoryStore());
    repository.initialize();
    RepositoryConnection con = repository.getConnection();

    url = TurtleParserTestCase.class.getResource(MANIFEST_GOOD_URL);
    con.add(url, base(url.toExternalForm()), RDFFormat.TURTLE);

    String query = "SELECT testName, inputURL, outputURL " + "FROM {} mf:name {testName}; "
        + "        mf:result {outputURL}; " + "        mf:action {} qt:data {inputURL} "
        + "USING NAMESPACE " + "  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, "
        + "  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>";
View Full Code Here

Examples of java.net.URL.toExternalForm()

    queryResult.close();

    // Add the manifest for negative test cases to a repository and query it
    con.clear();
    url = TurtleParserTestCase.class.getResource(MANIFEST_BAD_URL);
    con.add(url, base(url.toExternalForm()), RDFFormat.TURTLE);

    query = "SELECT testName, inputURL " + "FROM {} mf:name {testName}; "
        + "        mf:action {} qt:data {inputURL} " + "USING NAMESPACE "
        + "  mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, "
        + "  qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>";
View Full Code Here

Examples of java.net.URL.toExternalForm()

public final class URLCanonicalizer {

  public static String getCanonicalURL(String url) {
    URL canonicalURL = getCanonicalURL(url, null);
    if (canonicalURL != null) {
      return canonicalURL.toExternalForm();
    }
    return null;
  }

  public static URL getCanonicalURL(String href, String context) {
View Full Code Here

Examples of java.net.URL.toExternalForm()

      }
      if (hrefWithoutProtocol.indexOf("javascript:") < 0
          && hrefWithoutProtocol.indexOf("@") < 0) {
        URL url = URLCanonicalizer.getCanonicalURL(href, contextURL);
        if (url != null) {
          urls.add(url.toExternalForm());
          urlCount++;
          if (urlCount > MAX_OUT_LINKS) {
            break;
         
        }       
View Full Code Here

Examples of java.net.URL.toExternalForm()

    else
      remove(DB.xanchor);

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End ProductLocation.setURL() : " + oURL.toExternalForm());
    }

    } // setURL()

    // ----------------------------------------------------------
View Full Code Here

Examples of java.net.URL.toExternalForm()

    public FileObject getBaseTestFolder(final FileSystemManager manager)
        throws Exception
    {
        final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
        final URL url = baseDir.toURL();
        return manager.resolveFile(url.toExternalForm());
    }
}
View Full Code Here

Examples of java.net.URL.toExternalForm()

    public FileObject getBaseTestFolder(final FileSystemManager manager)
        throws Exception
    {
        final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
        final URL url = baseDir.toURL();
        return manager.resolveFile(url.toExternalForm());
    }
}
View Full Code Here

Examples of java.net.URL.toExternalForm()

            URL rootUrl = new URL(url, "/");
            final String key = this.getClass().getName() + rootUrl.toString();
            FileSystem fs = findFileSystem(key, fileSystemOptions);
            if (fs == null)
            {
                String extForm = rootUrl.toExternalForm();
                final FileName rootName =
                    getContext().parseURI(extForm);
                // final FileName rootName =
                //    new BasicFileName(rootUrl, FileName.ROOT_PATH);
                fs = new UrlFileSystem(rootName, fileSystemOptions);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.