blob: 798b7d152a923c026970f3e6aebb64da98eae24a [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2019 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.rtm.rtdata.impl;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.statet.rtm.rtdata.RtDataFactory;
import org.eclipse.statet.rtm.rtdata.RtDataPackage;
import org.eclipse.statet.rtm.rtdata.types.RTypedExpr;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class RtDataPackageImpl extends EPackageImpl implements RtDataPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rVarEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rDataFrameEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rDataFilterEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rColorEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rAlphaEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rPlotPointSymbolEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rPlotLineTypeEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rFontFamilyEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rTextEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rNumEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rSizeEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rIntEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rFunctionEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rLabelEDataType= null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EDataType rNumRangeEDataType= null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.statet.rtm.rtdata.RtDataPackage#eNS_URI
* @see #init()
* @generated
*/
private RtDataPackageImpl() {
super(eNS_URI, RtDataFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited= false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link RtDataPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static RtDataPackage init() {
if (isInited) {
return (RtDataPackage)EPackage.Registry.INSTANCE.getEPackage(RtDataPackage.eNS_URI);
}
// Obtain or create and register package
final RtDataPackageImpl theRtDataPackage= (RtDataPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RtDataPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RtDataPackageImpl());
isInited= true;
// Create package meta-data objects
theRtDataPackage.createPackageContents();
// Initialize created meta-data
theRtDataPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theRtDataPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(RtDataPackage.eNS_URI, theRtDataPackage);
return theRtDataPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRVar() {
return this.rVarEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRDataFrame() {
return this.rDataFrameEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRDataFilter() {
return this.rDataFilterEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRColor() {
return this.rColorEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRAlpha() {
return this.rAlphaEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRPlotPointSymbol() {
return this.rPlotPointSymbolEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRPlotLineType() {
return this.rPlotLineTypeEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRFontFamily() {
return this.rFontFamilyEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRText() {
return this.rTextEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRNum() {
return this.rNumEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRSize() {
return this.rSizeEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRInt() {
return this.rIntEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRFunction() {
return this.rFunctionEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRLabel() {
return this.rLabelEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EDataType getRNumRange() {
return this.rNumRangeEDataType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public RtDataFactory getRtDataFactory() {
return (RtDataFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated= false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (this.isCreated) {
return;
}
this.isCreated= true;
// Create data types
this.rVarEDataType= createEDataType(RVAR);
this.rDataFrameEDataType= createEDataType(RDATA_FRAME);
this.rDataFilterEDataType= createEDataType(RDATA_FILTER);
this.rTextEDataType= createEDataType(RTEXT);
this.rNumEDataType= createEDataType(RNUM);
this.rIntEDataType= createEDataType(RINT);
this.rFunctionEDataType= createEDataType(RFUNCTION);
this.rLabelEDataType= createEDataType(RLABEL);
this.rNumRangeEDataType= createEDataType(RNUM_RANGE);
this.rSizeEDataType= createEDataType(RSIZE);
this.rColorEDataType= createEDataType(RCOLOR);
this.rAlphaEDataType= createEDataType(RALPHA);
this.rPlotPointSymbolEDataType= createEDataType(RPLOT_POINT_SYMBOL);
this.rPlotLineTypeEDataType= createEDataType(RPLOT_LINE_TYPE);
this.rFontFamilyEDataType= createEDataType(RFONT_FAMILY);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized= false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (this.isInitialized) {
return;
}
this.isInitialized= true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Initialize data types
initEDataType(this.rVarEDataType, RTypedExpr.class, "RVar", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rDataFrameEDataType, RTypedExpr.class, "RDataFrame", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rDataFilterEDataType, RTypedExpr.class, "RDataFilter", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rTextEDataType, RTypedExpr.class, "RText", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rNumEDataType, RTypedExpr.class, "RNum", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rIntEDataType, RTypedExpr.class, "RInt", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rFunctionEDataType, RTypedExpr.class, "RFunction", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rLabelEDataType, RTypedExpr.class, "RLabel", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rNumRangeEDataType, RTypedExpr.class, "RNumRange", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rSizeEDataType, RTypedExpr.class, "RSize", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rColorEDataType, RTypedExpr.class, "RColor", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rAlphaEDataType, RTypedExpr.class, "RAlpha", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rPlotPointSymbolEDataType, RTypedExpr.class, "RPlotPointSymbol", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rPlotLineTypeEDataType, RTypedExpr.class, "RPlotLineType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(this.rFontFamilyEDataType, RTypedExpr.class, "RFontFamily", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
// Create resource
createResource(eNS_URI);
}
} //RtDataPackageImpl