Skip to content

Commit

Permalink
some javadoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgeiger committed Oct 7, 2015
1 parent 14b14e1 commit 2c81c11
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.uniba.dsg.bpmnspector.common.xsdvalidation;

import api.ValidationResult;
import api.ValidationException;
import api.ValidationResult;
import org.xml.sax.SAXException;

import javax.xml.transform.stream.StreamSource;
Expand All @@ -24,14 +24,15 @@ public abstract class AbstractXsdValidator {
* the given validation result
*
* @param xmlFile
* the xml file which should be validated
* the xml file which should be validated
* @param validationResult
* the result object of the validation
* the result object of the validation
* @throws IOException
* when xmlFile can't be read
* @throws SAXException
* when validation process fails somehow
* @throws ValidationException
* thrown if checked file is not well-formed or does not have a valid encoding
*/
public abstract void validateAgainstXsd(File xmlFile,
ValidationResult validationResult) throws IOException, SAXException,
Expand All @@ -43,7 +44,7 @@ public abstract void validateAgainstXsd(File xmlFile,
* streamsource with the searched source
*
* @param resourceName
* the name of the resource file
* the name of the resource file
* @return the streamsource of the file to be load
* @throws FileNotFoundException
* if the resource file doesn't exist there
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package de.uniba.dsg.bpmnspector.common.xsdvalidation;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.charset.Charset;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;


/**
* Customized LSInput in order to provide access to an resolved resource.
Expand Down Expand Up @@ -40,8 +40,11 @@ public class Input implements LSInput {
* InputStream
*
* @param publicId
* public ID set by the ResourceResolver
* @param sysId
* System ID set by the ResourceResolver
* @param input
* InputStream to be used
*/
public Input(String publicId, String sysId, InputStream input) {
this.publicId = publicId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class BPMNReferenceValidator {
.getLogger(BPMNReferenceValidator.class.getSimpleName());

/**
* Constructor sets the defaults. Log level = OFF and language = ENGLISH.
* Constructor sets the defaults. And loads the reference definitions to be used for validations.
*
* @throws ValidationException
* if problems with the language files exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static Map<String, Element> getAllElements(Document document) {
/**
* Map which uses the namespace-URI as an ID and another
* Map as value. The inner HashMap contains all Elements accessible via
* the ID as key {@see getAllElements()}
* the ID as key {@link #getAllElements}
*
* @param elementsMap
* the Map to be populated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ public class ViolationMessageCreator {
public static final int PREFIX_MSG = 1;

/**
*
* Creates a description of a found ExistenceViolation based on the given parameters
*
* @param element
* the name of the BPMN element, where the violation occurred
* @param reference
Expand All @@ -20,6 +21,7 @@ public class ViolationMessageCreator {
* use for additional information for special violation message
* text versions. For the DEFAULT version it is null, for the
* PREFIX it is the prefix of the namespace.
* @return the created String describing the ExistenceViolation
*/
public static String createExistenceViolationMessage(String element, String reference, int line,
int textVersion, String additionalInfo) {
Expand All @@ -36,7 +38,8 @@ public static String createExistenceViolationMessage(String element, String refe
}

/**
*
* Creates a description of a found Reference Type violation based on the given parameters
*
* @param element
* the name of the BPMN element, where the violation occurred
* @param line
Expand All @@ -47,6 +50,7 @@ public static String createExistenceViolationMessage(String element, String refe
* the incorrect type, which caused the violation
* @param expectedType
* the types expected instead of the incorrect type
* @return the created String describing the Reference Type violation
*/
public static String createTypeViolationMessage(String element, int line, String reference,
String incorrectType, String expectedType) {
Expand Down

0 comments on commit 2c81c11

Please sign in to comment.