@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(); }
@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); }
/** * 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()); }
private void checkCreate(final int index, final Literal l) { checkCreate(new Triple(holder.getBaseItem().asNode(), RDF.li(index).asNode(), l.asNode())); }