/** * Constructs a UnionGraph over the specified baseTripleCollections. Write * and delete operations are forwarded to the first baseTripleCollections. * * @param baseTripleCollections the baseTripleCollections */ public UnionGraph(Graph... baseTripleCollections) { this.baseTripleCollections = baseTripleCollections; readLock = getPartialReadLock(0); writeLock = createWriteLock(); }
@Override public T next() { T result = next; next = prepareNext(); return result; }
@Override public void lock() { boolean isLocked = false; while (!isLocked) { try { isLocked = tryLock(10000, TimeUnit.NANOSECONDS); } catch (InterruptedException ex) { } } }
/** * Provides the node in the system graph corresponding to rdf:type Role * * @return Role class node */ public GraphNode getRoleType() { return new GraphNode(PERMISSION.Role, systemGraph); }
private void updateProperty(GraphNode node, IRI predicate, RDFTerm object) { node.deleteProperties(predicate); node.addProperty(predicate, object); }
/** * Getter for the IRI representing the ID of this Representation. * @return The IRI representing the ID of this Representation. */ public IRI getNode(){ return (IRI)graphNode.getNode(); }
/** * Getter for the read only view onto the RDF data of this representation. * * @return The RDF graph of this Representation */ public Graph getRdfGraph(){ return graphNode.getGraph(); }
@Override public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) { final Iterator<Triple> baseIter = base.filter(toSourceRDFTerm(subject), predicate, toSourceRDFTerm(object)); return new WrappedIteraror(baseIter); }
/** * Replaces the graph node resouce with the specified <code>BlankNodeOrIRI</code>. * The resource is only replaced where it is either subject or object. * @param replacement * @return a GraphNode representing the replecement node */ public GraphNode replaceWith(BlankNodeOrIRI replacement) { return replaceWith(replacement, false); }
@Override public Literal next() { Literal result = next; next = prepareNext(); return result; }
@Override public boolean containsAll(Collection<?> c) { for (Object object : c) { if (!contains(object)) { return false; } } return true; }
/** * Provides the node in the system graph corresponding to rdf:type * Permission * * @return Permission class node */ public GraphNode getPermissionType() { return new GraphNode(PERMISSION.Permission, systemGraph); }
/** * Getter for the IRI representing the ID of this Representation. * @return The IRI representing the ID of this Representation. */ public IRI getNode(){ return (IRI)graphNode.getNode(); }
/** * Constructs a UnionGraph over the specified baseTripleCollections. Write * and delete operations are forwarded to the first baseTripleCollections. * * @param baseTripleCollections the baseTripleCollections */ public UnionGraph(Graph... baseTripleCollections) { this.baseTripleCollections = baseTripleCollections; readLock = getPartialReadLock(0); writeLock = createWriteLock(); }
@Override public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) { final Iterator<Triple> baseIter = base.filter(toSourceRDFTerm(subject), predicate, toSourceRDFTerm(object)); return new WrappedIteraror(baseIter); }
@Override public T next() { T result = next; next = prepareNext(); return result; }
@Override public void lock() { boolean isLocked = false; while (!isLocked) { try { isLocked = tryLock(10000, TimeUnit.NANOSECONDS); } catch (InterruptedException ex) { } } }
@Override public Literal next() { Literal result = next; next = prepareNext(); return result; }