© 2002 BEA Systems, Inc.


com.bea.p13n.content
Class ContentQuery

java.lang.Object
  |
  +--com.bea.p13n.content.ContentQueryBase
        |
        +--com.bea.p13n.content.ContentQuery

public class ContentQuery
extends ContentQueryBase

A utility class to construct a content query string expression from a <contentQuery> XML Element.

This can also handle filling-out the expression with a user/request/session properties from a PropertyProvider.

See Also:
ExpressionHelper

Fields inherited from class com.bea.p13n.content.ContentQueryBase
collectionContentQueriesAllowed, dateFormat, dateFormatStr, TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_LONG, TYPE_STRING
 
Constructor Summary
ContentQuery(PropertyProvider pp)
          Constructor.
 
Method Summary
 java.lang.String createExpression(org.w3c.dom.Element root)
          Return a String representing the expression rooted at the passed in element.
 Expression createExpressionTree(org.w3c.dom.Element root)
          Return the content Expression represeting the expression root at the passed in element.
static java.lang.String getCharacterData(org.w3c.dom.Element e)
           
static org.w3c.dom.Document parse(org.xml.sax.InputSource src)
          Perform a non-validating parse on the specified input source.
 
Methods inherited from class com.bea.p13n.content.ContentQueryBase
getISO8601Date, getLogic, getOperator, getType, getValueAsType, isCollectionContentQueriesAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentQuery

public ContentQuery(PropertyProvider pp)
Constructor.

Parameters:
pp - the PropertyProvider to use to provider user/request/session properties.
Method Detail

parse

public static org.w3c.dom.Document parse(org.xml.sax.InputSource src)
                                  throws org.xml.sax.SAXException,
                                         java.io.IOException
Perform a non-validating parse on the specified input source.

createExpressionTree

public Expression createExpressionTree(org.w3c.dom.Element root)
                                throws java.lang.IllegalArgumentException
Return the content Expression represeting the expression root at the passed in element.

createExpression

public java.lang.String createExpression(org.w3c.dom.Element root)
                                  throws java.lang.IllegalArgumentException
Return a String representing the expression rooted at the passed in element.

Parameters:
root - The root Element <contentQuery> of an expression
Returns:
a string representing the query.
Throws:
java.lang.IllegalArgumentException - if the content of the passed in XML tree is invalid.

getCharacterData

public static java.lang.String getCharacterData(org.w3c.dom.Element e)
                                         throws java.lang.IllegalArgumentException

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved