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 PurgeRelationship Method.

Author(s):
Edwin Shin
 
 public class PurgeRelationship extends RelationshipsRequest {
 
     public PurgeRelationship(String subject) {
         super(subject);
     }
 
     public PurgeRelationship subject(String subject) {
         addQueryParam("subject"subject);
         return this;
     }
 
     public PurgeRelationship predicate(String predicate) {
         addQueryParam("predicate"predicate);
         return this;
     }

    
The object of the relationship.

Unless otherwise indicated with the now-deprecated isLiteral(boolean) method, the object will be treated as a resource (i.e. a URI, not as a literal).

Parameters:
object the object of the relationship
Returns:
this builder
 
     public PurgeRelationship object(String object) {
         addQueryParam("object"object);
         return this;
     }

    
The object of the relationship as a plain literal.

Parameters:
object the object of the relationship
isLiteral whether or not the object is a literal.
Returns:
this builder
 
     public PurgeRelationship object(String objectboolean isLiteral) {
         addQueryParam("object"object);
         addQueryParam("isLiteral", Boolean.toString(isLiteral));
         return this;
     }

    
The object of the relationship as a datatyped literal.

Parameters:
object the object of the relationship
datatype The URI of the XML Schema Datatype of the object literal, e.g. "http://www.w3.org/2001/XMLSchema#dateTime".
Returns:
this builder
 
     public PurgeRelationship object(String objectString datatype) {
         addQueryParam("object"object);
         addQueryParam("isLiteral", Boolean.toString(true));
         addQueryParam("datatype"datatype);
         return this;
     }

    

Deprecated:
use object(java.lang.String,boolean)
Parameters:
isLiteral
Returns:
this builder
 
     public PurgeRelationship isLiteral(boolean isLiteral) {
        addQueryParam("isLiteral", Boolean.toString(isLiteral));
        return this;
    }

    

Deprecated:
use object(java.lang.String,java.lang.String)
Parameters:
datatype
Returns:
this builder
    public PurgeRelationship datatype(String datatype) {
        addQueryParam("datatype"datatype);
        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()).delete(
                        ClientResponse.class);
        return new FedoraResponseImpl(cr);
    }
New to GrepCode? Check out our FAQ X