Search in sources :

Example 76 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-xml-model by camunda.

the class ChildRelationshipDefinition method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ChildRelationshipDefinition.class, TYPE_NAME_CHILD_RELATIONSHIP_DEFINITION).namespaceUri(MODEL_NAMESPACE).extendsType(RelationshipDefinition.class).instanceProvider(new ModelTypeInstanceProvider<ChildRelationshipDefinition>() {

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

Example 77 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-xml-model by camunda.

the class Egg method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Egg.class, ELEMENT_NAME_EGG).namespaceUri(MODEL_NAMESPACE).instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<Egg>() {

        public Egg newInstance(ModelTypeInstanceContext instanceContext) {
            return new Egg(instanceContext);
        }
    });
    idAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ID).idAttribute().build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    motherRefChild = sequenceBuilder.element(Mother.class).uriElementReference(Animal.class).build();
    guardianRefCollection = sequenceBuilder.elementCollection(Guardian.class).uriElementReferenceCollection(Animal.class).build();
    typeBuilder.build();
}
Also used : 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 78 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-xml-model by camunda.

the class FlightInstructor method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(FlightInstructor.class, ELEMENT_NAME_FLIGHT_INSTRUCTOR).namespaceUri(MODEL_NAMESPACE).instanceProvider(new ModelTypeInstanceProvider<FlightInstructor>() {

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

Example 79 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-xml-model by camunda.

the class Mother method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Mother.class, ELEMENT_NAME_MOTHER).namespaceUri(MODEL_NAMESPACE).extendsType(AnimalReference.class).instanceProvider(new ModelTypeInstanceProvider<Mother>() {

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

Example 80 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-cmmn-model by camunda.

the class CaseFileItemOnPartImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CaseFileItemOnPart.class, CMMN_ELEMENT_CASE_FILE_ITEM_ON_PART).extendsType(OnPart.class).namespaceUri(CMMN11_NS).instanceProvider(new ModelTypeInstanceProvider<CaseFileItemOnPart>() {

        public CaseFileItemOnPart newInstance(ModelTypeInstanceContext instanceContext) {
            return new CaseFileItemOnPartImpl(instanceContext);
        }
    });
    sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF).idAttributeReference(CaseFileItem.class).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    standardEventChild = sequenceBuilder.element(CaseFileItemTransitionStandardEvent.class).build();
    typeBuilder.build();
}
Also used : CaseFileItemOnPart(org.camunda.bpm.model.cmmn.instance.CaseFileItemOnPart) 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)

Aggregations

ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)373 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)373 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)133 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)27 DmnElementReference (org.camunda.bpm.model.dmn.instance.DmnElementReference)23 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)14 Expression (org.camunda.bpm.model.bpmn.instance.Expression)13 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)9 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)9 Task (org.camunda.bpm.model.bpmn.instance.Task)8 Expression (org.camunda.bpm.model.cmmn.instance.Expression)8 Expression (org.camunda.bpm.model.dmn.instance.Expression)8 FormalExpression (org.camunda.bpm.model.bpmn.instance.FormalExpression)5 InformationItem (org.camunda.bpm.model.dmn.instance.InformationItem)5 LiteralExpression (org.camunda.bpm.model.dmn.instance.LiteralExpression)5 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)5 Gateway (org.camunda.bpm.model.bpmn.instance.Gateway)4 CaseParameter (org.camunda.bpm.model.cmmn.instance.CaseParameter)4 PlanItemDefinition (org.camunda.bpm.model.cmmn.instance.PlanItemDefinition)4 Task (org.camunda.bpm.model.cmmn.instance.Task)4