Search in sources :

Example 1 with LocationNode

use of org.eol.globi.domain.LocationNode in project eol-globi-data by jhpoelen.

the class ExporterRDF method writeParticipantStatements.

public void writeParticipantStatements(Writer writer, Relationship ixnR, Node participant1) throws IOException {
    writeStatement(writer, Arrays.asList(blankNode(ixnR), iriNode(HAS_PARTICIPANT), blankNode(participant1)));
    writeStatement(writer, Arrays.asList(blankNode(participant1), iriNode(HAS_TYPE), iriNode(ORGANISM)));
    writeStatements(writer, taxonOfSpecimen(participant1));
    LocationNode location = new SpecimenNode(participant1).getSampleLocation();
    if (location != null) {
        for (Environment env : location.getEnvironments()) {
            String envoId = ExternalIdUtil.urlForExternalId(env.getExternalId());
            if (StringUtils.isNotBlank(envoId)) {
                writeStatement(writer, Arrays.asList(blankNode(participant1), iriNode(OCCURS_IN), iriNode(envoId)));
            }
        }
    }
}
Also used : LocationNode(org.eol.globi.domain.LocationNode) Environment(org.eol.globi.domain.Environment) SpecimenNode(org.eol.globi.domain.SpecimenNode)

Aggregations

Environment (org.eol.globi.domain.Environment)1 LocationNode (org.eol.globi.domain.LocationNode)1 SpecimenNode (org.eol.globi.domain.SpecimenNode)1