|
Qizx fe-4.4p2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.qizx.api.XQuerySessionManager
public class XQuerySessionManager
Manager of simple XQuery sessions without access to a XML Library.
Provides a cache of Modules and a cache of transient documents, shared among the sessions created on this manager. This cache avoids reparsing XML documents if different sessions access it. It can detect a change on documents stored in the file-system and reload the document.
Constructor Summary | |
---|---|
XQuerySessionManager(ModuleResolver moduleResolver,
int transientDocumentCacheSize)
Creates a session manager. |
|
XQuerySessionManager(URL moduleBaseURI)
Creates a session manager with a default Module Resolver and a default cache for parsed documents. |
Method Summary | |
---|---|
static void |
bind(XQuerySession session,
String prefix,
Class classe)
|
boolean |
configure(Configuration.Property property,
Object value)
Configures a XQuerySessionManager with a Property. |
void |
configure(Map<Configuration.Property,Object> setup)
(Internal use) |
void |
configure(Properties properties)
Configures a XQuerySessionManager with a set of properties. |
XQuerySession |
createSession()
Creates a new XQuery session. |
XQuerySession |
findSession(int id)
Finds a session by its public identifier. |
Map<Configuration.Property,Object> |
getConfiguration()
Gets the current configuration properties of the Session Manager. |
com.qizx.xdm.DocumentPool |
getDocumentCache()
For internal use. |
FullTextFactory |
getFullTextFactory()
|
com.qizx.xquery.ModuleManager |
getModuleManager()
For internal use. |
ModuleResolver |
getModuleResolver()
Returns the current Resolver of XQuery modules. |
long |
getTransientDocumentCacheSize()
Gets the current maximum memory size for the document cache. |
List<XQuerySession> |
listSessions()
|
void |
setDocumentCache(com.qizx.xdm.DocumentPool documentCache)
For internal use. |
void |
setFullTextFactory(FullTextFactory factory)
|
void |
setModuleResolver(ModuleResolver resolver)
Defines a resolver of XQuery modules. |
long |
setTransientDocumentCacheSize(long size)
Sets the maximum memory size for the document cache. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XQuerySessionManager(URL moduleBaseURI)
Attention: this method does not inherit setup from
Configuration
. It is likely to be deprecated in the future.
moduleBaseURI
- base URI for the default Module Resolverpublic XQuerySessionManager(ModuleResolver moduleResolver, int transientDocumentCacheSize)
Attention: this method does not inherit setup from
Configuration
. It is likely to be deprecated in the future.
moduleResolver
- resolver used for modulestransientDocumentCacheSize
- size in bytes of the document cacheMethod Detail |
---|
public Map<Configuration.Property,Object> getConfiguration()
public void configure(Properties properties) throws QizxException
properties
- a set of properties. Recognized properties are:
QizxException
- When one or several invalid property values are specified. An invalid value does not prevent valid properties to be taken into account.
public void configure(Map<Configuration.Property,Object> setup) throws Exception
Exception
public boolean configure(Configuration.Property property, Object value) throws Exception
property
- a Property. Recognized properties are:
Configuration.TRANSIENT_DOCUMENT_CACHE_SIZE
": the value must represent
an integer number of bytes. This is equivalent to calling
setTransientDocumentCacheSize.
Configuration.CONTENT_IMPORTERS
": a comma-separated list of classes
that can be used for importing miscellaneous content formats into an
XML Library. These classes must implement ContentImporter.
value
- see each Property
Exception
public XQuerySession createSession()
public List<XQuerySession> listSessions()
public XQuerySession findSession(int id)
id
- a public identifier returned by XQuerySession.getIdentifier()
.
public com.qizx.xquery.ModuleManager getModuleManager()
public long setTransientDocumentCacheSize(long size)
size
- maximum memory size in bytes. Decreasing this size will
flush the cache accordingly.
public long getTransientDocumentCacheSize()
public com.qizx.xdm.DocumentPool getDocumentCache()
public void setDocumentCache(com.qizx.xdm.DocumentPool documentCache)
public void setModuleResolver(ModuleResolver resolver)
resolver
- a module resolverpublic ModuleResolver getModuleResolver()
public FullTextFactory getFullTextFactory()
public void setFullTextFactory(FullTextFactory factory)
public static void bind(XQuerySession session, String prefix, Class classe)
|
© 2010 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |