001: /*****************************************************************************
002: * Source code information
003: * -----------------------
004: * Original author Ian Dickinson, HP Labs Bristol
005: * Author email Ian.Dickinson@hp.com
006: * Package Jena 2
007: * Web http://sourceforge.net/projects/jena/
008: * Created 22-May-2003
009: * Filename $RCSfile: ProfileException.java,v $
010: * Revision $Revision: 1.7 $
011: * Release status $State: Exp $
012: *
013: * Last modified on $Date: 2008/01/02 12:06:41 $
014: * by $Author: andy_seaborne $
015: *
016: * (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
017: * (see footer for full conditions)
018: *****************************************************************************/package com.hp.hpl.jena.ontology;
019:
020: // Imports
021: ///////////////
022:
023: /**
024: * <p>
025: * Exception that is raised when an ontology operation is attempted that is
026: * not present in the language profile for the current ontology model. For example,
027: * if the language profile is
028: * {@linkplain com.hp.hpl.jena.ontology.ProfileRegistry#OWL_LITE_LANG owl lite},
029: * class complements are not permitted and so that element of the profile is null.
030: * An attempt to create a class complement in an OWL Lite model will raise a
031: * ProfileException.
032: * </p>
033: *
034: * @author Ian Dickinson, HP Labs
035: * (<a href="mailto:Ian.Dickinson@hp.com" >email</a>)
036: * @version CVS $Id: ProfileException.java,v 1.7 2008/01/02 12:06:41 andy_seaborne Exp $
037: */
038: public class ProfileException extends OntologyException {
039: // Constants
040: //////////////////////////////////
041:
042: // Static variables
043: //////////////////////////////////
044:
045: // Instance variables
046: //////////////////////////////////
047:
048: // Constructors
049: //////////////////////////////////
050:
051: public ProfileException(String element, Profile profile) {
052: super (
053: "Attempted to use language construct "
054: + element
055: + " that is not supported in the current language profile: "
056: + ((profile == null) ? "not specified"
057: : profile.getLabel()));
058: }
059:
060: // External signature methods
061: //////////////////////////////////
062:
063: // Internal implementation methods
064: //////////////////////////////////
065:
066: //==============================================================================
067: // Inner class definitions
068: //==============================================================================
069:
070: }
071:
072: /*
073: (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
074: All rights reserved.
075:
076: Redistribution and use in source and binary forms, with or without
077: modification, are permitted provided that the following conditions
078: are met:
079:
080: 1. Redistributions of source code must retain the above copyright
081: notice, this list of conditions and the following disclaimer.
082:
083: 2. Redistributions in binary form must reproduce the above copyright
084: notice, this list of conditions and the following disclaimer in the
085: documentation and/or other materials provided with the distribution.
086:
087: 3. The name of the author may not be used to endorse or promote products
088: derived from this software without specific prior written permission.
089:
090: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
091: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
092: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
093: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
094: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
095: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
096: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
097: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
098: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
099: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100: */
|