Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2010 MediaShelf <http://www.yourmediashelf.com/> 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 <http://www.gnu.org/licenses/>.
package com.yourmediashelf.fedora.client.request;
Builder for the GetRelationships method.

Author(s):
Edwin Shin
public class GetRelationships extends RelationshipsRequest {
    public GetRelationships(String subject) {
        super(subject);
    }

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

Deprecated:
use constructor
Parameters:
subject the subject of the relationship
Returns:
this builder
    public GetRelationships subject(String subject) {
        addQueryParam("subject"subject);
        return this;
    }
    public GetRelationships predicate(String predicate) {
        addQueryParam("predicate"predicate);
        return this;
    }

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

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