Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Feb 17, 2023
1 parent 60ca4ea commit d8f8d6a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void createGModel() {
logger.warn("no BPMNExtension found! Check DiagramModule->configureBPMNExtensions");
}

if (!modelState.isInitalized()) {
if (!modelState.isInitialized()) {
long l = System.currentTimeMillis();
GGraph newGModel = buildGGraph(getBpmnModel());
modelState.updateRoot(newGModel);
Expand All @@ -138,7 +138,7 @@ public void createGModel() {
createNewEmptyRoot("process_0");
}

modelState.setInitalized(true);
modelState.setInitialized(true);
logger.debug("===> createGModel took " + (System.currentTimeMillis() - l) + "ms");
} else {
logger.debug("===> createGModel skipped!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class BPMNGModelState extends DefaultGModelState {

private BPMNModel bpmnModel;
private boolean initalized = false;
private boolean initialized = false;
List<String> extensionKinds = new ArrayList<>();

@Inject
Expand All @@ -50,20 +50,20 @@ public void setBpmnModel(final BPMNModel bpmnModel) {
this.setRoot(null);
}

public boolean isInitalized() {
return initalized;
public boolean isInitialized() {
return initialized;
}

public void setInitalized(final boolean initalized) {
this.initalized = initalized;
public void setInitialized(final boolean initialized) {
this.initialized = initialized;
}

/**
* Reset the model state which will force a re-generation in the
* BPMNGModelFactory.createGModel() method
*/
public void reset() {
this.initalized = false;
this.initialized = false;
}

}
23 changes: 12 additions & 11 deletions open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/BPMNModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public Participant addParticipant(String name) throws BPMNModelException {

collaborationElement.appendChild(migratedParticipantNode);
existingProcess.setAttribute("definitionalCollaborationRef", collaborationElement.getAttribute("id"));
// finally add a new BPMNParticipatn to the paticipant list
// finally add a new BPMNParticipant to the participant list
getParticipants().add(new Participant(this, migratedParticipantNode));
}

Expand Down Expand Up @@ -687,7 +687,7 @@ public void deleteMessageFlow(String id) {
}

String targetRef = bpmnEdge.getTargetRef();
String soureRef = bpmnEdge.getSourceRef();
String sourceRef = bpmnEdge.getSourceRef();
// first we need to update the elements still connected with this flow
// <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
// <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
Expand All @@ -706,7 +706,7 @@ public void deleteMessageFlow(String id) {
}
}
}
BPMNElementNode sourceElement = findElementNodeById(soureRef);
BPMNElementNode sourceElement = findElementNodeById(sourceRef);
if (sourceElement != null) {
NodeList childs = sourceElement.getElementNode().getChildNodes();
for (int j = 0; j < childs.getLength(); j++) {
Expand Down Expand Up @@ -1047,7 +1047,7 @@ public BPMNElementEdge findElementEdgeById(String id) {
* given ID. This finder method can be used to just adjust the Bounds in the
* Diagram section of a model.
* <p>
* In case of a process diagram, the method verfies all FlowElements within the
* In case of a process diagram, the method verifies all FlowElements within the
* default process.
* <p>
* In case of a collaboration diagram, the method verifies all Participants and
Expand Down Expand Up @@ -1270,7 +1270,7 @@ public static String generateShortID() {
}

/**
* Generates a random short 6 byte id with a prafix
* Generates a random short 6 byte id with a prefix
* <p>
* HEX: 0-9, a-f. For example: BPMNShape_a55ac5, BPMNShape_1382c1
*
Expand Down Expand Up @@ -1364,7 +1364,7 @@ public static boolean isDataObject(BPMNElementNode element) {
}

/**
* Returns true if the node is a textAnnotaion node.
* Returns true if the node is a textAnnotation node.
*
* @param node
* @return
Expand Down Expand Up @@ -1398,7 +1398,7 @@ public static boolean isMessageFlow(Node node) {
}

/**
* Returns true if the node is a Accociation.
* Returns true if the node is a Association.
*
* @param node
* @return
Expand Down Expand Up @@ -1448,7 +1448,7 @@ public Node findBPMNPlaneElement(String nodeName, String id) {
}

/**
* Returns the central loger instance
* Returns the central logger instance
*
* @return
*/
Expand Down Expand Up @@ -1557,7 +1557,8 @@ private void loadProcessList() throws BPMNModelException {
processes.add(bpmnProcess);

// we need to update the containing Participant
// This assignment can only be done now because the loadParticpantList is called
// This assignment can only be done now because the loadParticipantList is
// called
// before this method.
Participant participant = bpmnProcess.findParticipant();
if (participant != null) {
Expand Down Expand Up @@ -1652,7 +1653,7 @@ private void loadMessageList() throws BPMNModelException {
* @throws TransformerException
*/
private void writeXml(Document doc, OutputStream output) throws TransformerException {
// clenup blank lines
// cleanup blank lines
clearBlankLines();

TransformerFactory transformerFactory = TransformerFactory.newInstance();
Expand All @@ -1666,7 +1667,7 @@ private void writeXml(Document doc, OutputStream output) throws TransformerExcep

/**
* This helper method use XPath to find all whitespace-only TEXT nodes in the
* current doucment, iterate through them and remove each one from its parent
* current document, iterate through them and remove each one from its parent
* (using getParentNode().removeChild()). Something like this would do (doc
* would be your DOM document object):
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ public Set<Association> getAssociations() {
return associations;
}

public void setAssociations(Set<Association> accociations) {
this.associations = accociations;
public void setAssociations(Set<Association> associations) {
this.associations = associations;
}

/**
Expand Down Expand Up @@ -586,7 +586,7 @@ public Lane addLane(String name) throws BPMNMissingElementException {
BPMNModel.debug("new lane '" + laneId + "' added");
Lane bpmnLane = new Lane(model, lane);

// Autocompute the Lane Bounds
// AutoCompute the Lane Bounds
Participant bpmnParticipant = model.findParticipantByProcessId(this.getId());
if (bpmnParticipant != null) {
// add shape
Expand All @@ -597,7 +597,7 @@ public Lane addLane(String name) throws BPMNMissingElementException {
* y="100.0"/> </bpmndi:BPMNShape>
*/

// if the pool already contains lanes, than we autoincrease the height of the
// if the pool already contains lanes, than we auto increase the height of the
// pool
int currentWidth = (int) bpmnParticipant.getBounds().getDimension().getWidth();
int currentHeight = (int) bpmnParticipant.getBounds().getDimension().getHeight();
Expand All @@ -609,11 +609,11 @@ public Lane addLane(String name) throws BPMNMissingElementException {
bpmnParticipant.getBounds().setDimension(currentWidth, currentHeight + expansion);
}

Element lanebpmnShape = model.createElement(BPMNNS.BPMNDI, "BPMNShape");
lanebpmnShape.setAttribute("id", BPMNModel.generateShortID("BPMNShape_Lane"));
lanebpmnShape.setAttribute("bpmnElement", laneId);
model.getBpmnPlane().appendChild(lanebpmnShape);
bpmnLane.setBpmnShape(lanebpmnShape);
Element laneBpmnShape = model.createElement(BPMNNS.BPMNDI, "BPMNShape");
laneBpmnShape.setAttribute("id", BPMNModel.generateShortID("BPMNShape_Lane"));
laneBpmnShape.setAttribute("bpmnElement", laneId);
model.getBpmnPlane().appendChild(laneBpmnShape);
bpmnLane.setBpmnShape(laneBpmnShape);

BPMNBounds poolBounds = bpmnParticipant.getBounds();

Expand Down Expand Up @@ -673,7 +673,7 @@ public void setLanes(Set<Lane> lanes) {
*/
public void deleteAllNodes() {

// frist delete all lanes
// first delete all lanes
Iterator<Lane> ll = this.getLanes().iterator();
while (ll.hasNext()) {
deleteLane(ll.next().getId());
Expand Down Expand Up @@ -702,8 +702,8 @@ public void deleteLane(String id) {

// delete all elements contained in this lane
Set<String> flowElementList = lane.getFlowElementIDs();
for (String flowEleemntID : flowElementList) {
this.removeAllEdgesFromElement(flowEleemntID);
for (String flowElementID : flowElementList) {
this.removeAllEdgesFromElement(flowElementID);
}

// delete the shape from bpmndi:BPMNDiagram
Expand Down Expand Up @@ -797,7 +797,7 @@ public void deleteElementNode(String id) {
}

/**
* Deletes a SquenceFlow from this context.
* Deletes a SequenceFlow from this context.
* <p>
*
* @param id
Expand Down Expand Up @@ -888,7 +888,7 @@ private void removeElementEdge(String id) {
}

String targetRef = bpmnEdge.getTargetRef();
String soureRef = bpmnEdge.getSourceRef();
String sourceRef = bpmnEdge.getSourceRef();
// In case of a SequenceFlow we need to update the referenced inside the
// referred elements
// <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
Expand All @@ -908,7 +908,7 @@ private void removeElementEdge(String id) {
}
}
}
BPMNElementNode sourceElement = findElementNodeById(soureRef);
BPMNElementNode sourceElement = findElementNodeById(sourceRef);
if (sourceElement != null) {
NodeList childs = sourceElement.getElementNode().getChildNodes();
for (int j = 0; j < childs.getLength(); j++) {
Expand Down Expand Up @@ -945,8 +945,8 @@ private void removeAllEdgesFromElement(String elementId) {
}

// remove all Associations
Set<Association> accociationList = findAssociationsByElementId(elementId);
for (Association flow : accociationList) {
Set<Association> associationList = findAssociationsByElementId(elementId);
for (Association flow : associationList) {
deleteAssociation(flow.getId());
}

Expand Down Expand Up @@ -1247,10 +1247,10 @@ public Set<SequenceFlow> findSequenceFlowsByElementId(String id) {
}

/**
* Returns a list of accociations associated with a given FlowElement
* Returns a list of associations associated with a given FlowElement
*
* @param id of a flowElement
* @return list of Accociations
* @return list of Associations
*/
private Set<Association> findAssociationsByElementId(String id) {
Set<Association> result = new LinkedHashSet<Association>();
Expand Down Expand Up @@ -1287,8 +1287,8 @@ private Set<MessageFlow> findMessageFlowsByElementId(String id) {
}

/**
* This method inserts a lane before a target lane within an existing laneset. A
* client need to re-initalize the process after an insert.
* This method inserts a lane before a target lane within an existing laneSet. A
* client need to re-initialize the process after an insert.
*
* @param laneTest
* @param lane2
Expand Down

0 comments on commit d8f8d6a

Please sign in to comment.