public class MCvalidationError
extends java.lang.Object
Validation error objects are created by the toolkit when the application requests the validation
of an attribute set using the MCattributeSet.validate(MCvalidationLevel)
or
MCattributeSet.validateAttribute(int, MCvalidationLevel)
.
Each validation error object contains a numeric code that identifies the type of violation. Values for such codes are defined as static fields of this class. Validation errors are classified in the following three categories:
Error:
INVALID_VR_CODE
REQUIRED_ATTRIBUTE_MISSING
REQUIRED_VALUE_MISSING
VALUE_MAY_NOT_BE_NULL
VALUE_MAY_NOT_BE_NULL
VALUE_NOT_ALLOWED
TOO_FEW_VALUES
TOO_MANY_VALUES
INVALID_ITEM_ID
NOT_ONE_OF_ENUMERATED_VALUES
INVALID_VALUE_FOR_VR
INVALID_CHARS_IN_VALUE
Warning:
Information:
The validation level specified when requesting the validation determined which categories of violations are actually checked by the toolkit.
Instances of this class can be used by multiple threads concurrently.
Modifier and Type | Field and Description |
---|---|
static int |
INVALID_CHARS_IN_VALUE
The validation error code reported when a value for this attribute does not contain valid
characters for its value representation
|
static int |
INVALID_ITEM_ID
The validation error code reported when an sequence of items (SQ) attribute has an invalid
value assigned to it.
|
static int |
INVALID_VALUE_FOR_VR
The validation error code reported when a value for an attribute does not conform to the
requirements of its value representation.
|
static int |
INVALID_VR_CODE
The validation error code reported when an attribute's value representation is invalid.
|
static int |
NO_CONDITION_FUNCTION
The validation information code reported when an attribute's DICOM type is 1C or
2C and the toolkit does support verification of the condition.
|
static int |
NON_SERVICE_ATTRIBUTE
The validation warning code reported when an attribute is not one of those defined for the
service.
|
static int |
NOT_ONE_OF_DEFINED_TERMS
The validation warning code reported when a value of an attribute is not one of the valid
defined terms for that attribute.
|
static int |
NOT_ONE_OF_ENUMERATED_VALUES
The validation error code reported when a value set for an attribute is not one of the valid
enumerated values defined for that attribute
|
static int |
REQUIRED_ATTRIBUTE_MISSING
The validation error code reported when a required attribute is missing.
|
static int |
REQUIRED_VALUE_MISSING
The validation error code reported when a required attribute is missing.
|
static int |
TOO_FEW_VALUES
The validation error code reported when an attribute is required to have more values than it
actually has.
|
static int |
TOO_MANY_VALUES
The validation error code reported when an attribute has more values set than are allowed.
|
static int |
UNABLE_TO_CHECK_CONDITION
The validation information code reported when not enough information is available to
check whether or not a DICOM type 1C or 2C attribute is required.
|
static int |
VALUE_MAY_NOT_BE_NULL
The validation error code reported when an attribute that is required to have a value, does not have
one.
|
static int |
VALUE_NOT_ALLOWED
The validation error code reported when a DICOM type 1C or type 2C attribute may not
have a value under current conditions.
|
Modifier and Type | Method and Description |
---|---|
MCattributeSet |
getAttributeSet()
Gets the attribute set that contains the attribute that caused this violation.
|
int |
getErrorCode()
Gets the numeric code that identifies the type of violation.
|
java.lang.String |
getErrorDescription()
Gets a description of the violation.
|
int |
getTag()
Gets the tag number of the attribute that caused this violation.
|
int |
getValueNumber()
Gets the index of the attribute's value that caused the violation.
|
java.lang.String |
toString()
Provides the full description of the violation.
|
public static final int NO_CONDITION_FUNCTION
public static final int UNABLE_TO_CHECK_CONDITION
public static final int NOT_ONE_OF_DEFINED_TERMS
public static final int NON_SERVICE_ATTRIBUTE
public static final int INVALID_VR_CODE
public static final int REQUIRED_ATTRIBUTE_MISSING
public static final int REQUIRED_VALUE_MISSING
public static final int VALUE_MAY_NOT_BE_NULL
public static final int VALUE_NOT_ALLOWED
public static final int TOO_FEW_VALUES
public static final int TOO_MANY_VALUES
public static final int INVALID_ITEM_ID
public static final int NOT_ONE_OF_ENUMERATED_VALUES
public static final int INVALID_VALUE_FOR_VR
public static final int INVALID_CHARS_IN_VALUE
public MCattributeSet getAttributeSet()
Note that the returned attribute set may not be the attribute set on which the validation was performed. If the attribute causing the violation is inside a sequence of items this method returns the sequence item.
public java.lang.String getErrorDescription()
public int getTag()
public int getValueNumber()
public int getErrorCode()
Values for this code are defined by the static fields of this class.
public java.lang.String toString()
toString
in class java.lang.Object