public class SearchManager extends Object implements SynchronousEventListener
Modifier and Type | Field and Description |
---|---|
static String |
NS_FN_OLD_URI |
static String |
NS_FN_URI |
static String |
NS_XS_URI |
Constructor and Description |
---|
SearchManager(String workspace,
RepositoryContext repositoryContext,
QueryHandlerFactory qhf,
SharedItemStateManager itemMgr,
PersistenceManager pm,
NodeId rootNodeId,
SearchManager parentMgr,
NodeId excludedNodeId)
Creates a new
SearchManager . |
Modifier and Type | Method and Description |
---|---|
void |
close()
|
javax.jcr.query.Query |
createQuery(SessionContext sessionContext,
String statement,
String language,
javax.jcr.Node node)
Creates a query object that can be executed on the workspace.
|
protected AbstractQueryImpl |
createQueryInstance()
Creates a new instance of an
AbstractQueryImpl which is not
initialized. |
javax.jcr.query.qom.QueryObjectModel |
createQueryObjectModel(SessionContext sessionContext,
QueryObjectModelTree qomTree,
String langugage,
javax.jcr.Node node)
Creates a query object model that can be executed on the workspace.
|
QueryHandler |
getQueryHandler() |
Iterable<NodeId> |
getWeaklyReferringNodes(NodeId id)
Returns the ids of the nodes that refer to the node with
id
by weak references. |
void |
onEvent(javax.jcr.observation.EventIterator events) |
public static final String NS_FN_URI
public static final String NS_FN_OLD_URI
public static final String NS_XS_URI
public SearchManager(String workspace, RepositoryContext repositoryContext, QueryHandlerFactory qhf, SharedItemStateManager itemMgr, PersistenceManager pm, NodeId rootNodeId, SearchManager parentMgr, NodeId excludedNodeId) throws javax.jcr.RepositoryException
SearchManager
.workspace
- the workspace namerepositoryContext
- the repository contextqhf
- the query handler factoryitemMgr
- the shared item state manager.pm
- the underlying persistence manager.rootNodeId
- the id of the root node.parentMgr
- the parent search manager or null
if
there is no parent search manager.excludedNodeId
- id of the node that should be excluded from
indexing. Any descendant of that node will also be
excluded from indexing.javax.jcr.RepositoryException
- if the search manager cannot be initializedpublic void close()
public javax.jcr.query.Query createQuery(SessionContext sessionContext, String statement, String language, javax.jcr.Node node) throws javax.jcr.query.InvalidQueryException, javax.jcr.RepositoryException
sessionContext
- component context of the current sessionstatement
- the actual query statement.language
- the syntax of the query statement.node
- a nt:query node where the query was read from or
null
if it is not a stored query.Query
instance to execute.javax.jcr.query.InvalidQueryException
- if the query is malformed or the
language
is unknown.javax.jcr.RepositoryException
- if any other error occurs.public javax.jcr.query.qom.QueryObjectModel createQueryObjectModel(SessionContext sessionContext, QueryObjectModelTree qomTree, String langugage, javax.jcr.Node node) throws javax.jcr.query.InvalidQueryException, javax.jcr.RepositoryException
sessionContext
- component context of the current sessionqomTree
- the query object model tree, representing the query.langugage
- the original language of the query statement.node
- a nt:query node where the query was read from or
null
if it is not a stored query.javax.jcr.query.InvalidQueryException
- the the query object model tree is
considered invalid by the query handler
implementation.javax.jcr.RepositoryException
- if any other error occurs.public Iterable<NodeId> getWeaklyReferringNodes(NodeId id) throws javax.jcr.RepositoryException, IOException
id
by weak references.id
- the id of the target node.javax.jcr.RepositoryException
- if an error occurs.IOException
- if an error occurs while reading from the
index.public QueryHandler getQueryHandler()
public void onEvent(javax.jcr.observation.EventIterator events)
onEvent
in interface javax.jcr.observation.EventListener
protected AbstractQueryImpl createQueryInstance() throws javax.jcr.RepositoryException
AbstractQueryImpl
which is not
initialized.javax.jcr.RepositoryException
- if an error occurs while creating a new query
instance.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.