org.apache.muse.ws.dm.muws.impl
Class XPathCorrelation

java.lang.Object
  extended by org.apache.muse.ws.dm.muws.impl.XPathCorrelation
All Implemented Interfaces:
XmlSerializable, Correlation

public class XPathCorrelation
extends Object
implements Correlation

XPathCorrelation represents correlation expressions formatted in XPath 1.0.

Author:
Dan Jemiolo (danj)

Constructor Summary
XPathCorrelation(WsResource resource, Element xml)
           
XPathCorrelation(WsResource resource, String xpath)
          This is a convenience constructor that calls this(Resource, String, boolean) with a 'false' third parameter.
XPathCorrelation(WsResource resource, String xpath, boolean negativeAssertion)
           
 
Method Summary
 String getDialect()
           
 WsResource getWsResource()
           
 String getXPath()
           
 boolean hasNegativeAssertion()
           
 boolean matches(org.apache.muse.ws.addressing.EndpointReference epr)
          

This implementation performs a WS-RP QueryResourceProperties call against the given resource using its XPath value.
 void setXPath(String xpath)
           
 Element toXML()
           
 Element toXML(Document doc)
           
 
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,
                        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,
                        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,
                        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 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

getXPath

public String getXPath()
Returns:
The XPath expression to evaluate against other resources' WS-RP collections.

hasNegativeAssertion

public boolean hasNegativeAssertion()
Specified by:
hasNegativeAssertion in interface Correlation

matches

public boolean matches(org.apache.muse.ws.addressing.EndpointReference epr)
                throws org.apache.muse.ws.addressing.soap.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
Throws:
org.apache.muse.ws.addressing.soap.SoapFault

setXPath

public void setXPath(String xpath)
Parameters:
xpath - The XPath 1.0 expression that should be used to evaluate other resources.

toXML

public Element toXML()
Specified by:
toXML in interface XmlSerializable

toXML

public Element toXML(Document doc)
Specified by:
toXML in interface XmlSerializable


Copyright © 2013 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.