From 5d8070789c8933eaa2fe0059c9430b1bc6ec2f6f Mon Sep 17 00:00:00 2001 From: CodeGat Date: Sat, 9 Feb 2019 18:15:55 +1100 Subject: [PATCH 1/2] Prefix definition can be of form: 'a ?: ?e' where 'a' is acronym and 'e' is expansion. --- src/controller/PrefixMenuController.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/controller/PrefixMenuController.java b/src/controller/PrefixMenuController.java index 2c7fabd..3c5b74f 100644 --- a/src/controller/PrefixMenuController.java +++ b/src/controller/PrefixMenuController.java @@ -72,10 +72,10 @@ public class PrefixMenuController extends AbstractDataSharingController Date: Sat, 9 Feb 2019 18:45:43 +1100 Subject: [PATCH 2/2] Fixed attempted correlation of .csv headers and .ttl classes not finding equal strings - failed due to \uFEFF being prepended to .csv headers. --- src/model/dataintegration/DataIntegrator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/model/dataintegration/DataIntegrator.java b/src/model/dataintegration/DataIntegrator.java index 9bc54a5..47a2c28 100644 --- a/src/model/dataintegration/DataIntegrator.java +++ b/src/model/dataintegration/DataIntegrator.java @@ -245,10 +245,13 @@ public void attemptCorrelationOfHeaders(){ for (Entry header : headers.entrySet()){ for (Vertex klass : classes){ - boolean isExactMatch = header.getKey().equals(klass.getName()); + String headerComparable = + header.getKey().charAt(0) == '\uFEFF' ? header.getKey().substring(1) : header.getKey(); + + boolean isExactMatch = headerComparable.equals(klass.getName()); boolean isCloseMatch = !klass.isIri() && klass.getElementType() == CLASS - && header.getKey().equalsIgnoreCase(klass.getName().split(":", 2)[1]); + && headerComparable.equalsIgnoreCase(klass.getName().split(":", 2)[1]); if (isExactMatch || isCloseMatch){ csvTtlCorrelations.add(new Correlation(header.getValue(), header.getKey(), klass));