Search in sources :

Example 1 with FormalismType

use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.FormalismType in project hale by halestudio.

the class OmlRdfReader method getFormalism.

/**
 * converts from JAXB FromalismType {@link FormalismType} to OML
 * {@link Formalism}
 *
 * @param jaxbFormalism
 * @return Formalism
 */
private Formalism getFormalism(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.OntologyType.Formalism jaxbFormalism) {
    if (LOG.isTraceEnabled()) {
        LOG.trace("getFormalism(eu.esdihumboldt.generated.oml.OntologyType.Formalism) - start");
    }
    Formalism formalism = null;
    if (jaxbFormalism != null) {
        FormalismType fType = jaxbFormalism.getFormalism();
        URI uri = null;
        try {
            uri = new URI(fType.getUri());
        } catch (URISyntaxException e) {
            LOG.error("getFormalism(eu.esdihumboldt.generated.oml.OntologyType.Formalism)", e);
        // throw new RuntimeException(e);
        }
        formalism = new Formalism(fType.getName(), uri);
    }
    if (LOG.isTraceEnabled()) {
        LOG.trace("getFormalism(eu.esdihumboldt.generated.oml.OntologyType.Formalism) - end");
    }
    return formalism;
}
Also used : FormalismType(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.FormalismType) URISyntaxException(java.net.URISyntaxException) Formalism(eu.esdihumboldt.hale.io.oml.internal.goml.align.Formalism) URI(java.net.URI)

Aggregations

Formalism (eu.esdihumboldt.hale.io.oml.internal.goml.align.Formalism)1 FormalismType (eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.FormalismType)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1