SUPPORTED_SCORM_NAMESPACES.put(ADLCP_NAMESPACE_12, ADL_SCORM_1_2);
}
protected static boolean canHandle(Document doc) throws DocumentHandlerException {
// The first thing we do is to see if there is a root Namespace in the Document
Namespace nameSpace = XMLUtils.getDocumentNamespace(doc);
// No Namespace, sorry we don't know what it is!
if(nameSpace == null || nameSpace.equals(Namespace.NO_NAMESPACE)) {
throw new DocumentHandlerException("No Namespace in Document so cannot determine what it is!");
}
// Does it have the correct root Namespace?
if(SUPPORTED_NAMESPACES.containsKey(nameSpace) == false) return false;
// Now find out if it is a SCORM Document and if so whether we support it
// We'll search all elements for the ADL Namespace
Namespace nsSCORM = getSCORM_Namespace(doc);
if(nsSCORM == null) return false;
// Do we support this version of SCORM?
return SUPPORTED_SCORM_NAMESPACES.containsKey(nsSCORM);
}