Package org.ontoware.rdf2go.model.node

Examples of org.ontoware.rdf2go.model.node.DatatypeLiteral


        final Resource subject = statement.getSubject();
        final URI predicate = statement.getPredicate();
        final Node object = statement.getObject();

        if (object instanceof DatatypeLiteral) {
            final DatatypeLiteral literal = (DatatypeLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getDatatype());
        } else if (object instanceof LanguageTagLiteral) {
            final LanguageTagLiteral literal = (LanguageTagLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getLanguageTag());
        } else if (object instanceof Literal) {
            final Literal literal = (Literal) object;
            addStatement(result, context, subject, predicate, literal.getValue());
        } else {
            addStatement(result, context, subject, predicate, object.asURI());
        }
    }
View Full Code Here


        final Resource subject = statement.getSubject();
        final URI predicate = statement.getPredicate();
        final Node object = statement.getObject();

        if (object instanceof DatatypeLiteral) {
            final DatatypeLiteral literal = (DatatypeLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getDatatype());
        } else if (object instanceof LanguageTagLiteral) {
            final LanguageTagLiteral literal = (LanguageTagLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getLanguageTag());
        } else if (object instanceof Literal) {
            final Literal literal = (Literal) object;
            addStatement(result, context, subject, predicate, literal.getValue());
        } else {
            addStatement(result, context, subject, predicate, object.asURI());
        }
    }
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.node.DatatypeLiteral

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.