Class Scorm2004ResourceValidator
java.lang.Object
dev.jcputney.elearning.parser.validators.Scorm2004ResourceValidator
Validator for SCORM 2004 manifests and their resource references.
This validator uses a rule-based architecture for better testability and maintainability. Each validation concern is encapsulated in a discrete rule.
This validator checks that:
- All identifiers are unique (no duplicates)
- All file paths are safe (no path traversal, absolute paths, or external URLs)
- Resources are not orphaned (all resources should be referenced)
- Organizations element exists
- Default organization reference is valid
- All item identifierrefs point to valid resources
- Referenced resources have valid href attributes (launch URLs)
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new Scorm2004ResourceValidator with default rules. -
Method Summary
Modifier and TypeMethodDescriptionvalidate(Scorm2004Manifest manifest) Validates a SCORM 2004 manifest for structural and reference integrity.
-
Constructor Details
-
Scorm2004ResourceValidator
public Scorm2004ResourceValidator()Constructs a new Scorm2004ResourceValidator with default rules.
-
-
Method Details
-
validate
Validates a SCORM 2004 manifest for structural and reference integrity. Uses rule-based validation for better testability and maintainability.- Parameters:
manifest- The SCORM 2004 manifest to validate- Returns:
- ValidationResult containing any issues found
-