Search in sources :

Example 6 with LomType

use of org.olat.imsmd.xml.manifest.LomType in project OpenOLAT by OpenOLAT.

the class ManifestBuilder method createLom.

private static LomType createLom(boolean assessmentTest, boolean assessmentItem) {
    LomType lom = mdObjectFactory.createLomType();
    TechnicalType technical = mdObjectFactory.createTechnicalType();
    if (assessmentTest) {
        technical.getContent().add(createTechnicalFormat(ASSESSMENTTEST_MIMETYPE));
    }
    if (assessmentItem) {
        technical.getContent().add(createTechnicalFormat(ASSESSMENTITEM_MIMETYPE));
    }
    return lom;
}
Also used : TechnicalType(org.olat.imsmd.xml.manifest.TechnicalType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 7 with LomType

use of org.olat.imsmd.xml.manifest.LomType in project openolat by klemens.

the class ManifestBuilder method createLom.

private static LomType createLom(boolean assessmentTest, boolean assessmentItem) {
    LomType lom = mdObjectFactory.createLomType();
    TechnicalType technical = mdObjectFactory.createTechnicalType();
    if (assessmentTest) {
        technical.getContent().add(createTechnicalFormat(ASSESSMENTTEST_MIMETYPE));
    }
    if (assessmentItem) {
        technical.getContent().add(createTechnicalFormat(ASSESSMENTITEM_MIMETYPE));
    }
    return lom;
}
Also used : TechnicalType(org.olat.imsmd.xml.manifest.TechnicalType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 8 with LomType

use of org.olat.imsmd.xml.manifest.LomType in project openolat by klemens.

the class ManifestBuilder method createAssessmentItemBuilder.

/**
 * Create a manifest with some metadata specific to the
 * assessment item.
 *
 * @return
 */
public static ManifestBuilder createAssessmentItemBuilder() {
    ManifestBuilder builder = new ManifestBuilder();
    // schema
    ManifestMetadataType metadataType = createManifestMetadataType();
    builder.manifest.setMetadata(metadataType);
    // lom technical
    LomType lom = createLom(false, true);
    metadataType.getAny().add(mdObjectFactory.createLom(lom));
    return builder;
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 9 with LomType

use of org.olat.imsmd.xml.manifest.LomType in project openolat by klemens.

the class ManifestBuilder method createAssessmentTestBuilder.

/**
 * Create a manifest with some metadata specific to the
 * assessment test.
 *
 * @return
 */
public static ManifestBuilder createAssessmentTestBuilder() {
    ManifestBuilder builder = new ManifestBuilder();
    // schema
    ManifestMetadataType metadataType = createManifestMetadataType();
    metadataType.setSchema("QTIv2.1 Package");
    metadataType.setSchemaversion("1.0.0");
    builder.manifest.setMetadata(metadataType);
    // lom technical
    LomType lom = createLom(true, true);
    metadataType.getAny().add(mdObjectFactory.createLom(lom));
    return builder;
}
Also used : ManifestMetadataType(org.olat.imscp.xml.manifest.ManifestMetadataType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 10 with LomType

use of org.olat.imsmd.xml.manifest.LomType in project openolat by klemens.

the class ManifestMetadataBuilder method getTechnical.

public TechnicalType getTechnical(boolean create) {
    LomType lom = getLom(create);
    if (lom == null)
        return null;
    TechnicalType technical = lom.getTechnical();
    if (technical == null && create) {
        technical = mdObjectFactory.createTechnicalType();
        lom.setTechnical(technical);
    }
    return technical;
}
Also used : TechnicalType(org.olat.imsmd.xml.manifest.TechnicalType) LomType(org.olat.imsmd.xml.manifest.LomType)

Aggregations

LomType (org.olat.imsmd.xml.manifest.LomType)20 ManifestMetadataType (org.olat.imscp.xml.manifest.ManifestMetadataType)4 TechnicalType (org.olat.imsmd.xml.manifest.TechnicalType)4 ClassificationType (org.olat.imsmd.xml.manifest.ClassificationType)2 EducationalType (org.olat.imsmd.xml.manifest.EducationalType)2 GeneralType (org.olat.imsmd.xml.manifest.GeneralType)2 LifecycleType (org.olat.imsmd.xml.manifest.LifecycleType)2 PurposeType (org.olat.imsmd.xml.manifest.PurposeType)2 RightsType (org.olat.imsmd.xml.manifest.RightsType)2