Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.muse.ws.dm.muws
Interface Relationships

All Superinterfaces:
  Capability, Initialization, InitializationParameters, ManageabilityCapability, Shutdown, WsResourceCapability, org.apache.muse.ws.resource.WsResourceCapabilityProperties

All Known Implementing Classes:
  SimpleRelationships

public interface Relationships
extends ManageabilityCapability

Relationships is an interface that represents the WSDM Relationships capability. It provides access to the capability's one resource property (muws2:Relationship) as well as methods for creating, destroying, and querying relationships.
The QueryRelationshipsByType operation is exposed here and can be exposed using the resource's WSDL. The other methods are for internal relationship management and should not be made public. If one desires to make the creation or manipulation of relationships possible through public APIs, he should do so as a side effect of another operation; that is, the generic methods for manipulation all relationships should remain private, while individual relationships may be altered using operations created specifically for that purpose.

Author:
  Dan Jemiolo (danj)

Field Summary
`static QName[]` | `PROPERTIES`

Method Summary
`WsResource` | `addRelationship(java.lang.String name, RelationshipType type, Participant[] participants)` Creates a new Relationship resource with the given values, adds it to the ResourceManager and the participant resources' WS-RP container, and returns it to the caller.
`WsResource[]` | `getRelationship()`
`WsResource[]` | `queryRelationshipsByType(QName[] types)` This method is defined by MUWS Part 2 in order to optimize the query of a resource property that will often have a large number of instances (which would make XPath-like queries and catch-all Get requests a performance bottleneck).
`void` | `removeRelationship(WsResource relationship)` Deletes the RelationshipResource from the owner's WS-RP container.

Methods inherited from interface org.apache.muse.ws.resource.WsResourceCapability
`deleteProperty, getProperty, getPropertyNames, getWsResource, insertProperty, updateProperty`

Methods inherited from interface org.apache.muse.core.Capability
`getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource`

Methods inherited from interface org.apache.muse.core.Initialization
`hasBeenInitialized, initialize`

Methods inherited from interface org.apache.muse.core.InitializationParameters
`getInitializationParameter, getInitializationParameters, setInitializationParameters`

Methods inherited from interface org.apache.muse.core.Shutdown
`hasBeenShutdown, shutdown`

Field Detail

### PROPERTIES

    public static final QName[] PROPERTIES

Method Detail

### addRelationship

    public WsResource addRelationship(java.lang.String name,
                                      RelationshipType type,
                                      Participant[] participants)
                               throws BaseFault

  Creates a new Relationship resource with the given values, adds it to the ResourceManager and the participant resources' WS-RP container, and returns it to the caller.

  Parameters:
    `name` - The descriptive name of the new relationship.
    `type` - The XSD-defined type of the new relationship.
    `participants` - The participant resources for the relationship. The array must have a length of at least 2.
  Returns:
    The newly-created (and stored) Relationship resource.
  Throws:
    `BaseFault` -
    - If there was an error during the initialization of the Relationship resource instance.
    - If there was an error inserting into the participant's WS-RP container.

### getRelationship

    public WsResource[] getRelationship()
                                 throws BaseFault

  Returns:
    The resources that represent the relationships this resource participates in. This is also the muws2:Relationship property. The implementation of this capability must provide a means of converting the WsResource objects into the proper XML format for WSRP clients.
  Throws:
    `BaseFault`

### queryRelationshipsByType

    public WsResource[] queryRelationshipsByType(QName[] types)
                                          throws BaseFault

  This method is defined by MUWS Part 2 in order to optimize the query of a resource property that will often have a large number of instances (which would make XPath-like queries and catch-all Get requests a performance bottleneck). The functional equivalent of this call would be WS-RP QueryResourceProperties with an XPath query that tries to match the value of the relationship's muws2:Type field.

  Parameters:
    `types` - The names of the types of relationships that should be returned by the query processor.
  Returns:
    An array of resources that can be used to manipulate the relationships that match the query. The array may be empty.
  Throws:
    `BaseFault`

### removeRelationship

    public void removeRelationship(WsResource relationship)
                            throws BaseFault

  Deletes the RelationshipResource from the owner's WS-RP container.

  Parameters:
    `relationship` -
  Throws:
    `BaseFault`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD