Package org.openrdf.rio

Examples of org.openrdf.rio.RDFParseException


            } else {
                createStringProperty(skosConcept, NS_SKOS + "prefLabel", category.getTerm());
            }
            rdfHandler.handleStatement(createStatement(resource,createURI(NS_SIOC + "topic"),skosConcept));
        } catch (UnsupportedEncodingException e) {
            throw new RDFParseException(e);
        }


        // add category value as dc:subject
        if(category.getLabel() != null) {
View Full Code Here


        try {
            WireFeed feed = input.build(new InputSource(in));
            if(feed instanceof Channel) {
                parseFeed((Channel) feed);
            } else {
                throw new RDFParseException("data stream is not an RSS feed");
            }
        } catch (FeedException e) {
            throw new RDFParseException(e);
        }
    }
View Full Code Here

        try {
            WireFeed feed = input.build(reader);
            if(feed instanceof Channel) {
                parseFeed((Channel) feed);
            } else {
                throw new RDFParseException("data stream is not an RSS feed");
            }
        } catch (FeedException e) {
            throw new RDFParseException(e);
        }
    }
View Full Code Here

            }
            createUrlProperty(skosConcept,NS_RDF + "type", NS_SKOS+"Concept");
            createStringProperty(skosConcept, NS_SKOS + "prefLabel", category.getValue());
            rdfHandler.handleStatement(createStatement(resource,createURI(NS_SIOC + "topic"),skosConcept));
        } catch (UnsupportedEncodingException e) {
            throw new RDFParseException(e);
        }


        // add category value as dc:subject
        createStringProperty(resource, NS_DC_TERMS + "subject", category.getValue());
View Full Code Here

        try {
            for(VCard card : new VCardBuilder(in).buildAll()) {
                parseVCard(card);
            }
        } catch (ParserException e) {
            throw new RDFParseException(e);
        }
    }
View Full Code Here

        try {
            for(VCard card : new VCardBuilder(reader).buildAll()) {
                parseVCard(card);
            }
        } catch (ParserException e) {
            throw new RDFParseException(e);
        }
    }
View Full Code Here

        options.useNamespaces = true;

        try {
            JsonLdProcessor.toRDF(JsonUtils.fromInputStream(in), callback, options);
        } catch (final JsonLdError e) {
            throw new RDFParseException("Could not parse JSONLD", e);
        } catch (final JsonParseException e) {
            throw new RDFParseException("Could not parse JSONLD", e);
        } catch (final RuntimeException e) {
            if (e.getCause() != null && e.getCause() instanceof RDFParseException) {
                throw (RDFParseException) e.getCause();
            }
            throw e;
View Full Code Here

        options.useNamespaces = true;

        try {
            JsonLdProcessor.toRDF(JsonUtils.fromReader(reader), callback, options);
        } catch (final JsonLdError e) {
            throw new RDFParseException("Could not parse JSONLD", e);
        } catch (final JsonParseException e) {
            throw new RDFParseException("Could not parse JSONLD", e);
        } catch (final RuntimeException e) {
            if (e.getCause() != null && e.getCause() instanceof RDFParseException) {
                throw (RDFParseException) e.getCause();
            }
            throw e;
View Full Code Here

            };
            add(new InputStreamReader(wrapper), baseURI, format, contexts);
          }
          catch (RDFParseException e) {
            String msg = e.getMessage() + " in " + entry.getName();
            RDFParseException pe = new RDFParseException(msg, e.getLineNumber(), e.getColumnNumber());
            pe.initCause(e);
            throw pe;
          }
          finally {
            zipIn.closeEntry();
          }
View Full Code Here

    public void parse(Reader reader, String baseURI) throws RDFParseException, RDFHandlerException {
        refreshSettings();
        try {
            streamProcessor.process(reader, baseURI);
        } catch (ParseException e) {
            throw new RDFParseException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.openrdf.rio.RDFParseException

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.