| @GenModel(fileExtensions="data") |
| @GenModel(modelName="DataDSL") |
| @GenModel(prefix="DataDSL") |
| @GenModel(updateClasspath="false") |
| |
| // force bigModel == false |
| @GenModel(loadInitialization="false") |
| @GenModel(literalsInterface="true") |
| |
| @GenModel(copyrightText="Copyright (c) 2014, Loetz GmbH&Co.KG (Heidelberg) |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License 2.0 |
| which accompanies this distribution, and is available at |
| https://www.eclipse.org/legal/epl-2.0/ |
| |
| SPDX-License-Identifier: EPL-2.0 |
| |
| Based on ideas from Xtext, Xtend, Xcore |
| |
| Contributors: |
| Joerg Riegel - Initial implementation |
| ") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/datainterchange/DataDSL") |
| @Ecore(nsPrefix="datadsl") |
| @Ecore(rootPackage="datadsl") |
| package org.eclipse.osbp.xtext.datainterchange |
| |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.emf.ecore.InternalEObject |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.osbp.dsl.semantic.entity.LEntity |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityAttribute |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityFeature |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityReference |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3 |
| import org.eclipse.xtext.xtype.XImportSection |
| |
| class DataInterchangeModel{ |
| contains XImportSection importSection |
| contains DataInterchangePackage[] packages |
| } |
| |
| type InternalEObject wraps InternalEObject |
| |
| class DataInterchangeLazyResolver { |
| op EObject eResolveProxy(InternalEObject proxy) { |
| return EcoreUtil3.resolve(proxy, this.eResource().resourceSet); |
| } |
| } |
| |
| class DataInterchangePackage extends LPackage{ |
| contains DataInterchangeGroup[] groups |
| } |
| |
| class DataInterchangeBase extends DataInterchangeLazyResolver{ |
| String name |
| } |
| |
| class DataInterchangeGroup extends DataInterchangeBase { |
| contains DataInterchange[] datInts |
| } |
| |
| class DataInterchange extends DataInterchangeBase { |
| boolean description |
| String descriptionValue |
| String vectorName |
| boolean hasVectorName |
| boolean createReport |
| int elementSize |
| EntityManagerMode mode |
| contains DataInterchangeFile fileEndpoint |
| contains DataInterchangeBean[] path |
| boolean deleteFileAfterImport |
| } |
| |
| interface DataInterchangeFile extends DataInterchangeLazyResolver{ |
| String encoding |
| String locale |
| } |
| |
| class DataInterchangeFileXML extends DataInterchangeFile { |
| String fileURL |
| boolean byAttribute |
| } |
| |
| class DataInterchangeFileCSV extends DataInterchangeFile { |
| String fileURL |
| String delimiter |
| String quoteCharacter |
| int skipLines |
| boolean indent |
| } |
| |
| class DataInterchangeFileEDI extends DataInterchangeFile { |
| String fileURL |
| String mappingModel |
| boolean validate |
| } |
| |
| class DataInterchangeBean extends DataInterchangeLazyResolver { |
| refers LEntity entity |
| boolean markLatestImport |
| boolean markLatestExport |
| boolean hasBlobMapping |
| refers LEntityAttribute latestProperty |
| refers LEntityAttribute latestExpProperty |
| String elementMap |
| String nodeName |
| contains DataInterchangeLookup[] lookup |
| contains DataInterchangeFormat[] format |
| contains DataInterchangeExpression[] expression |
| contains DataInterchangeMapping[] mappings |
| contains DataInterchangeKey[] lookupKeys |
| contains DataInterchangeExpose[] exportExposes |
| contains DataInterchangeExportFilter exportFilter |
| } |
| |
| class DataInterchangeKey extends DataInterchangeLazyResolver { |
| refers LEntityAttribute property |
| } |
| |
| class DataInterchangeFormat extends DataInterchangeLazyResolver { |
| refers LEntityAttribute targetProperty |
| String format |
| } |
| |
| interface DataInterchangeExpression extends DataInterchangeLazyResolver { |
| refers LEntityAttribute targetProperty |
| } |
| |
| class DataInterchangeEntityExpression extends DataInterchangeExpression { |
| refers LEntity entity |
| refers LEntityAttribute property |
| } |
| |
| class DataInterchangePredefinedExpression extends DataInterchangeExpression { |
| PredefinedBeanEnum bean |
| PredefinedBeanTypeEnum beanType |
| } |
| |
| class DataInterchangeLookup extends DataInterchangeLazyResolver { |
| refers LEntity entity |
| refers LEntityReference targetProperty |
| refers LEntityAttribute queryProperty |
| String elementMap |
| String dataMap |
| boolean allowNoResult |
| boolean allowNonuniqueResult |
| boolean cached |
| int cacheSize |
| contains DataInterchangeMarkerPath markerPath |
| } |
| |
| class DataInterchangeExpose extends DataInterchangeLazyResolver { |
| refers LEntityReference refEntity |
| refers LEntityAttribute refProperty |
| contains DataInterchangeExpose subExpose |
| } |
| |
| class DataInterchangeExportFilter extends DataInterchangeLazyResolver { |
| contains DataInterchangeFilterCondition condition |
| contains DataInterchangeExportHide[] hiddenproperties |
| } |
| |
| class DataInterchangeFilterCondition extends DataInterchangeLazyResolver { |
| refers LEntityFeature refProperty |
| ConditionAndOperator1 operator |
| String value |
| ConditionAndOperator2 operator2 |
| contains DataInterchangeFilterCondition subcondition |
| } |
| |
| class DataInterchangeExportHide extends DataInterchangeLazyResolver { |
| refers LEntityFeature property |
| } |
| |
| class DataInterchangeMarkerPath extends DataInterchangeLazyResolver { |
| contains DataInterchangeMarkerEntity[] path |
| } |
| |
| class DataInterchangeMarkerEntity extends DataInterchangeLazyResolver { |
| boolean markLatest |
| refers LEntity markerEntity |
| refers LEntityAttribute markerProperty |
| } |
| |
| interface DataInterchangeMapping extends DataInterchangeLazyResolver { |
| refers LEntityAttribute property |
| String data |
| } |
| |
| class DataInterchangeValueMapping extends DataInterchangeMapping { |
| } |
| |
| class DataInterchangeBlobMapping extends DataInterchangeMapping { |
| String blobFileExtension |
| String blobPath |
| PredefinedBlobMimeTypeEnum mimeType |
| } |
| |
| enum PredefinedBlobMimeTypeEnum{ |
| plain as "text/plain" |
| jpg as "image/jpeg" |
| png as "image/png" |
| mpeg as "video/mpeg" |
| octetstream as "application/octet-stream" |
| pdf as "application/pdf" |
| } |
| |
| |
| enum PredefinedBeanEnum{ |
| now as 'NowDate' |
| start as 'StartDate' |
| UUID as 'UniversallyUniqueIdentifier' |
| } |
| |
| enum PredefinedBeanTypeEnum{ |
| Date as 'Date' |
| Millis as 'Milliseconds' |
| Nanos as 'Nanoseconds' |
| random as 'Random' |
| execContext as 'ExecuteContext' |
| } |
| |
| enum EntityManagerMode{ |
| persist as 'persist' |
| merge as 'merge' |
| remove as 'remove' |
| } |
| |
| enum ConditionAndOperator1{ |
| equals as '=' |
| notequals as '!=' |
| greaterthen as '>' |
| greaterthenorequalto as '>=' |
| lessthen as '<' |
| lessthenorequalto as '<=' |
| in as 'in' |
| between as 'between' |
| like as 'like' |
| not as 'not' |
| isnull as 'isnull' |
| isnotnull as 'isnotnull' |
| exists as 'exists' |
| } |
| enum ConditionAndOperator2{ |
| and as 'and' |
| or as 'or' |
| } |