/** * Reads from inputStream, using base URI xmlbase, adding triples to graph. * If xmlbase is "" then relative URIs may be added to graph. * * @param g * A graph to add triples to. * @param in * The RDF/XML document stream. * @param xmlBase * The base URI of the document or "". */ public void read(Graph g, InputStream in, String xmlBase) { read(g, new InputSource(in), xmlBase, null); }
private Object setArpProperty(String str, Object v) { return processArpOptions(getOptions(), str, v, errorHandler); }
Model loadRDF(InFactoryX in, RDFErrorHandler eh, String base) throws IOException { Model model = ModelFactory.createDefaultModel(); JenaReader jr = new JenaReader(); if (eh != null) jr.setErrorHandler(eh); jr.setProperty("error-mode", "strict"); if ( base.contains( "/xmlns/" ) || base.contains( "/comments/" ) ) jr.setProperty("embedding","true"); try ( InputStream inx = in.open() ) { jr.read(model, inx, base); } return model; }
private Object setArpProperty(String str, Object v) { return JenaReader.processArpOptions(getOptions(), str, v, errorHandler); } }
if (str.startsWith("http:")) { if (str.startsWith(arpPropertiesURL)) { return setArpProperty(str.substring(arpPropertiesURLLength), obj); return setArpProperty(str, obj);
Model loadRDF(InFactoryX in, RDFErrorHandler eh, String base) throws IOException { Model model = ModelFactory.createDefaultModel(); JenaReader jr = new JenaReader(); if (eh != null) jr.setErrorHandler(eh); jr.setProperty("error-mode", "strict"); if ( base.contains( "/xmlns/" ) || base.contains( "/comments/" ) ) jr.setProperty("embedding","true"); try ( InputStream inx = in.open() ) { jr.read(model, inx, base); } return model; }
private Object setArpProperty(String str, Object v) { return JenaReader.processArpOptions(getOptions(), str, v, errorHandler); } }
if (str.startsWith("http:")) { if (str.startsWith(arpPropertiesURL)) { return setArpProperty(str.substring(arpPropertiesURLLength), obj); return setArpProperty(str, obj);
/** * Reads from inputStream, using base URI xmlbase, adding triples to graph. * If xmlbase is "" then relative URIs may be added to graph. * * @param g * A graph to add triples to. * @param in * The RDF/XML document stream. * @param xmlBase * The base URI of the document or "". */ public void read(Graph g, InputStream in, String xmlBase) { read(g, new InputSource(in), xmlBase, null); }
private Object setArpProperty(String str, Object v) { return processArpOptions(getOptions(), str, v, errorHandler); }
/** * Reads from inputStream, using base URI xmlbase, adding triples to model. * If xmlbase is "" then relative URIs may be added to model. * * @param m * A model to add triples to. * @param in * The RDF/XML document stream. * @param xmlBase * The base URI of the document or "". */ @Override public void read(final Model m, InputStream in, String xmlBase) throws JenaException { read(m, new InputSource(in), xmlBase); }
/** * Reads from inputStream, using base URI xmlbase, adding triples to model. * If xmlbase is "" then relative URIs may be added to model. * * @param m * A model to add triples to. * @param in * The RDF/XML document stream. * @param xmlBase * The base URI of the document or "". */ @Override public void read(final Model m, InputStream in, String xmlBase) throws JenaException { read(m, new InputSource(in), xmlBase); }
/** * Reads from reader, using base URI xmlbase, adding triples to graph. If * xmlbase is "" then relative URIs may be added to graph. * * @param g * A graph to add triples to. * @param reader * The RDF/XML document. * @param xmlBase * The base URI of the document or "". */ public void read(Graph g, Reader reader, String xmlBase) throws JenaException { read(g, new InputSource(reader), xmlBase, null); }
@Override public void statement(AResource subj, AResource pred, AResource obj) { try { Triple t = JenaReader.convert(subj, pred, obj) ; graph.add(t) ; } catch (JenaException e) { errorHandler.error(e) ; } }
/** * Reads from reader, using base URI xmlbase, adding triples to model. If * xmlbase is "" then relative URIs may be added to model. * * @param m * A model to add triples to. * @param reader * The RDF/XML document. * @param xmlBase * The base URI of the document or "". */ @Override public void read(final Model m, Reader reader, String xmlBase) throws JenaException { read(m, new InputSource(reader), xmlBase); }
@Override public void statement(AResource subj, AResource pred, AResource obj) { try { Triple t = JenaReader.convert(subj, pred, obj) ; graph.add(t) ; } catch (JenaException e) { errorHandler.error(e) ; } }