private void checkCreateNewList(final RDFNode value, final Resource tail) throws AddDeniedException, AuthenticationRequiredException { checkCreate(new Triple(SecurityEvaluator.FUTURE, listFirst().asNode(), value.asNode())); checkCreate(new Triple(SecurityEvaluator.FUTURE, listRest().asNode(), tail.asNode())); }
@Override public SecuredRDFList with(final RDFNode value) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException { checkUpdate(); checkCreate(new Triple(SecurityEvaluator.FUTURE, listFirst().asNode(), value.asNode())); return SecuredRDFListImpl.getInstance(getModel(), holder.getBaseItem() .with(value)); } }
@Override public SecuredModel add(final Resource s, final Property p, final String lex, final RDFDatatype datatype) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException { checkUpdate(); checkCreate(new Triple(s.asNode(), p.asNode(), NodeFactory.createLiteral(lex, datatype))); holder.getBaseItem().add(s, p, lex, datatype); return holder.getSecuredItem(); }
@Override public byte getByte(final int index) throws ReadDeniedException, AuthenticationRequiredException { checkRead(); final byte retval = holder.getBaseItem().getByte(index); checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index) .asNode(), asObject(retval).asNode())); return retval; }
@Override public SecuredBag createBag() throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException { checkUpdate(); checkCreate(new Triple(SecurityEvaluator.FUTURE, RDF.type.asNode(), RDF.Bag.asNode())); return SecuredBagImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().createBag()); }
@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()); }