Examples of TypedInputStream


Examples of org.apache.jena.atlas.web.TypedInputStream

                HttpOp.applyAuthentication((AbstractHttpClient) client, serviceURL, context, authenticator);
                this.client = new DecompressingHttpClient(client);
            }

            // Get the actual response stream
            TypedInputStream stream = HttpOp.execHttpPostFormStream(serviceURL, this, contentTypeResult, client, context, authenticator);
            if (stream == null)
                throw new QueryExceptionHTTP(404);
            return execCommon(stream);
        } catch (HttpException httpEx) {
            // Unwrap and re-wrap the HTTP Exception
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

    /**
     * Open a file using the locators of this FileManager but without location
     * mapping. Throws RiotNotFoundException if not found.
     */
    public TypedInputStream openNoMap(String filenameOrURI) {
        TypedInputStream in = openNoMapOrNull(filenameOrURI) ;
        if ( in == null )
            throw new RiotNotFoundException(filenameOrURI) ;
        return in ;
    }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

     * mapping. Return null if not found
     */

    public TypedInputStream openNoMapOrNull(String filenameOrURI) {
        for (Locator loc : handlers) {
            TypedInputStream in = loc.open(filenameOrURI) ;
            if ( in != null ) {
                if ( log.isDebugEnabled() )
                    log.debug("Found: " + filenameOrURI + " (" + loc.getName() + ")") ;
                return in ;
            }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

        @Override
        public void handle(String baseIRI, HttpResponse response) throws IOException {

            HttpEntity entity = response.getEntity();
            stream = new TypedInputStream(entity.getContent(), entity.getContentType().getValue());
        }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

    {
        String source = update.getSource() ;
        Node dest = update.getDest() ;
        try {
            // Read into temporary storage to protect against parse errors.
            TypedInputStream s = RDFDataMgr.open(source) ;
            Lang lang = RDFLanguages.contentTypeToLang(s.getContentType()) ;
            if ( RDFLanguages.isTriples(lang) ) {
                // Triples
                Graph g = GraphFactory.createGraphMem() ;
                StreamRDF stream = StreamRDFLib.graph(g) ;
                RDFDataMgr.parse(stream, s, source) ;
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

     * @param lang      Language syntax
     */
    public static void read(Graph graph, InputStream in, String base, Lang lang)
    {
        StreamRDF dest = StreamRDFLib.graph(graph) ;
        process(dest, new TypedInputStream(in), base, lang, null) ;
    }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

     * @param lang      Language syntax
     */
    public static void read(DatasetGraph dataset, InputStream in, String base, Lang lang)
    {
        StreamRDF dest = StreamRDFLib.dataset(dataset) ;
        process(dest, new TypedInputStream(in), base, lang, null) ;
    }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

            throw new IllegalArgumentException("URI to read from is null") ;
        if ( base == null )
            base = IRIResolver.resolveFileURL(uri) ;
        if ( hintLang == null )
            hintLang = RDFLanguages.filenameToLang(uri) ;
        TypedInputStream in = open(uri, context) ;
        if ( in == null )
            throw new RiotException("Not found: "+uri) ;
        process(sink, in, base, hintLang, context) ;
        IO.close(in) ;
    }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

     * @param hintLang  Hint for the syntax
     * @param context   Content object to control reading process.
     */
    public static void parse(StreamRDF sink, InputStream in, String base, Lang hintLang, Context context)
    {
        process(sink, new TypedInputStream(in), base, hintLang, context) ;
    }
View Full Code Here

Examples of org.apache.jena.atlas.web.TypedInputStream

     * @param context   Content object to control reading process.
     */
    public static void parse(StreamRDF sink, TypedInputStream in, String base, Context context)
    {
        Lang hintLang = RDFLanguages.contentTypeToLang(in.getMediaType()) ;
        process(sink, new TypedInputStream(in), base, hintLang, context) ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.