Interface ModelElementInstance

All Known Subinterfaces:
ActivationCondition, Activity, AllowedAnswers, AllowedValues, ApplicabilityRule, Artifact, Artifact, Artifact, Assignment, Association, Association, Association, Auditing, AuthorityRequirement, BaseElement, Binding, BindingRefinementExpression, Body, BoundaryEvent, Bounds, BpmnDiagram, BpmnEdge, BpmnLabel, BpmnLabelStyle, BpmnModelElementInstance, BpmnPlane, BpmnShape, BusinessContextElement, BusinessKnowledgeModel, BusinessRuleTask, CallableElement, CallActivity, CallConversation, CamundaCaseExecutionListener, CamundaConnector, CamundaConnectorId, CamundaConstraint, CamundaEntry, CamundaErrorEventDefinition, CamundaExecutionListener, CamundaExpression, CamundaExpression, CamundaFailedJobRetryTimeCycle, CamundaField, CamundaField, CamundaFormData, CamundaFormField, CamundaFormProperty, CamundaIn, CamundaIn, CamundaInputOutput, CamundaInputParameter, CamundaList, CamundaMap, CamundaOut, CamundaOut, CamundaOutputParameter, CamundaPotentialStarter, CamundaProperties, CamundaProperty, CamundaScript, CamundaScript, CamundaString, CamundaString, CamundaTaskListener, CamundaTaskListener, CamundaValidation, CamundaValue, CamundaVariableListener, CamundaVariableOnPart, CamundaVariableTransitionEvent, CancelEventDefinition, Case, CaseFile, CaseFileItem, CaseFileItemDefinition, CaseFileItemOnPart, CaseFileItemStartTrigger, CaseFileItemTransitionStandardEvent, CaseFileModel, CaseParameter, CasePlanModel, CaseRefExpression, CaseRole, CaseRoles, CaseTask, CatchEvent, Category, CategoryValue, Children, CmmnElement, CmmnModelElementInstance, Collaboration, Column, CompensateEventDefinition, CompletionCondition, ComplexBehaviorDefinition, ComplexGateway, Condition, ConditionalEventDefinition, ConditionExpression, ConditionExpression, Context, ContextEntry, Conversation, ConversationAssociation, ConversationLink, ConversationNode, CorrelationKey, CorrelationProperty, CorrelationPropertyBinding, CorrelationPropertyRetrievalExpression, CorrelationSubscription, Criterion, DataAssociation, DataInput, DataInputAssociation, DataObject, DataObjectReference, DataOutput, DataOutputAssociation, DataState, DataStore, DataStoreReference, Decision, Decision, DecisionMadeReference, DecisionMakerReference, DecisionOwnedReference, DecisionOwnerReference, DecisionParameter, DecisionRefExpression, DecisionRule, DecisionService, DecisionTable, DecisionTask, DefaultControl, DefaultOutputEntry, Definitions, Definitions, Definitions, Description, Diagram, DiagramElement, DiscretionaryItem, DmnElement, DmnElementReference, DmnModelElementInstance, Documentation, Documentation, DrgElement, DrgElementReference, Edge, ElementCollection, EncapsulatedDecisionReference, EncapsulatedLogic, EndEvent, EndPoint, EntryCriterion, Error, ErrorEventDefinition, Escalation, EscalationEventDefinition, Event, Event, EventBasedGateway, EventDefinition, EventListener, ExclusiveGateway, ExitCriterion, Expression, Expression, Expression, Extension, Extension, ExtensionElements, ExtensionElements, ExtensionElements, FlowElement, FlowNode, Font, FormalExpression, FormalParameter, FunctionDefinition, Gateway, GlobalConversation, Group, HumanPerformer, HumanTask, IfPart, ImpactedPerformanceIndicatorReference, ImpactingDecisionReference, Import, Import, Import, ImportedElement, ImportedValues, InclusiveGateway, InformationItem, InformationRequirement, Input, InputCaseParameter, InputClause, InputData, InputDataItem, InputDataReference, InputDecisionParameter, InputDecisionReference, InputEntry, InputExpression, InputProcessParameter, InputsCaseParameter, InputSet, InputValues, InteractionNode, Interface, IntermediateCatchEvent, IntermediateThrowEvent, Invocation, IoBinding, IoSpecification, ItemAwareElement, ItemComponent, ItemControl, ItemDefinition, ItemDefinition, ItemDefinitionReference, KnowledgeRequirement, KnowledgeSource, Label, LabeledEdge, LabeledShape, Lane, LaneSet, LinkEventDefinition, List, LiteralExpression, LoopCardinality, LoopCharacteristics, ManualActivationRule, ManualTask, Message, MessageEventDefinition, MessageFlow, MessageFlowAssociation, Milestone, Monitoring, MultiInstanceLoopCharacteristics, NamedElement, Node, OnPart, Operation, OrganizationUnit, Output, OutputCaseParameter, OutputClause, OutputDataItem, OutputDecisionParameter, OutputDecisionReference, OutputEntry, OutputProcessParameter, OutputsCaseParameter, OutputSet, OutputValues, OwnerReference, ParallelGateway, Parameter, Parameter, ParameterMapping, Participant, ParticipantAssociation, ParticipantMultiplicity, PerformanceIndicator, Performer, Plane, PlanFragment, PlanItem, PlanItemControl, PlanItemDefinition, PlanItemOnPart, PlanItemStartTrigger, PlanItemTransitionStandardEvent, PlanningTable, Point, PotentialOwner, Process, Process, ProcessParameter, ProcessRefExpression, ProcessTask, Property, Property, Question, ReceiveTask, Relation, Relationship, Relationship, Rendering, RepetitionRule, RequiredAuthorityReference, RequiredDecisionReference, RequiredInputReference, RequiredKnowledgeReference, RequiredRule, Resource, ResourceAssignmentExpression, ResourceParameter, ResourceParameterBinding, ResourceRole, Role, RootElement, Row, Rule, Script, ScriptTask, SendTask, Sentry, SequenceFlow, ServiceTask, Shape, Signal, SignalEventDefinition, Source, SourceRef, Stage, StartEvent, StartTrigger, Style, SubConversation, SubProcess, SupportedObjectiveReference, TableItem, Target, TargetRef, Task, Task, TerminateEventDefinition, Text, Text, Text, TextAnnotation, TextAnnotation, TextAnnotation, ThrowEvent, TimeCycle, TimeDate, TimeDuration, TimerEvent, TimerEventDefinition, TimerEventListener, TimerExpression, Transaction, TransformationExpression, Type, TypeRef, UnaryTests, UserEvent, UserEventListener, UserTask, UsingProcessReference, UsingTaskReference, Variable, Waypoint
All Known Implementing Classes:
ActivationConditionImpl, ActivityImpl, AllowedAnswersImpl, AllowedValuesImpl, ApplicabilityRuleImpl, ArtifactImpl, ArtifactImpl, ArtifactImpl, AssignmentImpl, AssociationImpl, AssociationImpl, AssociationImpl, AuditingImpl, AuthorityRequirementImpl, BaseElementImpl, BindingImpl, BindingRefinementExpressionImpl, BodyImpl, BoundaryEventImpl, BoundsImpl, BpmnDiagramImpl, BpmnEdgeImpl, BpmnLabelImpl, BpmnLabelStyleImpl, BpmnModelElementInstanceImpl, BpmnPlaneImpl, BpmnShapeImpl, BusinessContextElementImpl, BusinessKnowledgeModelImpl, BusinessRuleTaskImpl, CallableElementImpl, CallActivityImpl, CallConversationImpl, CamundaCaseExecutionListenerImpl, CamundaConnectorIdImpl, CamundaConnectorImpl, CamundaConstraintImpl, CamundaEntryImpl, CamundaErrorEventDefinitionImpl, CamundaExecutionListenerImpl, CamundaExpressionImpl, CamundaExpressionImpl, CamundaFailedJobRetryTimeCycleImpl, CamundaFieldImpl, CamundaFieldImpl, CamundaFormDataImpl, CamundaFormFieldImpl, CamundaFormPropertyImpl, CamundaGenericValueElementImpl, CamundaInImpl, CamundaInImpl, CamundaInputOutputImpl, CamundaInputParameterImpl, CamundaListImpl, CamundaMapImpl, CamundaOutImpl, CamundaOutImpl, CamundaOutputParameterImpl, CamundaPotentialStarterImpl, CamundaPropertiesImpl, CamundaPropertyImpl, CamundaScriptImpl, CamundaScriptImpl, CamundaStringImpl, CamundaStringImpl, CamundaTaskListenerImpl, CamundaTaskListenerImpl, CamundaValidationImpl, CamundaValueImpl, CamundaVariableListenerImpl, CamundaVariableOnPartImpl, CamundaVariableTransitionEventImpl, CancelEventDefinitionImpl, CaseFileImpl, CaseFileItemDefinitionImpl, CaseFileItemImpl, CaseFileItemOnPartImpl, CaseFileItemStartTriggerImpl, CaseFileItemTransitionStandardEventImpl, CaseFileModelImpl, CaseImpl, CaseParameterImpl, CasePlanModel, CaseRefExpressionImpl, CaseRoleImpl, CaseRolesImpl, CaseTaskImpl, CatchEventImpl, CategoryImpl, CategoryValueImpl, CategoryValueRef, ChildLaneSet, ChildrenImpl, CmmnElementImpl, CmmnModelElementInstanceImpl, CollaborationImpl, ColumnImpl, CompensateEventDefinitionImpl, CompletionConditionImpl, ComplexBehaviorDefinitionImpl, ComplexGatewayImpl, ConditionalEventDefinitionImpl, ConditionExpressionImpl, ConditionExpressionImpl, ConditionImpl, ContextEntryImpl, ContextImpl, ConversationAssociationImpl, ConversationImpl, ConversationLinkImpl, ConversationNodeImpl, CorrelationKeyImpl, CorrelationPropertyBindingImpl, CorrelationPropertyImpl, CorrelationPropertyRef, CorrelationPropertyRetrievalExpressionImpl, CorrelationSubscriptionImpl, CriterionImpl, DataAssociationImpl, DataInputAssociationImpl, DataInputImpl, DataInputRefs, DataObjectImpl, DataObjectReferenceImpl, DataOutputAssociationImpl, DataOutputImpl, DataOutputRefs, DataPath, DataStateImpl, DataStoreImpl, DataStoreReferenceImpl, DecisionImpl, DecisionImpl, DecisionMadeReferenceImpl, DecisionMakerReferenceImpl, DecisionOwnedReferenceImpl, DecisionOwnerReferenceImpl, DecisionParameterImpl, DecisionRefExpressionImpl, DecisionRuleImpl, DecisionServiceImpl, DecisionTableImpl, DecisionTaskImpl, DefaultControlImpl, DefaultOutputEntryImpl, DefinitionsImpl, DefinitionsImpl, DefinitionsImpl, DescriptionImpl, DiagramElementImpl, DiagramImpl, DiscretionaryItemImpl, DmnElementImpl, DmnElementReferenceImpl, DmnModelElementInstanceImpl, DocumentationImpl, DocumentationImpl, DrgElementImpl, DrgElementReferenceImpl, EdgeImpl, ElementCollectionImpl, EncapsulatedDecisionReferenceImpl, EncapsulatedLogicImpl, EndEventImpl, EndPointImpl, EndPointRef, EntryCriterionImpl, ErrorEventDefinitionImpl, ErrorImpl, ErrorRef, EscalationEventDefinitionImpl, EscalationImpl, EventBasedGatewayImpl, EventDefinitionImpl, EventDefinitionRef, EventImpl, EventImpl, EventListenerImpl, ExclusiveGatewayImpl, ExitCriterionImpl, ExpressionImpl, ExpressionImpl, ExpressionImpl, ExtensionElementsImpl, ExtensionElementsImpl, ExtensionElementsImpl, ExtensionImpl, ExtensionImpl, FlowElementImpl, FlowNodeImpl, FlowNodeRef, FontImpl, FormalExpressionImpl, FormalParameterImpl, From, FunctionDefinitionImpl, GatewayImpl, GlobalConversationImpl, GroupImpl, HumanPerformerImpl, HumanTaskImpl, IfPartImpl, ImpactedPerformanceIndicatorReferenceImpl, ImpactingDecisionReferenceImpl, ImportedElementImpl, ImportedValuesImpl, ImportImpl, ImportImpl, ImportImpl, InclusiveGatewayImpl, Incoming, InformationItemImpl, InformationRequirementImpl, InMessageRef, InnerParticipantRef, InputCaseParameterImpl, InputClauseImpl, InputDataImpl, InputDataItemImpl, InputDataReferenceImpl, InputDecisionParameterImpl, InputDecisionReferenceImpl, InputEntryImpl, InputExpressionImpl, InputImpl, InputProcessParameterImpl, InputsCaseParameterImpl, InputSetImpl, InputSetRefs, InputValuesImpl, InteractionNodeImpl, InterfaceImpl, InterfaceRef, IntermediateCatchEventImpl, IntermediateThrowEventImpl, InvocationImpl, IoBindingImpl, IoSpecificationImpl, ItemAwareElementImpl, ItemComponentImpl, ItemControlImpl, ItemDefinitionImpl, ItemDefinitionImpl, ItemDefinitionReferenceImpl, KnowledgeRequirementImpl, KnowledgeSourceImpl, LabeledEdgeImpl, LabeledShapeImpl, LabelImpl, LaneImpl, LaneSetImpl, LinkEventDefinitionImpl, ListImpl, LiteralExpressionImpl, LoopCardinalityImpl, LoopCharacteristicsImpl, LoopDataInputRef, LoopDataOutputRef, ManualActivationRuleImpl, ManualTaskImpl, MessageEventDefinitionImpl, MessageFlowAssociationImpl, MessageFlowImpl, MessageFlowRef, MessageImpl, MessagePath, MilestoneImpl, ModelElementInstanceImpl, MonitoringImpl, MultiInstanceLoopCharacteristicsImpl, NamedElementImpl, NodeImpl, OnPartImpl, OperationImpl, OperationRef, OptionalInputRefs, OptionalOutputRefs, OrganizationUnitImpl, OuterParticipantRef, Outgoing, OutMessageRef, OutputCaseParameterImpl, OutputClauseImpl, OutputDataItemImpl, OutputDecisionParameterImpl, OutputDecisionReferenceImpl, OutputEntryImpl, OutputImpl, OutputProcessParameterImpl, OutputsCaseParameterImpl, OutputSetImpl, OutputSetRefs, OutputValuesImpl, OwnerReferenceImpl, ParallelGatewayImpl, ParameterImpl, ParameterImpl, ParameterMappingImpl, ParticipantAssociationImpl, ParticipantImpl, ParticipantMultiplicityImpl, ParticipantRef, PartitionElement, PerformanceIndicatorImpl, PerformerImpl, PlaneImpl, PlanFragmentImpl, PlanItemControlImpl, PlanItemDefinitionImpl, PlanItemImpl, PlanItemOnPartImpl, PlanItemStartTriggerImpl, PlanItemTransitionStandardEventImpl, PlanningTableImpl, PointImpl, PotentialOwnerImpl, ProcessImpl, ProcessImpl, ProcessParameterImpl, ProcessRefExpressionImpl, ProcessTaskImpl, PropertyImpl, PropertyImpl, QuestionImpl, ReceiveTaskImpl, RelationImpl, RelationshipImpl, RelationshipImpl, RenderingImpl, RepetitionRuleImpl, RequiredAuthorityReferenceImpl, RequiredDecisionReferenceImpl, RequiredInputReferenceImpl, RequiredKnowledgeReferenceImpl, RequiredRuleImpl, ResourceAssignmentExpressionImpl, ResourceImpl, ResourceParameterBindingImpl, ResourceParameterImpl, ResourceRef, ResourceRoleImpl, RoleImpl, RootElementImpl, RowImpl, RuleImpl, ScriptImpl, ScriptTaskImpl, SendTaskImpl, SentryImpl, SequenceFlowImpl, ServiceTaskImpl, ShapeImpl, SignalEventDefinitionImpl, SignalImpl, Source, SourceImpl, SourceRef, SourceRefImpl, StageImpl, StartEventImpl, StartTriggerImpl, StyleImpl, SubConversationImpl, SubProcessImpl, SupportedInterfaceRef, SupportedObjectiveReferenceImpl, Supports, TableItemImpl, Target, TargetImpl, TargetRef, TargetRefImpl, TaskImpl, TaskImpl, TerminateEventDefinitionImpl, TextAnnotationImpl, TextAnnotationImpl, TextAnnotationImpl, TextImpl, TextImpl, TextImpl, ThrowEventImpl, TimeCycleImpl, TimeDateImpl, TimeDurationImpl, TimerEventDefinitionImpl, TimerEventImpl, TimerEventListenerImpl, TimerExpressionImpl, To, TransactionImpl, Transformation, TransformationExpressionImpl, TypeImpl, TypeRefImpl, UnaryTestsImpl, UserEventImpl, UserEventListenerImpl, UserTaskImpl, UsingProcessReferenceImpl, UsingTaskReferenceImpl, VariableImpl, WaypointImpl, WhileExecutingInputRefs, WhileExecutingOutputRefs

public interface ModelElementInstance
An instance of a ModelElementType
Author:
Daniel Meyer
  • Method Details

    • getDomElement

      DomElement getDomElement()
      Returns the represented DOM DomElement.
      Returns:
      the DOM element
    • getModelInstance

      ModelInstance getModelInstance()
      Returns the model instance which contains this type instance.
      Returns:
      the model instance
    • getParentElement

      ModelElementInstance getParentElement()
      Returns the parent element of this.
      Returns:
      the parent element
    • getElementType

      ModelElementType getElementType()
      Returns the element type of this.
      Returns:
      the element type
    • getAttributeValue

      String getAttributeValue(String attributeName)
      Returns the attribute value for the attribute name.
      Parameters:
      attributeName - the name of the attribute
      Returns:
      the value of the attribute
    • setAttributeValue

      void setAttributeValue(String attributeName, String xmlValue)
      Sets the value by name of a non-ID attribute.
      Parameters:
      attributeName - the name of the attribute
      xmlValue - the value to set
    • setAttributeValue

      void setAttributeValue(String attributeName, String xmlValue, boolean isIdAttribute)
      Sets attribute value by name.
      Parameters:
      attributeName - the name of the attribute
      xmlValue - the value to set
      isIdAttribute - true if the attribute is an ID attribute, false otherwise
    • setAttributeValue

      void setAttributeValue(String attributeName, String xmlValue, boolean isIdAttribute, boolean withReferenceUpdate)
      Sets attribute value by name.
      Parameters:
      attributeName - the name of the attribute
      xmlValue - the value to set
      isIdAttribute - true if the attribute is an ID attribute, false otherwise
      withReferenceUpdate - true to update incoming references in other elements, false otherwise
    • removeAttribute

      void removeAttribute(String attributeName)
      Removes attribute by name.
      Parameters:
      attributeName - the name of the attribute
    • getAttributeValueNs

      String getAttributeValueNs(String namespaceUri, String attributeName)
      Returns the attribute value for the given attribute name and namespace URI.
      Parameters:
      namespaceUri - the namespace URI of the attribute
      attributeName - the attribute name of the attribute
      Returns:
      the value of the attribute
    • setAttributeValueNs

      void setAttributeValueNs(String namespaceUri, String attributeName, String xmlValue)
      Sets the value by name and namespace of a non-ID attribute.
      Parameters:
      namespaceUri - the namespace URI of the attribute
      attributeName - the name of the attribute
      xmlValue - the XML value to set
    • setAttributeValueNs

      void setAttributeValueNs(String namespaceUri, String attributeName, String xmlValue, boolean isIdAttribute)
      Sets the attribute value by name and namespace.
      Parameters:
      namespaceUri - the namespace URI of the attribute
      attributeName - the name of the attribute
      xmlValue - the XML value to set
      isIdAttribute - true if the attribute is an ID attribute, false otherwise
    • setAttributeValueNs

      void setAttributeValueNs(String namespaceUri, String attributeName, String xmlValue, boolean isIdAttribute, boolean withReferenceUpdate)
      Sets the attribute value by name and namespace.
      Parameters:
      namespaceUri - the namespace URI of the attribute
      attributeName - the name of the attribute
      xmlValue - the XML value to set
      isIdAttribute - true if the attribute is an ID attribute, false otherwise
      withReferenceUpdate - true to update incoming references in other elements, false otherwise
    • removeAttributeNs

      void removeAttributeNs(String namespaceUri, String attributeName)
      Removes the attribute by name and namespace.
      Parameters:
      namespaceUri - the namespace URI of the attribute
      attributeName - the name of the attribute
    • getTextContent

      String getTextContent()
      Returns the text content of the DOM element without leading and trailing spaces. For raw text content see ModelElementInstanceImpl.getRawTextContent().
      Returns:
      text content of underlying DOM element with leading and trailing whitespace trimmed
    • getRawTextContent

      String getRawTextContent()
      Returns the raw text content of the DOM element including all whitespaces.
      Returns:
      raw text content of underlying DOM element
    • setTextContent

      void setTextContent(String textContent)
      Sets the text content of the DOM element
      Parameters:
      textContent - the new text content
    • replaceWithElement

      void replaceWithElement(ModelElementInstance newElement)
      Replaces this element with a new element and updates references.
      Parameters:
      newElement - the new element to replace with
    • getUniqueChildElementByNameNs

      ModelElementInstance getUniqueChildElementByNameNs(String namespaceUri, String elementName)
      Returns a child element with the given name or 'null' if no such element exists
      Parameters:
      namespaceUri - the local name of the element
      elementName - the namespace of the element
      Returns:
      the child element or null.
    • getUniqueChildElementByType

      ModelElementInstance getUniqueChildElementByType(Class<? extends ModelElementInstance> elementType)
      Returns a child element with the given type
      Parameters:
      elementType - the type of the element
      Returns:
      the child element or null
    • setUniqueChildElementByNameNs

      void setUniqueChildElementByNameNs(ModelElementInstance newChild)
      Adds or replaces a child element by name. Replaces an existing Child Element with the same name or adds a new child if no such element exists.
      Parameters:
      newChild - the child to add
    • replaceChildElement

      void replaceChildElement(ModelElementInstance existingChild, ModelElementInstance newChild)
      Replace an existing child element with a new child element. Changes the underlying DOM element tree.
      Parameters:
      existingChild - the child element to replace
      newChild - the new child element
    • addChildElement

      void addChildElement(ModelElementInstance newChild)
      Adds a new child element to the children of this element. The child is inserted at the correct position of the allowed child types. Updates the underlying DOM element tree.
      Parameters:
      newChild - the new child element
      Throws:
      ModelException - if the new child type is not an allowed child type
    • removeChildElement

      boolean removeChildElement(ModelElementInstance child)
      Removes the child element from this.
      Parameters:
      child - the child element to remove
      Returns:
      true if the child element could be removed
    • getChildElementsByType

      Collection<ModelElementInstance> getChildElementsByType(ModelElementType childElementType)
      Return all child elements of a given type
      Parameters:
      childElementType - the child element type to search for
      Returns:
      a collection of elements of the given type
    • getChildElementsByType

      <T extends ModelElementInstance> Collection<T> getChildElementsByType(Class<T> childElementClass)
      Return all child elements of a given type
      Parameters:
      childElementClass - the class of the child element type to search for
      Returns:
      a collection of elements to the given type
    • insertElementAfter

      void insertElementAfter(ModelElementInstance elementToInsert, ModelElementInstance insertAfterElement)
      Inserts the new element after the given element or at the beginning if the given element is null.
      Parameters:
      elementToInsert - the new element to insert
      insertAfterElement - the element to insert after or null to insert at first position
    • updateAfterReplacement

      void updateAfterReplacement()
      Execute updates after the element was inserted as a replacement of another element.