commit
75b8746026
1 changed files with 3 additions and 1 deletions
|
@ -160,7 +160,9 @@ public class FileGraphSetup implements ServletContextListener {
|
||||||
try {
|
try {
|
||||||
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||||
String fn = p.getFileName().toString().toLowerCase();
|
String fn = p.getFileName().toString().toLowerCase();
|
||||||
if ( fn.endsWith(".n3") || fn.endsWith(".ttl") ) {
|
if ( fn.endsWith(".nt") ) {
|
||||||
|
model.read( fis, null, "N-TRIPLE" );
|
||||||
|
} else if ( fn.endsWith(".n3") || fn.endsWith(".ttl") ) {
|
||||||
model.read( fis, null, "N3" );
|
model.read( fis, null, "N3" );
|
||||||
} else if ( fn.endsWith(".owl") || fn.endsWith(".rdf") || fn.endsWith(".xml") ) {
|
} else if ( fn.endsWith(".owl") || fn.endsWith(".rdf") || fn.endsWith(".xml") ) {
|
||||||
model.read( fis, null, "RDF/XML" );
|
model.read( fis, null, "RDF/XML" );
|
||||||
|
|
Loading…
Add table
Reference in a new issue