public class ReferenceChecker
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONSTRAINT_REF_EXISTENCE |
static java.lang.String |
CONSTRAINT_REF_TYPE |
Constructor and Description |
---|
ReferenceChecker(java.util.Map<java.lang.String,BPMNElement> bpmnRefElements) |
Modifier and Type | Method and Description |
---|---|
void |
createAndAddExistenceViolation(ValidationResult validationResult,
int line,
int column,
org.jdom2.Element currentElement,
Reference checkingReference)
Adds a found existence violation to the list.
|
void |
validateReferenceType(java.util.Map<java.lang.String,org.jdom2.Element> elements,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.jdom2.Element>> importedElements,
ValidationResult validationResult,
org.jdom2.Element currentElement,
int line,
int column,
Reference checkingReference,
java.lang.String referencedId,
java.lang.String ownPrefix)
This method validates the current element against the checking reference.
|
public static final java.lang.String CONSTRAINT_REF_TYPE
public static final java.lang.String CONSTRAINT_REF_EXISTENCE
public ReferenceChecker(java.util.Map<java.lang.String,BPMNElement> bpmnRefElements)
public void validateReferenceType(java.util.Map<java.lang.String,org.jdom2.Element> elements, java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.jdom2.Element>> importedElements, ValidationResult validationResult, org.jdom2.Element currentElement, int line, int column, Reference checkingReference, java.lang.String referencedId, java.lang.String ownPrefix) throws ValidationException
elements
- the elements of the root file (= bpmnFile
)importedElements
- the elements which have been defined in imported filesvalidationResult
- the validation result for adding found violationscurrentElement
- the current element to validateline
- the line of the reference in the root file for the violation
messagecolumn
- the column of the referencecheckingReference
- the reference to validate againstreferencedId
- the referenced IDownPrefix
- the namespace prefix of the current elementValidationException
- thrown if errors occur during creation of the Violationpublic void createAndAddExistenceViolation(ValidationResult validationResult, int line, int column, org.jdom2.Element currentElement, Reference checkingReference) throws ValidationException
validationResult
- the validation result for adding the found violationline
- the line of the reference in the root filecolumn
- the column of the reference in the root filecurrentElement
- the element causing the violationcheckingReference
- the violated referenceValidationException
- thrown if the Validation could not be created