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;
}
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");
}
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;
}
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");
}
Aggregations