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.impl
Class XPathCorrelation

    java.lang.Object
      org.apache.muse.ws.dm.muws.impl.XPathCorrelation

All Implemented Interfaces:
  Correlation, XmlSerializable

public class XPathCorrelation
extends java.lang.Object
implements Correlation

XPathCorrelation represents correlation expressions formatted in XPath 1.0.

Author:
  Dan Jemiolo (danj)

Constructor Summary
`XPathCorrelation(WsResource resource, org.w3c.dom.Element xml)`
`XPathCorrelation(WsResource resource, java.lang.String xpath)` This is a convenience constructor that calls this(Resource, String, boolean) with a 'false' third parameter.
`XPathCorrelation(WsResource resource, java.lang.String xpath, boolean negativeAssertion)`

Method Summary
`java.lang.String` | `getDialect()`
`WsResource` | `getWsResource()`
`java.lang.String` | `getXPath()`
`boolean` | `hasNegativeAssertion()`
`boolean` | `matches(EndpointReference epr)` This implementation performs a WS-RP QueryResourceProperties call against the given resource using its XPath value.
`void` | `setXPath(java.lang.String xpath)`
`org.w3c.dom.Element` | `toXML()` Converts this object into an XML representation, as defined by its related schema or specification.
`org.w3c.dom.Element` | `toXML(org.w3c.dom.Document doc)` Converts this object into an XML representation, as defined by its related schema or specification.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XPathCorrelation

    public XPathCorrelation(WsResource resource,
                            org.w3c.dom.Element xml)

Parameters:
  `resource` - The resource that is defining the CorrelatableProperties capability and, thus, this correlation.
  `xml` - The DOM Element representing an instance of CorrelatableProperties that uses the XPath 1.0 dialect.

### XPathCorrelation

    public XPathCorrelation(WsResource resource,
                            java.lang.String xpath)

  This is a convenience constructor that calls this(Resource, String, boolean) with a 'false' third parameter.

See Also:
  `XPathCorrelation(WsResource, String, boolean)`

### XPathCorrelation

    public XPathCorrelation(WsResource resource,
                            java.lang.String xpath,
                            boolean negativeAssertion)

Parameters:
  `resource` - The resource that is defining the CorrelatableProperties capability and, thus, this correlation.
  `xpath` - The XPath 1.0 expression that should be used to evaluate other resources.
  `negativeAssertion` - True if this correlation guarantees that a false match equates to two resources being different.

Method Detail

### getDialect

    public java.lang.String getDialect()

  Specified by:
    `getDialect` in interface `Correlation`
  Returns:
    The XPath 1.0 namespace URI.

### getWsResource

    public WsResource getWsResource()

  Specified by:
    `getWsResource` in interface `Correlation`
  Returns:
    The local resource that is defining the CorrelatableProperties capability and, thus, this correlation expression.

### getXPath

    public java.lang.String getXPath()

  Returns:
    The XPath expression to evaluate against other resources' WS-RP collections.

### hasNegativeAssertion

    public boolean hasNegativeAssertion()

  Specified by:
    `hasNegativeAssertion` in interface `Correlation`
  Returns:
    True if there is a guarantee that two resources are not the same when matches(Resource) returns 'false'. If this method returns 'false', the caller must rely on some other means to confirm that the resources are, in fact, different.

### matches

    public boolean matches(EndpointReference epr)
                    throws SoapFault

  This implementation performs a WS-RP QueryResourceProperties call against the given resource using its XPath value. If the expression results in either a) a Boolean value of 'true' or b) a non-Boolean that is not null (or not empty), then this method returns 'true'.

  Specified by:
    `matches` in interface `Correlation`
  Parameters:
    `epr` - The EPR of another resource which may be the same as this resource.
  Returns:
    True if the two resources are the same according to their WSDM ResourceId values or their WSDM CorrelatableProperties expressions. Note that if the method returns 'false', this does not guarantee that the two resources are actually different - you can only confirm this by checking with the hasNegativeAssertions() method.
  Throws:
    `SoapFault` -
    - If there is a problem reading the correlatable properties from either resource.
    - If the values or dialects of the correlatable properties are not supported. The built-in dialects are WSDM Property Boolean Match (PBM) and XPath 1.0.
  See Also:
    `Correlation.hasNegativeAssertion()`

### setXPath

    public void setXPath(java.lang.String xpath)

  Parameters:
    `xpath` - The XPath 1.0 expression that should be used to evaluate other resources.

### toXML

    public org.w3c.dom.Element toXML()

  Description copied from interface: `XmlSerializable`
  Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

  Specified by:
    `toXML` in interface `XmlSerializable`
  Returns:
    An XML representation of this object.

### toXML

    public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)

  Description copied from interface: `XmlSerializable`
  Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

  Specified by:
    `toXML` in interface `XmlSerializable`
  Parameters:
    `doc` - The DOM Document that will be used to create all of the nodes in the resulting XML fragment.
  Returns:
    An XML representation of this object.

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