return BooleanLiteral.not(is_nmtoken(arg));
}
@Builtin(Name = "iri-string", Bindable = true)
public static BooleanLiteral iri_string(final Argument arg) {
Literal left = null;
if (!arg.arguments.get(0).isVariable())
left = (Literal) arg.arguments.get(0);
Literal right = null;
if (!arg.arguments.get(1).isVariable())
right = (Literal) arg.arguments.get(1);
// versuchen beide zu URI-Literalen umzuformen
if (left != null && !(left instanceof URILiteral)) {
String uri = null;
if (left instanceof TypedLiteral)
uri = ((TypedLiteral) left).getContent();
else if (right instanceof StringLiteral)
uri = left.getName();
else if (left instanceof CodeMapLiteral)
uri = left.toString();
try {
left = LiteralFactory.createURILiteral("<"
+ uri.substring(1, uri.length() - 1) + ">");
} catch (URISyntaxException e) {
return null;
}
}
if (right != null && !(right instanceof URILiteral)) {
String uri = null;
if (right instanceof TypedLiteral)
uri = ((TypedLiteral) right).getContent();
else if (right instanceof StringLiteral)
uri = right.getName();
else if (right instanceof CodeMapLiteral)
uri = right.toString();
try {
right = LiteralFactory.createURILiteral("<"
+ uri.substring(1, uri.length() - 1) + ">");
} catch (URISyntaxException e) {
return null;