Search in sources :

Example 1 with GroupContents

use of org.w3._2007.rif.GroupContents in project hale by halestudio.

the class ModelRifToRifTranslator method translate.

/**
 * @see com.onespatial.jrc.tns.oml_to_rif.api.Translator#translate(Object)
 *      which this method implements.
 * @param source
 *            {@link ModelRifDocument}
 * @return {@link Document}
 * @throws TranslationException
 *             if any exceptions are thrown during translation.
 */
@Override
public Document translate(ModelRifDocument source) throws TranslationException {
    final Document document = factory.createDocument();
    Payload payload = factory.createPayload();
    document.setPayload(payload);
    GroupContents group = factory.createGroupContents();
    payload.setGroup(group);
    for (ModelSentence s : source.getSentences()) {
        group.getSentence().add(buildSentence(s));
    }
    return document;
}
Also used : ModelSentence(com.onespatial.jrc.tns.oml_to_rif.model.rif.ModelSentence) Payload(org.w3._2007.rif.Payload) Document(org.w3._2007.rif.Document) ModelRifDocument(com.onespatial.jrc.tns.oml_to_rif.model.rif.ModelRifDocument) GroupContents(org.w3._2007.rif.GroupContents)

Aggregations

ModelRifDocument (com.onespatial.jrc.tns.oml_to_rif.model.rif.ModelRifDocument)1 ModelSentence (com.onespatial.jrc.tns.oml_to_rif.model.rif.ModelSentence)1 Document (org.w3._2007.rif.Document)1 GroupContents (org.w3._2007.rif.GroupContents)1 Payload (org.w3._2007.rif.Payload)1