eu.emi.emir.client
Class EMIRClient

java.lang.Object
  extended by eu.emi.emir.client.EMIRClient

public class EMIRClient
extends Object

Helper class to create the client resource instance

Author:
a.memon

Constructor Summary
EMIRClient(String url)
          Single argument constructor to access emir on HTTP mode
EMIRClient(String url, eu.unicore.util.httpclient.IClientConfiguration clientConfig)
          Creates EMIRClient object with ssl/tls
 
Method Summary
 com.sun.jersey.api.client.ClientResponse deleteByID(String url)
           
 com.sun.jersey.api.client.Client getClient()
           
 com.sun.jersey.api.client.WebResource getClientResource()
          Returns remote raw resource object
 org.codehaus.jettison.json.JSONArray queryByJSON(org.codehaus.jettison.json.JSONObject queryDocument)
          Querying the EMIR server for JSON records by JSON document containing the rich queries
 org.codehaus.jettison.json.JSONArray queryByQueryParams(javax.ws.rs.core.MultivaluedMap<String,String> attrMap)
          Querying the EMIR server for Service Endpoint Records using http query parameters
 QueryResult queryXML(javax.ws.rs.core.MultivaluedMap<String,String> attrMap, Integer skip, Integer limit)
           
 org.codehaus.jettison.json.JSONArray register(org.codehaus.jettison.json.JSONArray ja)
          Registers an array of Service Endpoint Records, defined as JSONArray
 org.codehaus.jettison.json.JSONArray update(org.codehaus.jettison.json.JSONArray ja)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMIRClient

public EMIRClient(String url,
                  eu.unicore.util.httpclient.IClientConfiguration clientConfig)
Creates EMIRClient object with ssl/tls

Parameters:
url - Remote EMIR url
{@link - IClientConfiguration}

EMIRClient

public EMIRClient(String url)
Single argument constructor to access emir on HTTP mode

Parameters:
url - Remote EMIR url
Method Detail

getClientResource

public com.sun.jersey.api.client.WebResource getClientResource()
Returns remote raw resource object

Returns:
WebResource

getClient

public com.sun.jersey.api.client.Client getClient()

register

public org.codehaus.jettison.json.JSONArray register(org.codehaus.jettison.json.JSONArray ja)
Registers an array of Service Endpoint Records, defined as JSONArray

Parameters:
ja - An array of JSON documents containing the Service Endpoint Records
Returns:
JSONArray

update

public org.codehaus.jettison.json.JSONArray update(org.codehaus.jettison.json.JSONArray ja)

deleteByID

public com.sun.jersey.api.client.ClientResponse deleteByID(String url)

queryByQueryParams

public org.codehaus.jettison.json.JSONArray queryByQueryParams(javax.ws.rs.core.MultivaluedMap<String,String> attrMap)
Querying the EMIR server for Service Endpoint Records using http query parameters

Parameters:
attrMap - A map containing name value pairs
Returns:
a JSONArray containing matching records

queryByJSON

public org.codehaus.jettison.json.JSONArray queryByJSON(org.codehaus.jettison.json.JSONObject queryDocument)
Querying the EMIR server for JSON records by JSON document containing the rich queries

Parameters:
queryDocument - A json document defining rich query, according to MongoDB query specification, @see http://www.mongodb.org/display/DOCS/Advanced+Queries
Returns:
a JSONArray containing matching records

queryXML

public QueryResult queryXML(javax.ws.rs.core.MultivaluedMap<String,String> attrMap,
                            Integer skip,
                            Integer limit)


Copyright © 2012 EMI. All Rights Reserved.