public SesameTripleCallback() { this(new GraphImpl()); }
public void add(StatementIterator iterator) { add(iterator, JOIN_BLANKNODES_DEFAULT); }
public GraphImpl(ValueFactory valueFactory, Collection<? extends Statement> statements) { this(valueFactory); addAll(statements); }
public GraphImpl(ValueFactory valueFactory) { super(); statements = new LinkedList<Statement>(); setValueFactory(valueFactory); }
public Iterator<Statement> match(Resource subj, URI pred, Value obj, Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); return new PatternIterator(iterator(), subj, pred, obj, contexts); }
public GraphImpl(ValueFactory valueFactory) { super(); statements = new LinkedList<Statement>(); setValueFactory(valueFactory); }
public Iterator<Statement> match(Resource subj, IRI pred, Value obj, Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); return new PatternIterator(iterator(), subj, pred, obj, contexts); }
/** * Creates a new BufferedGroupedWriter that wraps the supplied handlers, * using the supplied buffer size. * * @param bufferSize * size of the buffer expressed in number of RDF statements * @param handlers * one or more wrapped RDFHandlers */ public BufferedGroupingRDFHandler(int bufferSize, RDFHandler... handlers) { super(handlers); this.bufferSize = bufferSize; this.bufferedStatements = new GraphImpl(); this.contexts = new HashSet<Resource>(); }
public void add(Collection statements) { add(statements, JOIN_BLANKNODES_DEFAULT); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); setValueFactory(SimpleValueFactory.getInstance()); }
public GraphImpl(ValueFactory valueFactory, Collection<? extends Statement> statements) { this(valueFactory); addAll(statements); }
public Iterable<Statement> serialize( final EntityState entityState, final boolean includeNonQueryable ) { Graph graph = new GraphImpl(); serialize( entityState, includeNonQueryable, graph ); return graph; }
public void add(Graph graph) { add(graph, JOIN_BLANKNODES_DEFAULT); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); setValueFactory(new ValueFactoryImpl()); }
/** * Associate the statement with the resource. It is part of the * description of that resource. * * @param describedResource * A resource that is being described. * @param stmt * A statement having that resource as either the subject or * object. */ private void record(final BigdataValue describedResource, final BigdataStatement stmt) { Graph g = graphs.get(describedResource); if(g == null) { graphs.put(describedResource, g = new GraphImpl()); } g.add(stmt); if (log.isDebugEnabled()) log.debug("DESCRIBE: describedResource=" + describedResource + ", statement=" + stmt); }
public boolean add(Resource subj, IRI pred, Value obj, Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); boolean graphChanged = false; if (contexts.length == 0) { graphChanged = add(valueFactory.createStatement(subj, pred, obj)); } else { for (Resource context : contexts) { graphChanged |= add(valueFactory.createStatement(subj, pred, obj, context)); } } return graphChanged; }
/** * Associate the statement with the resource. It is part of the * description of that resource. * * @param describedResource * A resource that is being described. * @param stmt * A statement having that resource as either the subject or * object. */ private void record(final BigdataValue describedResource, final BigdataStatement stmt) { Graph g = graphs.get(describedResource); if(g == null) { graphs.put(describedResource, g = new GraphImpl()); } g.add(stmt); if (log.isDebugEnabled()) log.debug("DESCRIBE: describedResource=" + describedResource + ", statement=" + stmt); }
public boolean add(Resource subj, URI pred, Value obj, Resource... contexts) { OpenRDFUtil.verifyContextNotNull(contexts); boolean graphChanged = false; if (contexts.length == 0) { graphChanged = add(valueFactory.createStatement(subj, pred, obj)); } else { for (Resource context : contexts) { graphChanged |= add(valueFactory.createStatement(subj, pred, obj, context)); } } return graphChanged; }
public Iterable<Statement> serialize( final EntityState entityState, final boolean includeNonQueryable ) { Graph graph = new GraphImpl(); serialize( entityState, includeNonQueryable, graph ); return graph; }
/** * Creates a Graph representation of this repository. Note that any changes * on the Graph object will be reflected in this repository immediately! * * @return a Graph object that uses this repository as the backing store. * * @throws AccessDeniedException In case one does not have both read and * write access on this repository. */ public Graph getGraph() throws AccessDeniedException { _ensureReadAccess(); _ensureWriteAccess(); return new GraphImpl(this); }