Package org.mmisw.mmiorr.client.RetrieveOntology

Examples of org.mmisw.mmiorr.client.RetrieveOntology.RetrieveResult


        "SELECT ?comment " +
        "WHERE { <http://www.w3.org/2003/01/geo/wgs84_pos#> rdfs:comment ?comment } ",
    };
   
    for ( String query : queries ) {
      RetrieveResult result = RetrieveOntology.queryGet(query, format);
      assertEquals(HttpStatus.SC_OK, result.status);
      assertNotNull(result.body);

      System.out.println(result.body);
    }
View Full Code Here


  private OntModel retrieveOntology() throws Exception {
    System.out.println("** retrieveOntology");
    String format = "owl";
    String version = null;
   
    RetrieveResult retrievalResult = RetrieveOntology.retrieveOntology(ontologyUri, version, format);
    assertEquals(HttpStatus.SC_OK, retrievalResult.status);
    assertNotNull(retrievalResult.body);
    assertTrue(retrievalResult.body.contains("<rdf:RDF"));
   
    OntModel model = Utils.readOntModel(retrievalResult.body);
View Full Code Here

  public void testRetrievalOfOntology() throws Exception {
    System.out.println("** testRetrievalOfOntology");
    String format = "owl";
    String version = null;
   
    RetrieveResult retrievalResult = RetrieveOntology.retrieveOntology(ontologyUri, version, format);
    assertEquals(HttpStatus.SC_OK, retrievalResult.status);
    assertNotNull(retrievalResult.body);
    assertTrue(retrievalResult.body.contains("<rdf:RDF"));
    retrievedOntologyContents = retrievalResult.body;
  }
View Full Code Here

  public void testRetrievalOfTerm() throws Exception {
    System.out.println("** testRetrievalOfTerm");
    String format = "owl";
    String version = null;
   
    RetrieveResult retrievalResult = RetrieveOntology.retrieveOntology(termUri, version, format);
    assertEquals(HttpStatus.SC_OK, retrievalResult.status);
    assertNotNull(retrievalResult.body);
    System.out.println("Term retrieval response:" +
        ("\n" + retrievalResult.body).replaceAll("\n", "\n   ")
    );
View Full Code Here

    System.out.println(vocabularyUri+ ": Available versions: " +versions);
   
    // retrieve each of the available versions:
    // note, no need to pass the "version" parameter because the URI is already in versioned form.
    for ( String vocabularyVersion : versions ) {
      RetrieveResult retrievalResult = RetrieveOntology.retrieveOntology(vocabularyVersion, null, "owl");
      assertEquals(HttpStatus.SC_OK, retrievalResult.status);
      assertNotNull(retrievalResult.body);
      assertTrue(retrievalResult.body.contains("<rdf:RDF"));
    }
  }
View Full Code Here

    }

    String format = "owl";
    String version = null;
   
    RetrieveResult retrievalResult = RetrieveOntology.retrieveOntology(vocabularyUri, version, format);
    assertEquals(HttpStatus.SC_OK, retrievalResult.status);
    assertNotNull(retrievalResult.body);
    assertTrue(retrievalResult.body.contains("<rdf:RDF"));
    OntModel model = Utils.readOntModel(retrievalResult.body);
   
View Full Code Here

   * @throws Exception
   */
  private void retrieveMetadataViaDescribe() throws Exception {
    System.out.println("** retrieveMetadataViaDescribe");
   
    RetrieveResult describeResult = RetrieveOntology.describeUri(vocabularyUri, "owl");
    assertEquals(HttpStatus.SC_OK, describeResult.status);
    assertNotNull(describeResult.body);
    assertTrue(describeResult.body.contains("<rdf:RDF"));
    Model describeModel = Utils.readModel(describeResult.body);

View Full Code Here

TOP

Related Classes of org.mmisw.mmiorr.client.RetrieveOntology.RetrieveResult

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.