Examples of asNode()


Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

      Resource thisres = null;
     
      if ( curr.isURIResource() )
        thisres = repair.createResource( curr.asNode().getURI() );
      else
        thisres = repair.createResource( curr.asNode().getBlankNodeId() );
     
      thisres = (Resource)curr;
     
      Resource stmtBnode = repair.createResource();
      Resource subject = repair.listSubjectsWithProperty(EYE.hasNoType, curr).nextResource();
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

          {
          boolean oneKept = false;
          while ( it2.hasNext() )
            {
            RDFNode curra = it2.nextNode();
            if ( m.getNsPrefixURI( curra.asNode().getLiteralLexicalForm() ) != null )
              if ( m.getNsPrefixURI( curra.asNode().getLiteralLexicalForm() ).equals( uri ) )   // The prefix is still used in the model
                {
                if ( oneKept )
                  m.removeNsPrefix( curra.asNode().getLiteralLexicalForm() );
                else
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

          boolean oneKept = false;
          while ( it2.hasNext() )
            {
            RDFNode curra = it2.nextNode();
            if ( m.getNsPrefixURI( curra.asNode().getLiteralLexicalForm() ) != null )
              if ( m.getNsPrefixURI( curra.asNode().getLiteralLexicalForm() ).equals( uri ) )   // The prefix is still used in the model
                {
                if ( oneKept )
                  m.removeNsPrefix( curra.asNode().getLiteralLexicalForm() );
                else
                  oneKept = true;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

            RDFNode curra = it2.nextNode();
            if ( m.getNsPrefixURI( curra.asNode().getLiteralLexicalForm() ) != null )
              if ( m.getNsPrefixURI( curra.asNode().getLiteralLexicalForm() ).equals( uri ) )   // The prefix is still used in the model
                {
                if ( oneKept )
                  m.removeNsPrefix( curra.asNode().getLiteralLexicalForm() );
                else
                  oneKept = true;
                }
            }
          }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

      while( it1.hasNext() )
        {
        Resource curr = it1.nextResource();
        NodeIterator it2 = repair.listObjectsOfProperty( curr, EYE.forReason );
        RDFNode uri = repair.listObjectsOfProperty( curr, EYE.badURI ).nextNode();
        String work = uri.asNode().getLiteralLexicalForm();
        while ( it2.hasNext() )
          {
          String fault = it2.nextNode().asNode().getURI();
          repair.add( curr, EYE.checkFix, RDF.subject );
          repair.remove( repair.listStatements( curr, EYE.newValue, work ) );
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

            RDFNode x = qSolution.get(n) ;
            if ( Var.isBlankNodeVarName(n) )
                continue ;
            try {
                binding.add(Var.alloc(n), x.asNode()) ;
            }
            catch (ARQInternalErrorException ex) {
                // bad binding attempt.
                Log.warn(BindingUtils.class, "Attempt to bind " + n + " when already bound") ;
            }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

            RDFNode x = qSolution.get(n) ;
            //XXX
            if ( Var.isBlankNodeVarName(n) )
                continue ;
            try {
                binding.add(Var.alloc(n), x.asNode()) ;
            } catch (ARQInternalErrorException ex)
            {
                // bad binding attempt.
                Log.warn(BindingUtils.class, "Attempt to bind "+n+" when already bound") ;
            }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

            Resource binding = bindingIter.nextStatement().getResource() ;
           
            String var = binding.getRequiredProperty(ResultSetGraphVocab.variable).getString() ;
            try {
                RDFNode val = binding.getRequiredProperty(ResultSetGraphVocab.value).getObject() ;
                rb.add(Var.alloc(var), val.asNode()) ;
            } catch (PropertyNotFoundException ex)
            {
                Log.warn(this, "Failed to get value for ?"+var) ;
            }
           
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asNode()

  private void testPresentAsRDFNode( final Node n,
      final Class<? extends RDFNode> nodeClass )
  {
    final RDFNode r = model.asRDFNode(n);
    Assert.assertSame(n, r.asNode());
    JenaTestBase.assertInstanceOf(nodeClass, r);
  }

  public void testRemoveAll()
  {
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ReifiedStatement.asNode()

      try
      {
        while (iter.hasNext())
        {
          final ReifiedStatement rs = iter.next();
          checkDelete(new Triple(rs.asNode(), RDF.subject.asNode(),
              wildCardNode(s.getSubject())));
          checkDelete(new Triple(rs.asNode(), RDF.predicate.asNode(),
              wildCardNode(s.getPredicate())));
          checkDelete(new Triple(rs.asNode(), RDF.object.asNode(),
              wildCardNode(s.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.