| /** |
| * ******************************************************************************* |
| * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Regent L'Archeveque - initial API and implementation |
| * |
| * SPDX-License-Identifier: EPL-1.0 |
| * ******************************************************************************* |
| */ |
| package org.eclipse.apogy.core.environment.earth.orbit.planner.impl; |
| |
| import java.util.List; |
| import java.util.Map; |
| |
| import org.eclipse.apogy.common.emf.EObjectReferencesList; |
| |
| import org.eclipse.apogy.core.environment.earth.orbit.VisibilityPass; |
| |
| import org.eclipse.apogy.core.environment.earth.orbit.planner.*; |
| |
| import org.eclipse.core.runtime.IProgressMonitor; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EDataType; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| |
| import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl extends EFactoryImpl implements ApogyCoreEnvironmentEarthOrbitPlannerFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static ApogyCoreEnvironmentEarthOrbitPlannerFactory init() { |
| try { |
| ApogyCoreEnvironmentEarthOrbitPlannerFactory theApogyCoreEnvironmentEarthOrbitPlannerFactory = (ApogyCoreEnvironmentEarthOrbitPlannerFactory)EPackage.Registry.INSTANCE.getEFactory(ApogyCoreEnvironmentEarthOrbitPlannerPackage.eNS_URI); |
| if (theApogyCoreEnvironmentEarthOrbitPlannerFactory != null) { |
| return theApogyCoreEnvironmentEarthOrbitPlannerFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.APOGY_CORE_ENVIRONMENT_EARTH_ORBIT_PLANNER_FACADE: return createApogyCoreEnvironmentEarthOrbitPlannerFacade(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_TOOL: return createObservationAnalysisPlannerTool(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER: return createObservationAnalysisPlanner(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE: return createObservationAnalysisPlannerNode(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLAN_GENERATOR: return createObservationAnalysisPlanGenerator(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLAN_COSTS_PROCESSOR: return createObservationAnalysisPlanCostsProcessor(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.DEFAULT_OBSERVATION_PLAN_EXPORTER: return createDefaultObservationPlanExporter(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.COST_FUNCTION_STATE: return createCostFunctionState(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_RESULT: return createObservationAnalysisPlannerResult(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATELESS_COSTS_MAP_ENTRY: return (EObject)createStatelessCostsMapEntry(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATELESS_COST_FUNCTION_MAP: return createStatelessCostFunctionMap(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATELESS_COST_FUNCTION_MAP_ENTRY: return (EObject)createStatelessCostFunctionMapEntry(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY: return (EObject)createStatefulCostFunctionMapEntry(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.STATEFUL_COST_FUNCTION_MAP_ENTRY_VALUE: return createStatefulCostFunctionMapEntryValue(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.ECLIPSE_COST_FUNCTION: return createEclipseCostFunction(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.TIME_INTERVAL_COST_FUNCTION: return createTimeIntervalCostFunction(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.SIMPLE_RESOURCE_COST_FUNCTION: return createSimpleResourceCostFunction(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.SIMPLE_RESOURCE_COST_FUNCTION_STATE: return createSimpleResourceCostFunctionState(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.MINIMUM_TIME_SPAM_COST_FUNCTION: return createMinimumTimeSpamCostFunction(); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.CROSSTRACK_ANGLE_COST_FUNCTION: return createCrosstrackAngleCostFunction(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object createFromString(EDataType eDataType, String initialValue) { |
| switch (eDataType.getClassifierID()) { |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.ECLIPSE_PERIOD: |
| return createEclipsePeriodFromString(eDataType, initialValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_PLAN: |
| return createObservationPlanFromString(eDataType, initialValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE_LIST: |
| return createObservationAnalysisPlannerNodeListFromString(eDataType, initialValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.VISIBILITY_PASSES_LIST: |
| return createVisibilityPassesListFromString(eDataType, initialValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.IPROGRESS_MONITOR: |
| return createIProgressMonitorFromString(eDataType, initialValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.VISIBILITY_PASS_REFERENCES_LIST: |
| return createVisibilityPassReferencesListFromString(eDataType, initialValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.EXCEPTION: |
| return createExceptionFromString(eDataType, initialValue); |
| default: |
| throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String convertToString(EDataType eDataType, Object instanceValue) { |
| switch (eDataType.getClassifierID()) { |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.ECLIPSE_PERIOD: |
| return convertEclipsePeriodToString(eDataType, instanceValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_PLAN: |
| return convertObservationPlanToString(eDataType, instanceValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.OBSERVATION_ANALYSIS_PLANNER_NODE_LIST: |
| return convertObservationAnalysisPlannerNodeListToString(eDataType, instanceValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.VISIBILITY_PASSES_LIST: |
| return convertVisibilityPassesListToString(eDataType, instanceValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.IPROGRESS_MONITOR: |
| return convertIProgressMonitorToString(eDataType, instanceValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.VISIBILITY_PASS_REFERENCES_LIST: |
| return convertVisibilityPassReferencesListToString(eDataType, instanceValue); |
| case ApogyCoreEnvironmentEarthOrbitPlannerPackage.EXCEPTION: |
| return convertExceptionToString(eDataType, instanceValue); |
| default: |
| throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ApogyCoreEnvironmentEarthOrbitPlannerFacade createApogyCoreEnvironmentEarthOrbitPlannerFacade() { |
| ApogyCoreEnvironmentEarthOrbitPlannerFacadeImpl apogyCoreEnvironmentEarthOrbitPlannerFacade = new ApogyCoreEnvironmentEarthOrbitPlannerFacadeCustomImpl(); |
| return apogyCoreEnvironmentEarthOrbitPlannerFacade; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObservationAnalysisPlannerTool createObservationAnalysisPlannerTool() { |
| ObservationAnalysisPlannerToolImpl observationAnalysisPlannerTool = new ObservationAnalysisPlannerToolImpl(); |
| return observationAnalysisPlannerTool; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObservationAnalysisPlanner createObservationAnalysisPlanner() { |
| ObservationAnalysisPlannerImpl observationAnalysisPlanner = new ObservationAnalysisPlannerCustomImpl(); |
| return observationAnalysisPlanner; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObservationAnalysisPlannerNode createObservationAnalysisPlannerNode() { |
| ObservationAnalysisPlannerNodeImpl observationAnalysisPlannerNode = new ObservationAnalysisPlannerNodeCustomImpl(); |
| return observationAnalysisPlannerNode; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObservationAnalysisPlanGenerator createObservationAnalysisPlanGenerator() { |
| ObservationAnalysisPlanGeneratorImpl observationAnalysisPlanGenerator = new ObservationAnalysisPlanGeneratorCustomImpl(); |
| return observationAnalysisPlanGenerator; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObservationAnalysisPlanCostsProcessor createObservationAnalysisPlanCostsProcessor() { |
| ObservationAnalysisPlanCostsProcessorImpl observationAnalysisPlanCostsProcessor = new ObservationAnalysisPlanCostsProcessorCustomImpl(); |
| return observationAnalysisPlanCostsProcessor; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DefaultObservationPlanExporter createDefaultObservationPlanExporter() { |
| DefaultObservationPlanExporterImpl defaultObservationPlanExporter = new DefaultObservationPlanExporterCustomImpl(); |
| return defaultObservationPlanExporter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CostFunctionState createCostFunctionState() { |
| CostFunctionStateImpl costFunctionState = new CostFunctionStateImpl(); |
| return costFunctionState; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ObservationAnalysisPlannerResult createObservationAnalysisPlannerResult() { |
| ObservationAnalysisPlannerResultImpl observationAnalysisPlannerResult = new ObservationAnalysisPlannerResultImpl(); |
| return observationAnalysisPlannerResult; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Map.Entry<VisibilityPass, StatelessCostFunctionMap> createStatelessCostsMapEntry() { |
| StatelessCostsMapEntryImpl statelessCostsMapEntry = new StatelessCostsMapEntryImpl(); |
| return statelessCostsMapEntry; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StatelessCostFunctionMap createStatelessCostFunctionMap() { |
| StatelessCostFunctionMapImpl statelessCostFunctionMap = new StatelessCostFunctionMapImpl(); |
| return statelessCostFunctionMap; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Map.Entry<AbstractStatelessCostFunction, Double> createStatelessCostFunctionMapEntry() { |
| StatelessCostFunctionMapEntryImpl statelessCostFunctionMapEntry = new StatelessCostFunctionMapEntryImpl(); |
| return statelessCostFunctionMapEntry; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Map.Entry<AbstractStatefulCostFunction<CostFunctionState>, StatefulCostFunctionMapEntryValue> createStatefulCostFunctionMapEntry() { |
| StatefulCostFunctionMapEntryImpl statefulCostFunctionMapEntry = new StatefulCostFunctionMapEntryImpl(); |
| return statefulCostFunctionMapEntry; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StatefulCostFunctionMapEntryValue createStatefulCostFunctionMapEntryValue() { |
| StatefulCostFunctionMapEntryValueImpl statefulCostFunctionMapEntryValue = new StatefulCostFunctionMapEntryValueImpl(); |
| return statefulCostFunctionMapEntryValue; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EclipseCostFunction createEclipseCostFunction() { |
| EclipseCostFunctionImpl eclipseCostFunction = new EclipseCostFunctionCustomImpl(); |
| return eclipseCostFunction; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TimeIntervalCostFunction createTimeIntervalCostFunction() { |
| TimeIntervalCostFunctionImpl timeIntervalCostFunction = new TimeIntervalCostFunctionCustomImpl(); |
| return timeIntervalCostFunction; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SimpleResourceCostFunction createSimpleResourceCostFunction() { |
| SimpleResourceCostFunctionImpl simpleResourceCostFunction = new SimpleResourceCostFunctionCustomImpl(); |
| return simpleResourceCostFunction; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SimpleResourceCostFunctionState createSimpleResourceCostFunctionState() { |
| SimpleResourceCostFunctionStateImpl simpleResourceCostFunctionState = new SimpleResourceCostFunctionStateImpl(); |
| return simpleResourceCostFunctionState; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public MinimumTimeSpamCostFunction createMinimumTimeSpamCostFunction() { |
| MinimumTimeSpamCostFunctionImpl minimumTimeSpamCostFunction = new MinimumTimeSpamCostFunctionCustomImpl(); |
| return minimumTimeSpamCostFunction; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CrosstrackAngleCostFunction createCrosstrackAngleCostFunction() { |
| CrosstrackAngleCostFunctionImpl crosstrackAngleCostFunction = new CrosstrackAngleCostFunctionCustomImpl(); |
| return crosstrackAngleCostFunction; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EclipsePeriod createEclipsePeriodFromString(EDataType eDataType, String initialValue) { |
| EclipsePeriod result = EclipsePeriod.get(initialValue); |
| if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); |
| return result; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertEclipsePeriodToString(EDataType eDataType, Object instanceValue) { |
| return instanceValue == null ? null : instanceValue.toString(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| public EObjectReferencesList<ObservationAnalysisPlannerNode> createObservationPlanFromString(EDataType eDataType, String initialValue) { |
| return (EObjectReferencesList<ObservationAnalysisPlannerNode>)super.createFromString(initialValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertObservationPlanToString(EDataType eDataType, Object instanceValue) { |
| return super.convertToString(instanceValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| public List<ObservationAnalysisPlannerNode> createObservationAnalysisPlannerNodeListFromString(EDataType eDataType, String initialValue) { |
| return (List<ObservationAnalysisPlannerNode>)super.createFromString(initialValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertObservationAnalysisPlannerNodeListToString(EDataType eDataType, Object instanceValue) { |
| return super.convertToString(instanceValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| public List<VisibilityPass> createVisibilityPassesListFromString(EDataType eDataType, String initialValue) { |
| return (List<VisibilityPass>)super.createFromString(initialValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertVisibilityPassesListToString(EDataType eDataType, Object instanceValue) { |
| return super.convertToString(instanceValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public IProgressMonitor createIProgressMonitorFromString(EDataType eDataType, String initialValue) { |
| return (IProgressMonitor)super.createFromString(eDataType, initialValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertIProgressMonitorToString(EDataType eDataType, Object instanceValue) { |
| return super.convertToString(eDataType, instanceValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| public EObjectReferencesList<VisibilityPass> createVisibilityPassReferencesListFromString(EDataType eDataType, String initialValue) { |
| return (EObjectReferencesList<VisibilityPass>)super.createFromString(initialValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertVisibilityPassReferencesListToString(EDataType eDataType, Object instanceValue) { |
| return super.convertToString(instanceValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Exception createExceptionFromString(EDataType eDataType, String initialValue) { |
| return (Exception)super.createFromString(eDataType, initialValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String convertExceptionToString(EDataType eDataType, Object instanceValue) { |
| return super.convertToString(eDataType, instanceValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ApogyCoreEnvironmentEarthOrbitPlannerPackage getApogyCoreEnvironmentEarthOrbitPlannerPackage() { |
| return (ApogyCoreEnvironmentEarthOrbitPlannerPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static ApogyCoreEnvironmentEarthOrbitPlannerPackage getPackage() { |
| return ApogyCoreEnvironmentEarthOrbitPlannerPackage.eINSTANCE; |
| } |
| |
| } //ApogyCoreEnvironmentEarthOrbitPlannerFactoryImpl |