Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2010 MediaShelf <> This file is part of fedora-client. fedora-client is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. fedora-client is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with fedora-client. If not, see <>.
package com.yourmediashelf.fedora.client.request;
Builder for the GetRelationships method.

Edwin Shin
public class GetRelationships extends RelationshipsRequest {
    public GetRelationships(String subject) {

The subject of the relationship. If null, defaults to the URI form of the constructor-provided pid, e.g. info:fedora/demo:1.

use constructor
subject the subject of the relationship
this builder
    public GetRelationships subject(String subject) {
        return this;
    public GetRelationships predicate(String predicate) {
        return this;

The format of the response. Default is rdf/xml.

format one of "rdf/xml", "n-triples", "turtle", or "sparql".
this builder
    public GetRelationships format(String format) {
        return this;
    public FedoraResponse execute(FedoraClient fedora)
            throws FedoraClientException {
        WebResource wr = resource(fedora);
        String path = String.format("objects/%s/relationships");
        ClientResponse cr =
        return new FedoraResponseImpl(cr);
New to GrepCode? Check out our FAQ X