Search in sources :

Example 6 with ValueType

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

the class ManifestMetadataBuilder method setEducationalContext.

public void setEducationalContext(String context, String lang) {
    EducationalType educational = getEducational(true);
    if (educational != null) {
        ContextType type = getFromAny(ContextType.class, educational.getContent());
        if (type == null) {
            type = mdObjectFactory.createContextType();
            educational.getContent().add(mdObjectFactory.createContext(type));
        }
        SourceType sourceType = mdObjectFactory.createSourceType();
        sourceType.setLangstring(createString("https://www.openolat.org", lang));
        ValueType valueType = mdObjectFactory.createValueType();
        valueType.setLangstring(createString(context, lang));
        type.setSource(sourceType);
        type.setValue(valueType);
    }
}
Also used : ContextType(org.olat.imsmd.xml.manifest.ContextType) ValueType(org.olat.imsmd.xml.manifest.ValueType) EducationalType(org.olat.imsmd.xml.manifest.EducationalType) SourceType(org.olat.imsmd.xml.manifest.SourceType)

Aggregations

ValueType (org.olat.imsmd.xml.manifest.ValueType)6 SourceType (org.olat.imsmd.xml.manifest.SourceType)4 ContextType (org.olat.imsmd.xml.manifest.ContextType)2 CopyrightandotherrestrictionsType (org.olat.imsmd.xml.manifest.CopyrightandotherrestrictionsType)2 EducationalType (org.olat.imsmd.xml.manifest.EducationalType)2 RightsType (org.olat.imsmd.xml.manifest.RightsType)2