|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.xmla.XmlaUtil
public class XmlaUtil
Utility methods for XML/A implementation.
| Nested Class Summary | |
|---|---|
static class |
XmlaUtil.ElementNameEncoder
|
static class |
XmlaUtil.MetadataRowset
Result of a metadata query. |
static class |
XmlaUtil.Wildcard
Wrapper which indicates that a restriction is to be treated as a SQL-style wildcard match. |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
XmlaUtil()
|
|
| Method Summary | |
|---|---|
static Enumeration.ResponseMimeType |
chooseResponseMimeType(String accept)
Chooses the appropriate response mime type given an HTTP "Accept" header. |
static void |
element2Text(Element elem,
StringWriter writer)
|
static Element[] |
filterChildElements(Element parent,
String ns,
String lname)
|
static XmlaUtil.MetadataRowset |
getMetadataRowset(OlapConnection connection,
String methodName,
Map<String,Object> restrictionMap)
Returns a set of column headings and rows for a given metadata request. |
static String |
normalizeNumericString(String numericStr)
Corrects for the differences between numeric strings arising because JDBC drivers use different representations for numbers ( Double vs. |
static Throwable |
rootThrowable(Throwable throwable)
Finds root MondrianException in exception chain if exists, otherwise the input throwable. |
static boolean |
shouldEmitInvisibleMembers(XmlaRequest request)
Returns whether an XMLA request should return invisible members. |
static Element |
stream2Element(InputStream stream)
|
static Element |
text2Element(String text)
|
static String |
textInElement(Element elem)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlaUtil()
| Method Detail |
|---|
public static void element2Text(Element elem,
StringWriter writer)
throws XmlaException
XmlaException
public static Element text2Element(String text)
throws XmlaException
XmlaException
public static Element stream2Element(InputStream stream)
throws XmlaException
XmlaException
public static Element[] filterChildElements(Element parent,
String ns,
String lname)
public static String textInElement(Element elem)
public static Throwable rootThrowable(Throwable throwable)
throwable - Exception
public static String normalizeNumericString(String numericStr)
Double vs. BigDecimal) and
these have different toString() behavior.
If it contains a decimal point, then strip off trailing '0's. After stripping off the '0's, if there is nothing right of the decimal point, then strip off decimal point.
numericStr - Numeric string
public static XmlaUtil.MetadataRowset getMetadataRowset(OlapConnection connection,
String methodName,
Map<String,Object> restrictionMap)
throws OlapException
connection - ConnectionmethodName - Metadata method name per XMLA (e.g. "MDSCHEMA_CUBES")restrictionMap - Restrictions
OlapExceptionpublic static Enumeration.ResponseMimeType chooseResponseMimeType(String accept)
The header can contain a list of mime types and optional qualities, for example "text/html,application/xhtml+xml,application/xml;q=0.9"
accept - Accept header
public static boolean shouldEmitInvisibleMembers(XmlaRequest request)
According to the XMLA spec, it should not. But we allow the client to specify different behavior. In particular, the olap4j driver for XMLA may need to access invisible members.
Returns true if the EmitInvisibleMembers property is specified and equal to "true".
request - XMLA request
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||