//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before @SuppressWarnings("unchecked") public void copyModelInstance() public virtual void copyModelInstance() { modelInstance = cloneModelInstance(); tweety = modelInstance.getModelElementById("tweety"); daffy = modelInstance.getModelElementById("daffy"); daisy = modelInstance.getModelElementById("daisy"); plucky = modelInstance.getModelElementById("plucky"); birdo = modelInstance.getModelElementById("birdo"); animalType = modelInstance.Model.getType(typeof(Animal)); // QName attribute reference fatherReference = (QNameAttributeReferenceImpl <Animal>)animalType.getAttribute("father").OutgoingReferences.GetEnumerator().next(); // ID attribute reference motherReference = (AttributeReferenceImpl <Animal>)animalType.getAttribute("mother").OutgoingReferences.GetEnumerator().next(); // ID element reference flightPartnerRefsColl = FlyingAnimal.flightPartnerRefsColl; ModelElementType flightPartnerRefType = modelInstance.Model.getType(typeof(FlightPartnerRef)); flightPartnerRef = (FlightPartnerRef)modelInstance.getModelElementsByType(flightPartnerRefType).GetEnumerator().next(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Animal), 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(typeof(Animal)).build(); motherRef = typeBuilder.stringAttribute(ATTRIBUTE_NAME_MOTHER).idAttributeReference(typeof(Animal)).build(); isEndangeredAttr = typeBuilder.booleanAttribute(ATTRIBUTE_NAME_IS_ENDANGERED).defaultValue(false).build(); genderAttr = typeBuilder.enumAttribute(ATTRIBUTE_NAME_GENDER, typeof(Gender)).required().build(); ageAttr = typeBuilder.integerAttribute(ATTRIBUTE_NAME_AGE).build(); bestFriendsRefCollection = typeBuilder.stringAttribute(ATTRIBUTE_NAME_BEST_FRIEND_REFS).idAttributeReferenceCollection(typeof(Animal), typeof(AnimalAttributeReferenceCollection)).build(); SequenceBuilder sequence = typeBuilder.sequence(); relationshipDefinitionsColl = sequence.elementCollection(typeof(RelationshipDefinition)).build(); relationshipDefinitionRefsColl = sequence.elementCollection(typeof(RelationshipDefinitionRef)).qNameElementReferenceCollection(typeof(RelationshipDefinition)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(CorrelationKey), BPMN_ELEMENT_CORRELATION_KEY).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); correlationPropertyRefCollection = sequenceBuilder.elementCollection(typeof(CorrelationPropertyRef)).qNameElementReferenceCollection(typeof(CorrelationProperty)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Process), BPMN_ELEMENT_PROCESS).namespaceUri(BPMN20_NS).extendsType(typeof(CallableElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); processTypeAttribute = typeBuilder.enumAttribute(BPMN_ATTRIBUTE_PROCESS_TYPE, typeof(ProcessType)).defaultValue(ProcessType.None).build(); isClosedAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_IS_CLOSED).defaultValue(false).build(); isExecutableAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_IS_EXECUTABLE).build(); // TODO: definitionalCollaborationRef SequenceBuilder sequenceBuilder = typeBuilder.sequence(); auditingChild = sequenceBuilder.element(typeof(Auditing)).build(); monitoringChild = sequenceBuilder.element(typeof(Monitoring)).build(); propertyCollection = sequenceBuilder.elementCollection(typeof(Property)).build(); laneSetCollection = sequenceBuilder.elementCollection(typeof(LaneSet)).build(); flowElementCollection = sequenceBuilder.elementCollection(typeof(FlowElement)).build(); artifactCollection = sequenceBuilder.elementCollection(typeof(Artifact)).build(); resourceRoleCollection = sequenceBuilder.elementCollection(typeof(ResourceRole)).build(); correlationSubscriptionCollection = sequenceBuilder.elementCollection(typeof(CorrelationSubscription)).build(); supportsCollection = sequenceBuilder.elementCollection(typeof(Supports)).qNameElementReferenceCollection(typeof(Process)).build(); /// <summary> /// camunda extensions </summary> camundaCandidateStarterGroupsAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CANDIDATE_STARTER_GROUPS).@namespace(CAMUNDA_NS).build(); camundaCandidateStarterUsersAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CANDIDATE_STARTER_USERS).@namespace(CAMUNDA_NS).build(); camundaJobPriorityAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_JOB_PRIORITY).@namespace(CAMUNDA_NS).build(); camundaTaskPriorityAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TASK_PRIORITY).@namespace(CAMUNDA_NS).build(); camundaHistoryTimeToLiveAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_HISTORY_TIME_TO_LIVE).@namespace(CAMUNDA_NS).build(); camundaIsStartableInTasklistAttribute = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_IS_STARTABLE_IN_TASKLIST).defaultValue(true).@namespace(CAMUNDA_NS).build(); camundaVersionTagAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_VERSION_TAG).@namespace(CAMUNDA_NS).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(LinkEventDefinition), BPMN_ELEMENT_LINK_EVENT_DEFINITION).namespaceUri(BPMN20_NS).extendsType(typeof(EventDefinition)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).required().build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); sourceCollection = sequenceBuilder.elementCollection(typeof(Source)).qNameElementReferenceCollection(typeof(LinkEventDefinition)).build(); targetChild = sequenceBuilder.element(typeof(Target)).qNameElementReference(typeof(LinkEventDefinition)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Egg), ELEMENT_NAME_EGG).namespaceUri(MODEL_NAMESPACE).instanceProvider(new ModelElementTypeBuilder_ModelTypeInstanceProviderAnonymousInnerClass()); idAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ID).idAttribute().build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); motherRefChild = sequenceBuilder.element(typeof(Mother)).uriElementReference(typeof(Animal)).build(); guardianRefCollection = sequenceBuilder.elementCollection(typeof(Guardian)).uriElementReferenceCollection(typeof(Animal)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(FlyingAnimal), TYPE_NAME_FLYING_ANIMAL).namespaceUri(MODEL_NAMESPACE).extendsType(typeof(Animal)).abstractType(); wingspanAttribute = typeBuilder.doubleAttribute(ATTRIBUTE_NAME_WINGSPAN).build(); SequenceBuilder sequence = typeBuilder.sequence(); flightInstructorChild = sequence.element(typeof(FlightInstructor)).idElementReference(typeof(FlyingAnimal)).build(); flightPartnerRefsColl = sequence.elementCollection(typeof(FlightPartnerRef)).idElementReferenceCollection(typeof(FlyingAnimal)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder bpmnModelBuilder) { ModelElementTypeBuilder typeBuilder = bpmnModelBuilder.defineType(typeof(CallableElement), BPMN_ELEMENT_CALLABLE_ELEMENT).namespaceUri(BPMN20_NS).extendsType(typeof(RootElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); supportedInterfaceRefCollection = sequenceBuilder.elementCollection(typeof(SupportedInterfaceRef)).qNameElementReferenceCollection(typeof(Interface)).build(); ioSpecificationChild = sequenceBuilder.element(typeof(IoSpecification)).build(); ioBindingCollection = sequenceBuilder.elementCollection(typeof(IoBinding)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(DataAssociation), BPMN_ELEMENT_DATA_ASSOCIATION).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); sourceRefCollection = sequenceBuilder.elementCollection(typeof(SourceRef)).idElementReferenceCollection(typeof(ItemAwareElement)).build(); targetRefChild = sequenceBuilder.element(typeof(TargetRef)).required().idElementReference(typeof(ItemAwareElement)).build(); transformationChild = sequenceBuilder.element(typeof(Transformation)).build(); assignmentCollection = sequenceBuilder.elementCollection(typeof(Assignment)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(ConversationNode), BPMN_ELEMENT_CONVERSATION_NODE).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).abstractType(); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); participantRefCollection = sequenceBuilder.elementCollection(typeof(ParticipantRef)).qNameElementReferenceCollection(typeof(Participant)).build(); messageFlowRefCollection = sequenceBuilder.elementCollection(typeof(MessageFlowRef)).qNameElementReferenceCollection(typeof(MessageFlow)).build(); correlationKeyCollection = sequenceBuilder.elementCollection(typeof(CorrelationKey)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(FlowElement), BPMN_ELEMENT_FLOW_ELEMENT).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).abstractType(); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); auditingChild = sequenceBuilder.element(typeof(Auditing)).build(); monitoringChild = sequenceBuilder.element(typeof(Monitoring)).build(); categoryValueRefCollection = sequenceBuilder.elementCollection(typeof(CategoryValueRef)).qNameElementReferenceCollection(typeof(CategoryValue)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(ThrowEvent), BPMN_ELEMENT_THROW_EVENT).namespaceUri(BPMN20_NS).extendsType(typeof(Event)).abstractType(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); dataInputCollection = sequenceBuilder.elementCollection(typeof(DataInput)).build(); dataInputAssociationCollection = sequenceBuilder.elementCollection(typeof(DataInputAssociation)).build(); inputSetChild = sequenceBuilder.element(typeof(InputSet)).build(); eventDefinitionCollection = sequenceBuilder.elementCollection(typeof(EventDefinition)).build(); eventDefinitionRefCollection = sequenceBuilder.elementCollection(typeof(EventDefinitionRef)).qNameElementReferenceCollection(typeof(EventDefinition)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Operation), BPMN_ELEMENT_OPERATION).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).required().build(); implementationRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_IMPLEMENTATION_REF).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); inMessageRefChild = sequenceBuilder.element(typeof(InMessageRef)).required().qNameElementReference(typeof(Message)).build(); outMessageRefChild = sequenceBuilder.element(typeof(OutMessageRef)).qNameElementReference(typeof(Message)).build(); errorRefCollection = sequenceBuilder.elementCollection(typeof(ErrorRef)).qNameElementReferenceCollection(typeof(Error)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Participant), BPMN_ELEMENT_PARTICIPANT).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build(); processRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_PROCESS_REF).qNameAttributeReference(typeof(Process)).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); interfaceRefCollection = sequenceBuilder.elementCollection(typeof(InterfaceRef)).qNameElementReferenceCollection(typeof(Interface)).build(); endPointRefCollection = sequenceBuilder.elementCollection(typeof(EndPointRef)).qNameElementReferenceCollection(typeof(EndPoint)).build(); participantMultiplicityChild = sequenceBuilder.element(typeof(ParticipantMultiplicity)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(InputSet), BPMN_ELEMENT_INPUT_SET).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute("name").build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); dataInputDataInputRefsCollection = sequenceBuilder.elementCollection(typeof(DataInputRefs)).idElementReferenceCollection(typeof(DataInput)).build(); optionalInputRefsCollection = sequenceBuilder.elementCollection(typeof(OptionalInputRefs)).idElementReferenceCollection(typeof(DataInput)).build(); whileExecutingInputRefsCollection = sequenceBuilder.elementCollection(typeof(WhileExecutingInputRefs)).idElementReferenceCollection(typeof(DataInput)).build(); outputSetOutputSetRefsCollection = sequenceBuilder.elementCollection(typeof(OutputSetRefs)).idElementReferenceCollection(typeof(OutputSet)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Bird), ELEMENT_NAME_BIRD).namespaceUri(MODEL_NAMESPACE).extendsType(typeof(FlyingAnimal)).instanceProvider(new ModelElementTypeBuilder_ModelTypeInstanceProviderAnonymousInnerClass()); SequenceBuilder sequence = typeBuilder.sequence(); eggColl = sequence.elementCollection(typeof(Egg)).minOccurs(0).maxOccurs(6).build(); spouseRefsColl = sequence.element(typeof(SpouseRef)).qNameElementReference(typeof(Bird)).build(); guardEggRefCollection = sequence.elementCollection(typeof(GuardEgg)).idsElementReferenceCollection(typeof(Egg)).build(); canHazExtendedWings_Renamed = typeBuilder.booleanAttribute("canHazExtendedWings").@namespace(TestModelConstants.NEWER_NAMESPACE).build(); wings = sequence.element(typeof(Wings)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(Lane), BPMN_ELEMENT_LANE).namespaceUri(BPMN20_NS).extendsType(typeof(BaseElement)).instanceProvider(new ModelTypeInstanceProviderAnonymousInnerClass()); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build(); partitionElementRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_PARTITION_ELEMENT_REF).qNameAttributeReference(typeof(PartitionElement)).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); partitionElementChild = sequenceBuilder.element(typeof(PartitionElement)).build(); flowNodeRefCollection = sequenceBuilder.elementCollection(typeof(FlowNodeRef)).idElementReferenceCollection(typeof(FlowNode)).build(); childLaneSetChild = sequenceBuilder.element(typeof(ChildLaneSet)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(CatchEvent), BPMN_ELEMENT_CATCH_EVENT).namespaceUri(BPMN20_NS).extendsType(typeof(Event)).abstractType(); parallelMultipleAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_PARALLEL_MULTIPLE).defaultValue(false).build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); dataOutputCollection = sequenceBuilder.elementCollection(typeof(DataOutput)).build(); dataOutputAssociationCollection = sequenceBuilder.elementCollection(typeof(DataOutputAssociation)).build(); outputSetChild = sequenceBuilder.element(typeof(OutputSet)).build(); eventDefinitionCollection = sequenceBuilder.elementCollection(typeof(EventDefinition)).build(); eventDefinitionRefCollection = sequenceBuilder.elementCollection(typeof(EventDefinitionRef)).qNameElementReferenceCollection(typeof(EventDefinition)).build(); typeBuilder.build(); }
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(typeof(FlowNode), BPMN_ELEMENT_FLOW_NODE).namespaceUri(BPMN20_NS).extendsType(typeof(FlowElement)).abstractType(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); incomingCollection = sequenceBuilder.elementCollection(typeof(Incoming)).qNameElementReferenceCollection(typeof(SequenceFlow)).build(); outgoingCollection = sequenceBuilder.elementCollection(typeof(Outgoing)).qNameElementReferenceCollection(typeof(SequenceFlow)).build(); /// <summary> /// Camunda Attributes </summary> camundaAsyncAfter = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC_AFTER).@namespace(CAMUNDA_NS).defaultValue(false).build(); camundaAsyncBefore = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC_BEFORE).@namespace(CAMUNDA_NS).defaultValue(false).build(); camundaExclusive = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_EXCLUSIVE).@namespace(CAMUNDA_NS).defaultValue(true).build(); camundaJobPriority = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_JOB_PRIORITY).@namespace(CAMUNDA_NS).build(); typeBuilder.build(); }