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 class of all anonymous OWL class types.
028     * Anonymous classes should be handled with care, as they do follow some
029     * life cycle restrictions.  Their life cycle depends on a host class,
030     * which references them.  When the host class is deleted, then the
031     * frame store will automatically delete any depending anonymous classes.
032     * As a result, it is not permitted to share anonymous classes between
033     * instances.
034     *
035     * @author Holger Knublauch  <holger@knublauch.com>
036     */
037    public interface OWLAnonymousClass extends OWLClass {
038    
039        /**
040         * This routine performs very slowly.  Usually this
041         * can be avoided by keeping track of how this OWLAnonymous class was constructed.
042         * 
043         * Gets the root of the expression three where this is a part of.
044         * For example, if this is the !A in the expression (!A & B), then
045         * this method will return the OWLIntersectionClass (!A & B).
046         *
047         * @return the root (may be this if noone is pointing to this)
048         */
049        OWLAnonymousClass getExpressionRoot();
050    
051    
052        /**
053         * Gets the named class where this is attached to (directly or indirectly
054         * as part of a nested expression).
055         *
056         * @return the owning named class
057         */
058        OWLNamedClass getOwner();
059    }
060