001package org.dllearner.configuration.spring;
002
003import org.dllearner.configuration.spring.editors.ClassExpressionPropertyEditor;
004import org.dllearner.configuration.spring.editors.OWLEntityEditor;
005import org.dllearner.configuration.spring.editors.ReasonerImplementationEditor;
006import org.dllearner.reasoning.ReasonerImplementation;
007import org.semanticweb.owlapi.model.*;
008import org.springframework.beans.PropertyEditorRegistrar;
009import org.springframework.beans.PropertyEditorRegistry;
010
011/**
012 * Created by IntelliJ IDEA.
013 * User: Chris
014 * Date: 8/27/11
015 * Time: 12:38 PM
016 * <p/>
017 * This is where we will register custom property editors for properties which can't be configured by the standard
018 * PropertyEditors.
019 */
020public class CustomPropertyEditorRegistrar implements PropertyEditorRegistrar {
021
022    @Override
023    public void registerCustomEditors(PropertyEditorRegistry registry) {
024        //Register any custom editors here.
025        registry.registerCustomEditor(OWLClassExpression.class, new ClassExpressionPropertyEditor());
026//              registry.registerCustomEditor(OWLClass.class, new OWLEntityEditor<EntityType<OWLClass>>());
027                registry.registerCustomEditor(OWLObjectProperty.class, new OWLEntityEditor<>(EntityType.OBJECT_PROPERTY));
028                registry.registerCustomEditor(OWLDataProperty.class, new OWLEntityEditor<>(EntityType.DATA_PROPERTY));
029                registry.registerCustomEditor(OWLIndividual.class, new OWLEntityEditor<>(EntityType.NAMED_INDIVIDUAL));
030        registry.registerCustomEditor(ReasonerImplementation.class, new ReasonerImplementationEditor());
031        
032    }
033}