Code Monkey home page Code Monkey logo

pivot4j's Introduction

mysticfall's github stats

pivot4j's People

Contributors

d-amelin avatar glauberalmeida avatar hiberus-os avatar mysticfall avatar ohierro avatar piersharding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pivot4j's Issues

Implement JPivot's 'logical mdx' feature

From the JavaDoc API description :

/**

  • JPivot by default converts MDX from a logical to a physical representation
  • of the metadata after an expansion, from "all children" to a list of
  • the specific children. If one wants to save the query, having the query
  • represent the current state of the data, the physical state, may mean
  • that the saved query will not execute at some future date because children
  • and come and go.
    */
    static final String LOGICAL_MDX_PROP = "com.tonbeller.jpivot.mondrian.logical.mdx";

Improve the query transform API

(1) Create a common parent class for axis transformations (i.e. PlaceMembersOnAxes, PlaceHierarchiesOnAxes).

It will help users to implement their own trasnform class which modifies MDX expressions on axes.

(2) Need findVisibleMembers method equivalent for hierarchies.

(3) Support partial modification of hierarchies and members on axis. Currently, to add a hierarchy on an axis for example, one need to manipulate all the existing members on that axis and change the axis expression as a whole.

(4) Add PlaceLevelsOnAxes transform

NPE on PivotModel.restoreState

Invoke to PivotModel.restoreState sometimes fails with the following exception :

java.lang.NullPointerException
at com.eyeq.pivot4j.query.Quax.restoreState(Quax.java:2788)
at com.eyeq.pivot4j.query.QueryAdapter.restoreState(QueryAdapter.java:1016)
at com.eyeq.pivot4j.impl.PivotModelImpl.restoreState(PivotModelImpl.java:812)
at com.eyeq.kona.web.ui.olap.PivotGridHandler.createModel(PivotGridHandler.java:165)
at com.eyeq.kona.web.ui.olap.PivotGridHandler.getDimensions(PivotGridHandler.java:602)
at sun.reflect.GeneratedMethodAccessor380.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:83)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
at org.apache.el.parser.AstEmpty.getValue(AstEmpty.java:45)
at org.apache.el.parser.AstNot.getValue(AstNot.java:42)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
at org.richfaces.component.UITree.processDecodes(UITree.java:472)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIForm.processDecodes(UIForm.java:209)
at org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:400)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:240)
at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:417)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.xebia.servlet.filter.ExpiresFilter.doFilter(ExpiresFilter.java:1243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.blogspot.java4it.commons.filters.gzip.GZipFilter.doFilter(GZipFilter.java:114)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.eyeq.kona.web.filter.WelcomePageFilter.doFilter(WelcomePageFilter.java:67)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter.doFilterHttp(AbstractPreAuthenticatedProcessingFilter.java:69)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.eyeq.kona.web.filter.SessionConfigurationFilter.doFilter(SessionConfigurationFilter.java:291)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:722)

Need more flexible way to configure factory classes

We need more flexible way to configure factory classes for various parts of the core API(i.e. Transform, ExpressionEvaluator, SortMode, UICommand, etc).

We can use the service extension SPI(look up via java.util.ServiceLoader), but it need to be able to save and restore its state via #42.

Client-side calculated measure support.

With the new Aggregator API(#44) combined with the expression language support(#37), we can support client side calculated (or virtual) measure which would provide users much more versatility than the server side alternative.

Provide convenient methods for ordering members

Provide convenient methods for ordering members.

For example, when implementing a GUI which lets users to order members in a placed hierarchy on an axis, one needs to find out which member can be moved up or down, and also needs to move the whole descendants along with the member itself.

We need to make this kind of operations easier by adding appropriate helper methods in the PlaceMembersOnAxes transform.

Need a way to mark members which does not include all of their children.

If user has excluded some members from a parent member, it would be confusing if the aggregated value of measure of its remaining children does not add up to that of parent.

So in this case we need to provide a hint to UI implementation whether a member node contains all of its children or not.

Incorrect table layout when member levels are not contiguous

Incorrect table layout is generated when member levels are not contiguous.

Test MDX :

SELECT {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON COLUMNS, CrossJoin({[Promotion Media].[All Media]}, {[Product].[All Products], [Product].[Drink], [Product].[Drink].[Beverages].[Carbonated Beverages], [Product].[Drink].[Beverages].[Drinks], [Product].[Drink].[Beverages].[Hot Beverages], [Product].[Drink].[Beverages].[Pure Juice Beverages], [Product].[Food], [Product].[Non-Consumable]}) ON ROWS FROM [Sales] WHERE [Time].[1997]

Duplicate Order function generated when the original MDX already contains one.

Duplicate Order() function is generated when the original MDX already contains one.

JPivot only handles the case when the Order function is added by calling sort() method. While this is not a big problem for JPivot as it lacks saving feature, it's a major issue when saving is involved since everytime the model is loaded with a MDX containing Order() function, it will accumulate whenever the user sort the grid.

Change table builder API to be more generic

Currently, the table builder API mandate developers to implement specific interfaces for each UI type - table, rows, and cells - which is not suitable for certain type of usage, i.e. building a XML DOM tree.

We need a more flexible API to handle such use cases.

Add a method to calculate indentation of member cells

Typically, pivot grid renders its member cells on the row axis in hierarchical manner (when showParentMembers is set to 'false')using indentation.

Currently, RenderContext interface does not provide reliable information to caculate such indentation except by getMember().getDepth() which is problematic if the top level member represented in the UI is not actually the top level member in its hierarchy.

'CELL PROPERTIES' MDX expression support.

Though much more elegant way to handle cell formatting is planned to be implemented soon, the traditional 'CELL PROPERTIES' statement also need to supported for compatibility.

Note that, the range of support does not include Mondrian specific 'style' attribute of FORMAT_STRING expression.

Use unique name instead of object itself when comparing between metadata elements.

Found a very subtle problem with Mondrian's DelegatingRole, that when it wraps RolapMember instance into RolapHierarchy$LimitedRollupMember, they no longer return true when equals() method is invoked with the other as an argument, which could make various parts of Pivot4J not functioning properly.

So, it would be safe to compare between unique name properties of members instead of the member objects themselves to prevent such a problem.

Migrate important JPivot extensions as transform class.

Migrate more JPivot extensions as transform class, notably PlaceHierarchiesOnAxes, PlaceMembersOnAxes, SwapAxes, ChangeSlicer, and etc.

Those extensions are essential in building real world OLAP frontend applications.

Refactor the MDX parser API

Requirement

  1. Change the existing JPivot based parser definition to Olap4J/Mondrian based one if needed.
  2. Remove IDE warnings.
  3. Expose parser API for public use.
  4. Possibly fix #34 along the way.
  5. Provide the basis for implementing #37.

PDF export feature

Add PDF export feature by writing the appropriate PivotRenderer implementation using XSL/FO and the Batik library.

Unit test failure since the sorting issue was fixed

Unit test failure since the sorting issue was fixed :

org.junit.ComparisonFailure: MDX has been changed after the state restoration expected:<SELECT BottomCount([{[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]}], 3, [Measures].[Uni...> but was:<SELECT BottomCount([BottomCount({[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]}, 3.0, [Measures].[Unit Sales])], 3, [Measures].[Uni...>
at org.junit.Assert.assertEquals(Assert.java:125)
at com.eyeq.pivot4j.impl.PivotModelImplIT.testBookmarkState(PivotModelImplIT.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Expression language support in MDX query.

Need to support expression language support in MDX query :

Requirements

  1. EL implementation should be pluggable.
  2. Snippets should be preserved during possible query transformation like drill down, sort, and more.
  3. EL is NOT allowed to change the structure of the query.

Provide more convinient way to toggle sort modes

Provide convinient way to toggle sort modes.

For example, when building a common grid UI which has a sort button on header cells which cycles through the available sort modes,

it's cumbersome to determine what the current status is and what next mode to change without writing lot of if-else statements.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.