Search in sources :

Example 1 with LomType

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

the class ManifestMetadataBuilder method getRights.

public RightsType getRights(boolean create) {
    LomType lom = getLom(create);
    if (lom == null)
        return null;
    RightsType rights = lom.getRights();
    if (rights == null && create) {
        rights = mdObjectFactory.createRightsType();
        lom.setRights(rights);
    }
    return rights;
}
Also used : RightsType(org.olat.imsmd.xml.manifest.RightsType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 2 with LomType

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

the class ManifestMetadataBuilder method getGeneral.

public GeneralType getGeneral(boolean create) {
    LomType lom = getLom(create);
    if (lom == null)
        return null;
    GeneralType general = lom.getGeneral();
    if (general == null && create) {
        general = mdObjectFactory.createGeneralType();
        lom.setGeneral(general);
    }
    return general;
}
Also used : GeneralType(org.olat.imsmd.xml.manifest.GeneralType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 3 with LomType

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

the class ManifestMetadataBuilder method getLifecycle.

public LifecycleType getLifecycle(boolean create) {
    LomType lom = getLom(create);
    if (lom == null)
        return null;
    LifecycleType lifecycle = lom.getLifecycle();
    if (lifecycle == null && create) {
        lifecycle = mdObjectFactory.createLifecycleType();
        lom.setLifecycle(lifecycle);
    }
    return lifecycle;
}
Also used : LifecycleType(org.olat.imsmd.xml.manifest.LifecycleType) LomType(org.olat.imsmd.xml.manifest.LomType)

Example 4 with LomType

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

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 5 with LomType

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

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)

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