Skip to content

Commit

Permalink
Fixed 2 issues raised by Idafen
Browse files Browse the repository at this point in the history
One had to do with the java version. The other with a capital letter
when copying resources
  • Loading branch information
dgarijo committed Sep 3, 2014
1 parent ee3811c commit 10be70a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 5 deletions.
Binary file modified JAR/widoco-0.0.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/lode/LODEGeneration.java
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ private static String applyXSLTTransformation(String source, String ontologyUrl,
Transformer transformer =
tfactory.newTransformer(
// new StreamSource(ClassLoader.getSystemResourceAsStream("lode/extraction.xsl")));
new StreamSource(resourcesFile.getPath()+"/extraction.xsl"));
new StreamSource(resourcesFile.getPath()+File.separator+"extraction.xsl"));
// new StreamSource(ClassLoader.getSystemResourceAsStream("lode/resources/extraction.xsl")));

//this will be modified later on, so it is not important right now
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/widoco/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ private void loadLogos(){
try {
//logo
this.logo = ImageIO.read(ClassLoader.getSystemResource("logo/logo2.png"));
this.logoMini = ImageIO.read(ClassLoader.getSystemResource("logo/logomini2.png"));
this.logoMini = ImageIO.read(ClassLoader.getSystemResource("logo/logomini100.png"));
} catch (IOException e) {
System.err.println("Error loading the logo :( "+e.getMessage());
}
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/widoco/CreateResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public static void copyResourceFolder(String[] resources, String savePath) throw
}

/**
* Method used to copy all the RO related files: styles, images, etc.
* Method used to copy all the related files: styles, images, etc.
* @param source
* @param dest
* @throws IOException
Expand All @@ -244,6 +244,9 @@ private static void copyResource(String resourceName, File dest) throws IOExcept
os.write(buffer, 0, length);
}
}
catch(Exception e){
System.err.println("Exception while copying the resource"+resourceName+". "+e.getMessage());
}
finally {
if(is!=null)is.close();
if(os!=null)os.close();
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/widoco/LODEParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -101,7 +100,7 @@ private void parse(String content){
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8)));
Document doc = db.parse(new ByteArrayInputStream(content.getBytes("UTF-8")));//StandardCharsets.UTF_8

NodeList html = doc.getElementsByTagName("div");
// String cList = "", pList= "", dPList= "", c= "", p= "", dp="";
Expand Down
Binary file added src/main/resources/logo/logomini100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/logo/logomini200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 10be70a

Please sign in to comment.