es.ucm.fdi.gaia.ontobridge.test.Test2gui Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Ontobridge Show documentation
Show all versions of Ontobridge Show documentation
OntoBridge is a java library that eases the management of ontologies.
The newest version!
/**
* OntoBride library
* Departamento de Ingenieria del Software e Inteligencia Artificial
* Universidad Complutense de Madrid
*
* Licensed under the terms of the GNU Library or Lesser General Public License (LGPL)
*
* @author Juan A. Recio Garcia
*
* This software is a subproject of the jCOLIBRI framework
* http://sourceforge.net/projects/jcolibri-cbr/
* http://gaia.fdi.ucm.es/projects/jcolibri/
*
* File: Test2gui.java
* 26/02/2007
*/
package es.ucm.fdi.gaia.ontobridge.test;
import java.util.ArrayList;
import es.ucm.fdi.gaia.ontobridge.OntoBridge;
import es.ucm.fdi.gaia.ontobridge.OntologyDocument;
import es.ucm.fdi.gaia.ontobridge.test.gui.PnlConceptsTree;
/**
* File used for testing the library using the GAIA restaurants ontology.
* Shows a graphical representation of the ontology (Classes only)
* http://gaia.fdi.ucm.es/ontologies/
*
* @author Juan A. Recio Garcia
*/
public class Test2gui {
public static void main(String args[])
{
OntoBridge ob = new OntoBridge();
ob.initWithPelletReasoner();
OntologyDocument mainOnto = new OntologyDocument("http://gaia.fdi.ucm.es/ontologies/restaurant.owl","file:test/restaurant.owl");
ArrayList subOntologies = new ArrayList();
subOntologies.add(new OntologyDocument("http://gaia.fdi.ucm.es/ontologies/calendar.owl","file:test/calendar.owl"));
subOntologies.add(new OntologyDocument("http://gaia.fdi.ucm.es/ontologies/price.owl","file:test/price.owl"));
subOntologies.add(new OntologyDocument("http://gaia.fdi.ucm.es/ontologies/address.owl","file:test/address.owl"));
subOntologies.add(new OntologyDocument("http://gaia.fdi.ucm.es/ontologies/contact-details.owl","file:test/contact-details.owl"));
ob.loadOntology(mainOnto, subOntologies, false);
javax.swing.JFrame window = new javax.swing.JFrame(mainOnto.getURL());
PnlConceptsTree tree = new PnlConceptsTree(ob);
window.getContentPane().add(tree);
window.pack();
window.setSize(300, 600);
window.setVisible(true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy