Search in sources :

Example 1 with ModelElementTypeBuilder

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

the class AllowedAnswersImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(AllowedAnswers.class, DMN_ELEMENT_ALLOWED_ANSWERS).namespaceUri(DMN11_NS).instanceProvider(new ModelTypeInstanceProvider<AllowedAnswers>() {

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

Example 2 with ModelElementTypeBuilder

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

the class AllowedValuesImpl method registerType.

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

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

Example 3 with ModelElementTypeBuilder

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

the class AssociationImpl method registerType.

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

        public Association newInstance(ModelTypeInstanceContext instanceContext) {
            return new AssociationImpl(instanceContext);
        }
    });
    associationDirectionAttribute = typeBuilder.enumAttribute(DMN_ATTRIBUTE_ASSOCIATION_DIRECTION, AssociationDirection.class).defaultValue(AssociationDirection.None).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    sourceRef = sequenceBuilder.element(SourceRef.class).required().uriElementReference(DmnElement.class).build();
    targetRef = sequenceBuilder.element(TargetRef.class).required().uriElementReference(DmnElement.class).build();
    typeBuilder.build();
}
Also used : Association(org.camunda.bpm.model.dmn.instance.Association) AssociationDirection(org.camunda.bpm.model.dmn.AssociationDirection) 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) Artifact(org.camunda.bpm.model.dmn.instance.Artifact)

Example 4 with ModelElementTypeBuilder

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

the class AuthorityRequirementImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(AuthorityRequirement.class, DMN_ELEMENT_AUTHORITY_REQUIREMENT).namespaceUri(DMN11_NS).instanceProvider(new ModelTypeInstanceProvider<AuthorityRequirement>() {

        public AuthorityRequirement newInstance(ModelTypeInstanceContext instanceContext) {
            return new AuthorityRequirementImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    requiredDecisionRef = sequenceBuilder.element(RequiredDecisionReference.class).uriElementReference(Decision.class).build();
    requiredInputRef = sequenceBuilder.element(RequiredInputReference.class).uriElementReference(InputData.class).build();
    requiredAuthorityRef = sequenceBuilder.element(RequiredAuthorityReference.class).uriElementReference(KnowledgeSource.class).build();
    typeBuilder.build();
}
Also used : RequiredAuthorityReference(org.camunda.bpm.model.dmn.instance.RequiredAuthorityReference) AuthorityRequirement(org.camunda.bpm.model.dmn.instance.AuthorityRequirement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) RequiredDecisionReference(org.camunda.bpm.model.dmn.instance.RequiredDecisionReference) RequiredInputReference(org.camunda.bpm.model.dmn.instance.RequiredInputReference) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 5 with ModelElementTypeBuilder

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

the class ColumnImpl method registerType.

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

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

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