-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #3 : Refactoring of ValueProcessors to pass CellReference +
LogListeners
- Loading branch information
Showing
12 changed files
with
455 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
xls2rdf-lib/src/main/java/fr/sparna/rdf/xls2rdf/ListXls2RdfMessageListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package fr.sparna.rdf.xls2rdf; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class ListXls2RdfMessageListener implements Xls2RdfMessageListenerIfc { | ||
|
||
private List<Message> messages = new ArrayList<>(); | ||
|
||
@Override | ||
public void onMessage(MessageCode code, String cellReference, String message) { | ||
messages.add(new Message(code, cellReference, message)); | ||
} | ||
|
||
public List<Message> getMessages() { | ||
return messages; | ||
} | ||
|
||
public class Message { | ||
MessageCode code; | ||
String cellReference; | ||
String message; | ||
public Message(MessageCode code, String cellReference, String message) { | ||
super(); | ||
this.code = code; | ||
this.cellReference = cellReference; | ||
this.message = message; | ||
} | ||
public MessageCode getCode() { | ||
return code; | ||
} | ||
public String getCellReference() { | ||
return cellReference; | ||
} | ||
public String getMessage() { | ||
return message; | ||
} | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
xls2rdf-lib/src/main/java/fr/sparna/rdf/xls2rdf/LogXls2RdfMessageListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package fr.sparna.rdf.xls2rdf; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class LogXls2RdfMessageListener implements Xls2RdfMessageListenerIfc { | ||
|
||
private Logger log = LoggerFactory.getLogger(this.getClass().getName()); | ||
|
||
@Override | ||
public void onMessage(MessageCode code, String cellReference, String message) { | ||
log.info("Cell "+cellReference+" : " +code.name()+" - "+message); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.