use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredModelImpl method createBag.
@Override
public SecuredBag createBag(final String uri) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException {
checkUpdate();
checkCreate(new Triple(NodeFactory.createURI(uri), RDF.type.asNode(), RDF.Bag.asNode()));
return SecuredBagImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().createBag(uri));
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredModelImpl method getSeq.
@Override
public SecuredSeq getSeq(final String uri) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
checkRead(new Triple(NodeFactory.createURI(uri), RDF.type.asNode(), RDF.Seq.asNode()));
return SecuredSeqImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().getSeq(uri));
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredModelImpl method createList.
@Override
public SecuredRDFList createList() throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException {
checkUpdate();
checkCreate(new Triple(SecurityEvaluator.FUTURE, RDF.first.asNode(), RDF.nil.asNode()));
return SecuredRDFListImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().createList());
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredResourceImpl method hasLiteral.
/**
* Answer true iff this resource has the value <code>o</code> for property
* <code>p</code>. <code>o</code> is interpreted as a typed literal with the
* appropriate RDF type.
*
* @throws ReadDeniedException
* @throws AuthenticationRequiredException
*/
@Override
public boolean hasLiteral(final Property p, final boolean o) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
checkRead(new Triple(holder.getBaseItem().asNode(), p.asNode(), ResourceFactory.createTypedLiteral(o).asNode()));
return holder.getBaseItem().hasLiteral(p, o);
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredResourceImpl method hasLiteral.
/**
* Answer true iff this resource has the value <code>o</code> for property
* <code>p</code>. <code>o</code> is interpreted as a typed literal with the
* appropriate RDF type.
*
* @throws ReadDeniedException
* @throws AuthenticationRequiredException
*/
@Override
public boolean hasLiteral(final Property p, final long o) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
checkRead(new Triple(holder.getBaseItem().asNode(), p.asNode(), ResourceFactory.createTypedLiteral(o).asNode()));
return holder.getBaseItem().hasLiteral(p, o);
}
Aggregations