Search in sources :

Example 1 with StringType

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

the class ManifestMetadataBuilder method setLanguage.

public void setLanguage(String language, String lang) {
    GeneralType general = getGeneral(true);
    if (general != null) {
        StringType type = getFromAny(StringType.class, general.getContent());
        if (type == null) {
            type = mdObjectFactory.createStringType();
            QName languageQNAME = new QName("http://www.imsglobal.org/xsd/imsmd_v1p2", "context");
            JAXBElement<StringType> typeEl = new JAXBElement<StringType>(languageQNAME, StringType.class, null, type);
            general.getContent().add(typeEl);
        }
        type.setLang(lang);
        type.setValue(language);
    }
}
Also used : StringType(org.olat.imsmd.xml.manifest.StringType) QName(javax.xml.namespace.QName) JAXBElement(javax.xml.bind.JAXBElement) GeneralType(org.olat.imsmd.xml.manifest.GeneralType)

Example 2 with StringType

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

the class ManifestMetadataBuilder method setLanguage.

public void setLanguage(String language, String lang) {
    GeneralType general = getGeneral(true);
    if (general != null) {
        StringType type = getFromAny(StringType.class, general.getContent());
        if (type == null) {
            type = mdObjectFactory.createStringType();
            QName languageQNAME = new QName("http://www.imsglobal.org/xsd/imsmd_v1p2", "context");
            JAXBElement<StringType> typeEl = new JAXBElement<StringType>(languageQNAME, StringType.class, null, type);
            general.getContent().add(typeEl);
        }
        type.setLang(lang);
        type.setValue(language);
    }
}
Also used : StringType(org.olat.imsmd.xml.manifest.StringType) QName(javax.xml.namespace.QName) JAXBElement(javax.xml.bind.JAXBElement) GeneralType(org.olat.imsmd.xml.manifest.GeneralType)

Aggregations

JAXBElement (javax.xml.bind.JAXBElement)2 QName (javax.xml.namespace.QName)2 GeneralType (org.olat.imsmd.xml.manifest.GeneralType)2 StringType (org.olat.imsmd.xml.manifest.StringType)2