Skip to content

Commit

Permalink
fix date detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Barber committed Feb 18, 2015
1 parent acfd76b commit 6e6a666
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2014 OSBI Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package mondrian.olap4j;

import org.olap4j.metadata.Level;

/**
* Created by bugg on 18/02/15.
*/
public class Checker {
public boolean checker(Level level){
return level instanceof MondrianOlap4jLevel;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import java.util.*;

import mondrian.olap.Annotation;
import mondrian.olap4j.Checker;
import mondrian.olap4j.LevelInterface;
import mondrian.olap4j.MondrianOlap4jLevel;


/**
Expand Down Expand Up @@ -140,13 +140,14 @@ public static List<SaikuLevel> convertLevels(@NotNull List<Level> levels) {

@NotNull
private static SaikuLevel convert(@NotNull Level level) {
Checker c= new Checker();
try {
try {
Class.forName("mondrian.olap4j.MondrianOlap4jLevelExtend");
//Class.forName("bi.meteorite.CheckClass");
Class<LevelInterface> _tempClass =
(Class<LevelInterface>) Class.forName("mondrian.olap4j.MondrianOlap4jLevelExtend");
if(level instanceof MondrianOlap4jLevel) {
if(c.checker(level)){
Constructor<LevelInterface> ctor = _tempClass.getDeclaredConstructor(org.olap4j.metadata.Level.class);
LevelInterface test = ctor.newInstance(level);
HashMap<String, String> m = null;
Expand Down

0 comments on commit 6e6a666

Please sign in to comment.