├── .github └── CODEOWNERS ├── impl ├── src │ ├── main │ │ ├── resources │ │ │ └── org │ │ │ │ └── pentaho │ │ │ │ └── commons │ │ │ │ └── metadata │ │ │ │ └── mqleditor │ │ │ │ ├── README.txt │ │ │ │ ├── editor │ │ │ │ ├── xul │ │ │ │ │ ├── images │ │ │ │ │ │ ├── delete.png │ │ │ │ │ │ ├── move_up.gif │ │ │ │ │ │ ├── remove.png │ │ │ │ │ │ ├── thin_up.png │ │ │ │ │ │ ├── e_forward.gif │ │ │ │ │ │ ├── move_down.gif │ │ │ │ │ │ ├── thin_down.png │ │ │ │ │ │ └── move_arrow.png │ │ │ │ │ ├── mainFrame-swt-overlay.xul │ │ │ │ │ ├── mainFrame_supported_languages.properties │ │ │ │ │ ├── mainFrame_es.properties │ │ │ │ │ ├── mainFrame_en.properties │ │ │ │ │ ├── mainFrame.properties │ │ │ │ │ ├── mainFrame_de.properties │ │ │ │ │ ├── mainFrame_fr.properties │ │ │ │ │ ├── mainFrame_CN.properties │ │ │ │ │ ├── mainFrame_zh_CN.properties │ │ │ │ │ ├── editor.html │ │ │ │ │ ├── mainFrame_ja.properties │ │ │ │ │ └── mainFrame-gwt-overlay.xul │ │ │ │ ├── controllers │ │ │ │ │ └── package.html │ │ │ │ └── models │ │ │ │ │ └── package.html │ │ │ │ ├── beans │ │ │ │ └── package.html │ │ │ │ ├── package.html │ │ │ │ └── MetaDataEditorModule.gwt.xml │ │ └── java │ │ │ └── org │ │ │ └── pentaho │ │ │ └── commons │ │ │ └── metadata │ │ │ └── mqleditor │ │ │ ├── messages │ │ │ ├── IMqlMessages.java │ │ │ └── GwtMqlMessages.java │ │ │ ├── editor │ │ │ ├── models │ │ │ │ ├── UIOrders.java │ │ │ │ ├── UIColumns.java │ │ │ │ ├── UIConditions.java │ │ │ │ ├── UICategory.java │ │ │ │ ├── UIDomain.java │ │ │ │ ├── UIModel.java │ │ │ │ ├── UIQuery.java │ │ │ │ ├── UIOrder.java │ │ │ │ ├── UIColumn.java │ │ │ │ └── AbstractModelNode.java │ │ │ ├── MqlDialogListener.java │ │ │ ├── gwt │ │ │ │ ├── util │ │ │ │ │ ├── MQLEditorGwtService.java │ │ │ │ │ └── MQLEditorGwtServiceAsync.java │ │ │ │ └── MQLEditorServiceGwtImpl.java │ │ │ ├── MQLEditorService.java │ │ │ ├── SwtMqlEditor.java │ │ │ ├── SwingMqlEditor.java │ │ │ ├── service │ │ │ │ ├── util │ │ │ │ │ ├── CWMStartup.java │ │ │ │ │ ├── ConditionFormatter.java │ │ │ │ │ ├── OperatorFormatter.java │ │ │ │ │ └── FormulaParser.java │ │ │ │ ├── MQLEditorServiceCWMImpl.java │ │ │ │ └── MQLEditorServiceImpl.java │ │ │ ├── controllers │ │ │ │ ├── OrderController.java │ │ │ │ ├── ConditionsController.java │ │ │ │ ├── SelectedColumnController.java │ │ │ │ └── PreviewController.java │ │ │ ├── OldSwtMqlEditor.java │ │ │ └── AbstractMqlEditor.java │ │ │ ├── MqlBusinessTable.java │ │ │ ├── MqlOrder.java │ │ │ ├── MqlCategory.java │ │ │ ├── MqlModel.java │ │ │ ├── AggType.java │ │ │ ├── MqlDomain.java │ │ │ ├── ColumnType.java │ │ │ ├── MqlColumn.java │ │ │ ├── CombinationType.java │ │ │ ├── MqlQuery.java │ │ │ ├── beans │ │ │ ├── Category.java │ │ │ ├── Order.java │ │ │ ├── Domain.java │ │ │ ├── Model.java │ │ │ ├── Column.java │ │ │ ├── Condition.java │ │ │ └── Query.java │ │ │ ├── MqlCondition.java │ │ │ ├── utils │ │ │ ├── ModelUtil.java │ │ │ └── ModelSerializer.java │ │ │ └── Operator.java │ └── test │ │ └── java │ │ └── org │ │ └── pentaho │ │ └── commons │ │ └── metadata │ │ └── mqleditor │ │ ├── editor │ │ └── service │ │ │ └── util │ │ │ ├── MQLEditorServiceDelegateTest.java │ │ │ └── OperatorFormatterTest.java │ │ ├── WorkspaceTest.java │ │ └── utils │ │ └── ModelSerializerTest.java └── pom.xml ├── .gitignore ├── README.md ├── assembly └── pom.xml ├── LICENSE.txt └── pom.xml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @pentaho/sp-branch-write -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/README.txt: -------------------------------------------------------------------------------- 1 | Refer to package.html -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | .classpath 3 | .settings 4 | build 5 | target 6 | release.properties 7 | pom.xml.releaseBackup 8 | *.iml 9 | .idea 10 | bin 11 | *.class 12 | *.jar 13 | *.war 14 | *.ear 15 | .DS_Store 16 | pentaho.log -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/delete.png -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/move_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/move_up.gif -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/remove.png -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/thin_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/thin_up.png -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/e_forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/e_forward.gif -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/move_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/move_down.gif -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/thin_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/thin_down.png -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/move_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pentaho/mql-editor/HEAD/impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/images/move_arrow.png -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/beans/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JavaBean implementations for the MQL thin-model interfaces. 6 | 7 | 8 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/controllers/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Contains XulEventHandler classes for the Xul MQL Editor 6 | 7 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/models/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Contains UI-specific implementations of the MQL thin-model interfaces. 6 | 7 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame-swt-overlay.xul: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_supported_languages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # ******************************************************************************* 3 | # Hitachi Vantara 4 | # 5 | # Copyright (C) 2018 by Hitachi Vantara : http://www.pentaho.com 6 | # ******************************************************************************* 7 | # 8 | 9 | es=Espa\u00F1ol 10 | en=English 11 | fr=Fran\u00E7ais 12 | de=Deutsch 13 | ja=\u65E5\u672C\u8A9E 14 | zh_CN=\u7b80\u4f53\u4e2d\u6587 15 | CN=\u7E41\u4F53\u4E2D\u6587 16 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/messages/IMqlMessages.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.messages; 15 | 16 | public interface IMqlMessages { 17 | String getString( String key, String defaultMessage, String... args ); 18 | } 19 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/models/UIOrders.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.models; 15 | 16 | import java.util.List; 17 | 18 | public class UIOrders extends AbstractModelNode { 19 | 20 | public UIOrders() { 21 | } 22 | 23 | public UIOrders( List orders ) { 24 | super( orders ); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/models/UIColumns.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.models; 15 | 16 | import java.util.List; 17 | 18 | public class UIColumns extends AbstractModelNode { 19 | 20 | public UIColumns() { 21 | } 22 | 23 | public UIColumns( List conditions ) { 24 | super( conditions ); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_es.properties: -------------------------------------------------------------------------------- 1 | window.title=Editor de Consulta 2 | business.domains=Dominios de Negocio: 3 | business.models=Modelos de Negocio: 4 | categories.columns=Categorias / Columnas 5 | select.columns=Columnas Seleccionadas: 6 | conditions=Condiciones: 7 | order.by=Ordenar Por: 8 | limit=Limite de renglones (debe ser mayor o igual a 0): 9 | ok=OK 10 | cancel=Cancelar 11 | close=Cerrar 12 | table=Tabla 13 | column=Columna 14 | combine=Combinar 15 | comparison=Comparacion 16 | value=Valor 17 | order=Orden 18 | default=Default 19 | aggtype=Aggregacion 20 | preview=Pre Visualizacion 21 | preview.title=Pre Visualizacion 22 | update=Actualizar 23 | errorDialog.title=Error 24 | errorDialog.defaultLabel=Un error ha ocurrido 25 | errorDialog.CLOSE=Cerrar 26 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/MqlDialogListener.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor; 15 | 16 | import org.pentaho.commons.metadata.mqleditor.MqlQuery; 17 | 18 | public interface MqlDialogListener { 19 | 20 | public void onDialogAccept( MqlQuery queryModel ); 21 | 22 | public void onDialogCancel(); 23 | 24 | public void onDialogReady(); 25 | } 26 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlBusinessTable.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.util.List; 18 | 19 | public interface MqlBusinessTable extends Serializable { 20 | 21 | public String getId(); 22 | 23 | public String getName(); 24 | 25 | public List getBusinessColumns(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlOrder.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | 18 | public interface MqlOrder extends Serializable { 19 | 20 | public enum Type { 21 | ASC, DESC 22 | } 23 | 24 | public MqlColumn getColumn(); 25 | 26 | public Type getOrderType(); 27 | 28 | public AggType getSelectedAggType(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlCategory.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.util.List; 18 | 19 | /** 20 | * Represents a Metadata Category containing a collection of {@see MqlColumn}s 21 | * 22 | */ 23 | public interface MqlCategory extends Serializable { 24 | 25 | public String getId(); 26 | 27 | public String getName(); 28 | 29 | public List getBusinessColumns(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlModel.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.util.List; 18 | 19 | /** 20 | * 21 | * Represents a Metadata Model object containing one or more {@see MqlCategory}s 22 | * 23 | */ 24 | public interface MqlModel extends Serializable { 25 | 26 | public String getId(); 27 | 28 | public String getName(); 29 | 30 | public List getCategories(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MQL Editor # 2 | 3 | 4 | #### Pre-requisites for building the project: 5 | * Maven, version 3+ 6 | * Java JDK 11 7 | * This [settings.xml](https://github.com/pentaho/maven-parent-poms/blob/master/maven-support-files/settings.xml) in your /.m2 directory 8 | 9 | #### Building it 10 | 11 | 12 | ``` 13 | $ mvn clean install 14 | ``` 15 | 16 | To include assembly and generate the package add the `mqlPackage` property. 17 | ``` 18 | $ mvn clean install -DmqlPackage 19 | ``` 20 | 21 | #### Running the tests 22 | 23 | __Unit tests__ 24 | 25 | This will run all tests in the project (and sub-modules). 26 | ``` 27 | $ mvn test 28 | ``` 29 | 30 | If you want to remote debug a single java unit test (default port is 5005): 31 | ``` 32 | $ cd impl 33 | $ mvn test -Dtest=<> -Dmaven.surefire.debug 34 | ``` 35 | 36 | __Deprecations__ 37 | 38 | Note that the pentaho-mql-editor-debug module was removed during mavenization because it was no longer being used -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/AggType.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import org.pentaho.commons.metadata.mqleditor.editor.models.Workspace; 17 | 18 | public enum AggType { 19 | SUM, COUNT, COUNT_DISTINCT, TOTAL, MIN, MAX, AVERAGE, NONE; 20 | 21 | private static final String AGG_TYPE_PREFIX = "AggType."; 22 | 23 | @Override 24 | public String toString() { 25 | return Workspace.getMessages() == null ? name() : Workspace.getMessages().getString( AGG_TYPE_PREFIX + name(), 26 | name() ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Contains classes for the Xul-based MQL Edtor. 6 | 7 |

Xul MQL Editor

8 | 9 | This package contains the Xul-based MQL editor. The MQL Editor is not a stand-alone application. It's designed to 10 | be integrated within other applications which provide a concreate Service implementation to support the dialog. The 11 | services included in this project are for debugging purposes. 12 |

13 | The MQL Editor can be run in Swing using {@see org.pentaho.commons.metadata.mqleditor.editor.SwingMqlEditor SwingMqlEditor} or from a 14 | GWT application with {@see org.pentaho.commons.metadata.mqleditor.editor.GwtMqlEditor GwtMqlEditor}. In both cases you'll need to 15 | supply a {@see org.pentaho.commons.metadata.mqleditor.editor.service.MQLEditorService MQLEditorService} 16 |

17 |

18 | The 19 |

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/messages/GwtMqlMessages.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.messages; 15 | 16 | import org.pentaho.gwt.widgets.client.utils.i18n.ResourceBundle; 17 | 18 | public class GwtMqlMessages implements IMqlMessages { 19 | private ResourceBundle messages; 20 | 21 | public GwtMqlMessages( ResourceBundle messages ) { 22 | this.messages = messages; 23 | } 24 | 25 | public String getString( String key, String defaultMessage, String... args ) { 26 | return messages.getString( key, defaultMessage, args ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlDomain.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.util.List; 18 | 19 | /** 20 | * Represents a Metadata Domain object containing Metadata Models {@see MqlModel} 21 | * 22 | * 23 | * @param 24 | */ 25 | public interface MqlDomain extends Serializable { 26 | 27 | // this should be deleted, it causes confusion and is not used. 28 | @Deprecated 29 | public String getId(); 30 | 31 | public String getName(); 32 | 33 | public List getModels(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/ColumnType.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.sql.Date; 18 | 19 | /** 20 | * ColumnType represents the data type of a {@see MqlColumn} 21 | * 22 | */ 23 | public enum ColumnType implements Serializable { 24 | NUMERIC( Integer.class ), TEXT( String.class ), FLOAT( Float.class ), BOOLEAN( Boolean.class ), DATE( Date.class ); 25 | 26 | private final Class clazz; 27 | 28 | ColumnType( Class cls ) { 29 | this.clazz = cls; 30 | } 31 | 32 | boolean validate( Object val ) { 33 | return clazz.getClass().equals( clazz ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlColumn.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.util.List; 18 | 19 | /** 20 | * Represents a Metadata Column object 21 | * 22 | * @param 23 | * implementation of a MqlBusinessTable 24 | */ 25 | public interface MqlColumn extends Serializable { 26 | 27 | public ColumnType getType(); 28 | 29 | public String getId(); 30 | 31 | public String getName(); 32 | 33 | public AggType getDefaultAggType(); 34 | 35 | public List getAggTypes(); 36 | 37 | public AggType getSelectedAggType(); 38 | 39 | public boolean isPersistent(); 40 | } 41 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/gwt/util/MQLEditorGwtService.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.gwt.util; 15 | 16 | import java.util.List; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.MqlDomain; 19 | import org.pentaho.commons.metadata.mqleditor.MqlQuery; 20 | 21 | import com.google.gwt.user.client.rpc.RemoteService; 22 | 23 | public interface MQLEditorGwtService extends RemoteService { 24 | 25 | List refreshMetadataDomains(); 26 | 27 | List getMetadataDomains(); 28 | 29 | MqlDomain getDomainByName( String name ); 30 | 31 | String saveQuery( MqlQuery model ); 32 | 33 | String serializeModel( MqlQuery query ); 34 | 35 | MqlQuery deserializeModel( String serializedQuery ); 36 | 37 | String[][] getPreviewData( MqlQuery query, int page, int limit ) throws Exception; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/CombinationType.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | 18 | /** 19 | * Defines the logical relationship between two {@see MqlCondition}s 20 | * 21 | */ 22 | public enum CombinationType implements Serializable { 23 | AND( "AND" ), OR( "OR" ), AND_NOT( "AND NOT" ), OR_NOT( "OR NOT" ); 24 | 25 | private String toStringVal; 26 | 27 | private CombinationType( String val ) { 28 | toStringVal = val; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return toStringVal; 34 | } 35 | 36 | public static CombinationType getByName( String value ) { 37 | for ( CombinationType type : CombinationType.values() ) { 38 | if ( type.toStringVal.equals( value ) ) { 39 | return type; 40 | } 41 | } 42 | return null; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/models/UIConditions.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.models; 15 | 16 | import java.util.List; 17 | 18 | public class UIConditions extends AbstractModelNode { 19 | 20 | public UIConditions() { 21 | } 22 | 23 | public UIConditions( List conditions ) { 24 | super( conditions ); 25 | } 26 | 27 | @Override 28 | protected void fireCollectionChanged() { 29 | markTopMostCondition(); 30 | this.changeSupport.firePropertyChange( "children", null, this.getChildren() ); 31 | } 32 | 33 | private void markTopMostCondition() { 34 | for ( int index = 0; index < children.size(); index++ ) { 35 | if ( index == 0 ) { 36 | children.get( index ).setTopMost( true ); 37 | } else { 38 | children.get( index ).setTopMost( false ); 39 | } 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlQuery.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | import java.util.List; 18 | import java.util.Map; 19 | 20 | /** 21 | * Represents an MQL Query. Contains a list of selected columns, conditions and order information. For convenience it 22 | * also has the serialized xml representation. 23 | * 24 | */ 25 | public interface MqlQuery extends Serializable { 26 | 27 | public List getColumns(); 28 | 29 | public List getConditions(); 30 | 31 | public List getOrders(); 32 | 33 | public int getLimit(); 34 | 35 | public boolean isDisableDistinct(); 36 | 37 | public MqlDomain getDomain(); 38 | 39 | public MqlModel getModel(); 40 | 41 | public String getMqlStr(); 42 | 43 | public Map getDefaultParameterMap(); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/beans/Category.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.beans; 15 | 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | import org.pentaho.commons.metadata.mqleditor.MqlCategory; 20 | 21 | public class Category implements MqlCategory { 22 | 23 | private String id, name; 24 | private List columns = new ArrayList(); 25 | 26 | public String getId() { 27 | return this.id; 28 | } 29 | 30 | public String getName() { 31 | return this.name; 32 | } 33 | 34 | public void setId( String id ) { 35 | this.id = id; 36 | } 37 | 38 | public void setName( String name ) { 39 | this.name = name; 40 | } 41 | 42 | public List getBusinessColumns() { 43 | return columns; 44 | } 45 | 46 | public void setBusinessColumns( List columns ) { 47 | this.columns = columns; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/beans/Order.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.beans; 15 | 16 | import org.pentaho.commons.metadata.mqleditor.AggType; 17 | import org.pentaho.commons.metadata.mqleditor.MqlOrder; 18 | 19 | public class Order implements MqlOrder { 20 | 21 | private Column column; 22 | 23 | private Type orderType; 24 | 25 | private AggType selectedAggType; 26 | 27 | public Column getColumn() { 28 | return column; 29 | } 30 | 31 | public Type getOrderType() { 32 | return orderType; 33 | } 34 | 35 | public void setOrderType( Type orderType ) { 36 | this.orderType = orderType; 37 | } 38 | 39 | public void setColumn( Column column ) { 40 | this.column = column; 41 | } 42 | 43 | public void setSelectedAggType( AggType aggType ) { 44 | this.selectedAggType = aggType; 45 | } 46 | 47 | public AggType getSelectedAggType() { 48 | return this.selectedAggType; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/MqlCondition.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor; 15 | 16 | import java.io.Serializable; 17 | 18 | public interface MqlCondition extends Serializable { 19 | 20 | public boolean validate(); 21 | 22 | public MqlColumn getColumn(); 23 | 24 | public Operator getOperator(); 25 | 26 | /** 27 | * @return if isParameterized() then the name of the parameter whose value will be substituted before query execution, 28 | * else the literal value 29 | */ 30 | public String getValue(); 31 | 32 | public CombinationType getCombinationType(); 33 | 34 | /** 35 | * Value in this condition is not static, but rather supplied for each execution of this query. 36 | * 37 | * @return true if value denotes parameter name rather than a literal value 38 | */ 39 | public boolean isParameterized(); 40 | 41 | public String getDefaultValue(); 42 | 43 | public AggType getSelectedAggType(); 44 | } 45 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/beans/Domain.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.beans; 15 | 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | import org.pentaho.commons.metadata.mqleditor.MqlDomain; 20 | 21 | public class Domain implements MqlDomain { 22 | 23 | private String id = "default"; 24 | private String name; 25 | 26 | private List models = new ArrayList(); 27 | 28 | public String getId() { 29 | return id; 30 | } 31 | 32 | public List getModels() { 33 | return models; 34 | } 35 | 36 | public String getName() { 37 | if ( name == null ) { 38 | name = "default"; 39 | } 40 | return name; 41 | } 42 | 43 | public void setId( String id ) { 44 | this.id = id; 45 | } 46 | 47 | public void setModels( List models ) { 48 | this.models = models; 49 | } 50 | 51 | public void setName( String name ) { 52 | this.name = name; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_en.properties: -------------------------------------------------------------------------------- 1 | window.title=Query Editor 2 | business.domains=Business Domains: 3 | business.models=Business Models: 4 | categories.columns=Categories / Columns 5 | select.columns=Selected Columns: 6 | conditions=Conditions: 7 | order.by=Order By: 8 | limit=Row Limit (must be greater than or equal to 0): 9 | ok=OK 10 | cancel=Cancel 11 | close=Close 12 | table=Table 13 | column=Column 14 | combine=Combine 15 | comparison=Comparison 16 | value=Value 17 | order=Order 18 | default=Default 19 | aggtype=Aggregation 20 | preview=Preview 21 | preview.title=Preview 22 | update=Update 23 | errorDialog.title=Error 24 | errorDialog.defaultLabel=An error occurred 25 | errorDialog.CLOSE=Close 26 | deny.remove.column.dialog.title=Cannot Remove Column 27 | deny.remove.column.dialog.message=Sorry, the key column cannot be removed. You will need to delete the filter to remove this column. 28 | deny.remove.column.dialog.button=OK 29 | 30 | Operator.EXACTLY_MATCHES=exactly matches 31 | Operator.CONTAINS=contains 32 | Operator.DOES_NOT_CONTAIN=does not contain 33 | Operator.BEGINS_WITH=begins with 34 | Operator.ENDS_WITH=ends with 35 | Operator.IS_NULL=is null 36 | Operator.IS_NOT_NULL=is not null 37 | Operator.IN=in 38 | 39 | AggType.SUM=SUM 40 | AggType.COUNT=COUNT 41 | AggType.COUNT_DISTINCT=COUNT_DISTINCT 42 | AggType.TOTAL=TOTAL 43 | AggType.MIN=MIN 44 | AggType.MAX=MAX 45 | AggType.NONE=NONE 46 | AggType.AVERAGE=AVERAGE 47 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/gwt/util/MQLEditorGwtServiceAsync.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.gwt.util; 15 | 16 | import java.util.List; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.MqlDomain; 19 | import org.pentaho.commons.metadata.mqleditor.MqlQuery; 20 | 21 | import com.google.gwt.user.client.rpc.AsyncCallback; 22 | 23 | public interface MQLEditorGwtServiceAsync { 24 | 25 | void getMetadataDomains( AsyncCallback> callback ); 26 | 27 | void refreshMetadataDomains( AsyncCallback> callback ); 28 | 29 | void getDomainByName( String name, AsyncCallback callback ); 30 | 31 | void saveQuery( MqlQuery model, AsyncCallback callback ); 32 | 33 | void serializeModel( MqlQuery query, AsyncCallback callback ); 34 | 35 | void deserializeModel( String serializedQuery, AsyncCallback callback ); 36 | 37 | void getPreviewData( MqlQuery query, int page, int limit, AsyncCallback callback ); 38 | } 39 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame.properties: -------------------------------------------------------------------------------- 1 | window.title=Query Editor 2 | business.domains=Business Domains: 3 | business.models=Business Models: 4 | categories.columns=Categories / Columns 5 | select.columns=Selected Columns: 6 | conditions=Conditions: 7 | order.by=Order By: 8 | limit=Row Limit (must be greater than or equal to 0): 9 | ok=OK 10 | cancel=Cancel 11 | close=Close 12 | table=Table 13 | column=Column 14 | combine=Combine 15 | comparison=Comparison 16 | value=Value 17 | order=Order 18 | default=Default 19 | aggtype=Aggregation 20 | preview=Preview 21 | preview.title=Preview 22 | preview.limit=Limit: 23 | update=Update 24 | errorDialog.title=Error 25 | errorDialog.defaultLabel=An error occurred 26 | errorDialog.CLOSE=Close 27 | deny.remove.column.dialog.title=Cannot Remove Column 28 | deny.remove.column.dialog.message=Sorry, the key column cannot be removed. You will need to delete the filter to remove this column. 29 | deny.remove.column.dialog.button=OK 30 | 31 | Operator.EXACTLY_MATCHES=exactly matches 32 | Operator.CONTAINS=contains 33 | Operator.DOES_NOT_CONTAIN=does not contain 34 | Operator.BEGINS_WITH=begins with 35 | Operator.ENDS_WITH=ends with 36 | Operator.IS_NULL=is null 37 | Operator.IS_NOT_NULL=is not null 38 | Operator.IN=in 39 | 40 | AggType.SUM=SUM 41 | AggType.COUNT=COUNT 42 | AggType.COUNT_DISTINCT=COUNT_DISTINCT 43 | AggType.TOTAL=TOTAL 44 | AggType.MIN=MIN 45 | AggType.MAX=MAX 46 | AggType.NONE=NONE 47 | AggType.AVERAGE=AVERAGE 48 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/MQLEditorService.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor; 15 | 16 | import java.util.List; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.MqlDomain; 19 | import org.pentaho.commons.metadata.mqleditor.MqlQuery; 20 | import org.pentaho.ui.xul.XulServiceCallback; 21 | 22 | /** 23 | * Interface to the service that the MQL Editor uses for operation. Due to the fact that the MQL Editor may be run in 24 | * GWT, all service calls use an asynchronous pattern. 25 | * 26 | */ 27 | public interface MQLEditorService { 28 | void refreshMetadataDomains( XulServiceCallback> callback ); 29 | 30 | void getMetadataDomains( XulServiceCallback> callback ); 31 | 32 | void getDomainByName( String name, XulServiceCallback callback ); 33 | 34 | void saveQuery( MqlQuery model, XulServiceCallback callback ); 35 | 36 | void serializeModel( MqlQuery query, XulServiceCallback callback ); 37 | 38 | void deserializeModel( String serializedQuery, XulServiceCallback callback ); 39 | 40 | void getPreviewData( MqlQuery query, int page, int limit, XulServiceCallback callback ); 41 | } 42 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/MetaDataEditorModule.gwt.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_de.properties: -------------------------------------------------------------------------------- 1 | window.title=Abfrage-Editor 2 | business.domains=Gesch\u00e4ftsdom\u00e4nen: 3 | business.models=Gesch\u00e4ftsmodelle: 4 | categories.columns=Kategorien/Spalten 5 | select.columns=Ausgew\u00e4hlte Spalten: 6 | conditions=Bedingungen: 7 | order.by=Sortieren nach: 8 | limit=Zeilenlimit (muss gr\u00f6\u00dfer als oder gleich Null sein): 9 | ok=OK 10 | cancel=Abbrechen 11 | close=Schlie\u00dfen 12 | table=Tabelle 13 | column=Spalte 14 | combine=Kombinieren 15 | comparison=Vergleich 16 | value=Wert 17 | order=Reihenfolge 18 | default=Standard 19 | aggtype=Aggregation 20 | preview=Vorschau 21 | preview.title=Vorschau 22 | update=Aktualisierung 23 | errorDialog.title=Fehler 24 | errorDialog.defaultLabel=Es ist ein Fehler aufgetreten. 25 | errorDialog.CLOSE=Schlie\u00dfen 26 | deny.remove.column.dialog.title=Spalte kann nicht entfernt werden 27 | deny.remove.column.dialog.message=Entschuldigung, die Schl\u00fcsselspalte kann nicht entfernt werden. Sie m\u00fcssen den Filter l\u00f6schen, um diese Spalte zu entfernen. 28 | deny.remove.column.dialog.button=OK 29 | # 30 | Operator.EXACTLY_MATCHES=stimmt genau \u00fcberein 31 | Operator.CONTAINS=enth\u00e4lt 32 | Operator.DOES_NOT_CONTAIN=enth\u00e4lt nicht 33 | Operator.BEGINS_WITH=beginnt mit 34 | Operator.ENDS_WITH=endet mit 35 | Operator.IS_NULL=ist ung\u00fcltig 36 | Operator.IS_NOT_NULL=ist nicht ung\u00fcltig 37 | Operator.IN=in 38 | # 39 | AggType.SUM=SUM 40 | AggType.COUNT=ANZAHL 41 | AggType.COUNT_DISTINCT=COUNT_DISTINCT 42 | AggType.TOTAL=SUMME 43 | AggType.MIN=MIN 44 | AggType.MAX=MAX 45 | AggType.NONE=KEINE 46 | AggType.AVERAGE=DURCHSCHNITT 47 | # 48 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_fr.properties: -------------------------------------------------------------------------------- 1 | window.title=\u00c9diteur de requ\u00eate 2 | business.domains=Domaines d'entreprise : 3 | business.models=Mod\u00e8les d'entreprise : 4 | categories.columns=Cat\u00e9gories/Colonnes 5 | select.columns=Colonnes s\u00e9lectionn\u00e9es : 6 | conditions=Conditions : 7 | order.by=Classement par : 8 | limit=Nombre limite de lignes (doit \u00eatre sup\u00e9rieur ou \u00e9gal \u00e0 0) : 9 | ok=OK 10 | cancel=Annuler 11 | close=Fermer 12 | table=Tableau 13 | column=Colonne 14 | combine=Combiner 15 | comparison=Comparaison 16 | value=Valeur 17 | order=Classement 18 | default=Par d\u00e9faut 19 | aggtype=Agr\u00e9gation 20 | preview=Aper\u00e7u 21 | preview.title=Aper\u00e7u 22 | update=Mettre \u00e0 jour 23 | errorDialog.title=Erreur 24 | errorDialog.defaultLabel=Une erreur est survenue 25 | errorDialog.CLOSE=Fermer 26 | deny.remove.column.dialog.title=Impossible de supprimer la colonne 27 | deny.remove.column.dialog.message=D\u00e9sol\u00e9, la colonne cl\u00e9 ne peut pas \u00eatre supprim\u00e9e. Vous devrez supprimer le filtre pour supprimer cette colonne. 28 | deny.remove.column.dialog.button=OK 29 | # 30 | Operator.EXACTLY_MATCHES=correspond exactement \u00e0 31 | Operator.CONTAINS=contient 32 | Operator.DOES_NOT_CONTAIN=ne contient pas 33 | Operator.BEGINS_WITH=commence par 34 | Operator.ENDS_WITH=se termine par 35 | Operator.IS_NULL=est nul 36 | Operator.IS_NOT_NULL=n'est pas nul 37 | Operator.IN=dans 38 | # 39 | AggType.SUM=SOMME 40 | AggType.COUNT=NOMBRE 41 | AggType.COUNT_DISTINCT=NOMBRE_DISTINCT 42 | AggType.TOTAL=TOTAL 43 | AggType.MIN=MIN 44 | AggType.MAX=MAX 45 | AggType.NONE=AUCUN 46 | AggType.AVERAGE=MOYENNE 47 | # 48 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/models/UICategory.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.models; 15 | 16 | import java.util.List; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.MqlCategory; 19 | import org.pentaho.commons.metadata.mqleditor.beans.Category; 20 | import org.pentaho.commons.metadata.mqleditor.beans.Column; 21 | import org.pentaho.ui.xul.stereotype.Bindable; 22 | 23 | public class UICategory extends AbstractModelNode implements MqlCategory { 24 | 25 | private String id, name; 26 | 27 | public UICategory( Category category ) { 28 | this.id = category.getId(); 29 | this.name = category.getName(); 30 | 31 | for ( Column col : category.getBusinessColumns() ) { 32 | UIColumn c = new UIColumn( col ); 33 | this.children.add( c ); 34 | } 35 | } 36 | 37 | public String getId() { 38 | return id; 39 | } 40 | 41 | public void setId( String id ) { 42 | this.id = id; 43 | } 44 | 45 | @Bindable 46 | public String getName() { 47 | return this.name; 48 | } 49 | 50 | @Bindable 51 | public void setName( String name ) { 52 | this.name = name; 53 | } 54 | 55 | public UICategory() { 56 | 57 | } 58 | 59 | public List getBusinessColumns() { 60 | return this.getChildren(); 61 | } 62 | 63 | public void setBusinessColumns( List cols ) { 64 | this.children = cols; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/models/UIDomain.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.models; 15 | 16 | import java.util.List; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.MqlDomain; 19 | import org.pentaho.commons.metadata.mqleditor.beans.Domain; 20 | import org.pentaho.commons.metadata.mqleditor.beans.Model; 21 | import org.pentaho.ui.xul.stereotype.Bindable; 22 | 23 | public class UIDomain extends AbstractModelNode implements MqlDomain { 24 | 25 | private String id = "default"; 26 | private String name; 27 | 28 | public UIDomain() { 29 | } 30 | 31 | public UIDomain( Domain domain ) { 32 | if ( domain.getId() != null ) { 33 | this.id = domain.getId(); 34 | } 35 | this.name = domain.getName(); 36 | 37 | for ( Model model : domain.getModels() ) { 38 | this.children.add( new UIModel( model ) ); 39 | } 40 | } 41 | 42 | @Bindable 43 | public String getId() { 44 | return id; 45 | } 46 | 47 | @Bindable 48 | public void setId( String id ) { 49 | this.id = id; 50 | } 51 | 52 | @Bindable 53 | public String getName() { 54 | return this.name; 55 | } 56 | 57 | @Bindable 58 | public void setName( String name ) { 59 | this.name = name; 60 | } 61 | 62 | @Bindable 63 | public List getModels() { 64 | return this.getChildren(); 65 | } 66 | 67 | @Bindable 68 | public void setModels( List models ) { 69 | this.children = models; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/models/UIModel.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor.models; 15 | 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | import org.pentaho.commons.metadata.mqleditor.MqlModel; 20 | import org.pentaho.commons.metadata.mqleditor.beans.Category; 21 | import org.pentaho.commons.metadata.mqleditor.beans.Model; 22 | import org.pentaho.ui.xul.stereotype.Bindable; 23 | 24 | public class UIModel extends AbstractModelNode implements MqlModel { 25 | 26 | private List categories = new ArrayList(); 27 | 28 | private String id, name; 29 | 30 | public UIModel( Model model ) { 31 | this.id = model.getId(); 32 | this.name = model.getName(); 33 | 34 | for ( Category cat : model.getCategories() ) { 35 | this.children.add( new UICategory( cat ) ); 36 | } 37 | } 38 | 39 | public UIModel() { 40 | 41 | } 42 | 43 | @Bindable 44 | public String getId() { 45 | return id; 46 | } 47 | 48 | @Bindable 49 | public void setId( String id ) { 50 | this.id = id; 51 | } 52 | 53 | @Bindable 54 | public String getName() { 55 | return this.name; 56 | } 57 | 58 | @Bindable 59 | public void setName( String name ) { 60 | this.name = name; 61 | } 62 | 63 | @Bindable 64 | public List getCategories() { 65 | return this.getChildren(); 66 | } 67 | 68 | @Bindable 69 | public void setCategories( List cats ) { 70 | this.children = cats; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_CN.properties: -------------------------------------------------------------------------------- 1 | window.title=\u67e5\u8a62\u7de8\u8f2f\u5668 2 | business.domains=\u5546\u696d\u9818\u57df\uff1a 3 | business.models=\u5546\u696d\u6a21\u578b\uff1a 4 | categories.columns=\u985e\u5225/\u8cc7\u6599\u884c 5 | select.columns=\u5df2\u9078\u53d6\u7684\u8cc7\u6599\u884c\uff1a 6 | conditions=\u689d\u4ef6\uff1a 7 | order.by=\u6392\u5e8f\u4f9d\u64da\uff1a 8 | limit=\u8cc7\u6599\u5217\u9650\u5236 (\u5fc5\u9808\u5927\u65bc\u6216\u7b49\u65bc 0)\uff1a 9 | ok=\u78ba\u5b9a 10 | cancel=\u53d6\u6d88 11 | close=\u95dc\u9589 12 | table=\u8cc7\u6599\u8868 13 | column=\u8cc7\u6599\u884c 14 | combine=\u5408\u4f75 15 | comparison=\u6bd4\u8f03 16 | value=\u503c 17 | order=\u9806\u5e8f 18 | default=\u9810\u8a2d\u503c 19 | aggtype=\u5f59\u7e3d 20 | preview=\u9810\u89bd 21 | preview.title=\u9810\u89bd 22 | preview.limit=\u9650\u5236\uff1a 23 | update=\u66f4\u65b0 24 | errorDialog.title=\u932f\u8aa4 25 | errorDialog.defaultLabel=\u767c\u751f\u932f\u8aa4 26 | errorDialog.CLOSE=\u95dc\u9589 27 | deny.remove.column.dialog.title=\u7121\u6cd5\u79fb\u9664\u8cc7\u6599\u884c 28 | deny.remove.column.dialog.message=\u62b1\u6b49\uff0c\u7121\u6cd5\u79fb\u9664\u7d22\u5f15\u9375\u8cc7\u6599\u884c\u3002\u60a8\u5fc5\u9808\u522a\u9664\u7be9\u9078\u4ee5\u79fb\u9664\u6b64\u8cc7\u6599\u884c\u3002 29 | deny.remove.column.dialog.button=\u78ba\u5b9a 30 | 31 | Operator.EXACTLY_MATCHES=\u7cbe\u78ba\u76f8\u7b26 32 | Operator.CONTAINS=\u5305\u542b 33 | Operator.DOES_NOT_CONTAIN=\u4e0d\u5305\u542b 34 | Operator.BEGINS_WITH=\u958b\u982d\u70ba 35 | Operator.ENDS_WITH=\u7d50\u5c3e\u70ba 36 | Operator.IS_NULL=\u662f Null 37 | Operator.IS_NOT_NULL=\u4e0d\u662f Null 38 | Operator.IN=\u65bc 39 | 40 | AggType.SUM=\u52a0\u7e3d 41 | AggType.COUNT=\u8a08\u6578 42 | AggType.COUNT_DISTINCT= 43 | AggType.TOTAL=\u7e3d\u8a08 44 | AggType.MIN=\u6700\u5c0f\u503c 45 | AggType.MAX=\u6700\u5927\u503c 46 | AggType.NONE=\u7121 47 | AggType.AVERAGE=\u5e73\u5747 48 | -------------------------------------------------------------------------------- /assembly/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | pentaho-mql-editor-package 7 | 11.1.0.0-SNAPSHOT 8 | 9 | 10 | org.pentaho 11 | pentaho-mql-editor 12 | 11.1.0.0-SNAPSHOT 13 | 14 | 15 | Pentaho MQL Editor Package 16 | war 17 | 18 | 19 | 20 | org.pentaho 21 | pentaho-mql-editor-impl 22 | ${project.version} 23 | 24 | 25 | org.pentaho 26 | pentaho-mql-editor-impl 27 | ${project.version} 28 | sources 29 | provided 30 | 31 | 32 | com.google.code.gwtx 33 | gwtx 34 | provided 35 | 36 | 37 | org.pentaho 38 | commons-gwt-widgets 39 | sources 40 | 41 | 42 | 43 | 44 | 45 | 46 | org.codehaus.mojo 47 | gwt-maven-plugin 48 | 49 | 50 | 51 | compile 52 | 53 | 54 | 55 | 56 | 57 | org.pentaho.commons.metadata.mqleditor.MetaDataEditorModule 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_zh_CN.properties: -------------------------------------------------------------------------------- 1 | # 2 | # ******************************************************************************* 3 | # Hitachi Vantara 4 | # 5 | # Copyright (C) 2020 by Hitachi Vantara : http://www.pentaho.com 6 | # ******************************************************************************* 7 | # 8 | # 9 | window.title=\u67e5\u8be2\u7f16\u8f91\u5668 10 | business.domains=\u4e1a\u52a1\u57df\uff1a 11 | business.models=\u4e1a\u52a1\u6a21\u578b\uff1a 12 | categories.columns=\u7c7b\u522b/\u5217 13 | select.columns=\u9009\u5b9a\u5217\uff1a 14 | conditions=\u6761\u4ef6\uff1a 15 | order.by=\u6392\u5e8f\u65b9\u5f0f\uff1a 16 | limit=\u884c\u9650\u5236\uff08\u5fc5\u987b\u5927\u4e8e\u6216\u7b49\u4e8e 0\uff09\uff1a 17 | ok=\u786e\u5b9a 18 | cancel=\u53d6\u6d88 19 | close=\u5173\u95ed 20 | table=\u8868 21 | column=\u5217 22 | combine=\u5408\u5e76 23 | comparison=\u6bd4\u8f83 24 | value=\u503c 25 | order=\u987a\u5e8f 26 | default=\u9ed8\u8ba4 27 | aggtype=\u805a\u5408 28 | preview=\u9884\u89c8 29 | preview.title=\u9884\u89c8 30 | update=\u66f4\u65b0 31 | errorDialog.title=\u9519\u8bef 32 | errorDialog.defaultLabel=\u53d1\u751f\u9519\u8bef 33 | errorDialog.CLOSE=\u5173\u95ed 34 | deny.remove.column.dialog.title=\u65e0\u6cd5\u5220\u9664\u5217 35 | deny.remove.column.dialog.message=\u62b1\u6b49\uff0c\u65e0\u6cd5\u5220\u9664\u952e\u5217\u3002\u60a8\u9700\u8981\u5220\u9664\u7b5b\u9009\u5668\u624d\u80fd\u5220\u9664\u6b64\u5217\u3002 36 | deny.remove.column.dialog.button=\u786e\u5b9a 37 | # 38 | Operator.EXACTLY_MATCHES=\u5b8c\u5168\u5339\u914d 39 | Operator.CONTAINS=\u5305\u542b 40 | Operator.DOES_NOT_CONTAIN=\u4e0d\u5305\u542b 41 | Operator.BEGINS_WITH=\u5f00\u5934 42 | Operator.ENDS_WITH=\u7ed3\u5c3e 43 | Operator.IS_NULL=\u4e3a\u7a7a 44 | Operator.IS_NOT_NULL=\u975e\u4e3a\u7a7a 45 | Operator.IN=\u5185 46 | # 47 | AggType.SUM=\u603b\u548c 48 | AggType.COUNT=\u8ba1\u6570 49 | AggType.COUNT_DISTINCT=\u53bb\u91cd_\u8ba1\u6570 50 | AggType.TOTAL=\u603b\u8ba1 51 | AggType.MIN=\u6700\u5c0f 52 | AggType.MAX=\u6700\u5927 53 | AggType.NONE=\u65e0 54 | AggType.AVERAGE=\u5e73\u5747 55 | # 56 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/editor.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | XUL Library 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame_ja.properties: -------------------------------------------------------------------------------- 1 | window.title=\u30af\u30a8\u30ea\u30fc\u30a8\u30c7\u30a3\u30bf\u30fc 2 | business.domains=\u30d3\u30b8\u30cd\u30b9\u30c9\u30e1\u30a4\u30f3: 3 | business.models=\u30d3\u30b8\u30cd\u30b9\u30e2\u30c7\u30eb: 4 | categories.columns=\u30ab\u30c6\u30b4\u30ea\u30fc / \u30ab\u30e9\u30e0 5 | select.columns=\u30ab\u30e9\u30e0\u9078\u629e: 6 | conditions=\u6761\u4ef6: 7 | order.by=\u6574\u5217: 8 | limit=\u884c\u30ea\u30df\u30c3\u30c8 (0\u4ee5\u4e0a\u306e\u5024\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044): 9 | ok=Ok 10 | cancel=\u30ad\u30e3\u30f3\u30bb\u30eb 11 | close=\u9589\u3058\u308b 12 | table=\u30c6\u30fc\u30d6\u30eb 13 | column=\u30ab\u30e9\u30e0 14 | combine=\u7d50\u5408 15 | comparison=\u6bd4\u8f03 16 | value=\u5024 17 | order=\u30aa\u30fc\u30c0\u30fc 18 | default=\u65e2\u5b9a\u5024 19 | aggtype=\u96c6\u8a08 20 | preview=\u30d7\u30ec\u30d3\u30e5\u30fc 21 | preview.title=\u30d7\u30ec\u30d3\u30e5\u30fc 22 | update=\u66f4\u65b0 23 | errorDialog.title=\u30a8\u30e9\u30fc 24 | errorDialog.defaultLabel=\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f 25 | errorDialog.CLOSE=\u9589\u3058\u308b 26 | deny.remove.column.dialog.title=\u30ab\u30e9\u30e0\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093 27 | deny.remove.column.dialog.message=\u30ad\u30fc\u30ab\u30e9\u30e0\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3002\u30ab\u30e9\u30e0\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 28 | deny.remove.column.dialog.button=Ok 29 | # 30 | Operator.EXACTLY_MATCHES=\u5b8c\u5168\u306b\u4e00\u81f4 31 | Operator.CONTAINS=\u3092\u542b\u3080 32 | Operator.DOES_NOT_CONTAIN=\u3092\u542b\u307e\u306a\u3044 33 | Operator.BEGINS_WITH=\u3067\u59cb\u307e\u308b 34 | Operator.ENDS_WITH=\u3067\u7d42\u308f\u308b 35 | Operator.IS_NULL=null 36 | Operator.IS_NOT_NULL=null\u3067\u306a\u3044 37 | Operator.IN=in 38 | # 39 | AggType.SUM=\u5408\u8a08 40 | AggType.COUNT=\u30ab\u30a6\u30f3\u30c8 41 | AggType.COUNT_DISTINCT=\u30c7\u30a3\u30b9\u30c6\u30a3\u30f3\u30af\u30c8\u30ab\u30a6\u30f3\u30c8 42 | AggType.TOTAL=\u5408\u8a08 43 | AggType.MIN=\u6700\u4f4e 44 | AggType.MAX=\u6700\u5927 45 | AggType.NONE=\u306a\u3057 46 | AggType.AVERAGE=\u5e73\u5747 47 | # 48 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/SwtMqlEditor.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor; 15 | 16 | import java.awt.Window; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.editor.service.util.MQLEditorServiceDelegate; 19 | import org.pentaho.metadata.repository.IMetadataDomainRepository; 20 | import org.pentaho.ui.xul.XulException; 21 | import org.pentaho.ui.xul.XulLoader; 22 | import org.pentaho.ui.xul.XulRunner; 23 | import org.pentaho.ui.xul.swt.SwtXulLoader; 24 | import org.pentaho.ui.xul.swt.SwtXulRunner; 25 | 26 | /** 27 | * Default Swt implementation. This class requires a concrete Service implementation 28 | */ 29 | public class SwtMqlEditor extends AbstractMqlEditor { 30 | 31 | public SwtMqlEditor( Window parent, IMetadataDomainRepository repo ) { 32 | super( parent, repo ); 33 | } 34 | 35 | public SwtMqlEditor( IMetadataDomainRepository repo, MQLEditorService service, MQLEditorServiceDelegate delegate ) { 36 | super( repo, service, delegate ); 37 | } 38 | 39 | public SwtMqlEditor( IMetadataDomainRepository repo ) { 40 | super( repo ); 41 | } 42 | 43 | /* 44 | * (non-Javadoc) 45 | * 46 | * @see org.pentaho.commons.metadata.mqleditor.editor.AbstractMqlEditor#getLoader() 47 | */ 48 | @Override 49 | protected XulLoader getLoader() { 50 | if ( xulLoader == null ) { 51 | try { 52 | xulLoader = new SwtXulLoader(); 53 | } catch ( XulException e ) { 54 | log.error( "error loading Xul application", e ); 55 | } 56 | } 57 | return xulLoader; 58 | } 59 | 60 | /* 61 | * (non-Javadoc) 62 | * 63 | * @see org.pentaho.commons.metadata.mqleditor.editor.AbstractMqlEditor#getRunner() 64 | */ 65 | @Override 66 | protected XulRunner getRunner() { 67 | if ( xulRunner == null ) { 68 | xulRunner = new SwtXulRunner(); 69 | } 70 | return xulRunner; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /impl/src/main/java/org/pentaho/commons/metadata/mqleditor/editor/SwingMqlEditor.java: -------------------------------------------------------------------------------- 1 | /*! ****************************************************************************** 2 | * 3 | * Pentaho 4 | * 5 | * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com 6 | * 7 | * Use of this software is governed by the Business Source License included 8 | * in the LICENSE.TXT file. 9 | * 10 | * Change Date: 2029-07-20 11 | ******************************************************************************/ 12 | 13 | 14 | package org.pentaho.commons.metadata.mqleditor.editor; 15 | 16 | import java.awt.Window; 17 | 18 | import org.pentaho.commons.metadata.mqleditor.editor.service.util.MQLEditorServiceDelegate; 19 | import org.pentaho.metadata.repository.IMetadataDomainRepository; 20 | import org.pentaho.ui.xul.XulException; 21 | import org.pentaho.ui.xul.XulLoader; 22 | import org.pentaho.ui.xul.XulRunner; 23 | import org.pentaho.ui.xul.swing.SwingXulLoader; 24 | import org.pentaho.ui.xul.swing.SwingXulRunner; 25 | 26 | /** 27 | * Default Swing implementation. This class requires a concrete Service implementation 28 | */ 29 | public class SwingMqlEditor extends AbstractMqlEditor { 30 | public SwingMqlEditor( Window parent, IMetadataDomainRepository repo ) { 31 | super( parent, repo ); 32 | } 33 | 34 | public SwingMqlEditor( IMetadataDomainRepository repo, MQLEditorService service, MQLEditorServiceDelegate delegate ) { 35 | super( repo, service, delegate ); 36 | } 37 | 38 | public SwingMqlEditor( IMetadataDomainRepository repo ) { 39 | super( repo ); 40 | } 41 | 42 | /* 43 | * (non-Javadoc) 44 | * 45 | * @see org.pentaho.commons.metadata.mqleditor.editor.AbstractMqlEditor#getLoader() 46 | */ 47 | @Override 48 | protected XulLoader getLoader() { 49 | if ( xulLoader == null ) { 50 | try { 51 | xulLoader = new SwingXulLoader(); 52 | } catch ( XulException e ) { 53 | log.error( "error loading Xul application", e ); 54 | } 55 | } 56 | return xulLoader; 57 | } 58 | 59 | /* 60 | * (non-Javadoc) 61 | * 62 | * @see org.pentaho.commons.metadata.mqleditor.editor.AbstractMqlEditor#getRunner() 63 | */ 64 | @Override 65 | protected XulRunner getRunner() { 66 | if ( xulRunner == null ) { 67 | xulRunner = new SwingXulRunner(); 68 | } 69 | return xulRunner; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /impl/src/main/resources/org/pentaho/commons/metadata/mqleditor/editor/xul/mainFrame-gwt-overlay.xul: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |