Exemplo n.º 1
0
 @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();
 }
Exemplo n.º 2
0
 @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);
 }
Exemplo n.º 3
0
 /**
  * Test that two literals are semantically equivalent. In some cases this may be the sames as
  * equals, in others equals is stricter. For example, two xsd:int literals with the same value but
  * different language tag are semantically equivalent but distinguished by the java equality
  * function in order to support round tripping.
  */
 public boolean sameValueAs(Literal other) {
   return asNode().sameValueAs(other.asNode());
 }
Exemplo n.º 4
0
 private void checkCreate(final int index, final Literal l) {
   checkCreate(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), l.asNode()));
 }