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-Aug-2003
009: * Filename $RCSfile: Main.java,v $
010: * Revision $Revision: 1.1 $
011: * Release status $State: Exp $
012: *
013: * Last modified on $Date: 2005/10/06 17:49:07 $
014: * by $Author: andy_seaborne $
015: *
016: * (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
017: * (see footer for full conditions)
018: *****************************************************************************/package jena.examples.ontology.classHierarchy;
019:
020: // Imports
021: ///////////////
022: import com.hp.hpl.jena.ontology.*;
023: import com.hp.hpl.jena.rdf.model.ModelFactory;
024:
025: /**
026: * <p>
027: * Execution wrapper for class hierarchy example
028: * </p>
029: *
030: * @author Ian Dickinson, HP Labs
031: * (<a href="mailto:Ian.Dickinson@hp.com" >email</a>)
032: * @version CVS $Id: Main.java,v 1.1 2005/10/06 17:49:07 andy_seaborne Exp $
033: */
034: public class Main {
035: // Constants
036: //////////////////////////////////
037:
038: // Static variables
039: //////////////////////////////////
040:
041: // Instance variables
042: //////////////////////////////////
043:
044: // Constructors
045: //////////////////////////////////
046:
047: // External signature methods
048: //////////////////////////////////
049:
050: public static void main(String[] args) {
051: OntModel m = ModelFactory.createOntologyModel(
052: OntModelSpec.OWL_MEM, null);
053:
054: // we have a local copy of the wine ontology
055: m.getDocumentManager().addAltEntry(
056: "http://www.w3.org/2001/sw/WebOnt/guide-src/wine",
057: "file:testing/reasoners/bugs/wine.owl");
058: m.getDocumentManager().addAltEntry(
059: "http://www.w3.org/2001/sw/WebOnt/guide-src/food",
060: "file:testing/reasoners/bugs/food.owl");
061:
062: m.read("http://www.w3.org/2001/sw/WebOnt/guide-src/wine");
063:
064: new ClassHierarchy().showHierarchy(System.out, m);
065: }
066:
067: // Internal implementation methods
068: //////////////////////////////////
069:
070: //==============================================================================
071: // Inner class definitions
072: //==============================================================================
073:
074: }
075:
076: /*
077: (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
078: All rights reserved.
079:
080: Redistribution and use in source and binary forms, with or without
081: modification, are permitted provided that the following conditions
082: are met:
083:
084: 1. Redistributions of source code must retain the above copyright
085: notice, this list of conditions and the following disclaimer.
086:
087: 2. Redistributions in binary form must reproduce the above copyright
088: notice, this list of conditions and the following disclaimer in the
089: documentation and/or other materials provided with the distribution.
090:
091: 3. The name of the author may not be used to endorse or promote products
092: derived from this software without specific prior written permission.
093:
094: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
095: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
096: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
097: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
098: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
099: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
100: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
101: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
102: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
103: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
104: */
|