Search in sources :

Example 1 with TechnicalType

use of org.olat.imsmd.xml.manifest.TechnicalType 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 2 with TechnicalType

use of org.olat.imsmd.xml.manifest.TechnicalType 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 3 with TechnicalType

use of org.olat.imsmd.xml.manifest.TechnicalType 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)

Example 4 with TechnicalType

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

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)

Example 5 with TechnicalType

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

the class ManifestMetadataBuilder method setTechnicalFormat.

public void setTechnicalFormat(String... formats) {
    if (formats != null && formats.length > 0 && formats[0] != null) {
        TechnicalType technical = getTechnical(true);
        clearFromAny("format", technical.getContent());
        for (int i = 0; i < formats.length; i++) {
            technical.getContent().add(mdObjectFactory.createFormat(formats[i]));
        }
    }
}
Also used : TechnicalType(org.olat.imsmd.xml.manifest.TechnicalType)

Aggregations

TechnicalType (org.olat.imsmd.xml.manifest.TechnicalType)6 LomType (org.olat.imsmd.xml.manifest.LomType)4