Search in sources :

Example 86 with ModelElementTypeBuilder

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

the class FlyingAnimal method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(FlyingAnimal.class, TYPE_NAME_FLYING_ANIMAL).namespaceUri(MODEL_NAMESPACE).extendsType(Animal.class).abstractType();
    wingspanAttribute = typeBuilder.doubleAttribute(ATTRIBUTE_NAME_WINGSPAN).build();
    SequenceBuilder sequence = typeBuilder.sequence();
    flightInstructorChild = sequence.element(FlightInstructor.class).idElementReference(FlyingAnimal.class).build();
    flightPartnerRefsColl = sequence.elementCollection(FlightPartnerRef.class).idElementReferenceCollection(FlyingAnimal.class).build();
    typeBuilder.build();
}
Also used : SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)

Example 87 with ModelElementTypeBuilder

use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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 88 with ModelElementTypeBuilder

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

the class RelationshipDefinition method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(RelationshipDefinition.class, TYPE_NAME_RELATIONSHIP_DEFINITION).namespaceUri(MODEL_NAMESPACE).abstractType();
    idAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ID).idAttribute().build();
    animalRef = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ANIMAL_REF).idAttributeReference(Animal.class).build();
    typeBuilder.build();
}
Also used : ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)

Example 89 with ModelElementTypeBuilder

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

the class ArtifactImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Artifact.class, CMMN_ELEMENT_ARTIFACT).abstractType().namespaceUri(CMMN11_NS);
    typeBuilder.build();
}
Also used : ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)

Example 90 with ModelElementTypeBuilder

use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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

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