Package org.apache.jena.atlas.lib

Examples of org.apache.jena.atlas.lib.InternalErrorException


        argSubject = Substitute.substitute(argSubject, binding) ;
        argObject = Substitute.substitute(argObject, binding) ;

        if (!argSubject.isNode())
            throw new InternalErrorException("Subject is not a node (it was earlier!)") ;

        Node s = argSubject.getArg() ;

        if (s.isLiteral())
            // Does not match
View Full Code Here


   
        argSubject = Substitute.substitute(argSubject, binding) ;
        argObject = Substitute.substitute(argObject, binding) ;
   
    if (!argSubject.isNode())
      throw new InternalErrorException("Subject is not a node (it was earlier!)");

    Node s = argSubject.getArg();

    if (s.isLiteral())
      // Does not match
View Full Code Here

        try {
            mbs.unregisterMBean(objName) ;
        }
        catch (InstanceNotFoundException ex) { }    // Meh, whatever
        catch (MBeanRegistrationException ex) {
            throw new InternalErrorException(ex) ;
        }
    }
View Full Code Here

            {
                Model model = ModelFactory.createDefaultModel() ;
                for ( String uri : graphURLs )
                {
                    if ( uri == null || uri.equals("") )
                        throw new InternalErrorException("Default graph URI is null or the empty string";

                    try {
                        //TODO Clearup - RIOT integration.
                        GraphLoadUtils.loadModel(model, uri, MaxTriples) ;
                        log.info(format("[%d] Load (default graph) %s", action.id, uri)) ;
                    } catch (RiotException ex) {
                        log.info(format("[%d] Parsing error loading %s: %s", action.id, uri, ex.getMessage())) ;
                        errorBadRequest("Failed to load URL (parse error) "+uri+" : "+ex.getMessage()) ;
                    } catch (Exception ex)
                    {
                        log.info(format("[%d] Failed to load (default) %s: %s", action.id, uri, ex.getMessage())) ;
                        errorBadRequest("Failed to load URL "+uri) ;
                    }
                }
                dataset.setDefaultModel(model) ;
            }
            // ---- Named graphs
            if ( namedGraphs != null )
            {
                for ( String uri : namedGraphs )
                {
                    if ( uri == null || uri.equals("") )
                        throw new InternalErrorException("Named graph URI is null or the empty string";

                    try {
                        Model model = ModelFactory.createDefaultModel() ;
                        GraphLoadUtils.loadModel(model, uri, MaxTriples) ;
                        log.info(format("[%d] Load (named graph) %s", action.id, uri)) ;
View Full Code Here

        try {
            e = new StringEntity(content, "UTF-8");
            e.setContentType(contentType);
            execHttpPost(url, e, acceptType, handler, httpClient, httpContext, authenticator);
        } catch (UnsupportedCharsetException | UnsupportedEncodingException e1) {
            throw new InternalErrorException("Platform does not support required UTF-8");
        }
        finally {
            closeEntity(e);
        }
    }
View Full Code Here

        try {
            e = new StringEntity(content, "UTF-8");
            e.setContentType(contentType);
            execHttpPut(url, e, httpClient, httpContext, authenticator);
        } catch (UnsupportedCharsetException | UnsupportedEncodingException e1) {
            throw new InternalErrorException("Platform does not support required UTF-8");
        }
        finally {
            closeEntity(e);
        }
    }
View Full Code Here

            for (Pair p : params.pairs())
                nvps.add(new BasicNameValuePair(p.getName(), p.getValue()));
            HttpEntity e = new UrlEncodedFormEntity(nvps, "UTF-8");
            return e;
        } catch (UnsupportedEncodingException e) {
            throw new InternalErrorException("Platform does not support required UTF-8");
        }
    }
View Full Code Here

    @Override
    public void finishPair(long currLine, long currCol)
    {
        if ( value == null )
            throw new InternalErrorException("null for 'value' (bad finishPair() allignment)") ;
       
        String k = keys.pop();
        JsonObject obj = objects.peek() ;
        if ( obj.hasKey(k) )
            Log.warn("JSON", "Duplicate key '"+k+"' for object ["+currLine+","+currCol+"]") ;
View Full Code Here

        {
            if ( node.isURI() )         return labelForURI(node) ;
            if ( node.isLiteral() )     return labelForLiteral(node) ;
            if ( node.isBlank() )       return labelForBlank(node) ;
            if ( node.isVariable() )    return labelForVar(node) ;
            throw new InternalErrorException("Node type not supported: "+node) ;
        }
View Full Code Here

        argSubject = Substitute.substitute(argSubject, binding) ;
        argObject = Substitute.substitute(argObject, binding) ;

        if (!argSubject.isNode())
            throw new InternalErrorException("Subject is not a node (it was earlier!)") ;

        Node s = argSubject.getArg() ;

        if (s.isLiteral())
            // Does not match
View Full Code Here

TOP

Related Classes of org.apache.jena.atlas.lib.InternalErrorException

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.