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;
025    
026    
027    /**
028     * The base class of all OWL restriction classes.
029     *
030     * @author Holger Knublauch  <holger@knublauch.com>
031     */
032    public interface OWLRestriction extends OWLAnonymousClass {
033    
034    
035        /**
036         * Checks the filler from a textual expression.  This should be called prior to
037         * assigning a new filler value.
038         *
039         * @param value the potential filler value
040         * @throws Exception to indicate a parse exception
041         */
042        void checkFillerText(String value) throws Exception;
043    
044    
045        /**
046         * Gets the Unicode operator character that is typically used to represent this
047         * type of restriction.
048         *
049         * @return the operator char
050         */
051        char getOperator();
052    
053    
054        /**
055         * Gets the Slot that is used to store the filler at this kind of restriction
056         * (e.g., owl:cardinality).
057         *
058         * @return the filler slot
059         */
060        RDFProperty getFillerProperty();
061    
062    
063        /**
064         * Gets the filler of this restriction for display purposes.
065         *
066         * @return the filler text (never null)
067         */
068        String getFillerText();
069    
070    
071        /**
072         * Gets the Slot that is restricted by this restriction.
073         *
074         * @return the value of the owl:onProperty slot at this restriction
075         */
076        RDFProperty getOnProperty();
077    
078    
079        /**
080         * Checks whether this restriction has been completely defined already.
081         * If this is false, then the user still has to define the restriction values.
082         *
083         * @return true  if this is completely defined
084         */
085        boolean isDefined();
086    
087    
088        /**
089         * Sets the filler from a (valid) textual expression.
090         *
091         * @param value the new filler value
092         * @throws Exception to indicate a parse exception
093         */
094        void setFillerText(String value) throws Exception;
095    
096    
097        /**
098         * Sets the restricted property at this restriction.
099         *
100         * @param property the RDFProperty to restrict
101         */
102        void setOnProperty(RDFProperty property);
103    }
104