Package com.hp.hpl.jena.shared

Examples of com.hp.hpl.jena.shared.JenaException


    public boolean runTest(Resource test, boolean log, boolean stats) throws IOException {
        // Find the specification for the named test
        RDFNode testType = test.getRequiredProperty(RDF.type).getObject();
        if (!(testType.equals(NegativeEntailmentTest) ||
               testType.equals(PositiveEntailmentTest) ) ) {
            throw new JenaException("Can't find test: " + test);
        }

        String description = test.getRequiredProperty(descriptionP).getObject().toString();
        String status = test.getRequiredProperty(statusP).getObject().toString();
        logger.debug("WG test " + test.getURI() + " - " + status);
View Full Code Here


    private static boolean process(Map<Node, Node> results, Node dataNode, Node varNode, boolean bindAny)
    {
        if ( ! varNode.isVariable() )
        {
            if ( ! dataNode.sameValueAs(varNode) )
                throw new JenaException("Internal error in Matcher") ;
            return true ;
        }
        Node x = results.get(varNode) ;
        if ( x != null )
            // Bound already.  Match?
View Full Code Here

        // Find the specification for the named test
        Resource test = testManifest.getResource(uri);
        testType = (Resource)test.getRequiredProperty(RDF.type).getObject();
        if (!(testType.equals(NegativeEntailmentTest) ||
               testType.equals(PositiveEntailmentTest) ) ) {
            throw new JenaException("Can't find test: " + uri);
        }

        Statement descriptionS = test.getProperty(descriptionP);
        String description = (descriptionS == null) ? "no description" : descriptionS.getObject().toString();
        String status = test.getRequiredProperty(statusP).getObject().toString();
View Full Code Here

     */
    public boolean runTest(String uri, Reasoner reasoner, TestCase testcase) throws IOException {
        // Find the specification for the named test
        Resource test = testManifest.getResource(uri);
        if (!test.hasProperty(RDF.type, testClass)) {
            throw new JenaException("Can't find test: " + uri);
        }

        String description = test.getRequiredProperty(descriptionP).getObject().toString();
        logger.debug("Reasoner test " + test.getURI() + " - " + description);
       
View Full Code Here

    }

    private String target(Node name)
    {
        if ( ! name.isURI() )
            throw new JenaException("Not a URI: "+name) ;
        String guri = name.getURI() ;
        // Encode
        guri = IRILib.encodeUriComponent(guri) ;
        return remote+"?"+HttpNames.paramGraph+"="+guri ;
    }
View Full Code Here

    {
      StmtIterator sIter = r.getModel().listStatements(r, RDF.first, (RDFNode)null) ;
      list.add(sIter.nextStatement().getObject()) ;
      if ( sIter.hasNext() )
        // @@ need to cope with this (unusual) case
        throw new JenaException("N3: Multi valued list item") ;
      sIter = r.getModel().listStatements(r, RDF.rest, (RDFNode)null) ;
      r = (Resource)sIter.nextStatement().getObject() ;
      if ( sIter.hasNext() )
        throw new JenaException("N3: List has two tails") ;
    }
    return list.iterator() ;
  }
View Full Code Here

            System.arraycopy(pushbackChars, 0, pushbackChars2, 0, pushbackChars.length) ;
            pushbackChars = pushbackChars2 ;
            //throw new JenaException("Pushback buffer overflow") ;
        }
        if ( ch == EOF || ch == UNSET )
            throw new JenaException("Illegal character to push back: "+ch) ;
       
        idxPushback++ ;
        pushbackChars[idxPushback] = (char)ch ;
    }
View Full Code Here

            return new FileOutputStream(url.getFile());
          throw new IllegalArgumentException("Can only save to file: scheme");
        }
        return new LazyURLInputStream(url);
      } catch (MalformedURLException e) {
        throw new JenaException( e );
      } catch (IOException e) {
        e.printStackTrace();
        throw new JenaException( e );
      }
    }
    if (!in)
      throw new IllegalArgumentException("Can only save to URLs");
View Full Code Here

    /*
     * Unexpected error.
     */
    private void error(String msg) {
        JenaException e = new BrokenException("Internal error in Unparser: "
                + msg);
        this.prettyWriter.fatalError(e);
        throw e; // Just in case.
    }
View Full Code Here

                read(m, new InputStreamReader(conn.getInputStream(),
                        encoding), url);
        } catch (FileNotFoundException e) {
            throw new DoesNotExistException(url);
        } catch (IOException e) {
            throw new JenaException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.shared.JenaException

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.