platform_dsl_mapping.grammar.mapping.pure Maven / Gradle / Ivy
// Copyright 2020 Goldman Sachs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import meta::pure::mapping::*;
import meta::core::runtime::*;
import meta::pure::store::*;
import meta::pure::tools::*;
import meta::pure::functions::collection::*;
import meta::pure::mapping::aggregationAware::*;
import meta::pure::test::*;
// Mapping
Class meta::pure::mapping::Mapping extends PackageableElement, Testable
{
includes : MappingInclude[*];
classMappings : SetImplementation[*];
enumerationMappings : EnumerationMapping[*];
associationMappings : AssociationImplementation[*];
}
Class meta::pure::mapping::ValueTransformer
{
// toDomainValue(sourceValue: Any[1]) { $sourceValue; }:Any[1];
// toSourceValues(domainValue: Any[1]) { $domainValue; }:Any[*];
}
Class meta::pure::mapping::EnumerationMapping extends meta::pure::mapping::ValueTransformer
{
name : String[1];
parent : Mapping[1];
enumeration : Enumeration[1];
enumValueMappings: EnumValueMapping[*];
}
Class meta::pure::mapping::EnumValueMapping
{
enum : Enum[1];
sourceValues : Any[*];
}
Class meta::pure::mapping::PropertyOwnerImplementation
{
id : String[1];
superSetImplementationId: String[0..1];
parent : Mapping[1];
}
Class meta::pure::mapping::SetImplementation extends PropertyOwnerImplementation
{
root : Boolean[1];
class : Class[1];
}
Class meta::pure::mapping::PropertyMappingsImplementation extends PropertyOwnerImplementation
{
stores : meta::pure::store::Store[*];
propertyMappings : PropertyMapping[*];
}
Class meta::pure::mapping::InstanceSetImplementation extends SetImplementation, PropertyMappingsImplementation
{
mappingClass : MappingClass[0..1];
aggregateSpecification: AggregateSpecification[0..1];
}
Class meta::pure::mapping::EmbeddedSetImplementation extends InstanceSetImplementation, PropertyMapping
{
}
Class meta::pure::mapping::AssociationImplementation extends PropertyMappingsImplementation
{
association:Association[1];
}
Class meta::pure::mapping::OtherwiseEmbeddedSetImplementation extends EmbeddedSetImplementation
{
otherwisePropertyMapping: PropertyMapping[1];
}
Class meta::pure::mapping::InlineEmbeddedSetImplementation extends EmbeddedSetImplementation
{
inlineSetImplementationId: String[1];
}
Class meta::pure::mapping::SetImplementationContainer
{
id : String[1];
setImplementation : SetImplementation[1];
}
Class meta::pure::mapping::OperationSetImplementation extends meta::pure::mapping::SetImplementation
{
parameters : SetImplementationContainer[*];
operation : Function<{OperationSetImplementation[1] -> SetImplementation[*]}>[1];
}
Class meta::pure::mapping::MergeOperationSetImplementation extends meta::pure::mapping::OperationSetImplementation
{
validationFunction : LambdaFunction[1];
}
Class meta::pure::mapping::PropertyMapping
{
owner : PropertyMappingsImplementation[0..1];
targetSetImplementationId : String[1];
sourceSetImplementationId : String[1];
property : Property[1];
localMappingProperty : Boolean[0..1];
localMappingPropertyType : Type[0..1];
localMappingPropertyMultiplicity : Multiplicity[0..1];
store : meta::pure::store::Store[0..1];
}
Class meta::pure::mapping::PropertyMappingValueSpecificationContext extends ValueSpecificationContext
{
propertyMapping : PropertyMapping[1];
}
Class meta::pure::mapping::MappingClass extends Class
{
setImplementation : SetImplementation[0..1];
class : Class[0..1];
localProperties : Property[*];
}
Class meta::pure::mapping::MappingInclude
{
owner : Mapping[1];
included : Mapping[1];
storeSubstitutions : SubstituteStore[*];
}
Class meta::pure::mapping::SubstituteStore
{
owner : MappingInclude[1];
original : Store[1];
substitute : Store[1];
}
// M2M
Class meta::external::store::model::PureInstanceSetImplementation extends InstanceSetImplementation
{
srcClass : Type[0..1];
filter : LambdaFunction[0..1]; // Boolean Expression
}
Class meta::external::store::model::PurePropertyMapping extends PropertyMapping
{
transform : LambdaFunction[1];
transformer : ValueTransformer[0..1];
explodeProperty : Boolean[0..1];
}
// XStore
Class meta::pure::mapping::xStore::XStoreAssociationImplementation extends AssociationImplementation
{
}
Class meta::pure::mapping::xStore::XStorePropertyMapping extends PropertyMapping
{
crossExpression : LambdaFunction<{Nil[1],Nil[1]->Boolean[1]}>[1];
}
// Aggregation Aware
Class meta::pure::mapping::aggregationAware::AggregationAwareSetImplementation extends InstanceSetImplementation
{
aggregateSetImplementations: AggregateSetImplementationContainer[*];
mainSetImplementation: InstanceSetImplementation[1];
}
Class meta::pure::mapping::aggregationAware::AggregationAwarePropertyMapping extends PropertyMapping
{
}
Class meta::pure::mapping::aggregationAware::AggregateSetImplementationContainer
{
index: Integer[1];
aggregateSpecification: AggregateSpecification[1];
setImplementation: InstanceSetImplementation[1];
}
Class meta::pure::mapping::aggregationAware::AggregateSpecification
{
canAggregate: Boolean[1];
groupByFunctions: meta::pure::mapping::aggregationAware::GroupByFunctionSpecification[*];
aggregateValues: meta::pure::mapping::aggregationAware::AggregationFunctionSpecification[*];
}
Class meta::pure::mapping::aggregationAware::GroupByFunctionSpecification
{
groupByFn: LambdaFunction[1];
}
Class meta::pure::mapping::aggregationAware::AggregationFunctionSpecification
{
mapFn: LambdaFunction[1];
aggregateFn: LambdaFunction[1];
}
Class meta::pure::mapping::aggregationAware::AggregateSpecificationValueSpecificationContext extends ValueSpecificationContext
{
aggregateSetImplementation: InstanceSetImplementation[1];
}