Package ru.spbu.math.ontologycomparison.zhukova.logic.builder.loader.impl

Source Code of ru.spbu.math.ontologycomparison.zhukova.logic.builder.loader.impl.PropertyVisitor

package ru.spbu.math.ontologycomparison.zhukova.logic.builder.loader.impl;

import org.semanticweb.owlapi.model.OWLObjectProperty;
import org.semanticweb.owlapi.model.OWLPropertyExpression;
import ru.spbu.math.ontologycomparison.zhukova.logic.builder.loader.IPropertyVisitor;
import ru.spbu.math.ontologycomparison.zhukova.logic.ontologygraph.IOntologyConcept;
import ru.spbu.math.ontologycomparison.zhukova.logic.ontologygraph.impl.OntologyRelation;

/**
* @author Anna Zhukova
*/
public class PropertyVisitor implements IPropertyVisitor<IOntologyConcept> {

    public void inRelationship(IOntologyConcept node, IOntologyConcept friend, OWLPropertyExpression property) {
        if (node != null && property instanceof OWLObjectProperty) {
            OWLObjectProperty objectProperty = (OWLObjectProperty) property;
            node.addSubjectRelation(new OntologyRelation(objectProperty.getIRI().toURI(), objectProperty.toString(), false, node, friend));
        }
    }
}
TOP

Related Classes of ru.spbu.math.ontologycomparison.zhukova.logic.builder.loader.impl.PropertyVisitor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.