
es.ucm.fdi.gaia.ontobridge.OntologyDocument 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: OntologyDocument.java
* 22/11/2006
*/
package es.ucm.fdi.gaia.ontobridge;
import es.ucm.fdi.gaia.ontobridge.exceptions.NoLocalFileException;
/**
* Represents the file/document containing an ontology.
* As ontologies should be online but usually are placed locally this class allows to
* map the URI of the ontology with the local copy.
*
* @author Juan A. Recio Garcia
*/
public class OntologyDocument {
private String _URL;
private String _localfile;
/**
* Creates an ontology document
* @param URL The correct URL of the ontology
* @param localfile the local copy of the ontology
*/
public OntologyDocument(String URL, String localfile)
{
_URL = URL;
_localfile = localfile;
}
/**
* Creates an ontology document. There is no local copy.
* @param URL The correct URL of the ontology
*/
public OntologyDocument(String URL)
{
this(URL,null);
}
/**
* @return the localfile
*/
public String getLocalfile() throws NoLocalFileException{
if(_localfile == null)
throw new NoLocalFileException(_localfile);
return _localfile;
}
/**
* @return the URL
*/
public String getURL() {
return _URL;
}
/**
* Checks if user has configured the local copy
*/
public boolean hasAltLocalFile()
{
return (_localfile != null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy