org.apache.lucene.gdata.search.analysis
Class Indexable<R extends Node,I extends ServerBaseEntry>
java.lang.Object
org.apache.lucene.gdata.search.analysis.Indexable<R,I>
- Type Parameters:
R
- -
a subtype of Node
returned by the applyPath
methodI
- -
a subtype of ServerBaseEntry
- Direct Known Subclasses:
- DomIndexable
public abstract class Indexable<R extends Node,I extends ServerBaseEntry>
- extends Object
This class wraps the access to the GData entities to access them via xpath
expressions. An arbitrary valid Xpath expression can be passed to the
applyPath method to access an element, attribute etc. in the gdata
entity.
- Author:
- Simon Willnauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
applyAble
protected ServerBaseEntry applyAble
applyPath
public abstract R applyPath(String xPath)
throws javax.xml.xpath.XPathExpressionException
- Parameters:
xPath
- -
a valid xpath expression
- Returns:
- - the requested element R
- Throws:
javax.xml.xpath.XPathExpressionException
getIndexable
public static <R extends Node,I extends ServerBaseEntry> Indexable<R,I> getIndexable(I entry)
throws NotIndexableException
- Factory method to create new Indexable instances.
- Type Parameters:
R
- -
a subtype of Node
returned by the
applyPath methodI
- -
a subtype of
ServerBaseEntry
- Parameters:
entry
- -
the entry to wrap in a Indexable
- Returns:
- - a new instance of Indexable to access the entry via
Xpath
- Throws:
NotIndexableException
- - if I can not be parsed.
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.