Search in sources :

Example 1 with VariableGroupConnection

use of com.opensimulationplatform.gen.owl.model.OntologyClasses.VariableGroupConnection in project osp-validator by open-simulation-platform.

the class VariableGroupConnectionOwlBuilder method makeNestedVariableGroupConnections.

private void makeNestedVariableGroupConnections(VariableGroupConnection variableGroupConnection, OWLNamedIndividual individual) {
    List<VariableGroup> variableGroupsA = variableGroupConnection.getVariableGroupA().getVariableGroups();
    List<VariableGroup> variableGroupsB = variableGroupConnection.getVariableGroupB().getVariableGroups();
    for (int i = 0; i < min(variableGroupsA.size(), variableGroupsB.size()); i++) {
        VariableGroupConnection connection = new VariableGroupConnection();
        connection.setSimulatorA(connection.getSimulatorA());
        connection.setSimulatorB(connection.getSimulatorB());
        connection.setVariableGroupA(variableGroupsA.get(i));
        connection.setVariableGroupB(variableGroupsB.get(i));
        OWLNamedIndividual variableGroupConnectionIndividual = this.build(connection);
        OWLObjectProperty hasConnection = context.owl.dataFactory.getOWLObjectProperty(op_has_connection, context.owl.prefixManager);
        OWLAxiom axiom = context.owl.dataFactory.getOWLObjectPropertyAssertionAxiom(hasConnection, individual, variableGroupConnectionIndividual);
        context.axioms.add(axiom);
    }
}
Also used : VariableGroupConnection(com.opensimulationplatform.core.model.systemstructure.VariableGroupConnection) VariableGroupConnection(com.opensimulationplatform.gen.owl.model.OntologyClasses.VariableGroupConnection) VariableGroup(com.opensimulationplatform.core.model.modeldescription.variablegroup.VariableGroup) OWLNamedIndividual(org.semanticweb.owlapi.model.OWLNamedIndividual) OWLAxiom(org.semanticweb.owlapi.model.OWLAxiom) OWLObjectProperty(org.semanticweb.owlapi.model.OWLObjectProperty)

Aggregations

VariableGroup (com.opensimulationplatform.core.model.modeldescription.variablegroup.VariableGroup)1 VariableGroupConnection (com.opensimulationplatform.core.model.systemstructure.VariableGroupConnection)1 VariableGroupConnection (com.opensimulationplatform.gen.owl.model.OntologyClasses.VariableGroupConnection)1 OWLAxiom (org.semanticweb.owlapi.model.OWLAxiom)1 OWLNamedIndividual (org.semanticweb.owlapi.model.OWLNamedIndividual)1 OWLObjectProperty (org.semanticweb.owlapi.model.OWLObjectProperty)1