Search in sources :

Example 6 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder 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();
}
Also used : DecisionTable(org.camunda.bpm.model.dmn.instance.DecisionTable) Expression(org.camunda.bpm.model.dmn.instance.Expression) HitPolicy(org.camunda.bpm.model.dmn.HitPolicy) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) Output(org.camunda.bpm.model.dmn.instance.Output) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) DecisionTableOrientation(org.camunda.bpm.model.dmn.DecisionTableOrientation)

Example 7 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder 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();
}
Also used : Definitions(org.camunda.bpm.model.dmn.instance.Definitions) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) NamedElement(org.camunda.bpm.model.dmn.instance.NamedElement)

Example 8 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-dmn-model by camunda.

the class DmnElementImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DmnElement.class, DMN_ELEMENT).namespaceUri(DMN11_NS).abstractType();
    idAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_ID).idAttribute().build();
    labelAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_LABEL).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    descriptionChild = sequenceBuilder.element(Description.class).build();
    extensionElementsChild = sequenceBuilder.element(ExtensionElements.class).build();
    typeBuilder.build();
}
Also used : SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)

Example 9 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-dmn-model by camunda.

the class InputClauseImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(InputClause.class, DMN_ELEMENT_INPUT_CLAUSE).namespaceUri(DMN11_NS).extendsType(DmnElement.class).instanceProvider(new ModelTypeInstanceProvider<InputClause>() {

        public InputClause newInstance(ModelTypeInstanceContext instanceContext) {
            return new InputClauseImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    inputExpressionChild = sequenceBuilder.element(InputExpression.class).required().build();
    inputValuesChild = sequenceBuilder.element(InputValues.class).build();
    // camunda extensions
    camundaInputVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_INPUT_VARIABLE).namespace(CAMUNDA_NS).build();
    typeBuilder.build();
}
Also used : DmnElement(org.camunda.bpm.model.dmn.instance.DmnElement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) InputExpression(org.camunda.bpm.model.dmn.instance.InputExpression) InputClause(org.camunda.bpm.model.dmn.instance.InputClause)

Example 10 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-dmn-model by camunda.

the class InputDataImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(InputData.class, DMN_ELEMENT_INPUT_DATA).namespaceUri(DMN11_NS).extendsType(DrgElement.class).instanceProvider(new ModelTypeInstanceProvider<InputData>() {

        public InputData newInstance(ModelTypeInstanceContext instanceContext) {
            return new InputDataImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    informationItemChild = sequenceBuilder.element(InformationItem.class).build();
    typeBuilder.build();
}
Also used : DrgElement(org.camunda.bpm.model.dmn.instance.DrgElement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) InputData(org.camunda.bpm.model.dmn.instance.InputData) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)152 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)152 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)133 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)14 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)13 Expression (org.camunda.bpm.model.dmn.instance.Expression)8 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)4 Task (org.camunda.bpm.model.cmmn.instance.Task)4 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)3 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)3 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)3 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)3 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)3 ConversationNode (org.camunda.bpm.model.bpmn.instance.ConversationNode)2 CorrelationPropertyRetrievalExpression (org.camunda.bpm.model.bpmn.instance.CorrelationPropertyRetrievalExpression)2 Expression (org.camunda.bpm.model.bpmn.instance.Expression)2 FlowNode (org.camunda.bpm.model.bpmn.instance.FlowNode)2 Operation (org.camunda.bpm.model.bpmn.instance.Operation)2 Task (org.camunda.bpm.model.bpmn.instance.Task)2 Node (org.camunda.bpm.model.bpmn.instance.di.Node)2