org.openspml.v2.profiles.dsml
Class FilterItem

java.lang.Object
  extended byorg.openspml.v2.profiles.dsml.FilterItem
All Implemented Interfaces:
DSMLUnmarshaller.Parseable
Direct Known Subclasses:
FilterSet, org.openspml.v2.profiles.dsml.NamedFilterItem, Not

public abstract class FilterItem
extends java.lang.Object
implements DSMLUnmarshaller.Parseable

This is a starter class that denotes a type to restrict setters on this package.

Each of the classes representing the typed elements of this this choice, e.g. "and" - which is a descendant of "FilterSet", will implement this interface.

 <xsd:group name="FilterGroup">
     <xsd:sequence>
         <xsd:choice>
             <xsd:element name="and" type="FilterSet"/>
             <xsd:element name="or" type="FilterSet"/>
             <xsd:element name="not" type="Filter"/>
             <xsd:element name="equalityMatch" type="AttributeValueAssertion"/>
             <xsd:element name="substrings" type="SubstringFilter"/>
             <xsd:element name="greaterOrEqual" type="AttributeValueAssertion"/>
             <xsd:element name="lessOrEqual" type="AttributeValueAssertion"/>
             <xsd:element name="present" type="AttributeDescription"/>
             <xsd:element name="approxMatch" type="AttributeValueAssertion"/>
             <xsd:element name="extensibleMatch" type="MatchingRuleAssertion"/>
         </xsd:choice>
     </xsd:sequence>
 </xsd:group>
 


Constructor Summary
protected FilterItem()
           
 
Method Summary
abstract  void accept(FilterItemVisitor visitor)
           
protected  java.util.Map convertAttrsToMap(DSMLAttr[] attrs)
          We want to just deal with Maps of String to List of Strings.
 boolean matches(DSMLAttr[] attrs)
           
 boolean matches(java.util.Map attrs)
           
abstract  void parseXml(DSMLUnmarshaller um, java.lang.Object e)
           
protected abstract  void toXML(XmlBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterItem

protected FilterItem()
Method Detail

toXML

protected abstract void toXML(XmlBuffer buffer)
                       throws DSMLProfileException
Throws:
DSMLProfileException

parseXml

public abstract void parseXml(DSMLUnmarshaller um,
                              java.lang.Object e)
                       throws DSMLProfileException
Specified by:
parseXml in interface DSMLUnmarshaller.Parseable
Throws:
DSMLProfileException

convertAttrsToMap

protected java.util.Map convertAttrsToMap(DSMLAttr[] attrs)
We want to just deal with Maps of String to List of Strings. You can override this to deal with other types if you'd like, but the matches() methods are implemented expecting List as the value in the Map.

Parameters:
attrs -
Returns:
A Map of attrName->List of valueStrings (often 1)

matches

public final boolean matches(DSMLAttr[] attrs)
                      throws DSMLProfileException
Throws:
DSMLProfileException

matches

public boolean matches(java.util.Map attrs)
                throws DSMLProfileException
Throws:
DSMLProfileException

accept

public abstract void accept(FilterItemVisitor visitor)
                     throws DSMLProfileException
Throws:
DSMLProfileException


Copyright © Sun Microsystems, Inc. All Rights Reserved.