Search in sources :

Example 31 with ModelElementTypeBuilder

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

the class ListImpl method registerType.

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

        public List newInstance(ModelTypeInstanceContext instanceContext) {
            return new ListImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    expressionCollection = sequenceBuilder.elementCollection(Expression.class).build();
    typeBuilder.build();
}
Also used : Expression(org.camunda.bpm.model.dmn.instance.Expression) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) List(org.camunda.bpm.model.dmn.instance.List) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 32 with ModelElementTypeBuilder

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

the class NamedElementImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(NamedElement.class, DMN_ELEMENT_NAMED_ELEMENT).namespaceUri(DMN11_NS).extendsType(DmnElement.class).abstractType();
    nameAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_NAME).required().build();
    typeBuilder.build();
}
Also used : DmnElement(org.camunda.bpm.model.dmn.instance.DmnElement) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) NamedElement(org.camunda.bpm.model.dmn.instance.NamedElement)

Example 33 with ModelElementTypeBuilder

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

the class OrganizationUnitImpl method registerType.

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

        public OrganizationUnit newInstance(ModelTypeInstanceContext instanceContext) {
            return new OrganizationUnitImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    decisionDecisionMadeRefCollection = sequenceBuilder.elementCollection(DecisionMadeReference.class).uriElementReferenceCollection(Decision.class).build();
    decisionDecisionOwnedRefCollection = sequenceBuilder.elementCollection(DecisionOwnedReference.class).uriElementReferenceCollection(Decision.class).build();
    typeBuilder.build();
}
Also used : OrganizationUnit(org.camunda.bpm.model.dmn.instance.OrganizationUnit) DecisionMadeReference(org.camunda.bpm.model.dmn.instance.DecisionMadeReference) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) DecisionOwnedReference(org.camunda.bpm.model.dmn.instance.DecisionOwnedReference) BusinessContextElement(org.camunda.bpm.model.dmn.instance.BusinessContextElement) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 34 with ModelElementTypeBuilder

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

the class OutputClauseImpl method registerType.

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

        public OutputClause newInstance(ModelTypeInstanceContext instanceContext) {
            return new OutputClauseImpl(instanceContext);
        }
    });
    nameAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_NAME).build();
    typeRefAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_TYPE_REF).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    outputValuesChild = sequenceBuilder.element(OutputValues.class).build();
    defaultOutputEntryChild = sequenceBuilder.element(DefaultOutputEntry.class).build();
    typeBuilder.build();
}
Also used : OutputClause(org.camunda.bpm.model.dmn.instance.OutputClause) 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)

Example 35 with ModelElementTypeBuilder

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

the class OutputValuesImpl method registerType.

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

        public OutputValues newInstance(ModelTypeInstanceContext instanceContext) {
            return new OutputValuesImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : OutputValues(org.camunda.bpm.model.dmn.instance.OutputValues) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) UnaryTests(org.camunda.bpm.model.dmn.instance.UnaryTests)

Aggregations

ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)416 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)373 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)152 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)31 DmnElementReference (org.camunda.bpm.model.dmn.instance.DmnElementReference)23 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)16 Expression (org.camunda.bpm.model.bpmn.instance.Expression)13 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)11 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)10 Expression (org.camunda.bpm.model.dmn.instance.Expression)9 Task (org.camunda.bpm.model.bpmn.instance.Task)8 Expression (org.camunda.bpm.model.cmmn.instance.Expression)8 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)8 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)7 Gateway (org.camunda.bpm.model.bpmn.instance.Gateway)6 PlanItemDefinition (org.camunda.bpm.model.cmmn.instance.PlanItemDefinition)6 FormalExpression (org.camunda.bpm.model.bpmn.instance.FormalExpression)5 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)5 InformationItem (org.camunda.bpm.model.dmn.instance.InformationItem)5 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)4