Package org.fcrepo.common.rdf

Examples of org.fcrepo.common.rdf.SimpleLiteral


        try{
        set.add(new SimpleTriple(new SimpleURIReference(
                                                        new URI(Constants.FEDORA.uri + reader.GetObjectPID())),
                                                new SimpleURIReference(
                                                        new URI(TEST_PREDICATE)),
                                                        new SimpleLiteral("true")));
        }
        catch (ServerException e){
            throw new ResourceIndexException(e.getLocalizedMessage(),e);
        }
        catch (URISyntaxException e){
View Full Code Here


        ObjectNode o = null;
        try {
            if (object != null) {
                if (isLiteral) {
                    if (datatype == null || datatype.length() == 0) {
                        o = new SimpleLiteral(object);
                    } else {
                        o = new SimpleLiteral(object, new URI(datatype));
                    }
                } else {
                    o = new SimpleURIReference(new URI(object));
                }
            }
View Full Code Here

                                                         String language)
            throws URISyntaxException {
        ObjectNode obj = null;
        if (isLiteral) {
            if (literalType != null) {
                obj = new SimpleLiteral(objURI, literalType);
            } else if (language != null){
                obj = new SimpleLiteral(objURI, language);
            } else {
                obj = new SimpleLiteral(objURI);
            }
        } else {
            obj = new SimpleURIReference(new URI(objURI));
        }
        return obj;
View Full Code Here

            throws Exception {
        for (RelationshipTuple tuple : reader.getRelationships()) {
            ObjectNode oNode;
            if (tuple.isLiteral) {
                if (tuple.datatype != null) {
                    oNode = new SimpleLiteral(tuple.object,
                                              tuple.datatype);
                } else if (tuple.language != null){
                    oNode = new SimpleLiteral(tuple.object, tuple.language);
                } else {
                    oNode = new SimpleLiteral(tuple.object);
                }
            } else {
                oNode = new SimpleURIReference(new URI(tuple.object));
            }
            set.add(new SimpleTriple(new SimpleURIReference(
View Full Code Here

    protected void add(SubjectNode subject,
                       RDFName predicate,
                       String lexicalValue,
                       Set<Triple> set) throws Exception {
        if (lexicalValue != null) {
            set.add(new SimpleTriple(subject, predicate, new SimpleLiteral(lexicalValue)));
        }
    }
View Full Code Here

                       RDFName predicate,
                       String lexicalValue,
                       String lang,
                       Set<Triple> set) throws Exception {
        if (lexicalValue != null) {
            set.add(new SimpleTriple(subject, predicate, new SimpleLiteral(lexicalValue, lang)));
        }
    }
View Full Code Here

                       RDFName predicate,
                       Date dateValue,
                       Set<Triple> set) throws Exception {
        if (dateValue != null) {
            String lexicalValue = DateUtility.convertDateToXSDString(dateValue);
            ObjectNode object = new SimpleLiteral(lexicalValue,
                                                  RDF_XSD.DATE_TIME.getURI());
            set.add(new SimpleTriple(subject, predicate, object));
        }
    }
View Full Code Here

            throws ServerException {
        ObjectNode o = null;
        try {
            if (isLiteral) {
                if (datatype == null || datatype.length() == 0) {
                    o = new SimpleLiteral(object);
                } else {
                    o = new SimpleLiteral(object, new URI(datatype));
                }
            } else {
                o = new SimpleURIReference(new URI(object));
            }
            return new SimpleTriple(new SimpleURIReference(new URI(subject)),
View Full Code Here

TOP

Related Classes of org.fcrepo.common.rdf.SimpleLiteral

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.