org.contextmapper.dsl.contextMappingDSL.impl.ContextMappingDSLFactoryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of context-mapper-dsl Show documentation
Show all versions of context-mapper-dsl Show documentation
Use the ContextMapper DSL in your standalone application.
/**
* generated by Xtext 2.21.0
*/
package org.contextmapper.dsl.contextMappingDSL.impl;
import org.contextmapper.dsl.contextMappingDSL.*;
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;
/**
*
* An implementation of the model Factory.
*
* @generated
*/
public class ContextMappingDSLFactoryImpl extends EFactoryImpl implements ContextMappingDSLFactory
{
/**
* Creates the default factory implementation.
*
*
* @generated
*/
public static ContextMappingDSLFactory init()
{
try
{
ContextMappingDSLFactory theContextMappingDSLFactory = (ContextMappingDSLFactory)EPackage.Registry.INSTANCE.getEFactory(ContextMappingDSLPackage.eNS_URI);
if (theContextMappingDSLFactory != null)
{
return theContextMappingDSLFactory;
}
}
catch (Exception exception)
{
EcorePlugin.INSTANCE.log(exception);
}
return new ContextMappingDSLFactoryImpl();
}
/**
* Creates an instance of the factory.
*
*
* @generated
*/
public ContextMappingDSLFactoryImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
public EObject create(EClass eClass)
{
switch (eClass.getClassifierID())
{
case ContextMappingDSLPackage.CONTEXT_MAPPING_MODEL: return createContextMappingModel();
case ContextMappingDSLPackage.IMPORT: return createImport();
case ContextMappingDSLPackage.CONTEXT_MAP: return createContextMap();
case ContextMappingDSLPackage.BOUNDED_CONTEXT: return createBoundedContext();
case ContextMappingDSLPackage.DOMAIN_PART: return createDomainPart();
case ContextMappingDSLPackage.DOMAIN: return createDomain();
case ContextMappingDSLPackage.SUBDOMAIN: return createSubdomain();
case ContextMappingDSLPackage.RELATIONSHIP: return createRelationship();
case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP: return createSymmetricRelationship();
case ContextMappingDSLPackage.PARTNERSHIP: return createPartnership();
case ContextMappingDSLPackage.SHARED_KERNEL: return createSharedKernel();
case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP: return createUpstreamDownstreamRelationship();
case ContextMappingDSLPackage.CUSTOMER_SUPPLIER_RELATIONSHIP: return createCustomerSupplierRelationship();
case ContextMappingDSLPackage.AGGREGATE: return createAggregate();
case ContextMappingDSLPackage.USER_REQUIREMENT: return createUserRequirement();
case ContextMappingDSLPackage.USE_CASE: return createUseCase();
case ContextMappingDSLPackage.USER_STORY: return createUserStory();
case ContextMappingDSLPackage.FEATURE: return createFeature();
case ContextMappingDSLPackage.SCULPTOR_MODULE: return createSculptorModule();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue)
{
switch (eDataType.getClassifierID())
{
case ContextMappingDSLPackage.UPSTREAM_ROLE:
return createUpstreamRoleFromString(eDataType, initialValue);
case ContextMappingDSLPackage.DOWNSTREAM_ROLE:
return createDownstreamRoleFromString(eDataType, initialValue);
case ContextMappingDSLPackage.CONTEXT_MAP_STATE:
return createContextMapStateFromString(eDataType, initialValue);
case ContextMappingDSLPackage.CONTEXT_MAP_TYPE:
return createContextMapTypeFromString(eDataType, initialValue);
case ContextMappingDSLPackage.BOUNDED_CONTEXT_TYPE:
return createBoundedContextTypeFromString(eDataType, initialValue);
case ContextMappingDSLPackage.SUB_DOMAIN_TYPE:
return createSubDomainTypeFromString(eDataType, initialValue);
case ContextMappingDSLPackage.DOWNSTREAM_GOVERNANCE_RIGHTS:
return createDownstreamGovernanceRightsFromString(eDataType, initialValue);
case ContextMappingDSLPackage.KNOWLEDGE_LEVEL:
return createKnowledgeLevelFromString(eDataType, initialValue);
case ContextMappingDSLPackage.LIKELIHOOD_FOR_CHANGE:
return createLikelihoodForChangeFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue)
{
switch (eDataType.getClassifierID())
{
case ContextMappingDSLPackage.UPSTREAM_ROLE:
return convertUpstreamRoleToString(eDataType, instanceValue);
case ContextMappingDSLPackage.DOWNSTREAM_ROLE:
return convertDownstreamRoleToString(eDataType, instanceValue);
case ContextMappingDSLPackage.CONTEXT_MAP_STATE:
return convertContextMapStateToString(eDataType, instanceValue);
case ContextMappingDSLPackage.CONTEXT_MAP_TYPE:
return convertContextMapTypeToString(eDataType, instanceValue);
case ContextMappingDSLPackage.BOUNDED_CONTEXT_TYPE:
return convertBoundedContextTypeToString(eDataType, instanceValue);
case ContextMappingDSLPackage.SUB_DOMAIN_TYPE:
return convertSubDomainTypeToString(eDataType, instanceValue);
case ContextMappingDSLPackage.DOWNSTREAM_GOVERNANCE_RIGHTS:
return convertDownstreamGovernanceRightsToString(eDataType, instanceValue);
case ContextMappingDSLPackage.KNOWLEDGE_LEVEL:
return convertKnowledgeLevelToString(eDataType, instanceValue);
case ContextMappingDSLPackage.LIKELIHOOD_FOR_CHANGE:
return convertLikelihoodForChangeToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
*
*
* @generated
*/
@Override
public ContextMappingModel createContextMappingModel()
{
ContextMappingModelImpl contextMappingModel = new ContextMappingModelImpl();
return contextMappingModel;
}
/**
*
*
* @generated
*/
@Override
public Import createImport()
{
ImportImpl import_ = new ImportImpl();
return import_;
}
/**
*
*
* @generated
*/
@Override
public ContextMap createContextMap()
{
ContextMapImpl contextMap = new ContextMapImpl();
return contextMap;
}
/**
*
*
* @generated
*/
@Override
public BoundedContext createBoundedContext()
{
BoundedContextImpl boundedContext = new BoundedContextImpl();
return boundedContext;
}
/**
*
*
* @generated
*/
@Override
public DomainPart createDomainPart()
{
DomainPartImpl domainPart = new DomainPartImpl();
return domainPart;
}
/**
*
*
* @generated
*/
@Override
public Domain createDomain()
{
DomainImpl domain = new DomainImpl();
return domain;
}
/**
*
*
* @generated
*/
@Override
public Subdomain createSubdomain()
{
SubdomainImpl subdomain = new SubdomainImpl();
return subdomain;
}
/**
*
*
* @generated
*/
@Override
public Relationship createRelationship()
{
RelationshipImpl relationship = new RelationshipImpl();
return relationship;
}
/**
*
*
* @generated
*/
@Override
public SymmetricRelationship createSymmetricRelationship()
{
SymmetricRelationshipImpl symmetricRelationship = new SymmetricRelationshipImpl();
return symmetricRelationship;
}
/**
*
*
* @generated
*/
@Override
public Partnership createPartnership()
{
PartnershipImpl partnership = new PartnershipImpl();
return partnership;
}
/**
*
*
* @generated
*/
@Override
public SharedKernel createSharedKernel()
{
SharedKernelImpl sharedKernel = new SharedKernelImpl();
return sharedKernel;
}
/**
*
*
* @generated
*/
@Override
public UpstreamDownstreamRelationship createUpstreamDownstreamRelationship()
{
UpstreamDownstreamRelationshipImpl upstreamDownstreamRelationship = new UpstreamDownstreamRelationshipImpl();
return upstreamDownstreamRelationship;
}
/**
*
*
* @generated
*/
@Override
public CustomerSupplierRelationship createCustomerSupplierRelationship()
{
CustomerSupplierRelationshipImpl customerSupplierRelationship = new CustomerSupplierRelationshipImpl();
return customerSupplierRelationship;
}
/**
*
*
* @generated
*/
@Override
public Aggregate createAggregate()
{
AggregateImpl aggregate = new AggregateImpl();
return aggregate;
}
/**
*
*
* @generated
*/
@Override
public UserRequirement createUserRequirement()
{
UserRequirementImpl userRequirement = new UserRequirementImpl();
return userRequirement;
}
/**
*
*
* @generated
*/
@Override
public UseCase createUseCase()
{
UseCaseImpl useCase = new UseCaseImpl();
return useCase;
}
/**
*
*
* @generated
*/
@Override
public UserStory createUserStory()
{
UserStoryImpl userStory = new UserStoryImpl();
return userStory;
}
/**
*
*
* @generated
*/
@Override
public Feature createFeature()
{
FeatureImpl feature = new FeatureImpl();
return feature;
}
/**
*
*
* @generated
*/
@Override
public SculptorModule createSculptorModule()
{
SculptorModuleImpl sculptorModule = new SculptorModuleImpl();
return sculptorModule;
}
/**
*
*
* @generated
*/
public UpstreamRole createUpstreamRoleFromString(EDataType eDataType, String initialValue)
{
UpstreamRole result = UpstreamRole.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertUpstreamRoleToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public DownstreamRole createDownstreamRoleFromString(EDataType eDataType, String initialValue)
{
DownstreamRole result = DownstreamRole.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertDownstreamRoleToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public ContextMapState createContextMapStateFromString(EDataType eDataType, String initialValue)
{
ContextMapState result = ContextMapState.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertContextMapStateToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public ContextMapType createContextMapTypeFromString(EDataType eDataType, String initialValue)
{
ContextMapType result = ContextMapType.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertContextMapTypeToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public BoundedContextType createBoundedContextTypeFromString(EDataType eDataType, String initialValue)
{
BoundedContextType result = BoundedContextType.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertBoundedContextTypeToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public SubDomainType createSubDomainTypeFromString(EDataType eDataType, String initialValue)
{
SubDomainType result = SubDomainType.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertSubDomainTypeToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public DownstreamGovernanceRights createDownstreamGovernanceRightsFromString(EDataType eDataType, String initialValue)
{
DownstreamGovernanceRights result = DownstreamGovernanceRights.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertDownstreamGovernanceRightsToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public KnowledgeLevel createKnowledgeLevelFromString(EDataType eDataType, String initialValue)
{
KnowledgeLevel result = KnowledgeLevel.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertKnowledgeLevelToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
public LikelihoodForChange createLikelihoodForChangeFromString(EDataType eDataType, String initialValue)
{
LikelihoodForChange result = LikelihoodForChange.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
*
*
* @generated
*/
public String convertLikelihoodForChangeToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
*
*
* @generated
*/
@Override
public ContextMappingDSLPackage getContextMappingDSLPackage()
{
return (ContextMappingDSLPackage)getEPackage();
}
/**
*
*
* @deprecated
* @generated
*/
@Deprecated
public static ContextMappingDSLPackage getPackage()
{
return ContextMappingDSLPackage.eINSTANCE;
}
} //ContextMappingDSLFactoryImpl