Package com.hp.hpl.jena.shared

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


    public void read(Model model, String url)
    {
        // model.read(url)
        TypedInputStream in = StreamManager.get().open(url) ;
        if ( in == null )
            throw new NotFoundException(url) ;
        String contentType = in.getContentType() ;
       
        // Reading a URL, no hint language provided.
        // Use the URL structure as the hint.
        Lang lang = null ;
View Full Code Here


        TypedStream in = openNoMapOrNull(mappedURI) ;
        if ( in == null )
        {
            if ( log.isDebugEnabled() )
                log.debug("Failed to locate '"+mappedURI+"'") ;
            throw new NotFoundException("Not found: "+filenameOrURI) ;
        }
        if ( in.getMimeType() != null )
        {
            // XXX
            //syntax
View Full Code Here

    /** Slurp up a whole file: map filename as necessary */
    public String readWholeFileAsUTF8(String filename)
    {
        InputStream in = open(filename) ;
        if ( in == null )
            throw new NotFoundException("File not found: "+filename) ;
        return readWholeFileAsUTF8(in) ;
    }
View Full Code Here

    private Model loadVia( String rootAtFile )
        {
        int at = rootAtFile.indexOf( '@' );
        String rootString = rootAtFile.substring( 0, at ), fileName = rootAtFile.substring( at + 1 );
        Model assembly = load( fileName );
        if (assembly == null) throw new NotFoundException( fileName );
        Resource root = assembly.createResource( assembly.expandPrefix( rootString ) );
        return Assembler.general.openModel( root );
        }
View Full Code Here

        if (s.matches( "ont:[A-Za-z_]+:.*" ))
            {
            int secondColon = s.indexOf( ':', 4 );
            String specName = s.substring( 4, secondColon );
            OntModelSpec spec = OntModelSpecAssembler.getOntModelSpecField( specName );
            if (spec == null) throw new NotFoundException( specName );
            return ModelFactory.createOntologyModel
                ( spec, base.load( s.substring( secondColon + 1 ) ) );
            }
        else
            {
View Full Code Here

            {
            missing = false;
            Resource x = it.nextStatement().getSubject();
            getClassNames( result, x );
            }
        if (missing) throw new NotFoundException( shortName );
        return result;
        }
View Full Code Here

            throw new ResultSetException("Can't read a text result set");
        }

        InputStream in = FileManager.get().open(filenameOrURI);
        if (in == null)
            throw new NotFoundException("Not found: " + filenameOrURI);
        return load(in, format);
    }
View Full Code Here

        if (format.equals(ResultsFormat.FMT_RS_XML) || format.equals(ResultsFormat.FMT_RS_JSON)) {
            InputStream in = null;
            try {
                in = FileManager.get().open(filenameOrURI);
                if (in == null)
                    throw new NotFoundException(filenameOrURI);
            } catch (NotFoundException ex) {
                throw new NotFoundException("File not found: " + filenameOrURI);
            }

            SPARQLResult x = null;

            if (format.equals(ResultsFormat.FMT_RS_JSON))
View Full Code Here

            || format.equals(ResultsFormat.FMT_RS_TSV) || format.equals(ResultsFormat.FMT_RS_CSV)) {
            InputStream in = null;
            try {
                in = FileManager.get().open(filenameOrURI);
                if (in == null)
                    throw new NotFoundException(filenameOrURI);
            } catch (NotFoundException ex) {
                throw new NotFoundException("File not found: " + filenameOrURI);
            }

            SPARQLResult x = null;

            if (format.equals(ResultsFormat.FMT_RS_JSON))
View Full Code Here

            if ( len == 0 )
                return Item.nil ;
            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

TOP

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

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.