Package ch.randelshofer.scorm

Examples of ch.randelshofer.scorm.AbstractElement


     * Adds all file names referenced by this FileElement and subtree elements.
     */
    public void addSubtreeFileNames(HashSet fileNames) {
        Enumeration enm = preorderEnumeration();
        while (enm.hasMoreElements()) {
            AbstractElement element = (AbstractElement) enm.nextElement();
            if (element instanceof FileElement) {
                FileElement fileElement = (FileElement) element;
                String href = fileElement.getConsolidatedHRef();
                if (href != null && isHRefValid) fileNames.add(href);
            }
View Full Code Here


        if (identifierref == null) isIdentifierrefValid = false;
        if (identifierref != null) {
            isIdentifierrefValid = false;
            Enumeration enm = getIMSManifestDocument().getResourcesElement().preorderEnumeration();
            while (enm.hasMoreElements()) {
                AbstractElement node = (AbstractElement) enm.nextElement();
                if (node.getIdentifier() != null && node.getIdentifier().equals(identifierref)) {
                    isIdentifierrefValid = true;
                    break;
                }
            }
            if (! isIdentifierrefValid) isValid = false;
View Full Code Here

        }
        if (identifierref != null) {
            isIdentifierrefValid = false;
            Enumeration enm = getIMSManifestDocument().getResourcesElement().preorderEnumeration();
            while (enm.hasMoreElements()) {
                AbstractElement node = (AbstractElement) enm.nextElement();
                if (node.getIdentifier() != null && node.getIdentifier().equals(identifierref)) {
                    isIdentifierrefValid = true;
                    break;
                }
            }
            if (!isIdentifierrefValid) {
View Full Code Here

        ResourcesElement resources = getIMSManifestDocument().getResourcesElement();
        HashSet referencedResources = new HashSet();

        Enumeration enm = preorderEnumeration();
        while (enm.hasMoreElements()) {
            AbstractElement element = (AbstractElement) enm.nextElement();
            if (element instanceof ItemElement) {
                ItemElement item = (ItemElement) element;
                if (item.getIdentifierref() != null) {
                    AbstractElement resource = resources.findChildByIdentifier(item.getIdentifierref());
                    if (resource != null) {
                        referencedResources.add(resource);
                    }
                }
            }
View Full Code Here

        if (getIdentifier() == null) isValid = false;
        if (identifier != null) {
            isReferenced = false;
            Enumeration enm = getIMSManifestDocument().getOrganizationsElement().preorderEnumeration();
            while (enm.hasMoreElements()) {
                AbstractElement node = (AbstractElement) enm.nextElement();
                if (node instanceof ItemElement) {
                    ItemElement item = (ItemElement) node;
                    if (item.getIdentifierref() != null
                            && item.getIdentifierref().equals(identifier)) {
                        isReferenced = true;
                        break;
                    }
                }
            }
            enm = getIMSManifestDocument().getResourcesElement().preorderEnumeration();
            while (enm.hasMoreElements()) {
                AbstractElement node = (AbstractElement) enm.nextElement();
                if (node instanceof DependencyElement) {
                    DependencyElement dependency = (DependencyElement) node;
                    if (dependency.getIdentifierref() != null
                            && dependency.getIdentifierref().equals(identifier)) {
                        isReferenced = true;
View Full Code Here

        fileNames.remove("adl_cp_rootv1p2.xsd");
        fileNames.remove("tinylms.xml");
       
        Enumeration enm = getIMSManifestDocument().preorderEnumeration();
        while (enm.hasMoreElements()) {
            AbstractElement element = (AbstractElement) enm.nextElement();
            element.consumeFileNames(fileNames);
        }
        LinkedList list = new LinkedList(fileNames);
        if (list.size() > 0) {
            Collections.sort(list);
            StringBuffer buf = new StringBuffer(
View Full Code Here

TOP

Related Classes of ch.randelshofer.scorm.AbstractElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.