use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getResource.
/**
* @sec.graph Read if {@link SecurityEvaluator#isHardReadError()} is true and
* the user does not have read access then SeqIndexBoundsException is
* thrown
* @sec.triple Read SecTriple( this, RDF.li(1), o )
* @throws ReadDeniedException
* @throws AuthenticationRequiredException if user is not authenticated and is
* required to be.
*/
@Override
@Deprecated
public SecuredResource getResource(final int index, final ResourceF f) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final Resource retval = holder.getBaseItem().getResource(index, f);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), retval.asNode()));
return SecuredResourceImpl.getInstance(getModel(), retval);
}
throw new SeqIndexBoundsException(index, 0);
}
use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getInt.
/**
* @sec.graph Read if {@link SecurityEvaluator#isHardReadError()} is true and
* the user does not have read access then SeqIndexBoundsException is
* thrown
* @sec.triple Read SecTriple( this, RDF.li(1), o )
* @throws ReadDeniedException
* @throws AuthenticationRequiredException if user is not authenticated and is
* required to be.
*/
@Override
public int getInt(final int index) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final int retval = holder.getBaseItem().getInt(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), asObject(retval).asNode()));
return retval;
}
throw new SeqIndexBoundsException(index, 0);
}
Aggregations