public boolean isValid() { return !hasMissingAttributes() && !hasMissingAttributeValues() && !hasInvalidAttributeValues() && !hasNotAllowedAttributes(); }
public static DicomServiceException valueOf(ValidationResult result, Attributes attrs) { if (result.hasNotAllowedAttributes()) return new DicomServiceException(Status.NoSuchAttribute) .setAttributeIdentifierList(result.tagsOfNotAllowedAttributes()); if (result.hasMissingAttributes()) return new DicomServiceException(Status.MissingAttribute) .setAttributeIdentifierList(result.tagsOfMissingAttributes()); if (result.hasMissingAttributeValues()) return new DicomServiceException(Status.MissingAttributeValue) .setDataset(new Attributes(attrs, result.tagsOfMissingAttributeValues())); if (result.hasInvalidAttributeValues()) return new DicomServiceException(Status.InvalidAttributeValue) .setDataset(new Attributes(attrs, result.tagsOfInvalidAttributeValues())); return null; } }
public static DicomServiceException valueOf(ValidationResult result, Attributes attrs) { if (result.hasNotAllowedAttributes()) return new DicomServiceException(Status.NoSuchAttribute) .setAttributeIdentifierList(result.tagsOfNotAllowedAttributes()); if (result.hasMissingAttributes()) return new DicomServiceException(Status.MissingAttribute) .setAttributeIdentifierList(result.tagsOfMissingAttributes()); if (result.hasMissingAttributeValues()) return new DicomServiceException(Status.MissingAttributeValue) .setDataset(new Attributes(attrs, result.tagsOfMissingAttributeValues())); if (result.hasInvalidAttributeValues()) return new DicomServiceException(Status.InvalidAttributeValue) .setDataset(new Attributes(attrs, result.tagsOfInvalidAttributeValues())); return null; } }