Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.StmtIterator.nextStatement()


    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }

   
View Full Code Here


      if ( log.isDebugEnabled() ) {
        log.debug("Getting pre-existing properties from Ontology: " +ont.getURI());
      }
      StmtIterator iter = ont.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }

   
View Full Code Here

    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }

   
View Full Code Here

    if ( false && log.isDebugEnabled() ) {
      log.debug("_listStatements:");
      StmtIterator iter = _model.listStatements();
      while (iter.hasNext()) {
        com.hp.hpl.jena.rdf.model.Statement sta = iter.nextStatement();
        Resource sjt = sta.getSubject();
        log.debug("      " +
            PrintUtil.print(sjt)
            + "   " +
            PrintUtil.print(sta.getPredicate().getURI())
View Full Code Here

   
    if ( true ) { // get all statements about the term
      StmtIterator iter = model.listStatements(termRes, (Property) null, (Property) null);
      if (iter.hasNext()) {
        while (iter.hasNext()) {
          com.hp.hpl.jena.rdf.model.Statement sta = iter.nextStatement();
         
          termModel.add(sta);
        }
      }
    }
View Full Code Here

   
    if ( true ) { // test for subclasses
      StmtIterator iter = model.listStatements(null, RDFS.subClassOf, termRes);
      if  ( iter.hasNext() ) {
        while ( iter.hasNext() ) {
          com.hp.hpl.jena.rdf.model.Statement sta = iter.nextStatement();
         
          termModel.add(sta);
        }
      }
    }
View Full Code Here

        out.printf("</tr>%n");
       
       
       
        while (iter.hasNext()) {
          com.hp.hpl.jena.rdf.model.Statement sta = iter.nextStatement();
         
          out.printf("<tr>%n");
             
          Property prd = sta.getPredicate();
          String prdUri = prd.getURI();
View Full Code Here

        out.println("<table class=\"inline\" width=\"100%\">");
        out.printf("<tr>%n");
        out.printf("<th>Subclasses</th>");
        out.printf("</tr>%n");
        while ( iter.hasNext() ) {
          com.hp.hpl.jena.rdf.model.Statement sta = iter.nextStatement();
         
          out.printf("<tr>%n");
         
          Resource sjt = sta.getSubject();
          String sjtUri = sjt.getURI();
View Full Code Here

      }
    }
   
    StmtIterator iter = ontModel.listStatements();
    while ( iter.hasNext() ) {
      final Statement stmt = iter.nextStatement();
     
      final Resource sbj = stmt.getSubject();
      final Property prd = stmt.getPredicate();
      final RDFNode obj = stmt.getObject();
     
View Full Code Here

    // false: not included to avoid cluttering the test output
    if ( false ) {
      Resource ontologyResource = ResourceFactory.createResource(vocabularyUri);
      StmtIterator metadata = model.listStatements(ontologyResource, null, (RDFNode) null);
      while ( metadata.hasNext() ) {
        Statement stmt = metadata.nextStatement();
        System.out.println("\t" +stmt.getPredicate()+ " -> " +stmt.getObject());
      }
    }
  }
 
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.