<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16546" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=390531001-15102007>
<DIV dir=ltr align=left><SPAN class=390531001-15102007><FONT face=Verdana 
color=#000080 size=2>It's a shame you need to use reflection to find out the 
members surrounding a cell. It seems like there is not enough information in the 
Cell interface to deduce the members, so that's something we should fix, because 
other applications would need the same thing.&nbsp;Suppose I add a new method 
'List&lt;Integer&gt; Cell.getOrdinateList()' - then you could use each 
coordinate to get the corresponding axis position, hence its members. Would that 
be sufficient for your purposes?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390531001-15102007><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV><FONT face=Verdana><FONT 
color=#000080><FONT size=2>But the other extensions all sound natural and 
reasonable. Adding layers of wrapper classes is common on modern software 
engineering. It can be a little convoluted, but the value is that the underlying 
system (in this case mondrian) is not customized for each application. Instead, 
you are using the wrappers to create a read-only view which presents the data 
the way the application needs it.</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390531001-15102007><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=390531001-15102007><FONT face=Verdana 
color=#000080 size=2>I hope you can see why I making 'RolapResult axes' 
non-final is a significant change - it's another moving part, and another 
potential pitfall to add a bug to mondrian.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=390531001-15102007><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=390531001-15102007><FONT face=Verdana 
color=#000080 size=2>Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> mondrian-bounces@pentaho.org 
  [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Ajit Vasudeo 
  Joglekar<BR><B>Sent:</B> Wednesday, October 10, 2007 11:53 PM<BR><B>To:</B> 
  Mondrian developer mailing list<BR><B>Subject:</B> RE: [Mondrian] Proposal for 
  adding result post processorextension tospi<BR></FONT><BR></DIV>
  <DIV></DIV><BR><FONT face=sans-serif size=2>Julian,</FONT> <BR><BR><FONT 
  face=sans-serif size=2>We are using XMLA in the deployment scenario. This is 
  what we have done to post process the rolap result in xmla pipeline</FONT> 
  <BR><BR><FONT face=sans-serif size=2>- Extend XmlaServlet</FONT> <BR><FONT 
  face=sans-serif size=2>&nbsp; &nbsp; &nbsp; &nbsp; Override "protected 
  XmlaHandler getXmlaHandler()" to return our own XmlaHandler</FONT> 
  <BR><BR><FONT face=sans-serif size=2>- Extend XmlaHandler</FONT> <BR><FONT 
  face=sans-serif size=2>&nbsp; &nbsp; &nbsp; &nbsp; Override "protected 
  Connection getConnection(final DataSourcesConfig.Catalog catalog, final Role 
  role, final String roleName) throws XmlaException" to return our own 
  RolapConnection</FONT> <BR><BR><FONT face=sans-serif size=2>- Implement 
  Connection, delegate to RolapConnection</FONT> <BR><FONT face=sans-serif 
  size=2>&nbsp; &nbsp; &nbsp; &nbsp; Wrap "public Result execute(Query query)" 
  to return our own Result. Delegate all other method calls to RolapConnection. 
  </FONT><BR><BR><BR><FONT face=sans-serif size=2>- Extend ResultBase to do the 
  Result post processing as required. Use in the Connection execute 
  method</FONT> <BR><BR><FONT face=sans-serif size=2>- Define the classes that 
  need to access RolapCell (package visibility) in package mondrian.rolap</FONT> 
  <BR><BR><FONT face=sans-serif size=2>- Use reflection to invoke getMembers on 
  RolapCell. Required to determine whether the cell value is a result of literal 
  calculated member evaluation</FONT> <BR><BR><BR><FONT face=sans-serif 
  size=2>This takes care of the post processing the result in Xmla pipeline. We 
  also use Mdx servlet in our development setup for simplifying the development 
  cycle. We will need to handle the post processing separately for this</FONT> 
  <BR><BR><BR><FONT face=sans-serif size=2>In the post I mentioned about 
  removing final</FONT> <BR><BR><FONT face=sans-serif size=2>&nbsp; &nbsp; 
  &nbsp; &nbsp; protected final Axis[] axes; // remove final </FONT><BR><FONT 
  face=sans-serif size=2>&nbsp; &nbsp; &nbsp; &nbsp; </FONT><BR><FONT 
  face=sans-serif size=2>This is not required</FONT> <BR><BR><BR><FONT 
  face=sans-serif size=2>It doesn't feel very clean the way we have made changes 
  from the end of the xmla processing pipeline, added the new classes in 
  mondrian.rolap package and used reflection in one case. It will be much 
  simpler and cleaner if we could intercept the result and change visibility, 
  accessibility of few things. Hence the proposal. </FONT><BR><BR><BR><FONT 
  face=sans-serif size=2>-Ajit</FONT></BLOCKQUOTE></BODY></HTML>