Search in sources :

Example 1 with LifecycleType

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

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

the class ManifestMetadataBuilder method setLifecycleVersion.

public void setLifecycleVersion(String version) {
    LifecycleType lifecycle = getLifecycle(true);
    VersionType type = getFromAny(VersionType.class, lifecycle.getContent());
    if (type == null) {
        type = mdObjectFactory.createVersionType();
        lifecycle.getContent().add(mdObjectFactory.createVersion(type));
    }
    createOrUpdateFirstLangstring(type.getLangstring(), version, "en");
}
Also used : LifecycleType(org.olat.imsmd.xml.manifest.LifecycleType) VersionType(org.olat.imsmd.xml.manifest.VersionType)

Example 3 with LifecycleType

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

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 LifecycleType

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

the class ManifestMetadataBuilder method setLifecycleVersion.

public void setLifecycleVersion(String version) {
    LifecycleType lifecycle = getLifecycle(true);
    VersionType type = getFromAny(VersionType.class, lifecycle.getContent());
    if (type == null) {
        type = mdObjectFactory.createVersionType();
        lifecycle.getContent().add(mdObjectFactory.createVersion(type));
    }
    createOrUpdateFirstLangstring(type.getLangstring(), version, "en");
}
Also used : LifecycleType(org.olat.imsmd.xml.manifest.LifecycleType) VersionType(org.olat.imsmd.xml.manifest.VersionType)

Aggregations

LifecycleType (org.olat.imsmd.xml.manifest.LifecycleType)4 LomType (org.olat.imsmd.xml.manifest.LomType)2 VersionType (org.olat.imsmd.xml.manifest.VersionType)2