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

java.lang.Object
  extended by org.apache.muse.ws.dm.muws.impl.ComplexMatch
All Implemented Interfaces:
XmlSerializable, Match
Direct Known Subclasses:
AllMatch, AnyMatch

public abstract class ComplexMatch
extends Object
implements Match

ComplexMatch is an abstract class for any pbm:Match that supports subexpressions (sub-Matches). It provides all of the collection operations needed to store and evaluate the subexpressions but provides no default implementation for matches(Resource). Concrete subclasses must define how the Match's subexpressions are combined to evaluate another resource.

Author:
Dan Jemiolo (danj)

Constructor Summary
ComplexMatch(WsResource resource)
           
ComplexMatch(WsResource resource, Element xml)
           
 
Method Summary
 void addMatch(Match child)
           
 List getMatches()
           
protected abstract  QName getRootQName()
           
 WsResource getWsResource()
           
 void removeMatch(Match child)
           
 Element toXML()
          Converts this object into an XML representation, as defined by its related schema or specification.
 Element toXML(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
 
Methods inherited from interface org.apache.muse.ws.dm.muws.Match
matches
 

Constructor Detail

ComplexMatch

public ComplexMatch(WsResource resource)
Parameters:
resource - The resource that is defining the CorrelatableProperties capability and thus, this correlation expression.

ComplexMatch

public ComplexMatch(WsResource resource,
                    Element xml)
Parameters:
resource - The resource that is defining the CorrelatableProperties capability and thus, this correlation expression.
xml - The DOM Element representing the simple pbm:Match.
Method Detail

addMatch

public void addMatch(Match child)
Specified by:
addMatch in interface Match
Parameters:
child - A subexpression that must be evaluated as part of this larger expression.

getMatches

public List getMatches()
Specified by:
getMatches in interface Match
Returns:
An ordered list of subexpressions in this Match. If there are no subexpressions, the list is empty.

getRootQName

protected abstract QName getRootQName()
Returns:
The name of the XML element that defines the concrete match.

getWsResource

public WsResource getWsResource()
Specified by:
getWsResource in interface Match
Returns:
The local resource that is defining the CorrelatableProperties capability and, thus, this correlation expression.

removeMatch

public void removeMatch(Match child)
Specified by:
removeMatch in interface Match

toXML

public 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 Element toXML(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.


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.