de.fzj.unicore.uas.client
Class LocalRegistryClient

java.lang.Object
  extended by de.fzj.unicore.uas.client.LocalRegistryClient

public class LocalRegistryClient
extends java.lang.Object

Client for accessing a Registry service. Allows to add entries, and to list services based on porttype and filtering criteria. To allow service discovery, services have to publish their EPR in a special form containing a metadata item. EndpointReferenceType epr= ... your service epr... ; AddressingUtil.addPortType(... your service porttype ...) ; registryClient.addRegistryEntry(epr); You can add more content to the registry entry, for example resource properties.

Author:
demuth, schuller
See Also:
UASWSResourceImpl.getPortType(), AddressingUtil.addPortType(EndpointReferenceType, QName)

Field Summary
static javax.xml.namespace.QName ENTRY_RP
          the QName of the Entry resource property
 
Constructor Summary
LocalRegistryClient()
           
LocalRegistryClient(java.lang.String resID)
           
 
Method Summary
 org.oasisOpen.docs.wsrf.sg2.AddResponseDocument addRegistryEntry(org.oasisOpen.docs.wsrf.sg2.AddDocument in)
          add a registry entry
 org.oasisOpen.docs.wsrf.sg2.AddResponseDocument addRegistryEntry(org.w3.x2005.x08.addressing.EndpointReferenceType memberEpr)
          add an entry to the registry (with no content)
 org.oasisOpen.docs.wsrf.sg2.AddResponseDocument addRegistryEntry(org.w3.x2005.x08.addressing.EndpointReferenceType memberEpr, org.oasisOpen.docs.wsrf.sg2.ContentType content)
          add an entry to the registry configured for UAS
 java.util.List<org.oasisOpen.docs.wsrf.sg2.EntryType> listEntries()
          lists all the entries in this local registry
static org.oasisOpen.docs.wsrf.sg2.ContentType makeContent(java.util.List<org.apache.xmlbeans.XmlObject> os)
          make content suitable for publishing from a list of xml elements
static org.oasisOpen.docs.wsrf.sg2.ContentType makeContent(org.apache.xmlbeans.XmlObject[] os)
          make content suitable for publishing from an array of xml elements
protected  Registry makeProxy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTRY_RP

public static final javax.xml.namespace.QName ENTRY_RP
the QName of the Entry resource property

Constructor Detail

LocalRegistryClient

public LocalRegistryClient(java.lang.String resID)
                    throws java.lang.Exception
Throws:
java.lang.Exception

LocalRegistryClient

public LocalRegistryClient()
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

makeProxy

protected Registry makeProxy()
                      throws java.lang.Exception
Throws:
java.lang.Exception

addRegistryEntry

public org.oasisOpen.docs.wsrf.sg2.AddResponseDocument addRegistryEntry(org.oasisOpen.docs.wsrf.sg2.AddDocument in)
                                                                 throws java.lang.Exception
add a registry entry

Parameters:
in -
Returns:
Throws:
java.lang.Exception

addRegistryEntry

public org.oasisOpen.docs.wsrf.sg2.AddResponseDocument addRegistryEntry(org.w3.x2005.x08.addressing.EndpointReferenceType memberEpr,
                                                                        org.oasisOpen.docs.wsrf.sg2.ContentType content)
                                                                 throws java.lang.Exception
add an entry to the registry configured for UAS

Parameters:
memberEpr - the epr of the service
content - The content document (ResourceProperty doc)
Returns:
the epr of the new sg entry
Throws:
java.lang.Exception

addRegistryEntry

public org.oasisOpen.docs.wsrf.sg2.AddResponseDocument addRegistryEntry(org.w3.x2005.x08.addressing.EndpointReferenceType memberEpr)
                                                                 throws java.lang.Exception
add an entry to the registry (with no content)

Parameters:
memberEpr -
Returns:
Throws:
java.lang.Exception

listEntries

public java.util.List<org.oasisOpen.docs.wsrf.sg2.EntryType> listEntries()
                                                                  throws java.lang.Exception
lists all the entries in this local registry

Returns:
Throws:
java.lang.Exception

makeContent

public static org.oasisOpen.docs.wsrf.sg2.ContentType makeContent(org.apache.xmlbeans.XmlObject[] os)
make content suitable for publishing from an array of xml elements

Parameters:
os -
Returns:

makeContent

public static org.oasisOpen.docs.wsrf.sg2.ContentType makeContent(java.util.List<org.apache.xmlbeans.XmlObject> os)
make content suitable for publishing from a list of xml elements

Parameters:
os -
Returns:


Copyright © 2006-2010 Research Center Juelich. All Rights Reserved.