|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmondrian.spi.impl.FilterDynamicSchemaProcessor
public class FilterDynamicSchemaProcessor
Implementation of DynamicSchemaProcessor
which allows a derived class
to easily process a schema file.
Mondrian's default mechanism for loading schema files, if no DynamicSchemaProcessor is specified, is to use Apache VFS (virtual file system) to resolve the URL to a stream, and to read the contents of the stream into a string.
FilterDynamicSchemaProcessor implements exactly the same mechanism, but makes it easy for a derived class to override the mechanism. For example:
processSchema(String, mondrian.olap.Util.PropertyList)
method.
filter(String, mondrian.olap.Util.PropertyList, java.io.InputStream)
method.
Constructor Summary | |
---|---|
FilterDynamicSchemaProcessor()
|
Method Summary | |
---|---|
protected java.lang.String |
filter(java.lang.String schemaUrl,
Util.PropertyList connectInfo,
java.io.InputStream stream)
Reads the contents of a schema as a stream and returns the result as a string. |
java.lang.String |
processSchema(java.lang.String schemaUrl,
Util.PropertyList connectInfo)
Modifies a Mondrian schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterDynamicSchemaProcessor()
Method Detail |
---|
public java.lang.String processSchema(java.lang.String schemaUrl, Util.PropertyList connectInfo) throws java.lang.Exception
An implementation should generally interpret the URL string as an Apache VFS (virtual file system) URL.
FilterDynamicSchemaProcessor's implementation of this method reads
from the URL supplied (that is, it does not perform URL translation)
and passes it through the filter(java.lang.String, mondrian.olap.Util.PropertyList, java.io.InputStream)
method.
processSchema
in interface DynamicSchemaProcessor
schemaUrl
- the URL of the catalogconnectInfo
- Connection properties
java.lang.Exception
- if an error occursprotected java.lang.String filter(java.lang.String schemaUrl, Util.PropertyList connectInfo, java.io.InputStream stream) throws java.lang.Exception
The default implementation returns the contents of the schema unchanged.
schemaUrl
- the URL of the catalogconnectInfo
- Connection propertiesstream
- Schema contents represented as a stream
java.lang.Exception
- if an error occurs
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |