use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.
the class DecisionRuleImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DecisionRule.class, DMN_ELEMENT_DECISION_RULE).namespaceUri(DMN11_NS).extendsType(DmnElement.class).instanceProvider(new ModelTypeInstanceProvider<DecisionRule>() {
public DecisionRule newInstance(ModelTypeInstanceContext instanceContext) {
return new DecisionRuleImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
inputEntryCollection = sequenceBuilder.elementCollection(InputEntry.class).build();
outputEntryCollection = sequenceBuilder.elementCollection(OutputEntry.class).required().build();
typeBuilder.build();
}
use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.
the class DecisionTableImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DecisionTable.class, DMN_ELEMENT_DECISION_TABLE).namespaceUri(DMN11_NS).extendsType(Expression.class).instanceProvider(new ModelTypeInstanceProvider<DecisionTable>() {
public DecisionTable newInstance(ModelTypeInstanceContext instanceContext) {
return new DecisionTableImpl(instanceContext);
}
});
hitPolicyAttribute = typeBuilder.namedEnumAttribute(DMN_ATTRIBUTE_HIT_POLICY, HitPolicy.class).defaultValue(HitPolicy.UNIQUE).build();
aggregationAttribute = typeBuilder.enumAttribute(DMN_ATTRIBUTE_AGGREGATION, BuiltinAggregator.class).build();
preferredOrientationAttribute = typeBuilder.namedEnumAttribute(DMN_ATTRIBUTE_PREFERRED_ORIENTATION, DecisionTableOrientation.class).defaultValue(DecisionTableOrientation.Rule_as_Row).build();
outputLabelAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_OUTPUT_LABEL).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
inputCollection = sequenceBuilder.elementCollection(Input.class).build();
outputCollection = sequenceBuilder.elementCollection(Output.class).required().build();
ruleCollection = sequenceBuilder.elementCollection(Rule.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.
the class DefaultOutputEntryImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DefaultOutputEntry.class, DMN_ELEMENT_DEFAULT_OUTPUT_ENTRY).namespaceUri(DMN11_NS).extendsType(LiteralExpression.class).instanceProvider(new ModelTypeInstanceProvider<DefaultOutputEntry>() {
public DefaultOutputEntry newInstance(ModelTypeInstanceContext instanceContext) {
return new DefaultOutputEntryImpl(instanceContext);
}
});
typeBuilder.build();
}
use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.
the class DefinitionsImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Definitions.class, DMN_ELEMENT_DEFINITIONS).namespaceUri(DMN11_NS).extendsType(NamedElement.class).instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<Definitions>() {
public Definitions newInstance(ModelTypeInstanceContext instanceContext) {
return new DefinitionsImpl(instanceContext);
}
});
expressionLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPRESSION_LANGUAGE).defaultValue("http://www.omg.org/spec/FEEL/20140401").build();
typeLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_TYPE_LANGUAGE).defaultValue("http://www.omg.org/spec/FEEL/20140401").build();
namespaceAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_NAMESPACE).required().build();
exporterAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPORTER).build();
exporterVersionAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPORTER_VERSION).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
importCollection = sequenceBuilder.elementCollection(Import.class).build();
itemDefinitionCollection = sequenceBuilder.elementCollection(ItemDefinition.class).build();
drgElementCollection = sequenceBuilder.elementCollection(DrgElement.class).build();
artifactCollection = sequenceBuilder.elementCollection(Artifact.class).build();
elementCollectionCollection = sequenceBuilder.elementCollection(ElementCollection.class).build();
businessContextElementCollection = sequenceBuilder.elementCollection(BusinessContextElement.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.
the class DescriptionImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Description.class, DMN_ELEMENT_DESCRIPTION).namespaceUri(DMN11_NS).instanceProvider(new ModelTypeInstanceProvider<Description>() {
public Description newInstance(ModelTypeInstanceContext instanceContext) {
return new DescriptionImpl(instanceContext);
}
});
typeBuilder.build();
}
Aggregations