org.qtitools.qti.validation
Class ValidationResult

java.lang.Object
  extended by org.qtitools.qti.validation.ValidationResult

public class ValidationResult
extends java.lang.Object

Result of validation. Container of validation items.

Author:
Jiri Kajaba

Constructor Summary
ValidationResult()
          Constructs validation result container.
 
Method Summary
 void add(ValidationItem item)
          Adds validation item into this container.
 void add(ValidationResult result)
          Adds all validation items from given container into this container.
 java.util.List<ValidationItem> getAllItems()
          Gets all validation items (error, warning, info) of this container.
 java.util.List<ValidationItem> getAllItems(XmlNode source)
          Gets all validation items (error, warning, info) of this container for given source node.
 java.util.List<ValidationError> getErrors()
          Gets all errors of this container.
 java.util.List<ValidationError> getErrors(XmlNode source)
          Gets all errors of this container for given source node.
 java.util.List<ValidationInfo> getInfos()
          Gets all infos of this container.
 java.util.List<ValidationInfo> getInfos(XmlNode source)
          Gets all infos of this container for given source node.
 java.util.List<ValidationWarning> getWarnings()
          Gets all warnings of this container.
 java.util.List<ValidationWarning> getWarnings(XmlNode source)
          Gets all warnings of this container for given source node.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationResult

public ValidationResult()
Constructs validation result container.

Method Detail

getErrors

public java.util.List<ValidationError> getErrors()
Gets all errors of this container.

Do not add errors directly getErrors().add(ERROR), use add(ERROR) method instead of it!

Returns:
all errors of this container
See Also:
getErrors(XmlNode)

getErrors

public java.util.List<ValidationError> getErrors(XmlNode source)
Gets all errors of this container for given source node.

Convenient method for obtaining only errors related to one node.

Parameters:
source - given source node
Returns:
all errors of this container for given source node
See Also:
getErrors()

getWarnings

public java.util.List<ValidationWarning> getWarnings()
Gets all warnings of this container.

Do not add warnings directly getWarnings().add(WARNING), use add(WARNING) method instead of it!

Returns:
all warnings of this container
See Also:
getWarnings(XmlNode)

getWarnings

public java.util.List<ValidationWarning> getWarnings(XmlNode source)
Gets all warnings of this container for given source node.

Convenient method for obtaining only warnings related to one node.

Parameters:
source - given source node
Returns:
all warnings of this container for given source node
See Also:
getWarnings()

getInfos

public java.util.List<ValidationInfo> getInfos()
Gets all infos of this container.

Do not add infos directly getInfos().add(INFO), use add(INFO) method instead of it!

Returns:
all infos of this container
See Also:
getInfos(XmlNode)

getInfos

public java.util.List<ValidationInfo> getInfos(XmlNode source)
Gets all infos of this container for given source node.

Convenient method for obtaining only infos related to one node.

Parameters:
source - given source node
Returns:
all infos of this container for given source node
See Also:
getInfos()

getAllItems

public java.util.List<ValidationItem> getAllItems()
Gets all validation items (error, warning, info) of this container.

Do not add validation items directly getAllItems().add(ITEM), use add(ITEM) method instead of it!

Returns:
all validation items (error, warning, info) of this container
See Also:
getAllItems(XmlNode)

getAllItems

public java.util.List<ValidationItem> getAllItems(XmlNode source)
Gets all validation items (error, warning, info) of this container for given source node.

Convenient method for obtaining only validation items (error, warning, info) related to one node.

Parameters:
source - given source node
Returns:
all validation items (error, warning, info) of this container for given source node
See Also:
getAllItems()

add

public void add(ValidationItem item)
Adds validation item into this container.
  1. adds validation item into its type list (for example if item is error: getErrors().add(ITEM))
  2. adds validation item into allItems list (getAllItems().add(ITEM))
Using of this method is preferred way how to insert new item into this container.

Parameters:
item - item to be added

add

public void add(ValidationResult result)
Adds all validation items from given container into this container.

Parameters:
result - container with validation items to be added

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.