示例#1
0
 @Override
 public SecuredSeq add(final int index, final RDFNode o)
     throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException {
   checkUpdate();
   final Literal l = holder.getBaseItem().getModel().createTypedLiteral(o);
   checkCreate(index, l);
   holder.getBaseItem().add(index, o);
   return holder.getSecuredItem();
 }
示例#2
0
 @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();
 }
示例#3
0
 private void checkCreate(final int index, final Literal l) {
   checkCreate(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), l.asNode()));
 }