use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder in project camunda-cmmn-model by camunda.
the class CamundaVariableListenerImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaVariableListener.class, CAMUNDA_ELEMENT_VARIABLE_LISTENER).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaVariableListener>() {
public CamundaVariableListener newInstance(ModelTypeInstanceContext instanceContext) {
return new CamundaVariableListenerImpl(instanceContext);
}
});
camundaEventAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EVENT).namespace(CAMUNDA_NS).build();
camundaClassAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CLASS).namespace(CAMUNDA_NS).build();
camundaExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EXPRESSION).namespace(CAMUNDA_NS).build();
camundaDelegateExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DELEGATE_EXPRESSION).namespace(CAMUNDA_NS).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
camundaFieldCollection = sequenceBuilder.elementCollection(CamundaField.class).build();
camundaScriptChild = sequenceBuilder.element(CamundaScript.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder in project camunda-xml-model by camunda.
the class Animal method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Animal.class, TYPE_NAME_ANIMAL).namespaceUri(MODEL_NAMESPACE).abstractType();
idAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ID).idAttribute().build();
nameAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_NAME).build();
fatherRef = typeBuilder.stringAttribute(ATTRIBUTE_NAME_FATHER).qNameAttributeReference(Animal.class).build();
motherRef = typeBuilder.stringAttribute(ATTRIBUTE_NAME_MOTHER).idAttributeReference(Animal.class).build();
isEndangeredAttr = typeBuilder.booleanAttribute(ATTRIBUTE_NAME_IS_ENDANGERED).defaultValue(false).build();
genderAttr = typeBuilder.enumAttribute(ATTRIBUTE_NAME_GENDER, Gender.class).required().build();
ageAttr = typeBuilder.integerAttribute(ATTRIBUTE_NAME_AGE).build();
bestFriendsRefCollection = typeBuilder.stringAttribute(ATTRIBUTE_NAME_BEST_FRIEND_REFS).idAttributeReferenceCollection(Animal.class, AnimalAttributeReferenceCollection.class).build();
SequenceBuilder sequence = typeBuilder.sequence();
relationshipDefinitionsColl = sequence.elementCollection(RelationshipDefinition.class).build();
relationshipDefinitionRefsColl = sequence.elementCollection(RelationshipDefinitionRef.class).qNameElementReferenceCollection(RelationshipDefinition.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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();
}
use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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();
}
use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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();
}
Aggregations