Package com.hp.hpl.jena.sparql

Examples of com.hp.hpl.jena.sparql.ARQException


    /** Parse a string to obtain a Triple */
    public static Triple parseTriple(String str, PrefixMapping pmap)
    {
        Item item = parse(str, pmap) ;
        if ( !item.isList() )
            throw new ARQException("Not a list: "+str) ;
        return BuilderGraph.buildTriple(item.getList()) ;
    }
View Full Code Here


    /** Parse a string to obtain a path */
    public static Path parsePath(String str, PrefixMapping pmap)
    {
        Item item = parse(str, pmap) ;
        if ( !item.isList() )
            throw new ARQException("Not a list: "+str) ;
        return BuilderPath.buildPath(item) ;
    }
View Full Code Here

            return parse(in, pmap) ;
        }
        catch (FileNotFoundException ex)
        { throw new NotFoundException("Not found: "+filename) ; }
        catch (IOException ex)
        { throw new ARQException("IOExeption: "+filename, ex) ; }
        finally { IO.close(in) ; }
    }
View Full Code Here

            mbs.registerMBean(bean, objName) ;
            // remember ...
            mgtObjects.put(objName, bean) ;
        } catch (NotCompliantMBeanException ex) {
            log.warn("Failed to register (NotCompliantMBeanException)'" + objName.getCanonicalName() + "': " + ex.getMessage()) ;
            throw new ARQException("Failed to register '" + objName.getCanonicalName() + "': " + ex.getMessage(), ex) ;
        } catch (InstanceAlreadyExistsException ex) {
            log.warn("Failed to register (InstanceAlreadyExistsException)'" + objName.getCanonicalName() + "': " + ex.getMessage()) ;
            throw new ARQException("Failed to register '" + objName.getCanonicalName() + "': " + ex.getMessage(), ex) ;
        } catch (MBeanRegistrationException ex) {
            log.warn("Failed to register (MBeanRegistrationException)'" + objName.getCanonicalName() + "': " + ex.getMessage()) ;
            throw new ARQException("Failed to register '" + objName.getCanonicalName() + "': " + ex.getMessage(), ex) ;
        }
    }
View Full Code Here

    }

    private static ObjectName objectName(String name) {
        try { return new ObjectName(name) ; }
        catch (MalformedObjectNameException ex) {
            throw new ARQException("Failed to create name '" + name + "': " + ex.getMessage(), ex) ;
        }
    }
View Full Code Here

        return (duration < 0) ? duration : timeUnit.toMillis(duration);
    }

    private HttpQuery makeHttpQuery() {
        if (finished)
            throw new ARQException("HTTP execution already closed");

        HttpQuery httpQuery = new HttpQuery(service);
        httpQuery.merge(getServiceParams(service, context));
        httpQuery.addParam(HttpParams.pQuery, queryString);
View Full Code Here

            {
                Log.warn(this, "Empty stats file: "+filename) ;
                return ;
            }
            if ( !stats.isTagged(STATS) )
                throw new ARQException("Not a stats file: "+filename) ;
            init(stats) ;
        } catch (ItemException ex)
        {  // Debug
            throw ex ;
        }
View Full Code Here

    { init(stats) ; }
   
    private void init(Item stats)
    {
        if ( !stats.isTagged(STATS) )
            throw new ARQException("Not a tagged '"+STATS+"'") ;

        ItemList list = stats.getList().cdr();      // Skip tag
       
        if ( list.car().isTagged(META) )
        {       
View Full Code Here

    }

    private static void check(Item item)
    {
        if ( Var.isVar(item.getNode()) )
            throw new ARQException("Explicit variable used in a pattern (use VAR): "+item.getNode()) ;
    }
View Full Code Here

            return w ;
        }
       
        if ( pred.equals(ANY) )
        {
            throw new ARQException("Predicate is ANY") ;
           
            //double w = matchLinear(patterns, subj, pred, obj) ;
//            double w = NOMATCH ;
//            w = search(VAR, subj, pred, obj, w) ;
//            w = search(ANY, subj, pred, obj, w) ;
//            return w ;
        }
       
        throw new ARQException("Unidentified predicate: "+pred+" in ("+subj+" "+pred+" "+obj+")") ;
       
        //return matchLinear(subj, pred, obj) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.ARQException

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.