use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredSeqImpl method getFloat.
@Override
public float getFloat(final int index) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
final float retval = holder.getBaseItem().getFloat(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), asObject(retval).asNode()));
return retval;
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredSeqImpl method getLiteral.
@Override
public SecuredLiteral getLiteral(final int index) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
final Literal literal = holder.getBaseItem().getLiteral(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), literal.asNode()));
return SecuredLiteralImpl.getInstance(getModel(), literal);
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredSeqImpl method set.
@Override
public SecuredSeq set(final int index, final RDFNode o) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException {
checkUpdate();
final Triple t2 = new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), o.asNode());
final RDFNode rdfNode = holder.getBaseItem().getObject(index);
if (rdfNode != null) {
final Triple t1 = new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), rdfNode.asNode());
checkUpdate(t1, t2);
} else {
checkCreate(t2);
}
holder.getBaseItem().set(index, o);
return holder.getSecuredItem();
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredSeqImpl method getResource.
@Override
public SecuredResource getResource(final int index) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
final Resource retval = holder.getBaseItem().getResource(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), retval.asNode()));
return SecuredResourceImpl.getInstance(getModel(), retval);
}
use of org.apache.jena.graph.Triple in project jena by apache.
the class SecuredSeqImpl method getLanguage.
@Override
public String getLanguage(final int index) throws ReadDeniedException, AuthenticationRequiredException {
checkRead();
final Literal literal = holder.getBaseItem().getLiteral(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), literal.asNode()));
return literal.getLanguage();
}
Aggregations