Examples of nextStatement()


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

    // false: not included to avoid cluttering the test output
    if ( false ) {
      Resource ontologyResource = ResourceFactory.createResource(vocabularyUri);
      StmtIterator describeMetatada = describeModel.listStatements(ontologyResource, null, (RDFNode) null);
      while ( describeMetatada.hasNext() ) {
        Statement stmt = describeMetatada.nextStatement();
        System.out.println("\t" +stmt.getPredicate()+ " -> " +stmt.getObject());
      }
    }
  }
 
View Full Code Here

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

   
    // collect all found reified Vine statements in this map:
    Map<StmtKey,Set<Resource>> stmtRsrsMap = new HashMap<StmtKey,Set<Resource>>();
   
    while ( vineStmts.hasNext() ) {
      Statement stmt = vineStmts.nextStatement();
      Property prd = stmt.getPredicate();
     
      // Vine "subject" arbitrarily chosen to check whether we're seeing a Vine statement:
      if ( _isVineSubject(prd) ) {
        //
View Full Code Here

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

     */
    public void listarStatements(){
        // retorna um iterador para todos os statements da ontologia
        StmtIterator iter = ontologia.listStatements();
        while(iter.hasNext()){
            Statement stmt = iter.nextStatement();
            System.out.println(stmt);
        }
    }


View Full Code Here

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

            {
                Model resultsAsModel = results.getModel() ;
                StmtIterator sIter = results.getModel().listStatements(null, RDF.type, ResultSetGraphVocab.ResultSet) ;
                if ( !sIter.hasNext() )
                    throw new QueryTestException("Can't find the ASK result") ;
                Statement s = sIter.nextStatement() ;
                if ( sIter.hasNext() )
                    throw new QueryTestException("Too many result sets in ASK result") ;
                Resource r = s.getSubject() ;
                Property p = resultsAsModel.createProperty(ResultSetGraphVocab.getURI()+"boolean") ;
View Full Code Here

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

        AssemblerUtils.setContext(server, Fuseki.getContext()) ;
       
        StmtIterator sIter = server.listProperties(JA.loadClass) ;
        for( ; sIter.hasNext(); )
        {
            Statement s = sIter.nextStatement() ;
            RDFNode rn = s.getObject() ;
            String className = null ;
            if ( rn instanceof Resource )
            {
                String uri = ((Resource)rn).getURI() ;
View Full Code Here

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

    private void indexAnnotation(Resource skos_concept, Document conceptDoc,
            AnnotationProperty property, String field) {
        StmtIterator stmt_iter = skos_concept.listProperties(property);
        while (stmt_iter.hasNext()) {
            Literal labelLiteral = stmt_iter.nextStatement().getObject()
                    .as(Literal.class);
            String label = labelLiteral.getLexicalForm();
            String labelLang = labelLiteral.getLanguage();

            if (this.languages != null && !this.languages.contains(labelLang)) {
View Full Code Here

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

    private void indexObject(Resource skos_concept, Document conceptDoc,
            ObjectProperty property, String field) {
        StmtIterator stmt_iter = skos_concept.listProperties(property);
        while (stmt_iter.hasNext()) {
            RDFNode concept = stmt_iter.nextStatement().getObject();

            if (!concept.canAs(Resource.class)) {
                System.err.println("Error when indexing relationship of concept "
                        + skos_concept.getURI() + " .");
                continue;
View Full Code Here

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

      builder.append(": ");
     
      StmtIterator iter = model.listStatements(null, model.getProperty(propertyUrl), (Resource)null);
     
      while (iter.hasNext()) {
        Statement stmt = iter.nextStatement();
        builder.append(stmt.getObject().asNode().getLiteralValue().toString());
      }
      builder.append("\n");     
    }
    logger.debug(builder.toString());   
View Full Code Here

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

        visited.add(r) ;

        StmtIterator sIter = r.listProperties() ;
        for ( ; sIter.hasNext() ; )
        {
            Statement stmt = sIter.nextStatement() ;
            closure(stmt, closureBlob, visited, test) ;
        }
    }

View Full Code Here

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

    this.output = this.input;

      StmtIterator it = repair.listStatements( (Resource)null, EYE.notFromSchema, (RDFNode)null );
      while ( it.hasNext() )
        {
      subject = it.nextStatement().getSubject();                
      curr = repair.listObjectsOfProperty( subject, EYE.onResource ).nextNode();
        NodeIterator it2 = repair.listObjectsOfProperty( subject, EYE.newValue );
        if ( it2.hasNext() )
          fixURI( it2.nextNode().asNode().getLiteralLexicalForm() );
        }                           
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.