Package com.hp.hpl.jena.shared

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


    @Override
    public void delete(Quad quad)
    {
        Graph g = fetchGraph(quad.getGraph()) ;
        if ( g == null )
            throw new JenaException("No such graph: "+quad.getGraph()) ;
        g.delete(quad.asTriple()) ;
    }
View Full Code Here


     *         in this composition
     */
    public Graph getRequiredBaseGraph() {
        Graph base = getBaseGraph();
        if (base == null) {
            throw new JenaException( "This polyadic graph should have a base graph, but none is defined" );
        }
        else {
            return base;
        }
    }
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

            handler.useWith(arpf.getHandlers());
            arpf.parse(inputS, xmlBase);
        } catch (IOException e) {
            throw new WrappedIOException(e);
        } catch (SAXException e) {
            throw new JenaException(e);
        } finally {
            g.getEventManager().notifyEvent(g, GraphEvents.finishRead);
            handler = null;
        }
    }
View Full Code Here

                    return null;
                }
                try {
                    arpf.getSAXParser().setProperty(str, obj);
                } catch (SAXNotSupportedException ns) {
                    errorHandler.error(new JenaException(ns));
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                }
                return old;
            }

            if (str.startsWith(saxFeaturesURL)
                    || str.startsWith(apacheFeaturesURL)) {
                Boolean old;
                try {
                    old = new Boolean(arpf.getSAXParser().getFeature(str));
                } catch (SAXNotSupportedException ns) {
                    old = null;
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                }
                try {
                    arpf.getSAXParser().setFeature(str,
                            ((Boolean) obj).booleanValue());
                } catch (SAXNotSupportedException ns) {
                    errorHandler.error(new JenaException(ns));
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                } catch (ClassCastException cc) {
                    errorHandler.error(new JenaException(
                            new SAXNotSupportedException("Feature: '" + str
                                    + "' can only have a boolean value.")));
                }
                return old;
            }
View Full Code Here

           
        }
        catch (RuntimeException rte) {
            throw rte;
        } catch (Exception nrte) {
            throw new JenaException(nrte);
        } finally {
            close();
        }
    }
View Full Code Here

            { this.key = key; }
       
        // TODO fix the way this interacts (badly) with iteration and CMEs.
        @Override
        public void emptied()
            { if (false) throw new JenaException( "BOOM" ); /* System.err.println( ">> OOPS" ); */ bunchMap.remove( key ); }
View Full Code Here

        {
            properties.loadFromXML ( in ) ;
        }
        catch ( InvalidPropertiesFormatException ex )
        {
            throw new JenaException ( "Invalid properties file", ex ) ;
        }
        catch ( IOException ex )
        {
            throw new JenaException ( "Metadata ==> IOException", ex ) ;
        }
    }
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

        { return true; }
   
    @Override
    public void begin()
        { if (inTransaction)
            throw new JenaException( "nested transactions not supported" );
        else
            { checkPointFile = new File( checkPointName( fileGraph.name ) );
            checkPointFile.deleteOnExit();
            fileGraph.saveContents( checkPointFile );
            inTransaction = true; } }
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.