@Override public String toString() { return "<GRAPH_CONTENT>" + getOrigin(); }
@Override public String toString() { return "GRAPH<" + rootOntology.getClass() + "," + getOrigin() + ">"; }
/** * Wraps the supplied <code>graph</code> into a new input source. No origin will be set. * * @param graph * the RDF graph * @throws IllegalArgumentException * if <code>graph</code> is neither a {@link ImmutableGraph} nor a {@link Graph}. */ public GraphSource(Graph graph) { if (graph instanceof ImmutableGraph) bindRootOntology(graph); else if (graph instanceof Graph) bindRootOntology(((Graph) graph).getImmutableGraph()); else throw new IllegalArgumentException("GraphSource supports only ImmutableGraph and Graph types. " + graph.getClass() + " is not supported."); bindPhysicalOrigin(null); }
key = addOntology(new GraphSource((IRI) ref)); } else if (ref instanceof OWLOntologyID) { OWLOntologyID idref = (OWLOntologyID) ref;
bindPhysicalOrigin(Origin.create(name)); bindPhysicalOrigin(null); bindRootOntology(graph); log.debug("Root ontology is a {}.", getRootOntology().getClass().getCanonicalName()); } else {
content); else // content = new BufferedInputStream(content); src = new GraphContentInputSource(content, mt, ontologyProvider.getStore()); log.debug("SUCCESS parse with media type {}.", mt); OWLOntologyID key = session.addOntology(src);
/** * Creates a new input source by querying the supplied triple collection provider for a graph named with * the supplied <code>graphId</code>. The supplied ID will also be set as the graph origin. * * @param graphId * the graph ID. * @throws NullPointerException * if <code>tcProvider</code> is null. * @throws org.apache.clerezza.rdf.core.access.NoSuchEntityException * if no such graph can be found in <code>tcProvider</code>. */ public GraphSource(IRI graphId, TcProvider tcProvider) { this(tcProvider.getGraph(graphId)); bindPhysicalOrigin(Origin.create(graphId)); }
key = addOntology(new GraphSource((IRI) ref)); } else if (ref instanceof OWLOntologyID) { OWLOntologyID idref = (OWLOntologyID) ref;
bindPhysicalOrigin(Origin.create(name)); bindPhysicalOrigin(null); bindRootOntology(graph); log.debug("Root ontology is a {}.", getRootOntology().getClass().getCanonicalName()); } else {
/** * Wraps the supplied <code>graph</code> into a new input source. No origin will be set. * * @param graph * the RDF graph * @throws IllegalArgumentException * if <code>graph</code> is neither a {@link ImmutableGraph} nor a {@link Graph}. */ public GraphSource(Graph graph) { if (graph instanceof ImmutableGraph) bindRootOntology(graph); else if (graph instanceof Graph) bindRootOntology(((Graph) graph).getImmutableGraph()); else throw new IllegalArgumentException("GraphSource supports only ImmutableGraph and Graph types. " + graph.getClass() + " is not supported."); bindPhysicalOrigin(null); }
new GraphContentInputSource(content, mt.toString(), ontologyProvider.getStore())); if (key == null || key.isAnonymous()) { log.error("FAILED parse with media type {}.", mt);
@Override public String toString() { return "<GRAPH_CONTENT>" + getOrigin(); }
@Override public String toString() { return "GRAPH<" + rootOntology.getClass() + "," + getOrigin() + ">"; }
/** * Creates a new input source by querying the supplied triple collection provider for a graph named with * the supplied <code>graphId</code>. The supplied ID will also be set as the graph origin. * * @param graphId * the graph ID. * @throws NullPointerException * if <code>tcProvider</code> is null. * @throws org.apache.clerezza.rdf.core.access.NoSuchEntityException * if no such graph can be found in <code>tcProvider</code>. */ public GraphSource(IRI graphId, TcProvider tcProvider) { this(tcProvider.getGraph(graphId)); bindPhysicalOrigin(Origin.create(graphId)); }
OntologyInputSource<?> src = null; if (o instanceof OWLOntology) src = new RootOntologySource((OWLOntology) o); else if (o instanceof Graph) src = new GraphSource( (Graph) o); if (src != null) expanded.add(src);
src = new GraphContentInputSource(content, f, ontologyProvider.getStore());
session.addOntology(new GraphSource(signaturesGraph)); session.addOntology(new GraphSource(metadataGraph)); } catch (UnmodifiableOntologyCollectorException e1) { throw new EngineException("Cannot add enhancement graph to OntoNet session for refactoring", e1);
content = new ByteArrayInputStream(file.getContent()); log.debug("Recreated input stream for format {}", f); src = new GraphContentInputSource(content, f, ontologyProvider.getStore());