本文整理汇总了Java中gate.creole.ontology.OConstants.ONTOLOGY_DEFAULT_BASE_URI属性的典型用法代码示例。如果您正苦于以下问题:Java OConstants.ONTOLOGY_DEFAULT_BASE_URI属性的具体用法?Java OConstants.ONTOLOGY_DEFAULT_BASE_URI怎么用?Java OConstants.ONTOLOGY_DEFAULT_BASE_URI使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gate.creole.ontology.OConstants
的用法示例。
在下文中一共展示了OConstants.ONTOLOGY_DEFAULT_BASE_URI属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readOntologies
private void readOntologies(Set<String> filenames, String baseURI,
boolean asImport, String dirName) throws OWLOntologyCreationException, FileNotFoundException {
boolean isBaseURIset = true;
if (baseURI == null || baseURI.length() == 0) {
isBaseURIset = false;
baseURI = OConstants.ONTOLOGY_DEFAULT_BASE_URI;
}
String defaultUri = ((OWLOntologyServiceImpl) ontologyService).readOntologyData(filenames, dirName);
setDefaultNameSpace(defaultUri);
if (!asImport) {
if (isBaseURIset && getDefaultNameSpace() == null) {
setDefaultNameSpace(baseURI);
}
Set<OURI> us = addOntologyURIs();
int n = us.size();
if (n != 1) {
Utils.warning("Found 0 or more than 1 ontology in " + filenames.toString());
} else {
setDefaultNameSpaceFromOntologyURI();
}
}
}
示例2: readOntologyData
public void readOntologyData(File selectedFile, String baseURI,
OConstants.OntologyFormat format, boolean asImport) throws OWLOntologyCreationException, FileNotFoundException {
boolean isBaseURIset = true;
if (baseURI == null || baseURI.length() == 0) {
isBaseURIset = false;
baseURI = OConstants.ONTOLOGY_DEFAULT_BASE_URI;
}
((OWLOntologyServiceImpl) ontologyService).readOntologyData(selectedFile,
baseURI, format, asImport);
if (!asImport) {
if (isBaseURIset && getDefaultNameSpace() == null) {
setDefaultNameSpace(baseURI);
}
Set<OURI> us = addOntologyURIs();
int n = us.size();
if (n == 0) {
Utils.warning("No ontology URI found for ontology loaded from " + selectedFile.getAbsolutePath());
} else if (n > 1) {
// Utils.warning("More than one("+n+") ontology URI found for ontology loaded from "+selectedFile.getAbsolutePath()+": "+us);
} else {
setDefaultNameSpaceFromOntologyURI();
}
}
}
示例3: readOntologyData
public void readOntologyData(Reader in, String baseURI, OntologyFormat format,
boolean asImport) {
boolean isBaseURIset = true;
if(baseURI == null || baseURI.length() == 0) {
isBaseURIset = false;
baseURI = OConstants.ONTOLOGY_DEFAULT_BASE_URI;
}
((OntologyServiceImplSesame) ontologyService).readOntologyData(in,
baseURI, format, asImport);
if(!asImport) {
if(isBaseURIset && getDefaultNameSpace() == null) {
setDefaultNameSpace(baseURI);
} else {
setDefaultNameSpaceFromRepository();
}
}
}