001 /** 002 * OntoBride library 003 * Departamento de Ingeniería del Software e Inteligencia Artificial 004 * Universidad Complutense de Madrid 005 * 006 * Licensed under the terms of the GNU Library or Lesser General Public License (LGPL) 007 * 008 * @author Juan A. Recio García 009 * 010 * This software is a subproject of the jCOLIBRI framework 011 * http://sourceforge.net/projects/jcolibri-cbr/ 012 * http://gaia.fdi.ucm.es/projects/jcolibri/ 013 * 014 * File: Test5.java 015 * 26/02/2007 016 */ 017 package es.ucm.fdi.gaia.ontobridge.test; 018 019 import java.util.ArrayList; 020 021 import es.ucm.fdi.gaia.ontobridge.OntoBridge; 022 import es.ucm.fdi.gaia.ontobridge.OntologyDocument; 023 import es.ucm.fdi.gaia.ontobridge.test.gui.PnlConceptsAndInstancesTree; 024 025 /** 026 * File used for testing the library using the GAIA photos ontology. 027 * Shows how to disable inference. 028 * 029 * @author Juan A. Recio Garcia 030 */ 031 public class Test6 { 032 033 public static void main(String args[]) 034 { 035 OntoBridge ob = new OntoBridge(); 036 ob.initWithPelletReasoner(); 037 038 039 OntologyDocument mainOnto = new OntologyDocument("http://gaia.fdi.ucm.es/ontologies/fotos.owl","file:test/fotos.owl"); 040 ArrayList<OntologyDocument> subOntologies = new ArrayList<OntologyDocument>(); 041 042 ob.loadOntology(mainOnto, subOntologies, false); 043 044 javax.swing.JFrame window = new javax.swing.JFrame(mainOnto.getURL()); 045 PnlConceptsAndInstancesTree tree = new PnlConceptsAndInstancesTree(ob,true); 046 window.getContentPane().add(tree); 047 window.pack(); 048 window.setSize(300, 600); 049 window.setVisible(true); 050 051 ob.setInference(false); 052 javax.swing.JOptionPane.showMessageDialog(window, "Inference disabled"); 053 054 } 055 }