001 /*
002 * The contents of this file are subject to the Mozilla Public License
003 * Version 1.1 (the "License"); you may not use this file except in
004 * compliance with the License. You may obtain a copy of the License at
005 * http://www.mozilla.org/MPL/
006 *
007 * Software distributed under the License is distributed on an "AS IS" basis,
008 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
009 * the specific language governing rights and limitations under the License.
010 *
011 * The Original Code is Protege-2000.
012 *
013 * The Initial Developer of the Original Code is Stanford University. Portions
014 * created by Stanford University are Copyright (C) 2007. All Rights Reserved.
015 *
016 * Protege was developed by Stanford Medical Informatics
017 * (http://www.smi.stanford.edu) at the Stanford University School of Medicine
018 * with support from the National Library of Medicine, the National Science
019 * Foundation, and the Defense Advanced Research Projects Agency. Current
020 * information about Protege can be obtained at http://protege.stanford.edu.
021 *
022 */
023
024 package edu.stanford.smi.protegex.owl.model.event;
025
026 import edu.stanford.smi.protegex.owl.model.RDFProperty;
027 import edu.stanford.smi.protegex.owl.model.RDFResource;
028 import edu.stanford.smi.protegex.owl.model.RDFSClass;
029
030 /**
031 * @author Holger Knublauch <holger@knublauch.com>
032 */
033 public interface ClassListener extends ProtegeClsListener {
034
035 /**
036 * Called after a class has been added to the union domain of a property.
037 *
038 * @param cls the class that was added
039 * @param property the property that has changed its domain
040 */
041 void addedToUnionDomainOf(RDFSClass cls, RDFProperty property);
042
043
044 /**
045 * Called after a (new) resource was made an instance of a class.
046 *
047 * @param cls the RDFSClass of the instance
048 * @param instance the instance that was added
049 */
050 void instanceAdded(RDFSClass cls, RDFResource instance);
051
052
053 /**
054 * Called after a resource was removed from the instances of a class.
055 *
056 * @param cls the RDFSClass of the instance
057 * @param instance the instance that was removed
058 */
059 void instanceRemoved(RDFSClass cls, RDFResource instance);
060
061
062 /**
063 * Called after a class has been removed from the union domain of a property.
064 *
065 * @param cls the class that was removed
066 * @param property the property that has changed its domain
067 */
068 void removedFromUnionDomainOf(RDFSClass cls, RDFProperty property);
069
070
071 /**
072 * Called after a class has been added as a subclass to another class.
073 *
074 * @param cls the class that was changed
075 * @param subclass the new subclass of cls
076 */
077 void subclassAdded(RDFSClass cls, RDFSClass subclass);
078
079
080 /**
081 * Called after a class has been removed from the subclasses of another class.
082 *
083 * @param cls the class that was changed
084 * @param subclass the former subclass of cls
085 */
086 void subclassRemoved(RDFSClass cls, RDFSClass subclass);
087
088
089 /**
090 * Called after a class has been added as a superclass to another class.
091 *
092 * @param cls the class that was changed
093 * @param superclass the new superclass of cls
094 */
095 void superclassAdded(RDFSClass cls, RDFSClass superclass);
096
097
098 /**
099 * Called after a class has been removed from the superclasses of another class.
100 *
101 * @param cls the class that was changed
102 * @param superclass the former superclass of cls
103 */
104 void superclassRemoved(RDFSClass cls, RDFSClass superclass);
105 }
106