Package org.fcrepo.common.rdf

Examples of org.fcrepo.common.rdf.SimpleURIReference


            logger.debug("Getting Relationships:  pid = " + pid + " predicate = "
                         + relationship);
            try {
                URIReference pred = null;
                if (relationship != null) {
                    pred = new SimpleURIReference(new URI(relationship));
                }
                URIReference subj = null;
                if (subject != null) {
                    subj = new SimpleURIReference(new URI(SubjectProcessor.getSubjectAsUri(subject)));
                }
                Set<RelationshipTuple> tuples =
                        r.getRelationships(subj, pred, null);
                return tuples.toArray(new RelationshipTuple[tuples.size()]);
            } catch (URISyntaxException e) {
View Full Code Here


    public Set<Triple> getTriplesForObject(DOReader reader)
            throws ResourceIndexException {
        Set<Triple> set = new HashSet<Triple>();

        try {
            URIReference objURI = new SimpleURIReference(
                    new URI(PID.toURI(reader.GetObjectPID())));

            /* Now add the SDef operation-specific triples */
            addMethodDefTriples(objURI, reader, set);
        } catch (Exception e) {
View Full Code Here

    /**
     * Return a URIReference of some PID string, assuming it is well-formed.
     */
    public static SimpleURIReference toURIReference(String pidString) {
        SimpleURIReference ref = null;
        try {
            ref = new SimpleURIReference(new URI(toURI(pidString)));
        } catch (URISyntaxException e) {
            // assumes pid is well-formed
            throw new Error(e);
        }
        return ref;
View Full Code Here

        }

        logger.debug("Getting attribute for resource " + resourceID);

        try{
            SubjectNode snode = new SimpleURIReference(new URI(resourceID));
            PredicateNode pnode = new SimpleURIReference(new URI(attribute));
            DOReader reader = m_doManager.getReader(false, getContext(), pid);
            Set<RelationshipTuple> triples = reader.getRelationships(snode, pnode, null);
            results = new HashSet<String>();

            for (RelationshipTuple triple:triples){
View Full Code Here

                    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)),
                                    new SimpleURIReference(new URI(predicate)),
                                    o);
        } catch (URISyntaxException e) {
            throw new GeneralException(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

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

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.