use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getBag.
/**
* @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 SecuredBag getBag(final int index) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final Bag b = holder.getBaseItem().getBag(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), b.asNode()));
return SecuredBagImpl.getInstance(getModel(), b);
}
throw new SeqIndexBoundsException(index, 0);
}
use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getLong.
/**
* @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 long getLong(final int index) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final long retval = holder.getBaseItem().getLong(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), asObject(retval).asNode()));
return retval;
}
throw new SeqIndexBoundsException(index, 0);
}
use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getByte.
/**
* @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 byte getByte(final int index) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final byte retval = holder.getBaseItem().getByte(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), asObject(retval).asNode()));
return retval;
}
throw new SeqIndexBoundsException(index, 0);
}
use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getString.
/**
* @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 String getString(final int index) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final String retval = holder.getBaseItem().getString(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), ResourceFactory.createTypedLiteral(retval).asNode()));
return retval;
}
throw new SeqIndexBoundsException(index, 0);
}
use of org.apache.jena.rdf.model.SeqIndexBoundsException in project jena by apache.
the class SecuredSeqImpl method getAlt.
/**
* @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 SecuredAlt getAlt(final int index) throws ReadDeniedException, AuthenticationRequiredException {
if (checkSoftRead()) {
final Alt a = holder.getBaseItem().getAlt(index);
checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), a.asNode()));
return SecuredAltImpl.getInstance(getModel(), a);
}
throw new SeqIndexBoundsException(index, 0);
}
Aggregations