Skip to content

Commit

Permalink
Updates to Readme and interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
lbozzato committed Apr 9, 2016
1 parent cda2679 commit eb59084
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
5 changes: 0 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ Options:
- Java runtime version 1.7 (or greater)
- Windows, Linux or Mac OS X operating system

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
= DEMO =

Please refer to "/demo/DEMO_README.txt" for usage examples.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
= KNOWN LIMITATIONS =

Expand Down
8 changes: 4 additions & 4 deletions examples/just-atomic-out.n3
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@
<http://dkm.fbk.eu/asp-it/just-atomic#R> <http://dkm.fbk.eu/asp-it/just-atomic#i2> .
[ rdf:type owl:Axiom ;
<http://dkm.fbk.eu/asp-it/elc-schema#hasIT> "\"tt\""^^xsd:string ;
owl:annotatedProperty <http://dkm.fbk.eu/asp-it/just-atomic#R> ;
owl:annotatedTarget <http://dkm.fbk.eu/asp-it/just-atomic#A> ;
owl:annotatedSource <http://dkm.fbk.eu/asp-it/just-atomic#i1> ;
owl:annotatedTarget <http://dkm.fbk.eu/asp-it/just-atomic#i2>
owl:annotatedProperty rdf:type
] .
[ rdf:type owl:Axiom ;
<http://dkm.fbk.eu/asp-it/elc-schema#hasIT> "\"tt\""^^xsd:string ;
owl:annotatedTarget <http://dkm.fbk.eu/asp-it/just-atomic#A> ;
owl:annotatedProperty <http://dkm.fbk.eu/asp-it/just-atomic#R> ;
owl:annotatedSource <http://dkm.fbk.eu/asp-it/just-atomic#i1> ;
owl:annotatedProperty rdf:type
owl:annotatedTarget <http://dkm.fbk.eu/asp-it/just-atomic#i2>
] .


Expand Down
20 changes: 15 additions & 5 deletions src/main/java/eu/fbk/dkm/aspit/cli/AspitCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import it.unical.mat.wrapper.DLVInvocationException;

import java.io.File;
import java.io.IOException;

import org.semanticweb.drew.dlprogram.parser.ParseException;
Expand Down Expand Up @@ -54,6 +55,13 @@ public void go() {
printUsage();
System.exit(1);
}

//Check input file existence
File ontofile = new File(inputKB.getOntologyFilename());
if(!ontofile.exists()){
System.err.println("[!] Input ontology file does not exists.");
System.exit(1);
}

//Load ontology file.
try {
Expand All @@ -65,10 +73,12 @@ public void go() {

//Create new program for the input KB.
outputKBProgram = new KBProgram(inputKB);

//Set possibly custom DLV, output file path and lp program
if(dlvPath != null)
outputKBProgram.setDlvPath(dlvPath);
else
dlvPath = outputKBProgram.getDlvPath();
if(outputKBFilePath != null)
inputKB.setOutputFilePath(outputKBFilePath);
else
Expand Down Expand Up @@ -107,7 +117,7 @@ public void go() {
}
if(verbose) System.out.println("Output KB saved to: " + inputKB.getOutputFilePath() + "\n");

System.out.println("Asp-it: process complete.");
System.out.println("Asp-it: process completed.");
}

/**
Expand Down Expand Up @@ -137,7 +147,7 @@ public String formatFilename(){
public boolean parseArgs(String[] args) {

if (args.length == 0) {
System.err.println("Missing argument: <input-ontology-file>");
System.err.println("[!] Missing argument: <input-ontology-file>");
System.err.println();
return false;
} else {
Expand Down Expand Up @@ -180,9 +190,9 @@ void printUsage() {
+ //
" <input-ontology-file>\n"
+ //
" OWL file containing the ontology for which IT have to be computed. \n"
" OWL file containing the ontology for which IT have to be computed.\n\n"
+ //
"Example: aspit input.n3\n"
"Example: asp-it input.n3\n\n"
+ //
"Options:\n"
+ //
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/eu/fbk/dkm/aspit/kb/KBProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ public void handleResult(DLVInvocation paramDLVInvocation,
System.err.println("[!] No models for KB program.");

} catch (DLVInvocationException | IOException e) {
System.err.println("[!] Cannot execute DLV invocation. Check if DLV executable file exists at path: " + dlvPath + "\n");
e.printStackTrace();
System.exit(1);
}
}

Expand Down

0 comments on commit eb59084

Please sign in to comment.