Adding more unit tests for EditN3Generator. Dealing with literals better
This commit is contained in:
parent
5ddd6fecad
commit
876e2d97f1
3 changed files with 74 additions and 5 deletions
|
@ -148,7 +148,7 @@ public class EditN3GeneratorVTwo {
|
|||
*
|
||||
*/
|
||||
protected String subInLiterals(String var, Literal literal, String target){
|
||||
String varRegex = "\\?" + var + "(?=\\.\\p{Space}|\\p{Space})";
|
||||
String varRegex = "\\?" + var + "(?=\\p{Punct}||\\p{Space}|&)";
|
||||
if (target==null ) {
|
||||
log.error("subInLiterals was passed a null target");
|
||||
return "blankBecauseTargetOrValueWasNull";
|
||||
|
@ -215,7 +215,7 @@ public class EditN3GeneratorVTwo {
|
|||
String valueString = org.apache.commons.lang.StringUtils.join(n3Values, ",");
|
||||
|
||||
//Substitute it in to n3
|
||||
String varRegex = "\\?" + var + "(?=\\.\\p{Space}|\\p{Space})";
|
||||
String varRegex = "\\?" + var + "(?=\\p{Punct}|\\p{Space}|$)";
|
||||
|
||||
String out = null;
|
||||
if( valueString != null )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue