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     * The base interface of the various cardinality restrictions.
028     *
029     * @author Holger Knublauch  <holger@knublauch.com>
030     */
031    public interface OWLCardinalityBase extends OWLRestriction {
032    
033        /**
034         * Gets the cardinality value in this restriction.
035         *
036         * @return a positive integer
037         */
038        int getCardinality();
039    
040    
041        /**
042         * Gets the qualifier class.  If this is a qualified cardinality restriction, then
043         * this is the value of the owl:valuesFrom property.  Otherwise, this method returns
044         * owl:Thing.
045         *
046         * @return owl:Thing or the result of <CODE>getValuesFrom()</CODE>.
047         */
048        RDFSClass getQualifier();
049    
050    
051        /**
052         * If this is a qualified cardinality restriction, then this gets the
053         * owl:valuesFrom property value.
054         *
055         * @return the qualifier class or null if this is not a qualified cardinality restriction
056         */
057        RDFSClass getValuesFrom();
058    
059    
060        /**
061         * Checks if this is a qualified cardinality restriction.
062         * This is true if this has a value for the owl:valuesFrom property.
063         *
064         * @return true  if this is a qualified cardinality restriction
065         */
066        boolean isQualified();
067    
068    
069        /**
070         * Sets the cardinality value in this restriction.
071         *
072         * @param value the new cardinality value
073         */
074        void setCardinality(int value);
075    
076    
077        void setValuesFrom(RDFSClass value);
078    }
079