-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMinhaClasse.java
38 lines (33 loc) · 1.08 KB
/
MinhaClasse.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
*
*/
//package tr.com.srdc.ontmalizer.test;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.Writer;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import tr.com.srdc.ontmalizer.XSD2OWLMapper;
public class MinhaClasse {
public static void main(String[] args) throws Exception {
// This part converts XML schema to OWL ontology.
XSD2OWLMapper mapping = new XSD2OWLMapper(new File("indoorgmlnavi.xsd"));
mapping.setObjectPropPrefix("");
mapping.setDataTypePropPrefix("");
mapping.convertXSD2OWL();
// This part prints the ontology to the specified file.
FileOutputStream ont;
// try {
File f = new File("indoorgmlnavi.owl");
// f.getParentFile().mkdirs();
ont = new FileOutputStream(f);
// mapping.writeOntology(ont, "N3");
mapping.writeOntology(ont, "RDF/XML");
ont.close();
// } catch (Exception e) {
// LOGGER.error("{}", e.getMessage());
// }
}
}