/** * is_blanknode. * * @param arg a {@link lupos.rif.builtin.Argument} object. * @return a {@link lupos.rif.builtin.BooleanLiteral} object. */ @Builtin(Name = "is-blanknode") public static BooleanLiteral is_blanknode(final Argument arg) { Item arg0 = arg.arguments.get(0); if (arg0 instanceof LazyLiteral) { arg0 = ((LazyLiteral) arg0).getLiteral(); } return BooleanLiteral.create(arg0 instanceof AnonymousLiteral); }
/** * is_uri. * * @param arg a {@link lupos.rif.builtin.Argument} object. * @return a {@link lupos.rif.builtin.BooleanLiteral} object. */ @Builtin(Name = "is-uri") public static BooleanLiteral is_uri(final Argument arg) { Item arg0 = arg.arguments.get(0); if (arg0 instanceof LazyLiteral) { arg0 = ((LazyLiteral) arg0).getLiteral(); } return BooleanLiteral.create(arg0 instanceof URILiteral); }
/** * is_literal. * * @param arg a {@link lupos.rif.builtin.Argument} object. * @return a {@link lupos.rif.builtin.BooleanLiteral} object. */ @Builtin(Name = "is-literal") public static BooleanLiteral is_literal(final Argument arg) { Item arg0 = arg.arguments.get(0); if (arg0 instanceof LazyLiteral) { arg0 = ((LazyLiteral) arg0).getLiteral(); } return BooleanLiteral.create(!(arg0 instanceof AnonymousLiteral || arg0 instanceof URILiteral)); }
/** * is_integer_expression. * * @param arg a {@link lupos.rif.builtin.Argument} object. * @return a {@link lupos.rif.builtin.BooleanLiteral} object. */ @Builtin(Name = "is-integer-expression") public static BooleanLiteral is_integer_expression(final Argument arg) { Item arg0 = arg.arguments.get(0); if (arg0 instanceof LazyLiteral) { arg0 = ((LazyLiteral) arg0).getLiteral(); } final double value = BuiltinHelper.numberFromLiteral((TypedLiteral) arg0); return BooleanLiteral.create(Math.round(value) == value); }