Skip to content

Commit

Permalink
[Feature #15] Fix loading configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Sep 17, 2021
1 parent da76f60 commit 4c0b038
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Resource getPropertyValue(Property property, Resource defaultValue) {
}


boolean getPropertyValue(Property property, boolean defaultValue) {
boolean getPropertyValue(@NotNull Property property, boolean defaultValue) {

Statement s = resource.getProperty(property);

Expand All @@ -308,6 +308,16 @@ boolean getPropertyValue(Property property, boolean defaultValue) {
return defaultValue;
}

char getPropertyValue(@NotNull Property property, char defaultValue) {

Statement s = resource.getProperty(property);

if (s != null && s.getObject().isLiteral()) {
return s.getObject().asLiteral().getChar();
}
return defaultValue;
}

protected String getStringPropertyValue(@NotNull Property property) {

Statement st = resource.getProperty(property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ ExecutionContext executeSelf() {
public void loadConfiguration() {
isReplace = getPropertyValue(SML.replace, false);
delimiter = getPropertyValue(P_DELIMITER, '\t');
quoteCharacter = getEffectiveValue(P_QUOTE_CHARACTER).asLiteral().getChar();
quoteCharacter = getPropertyValue(P_QUOTE_CHARACTER, '\'');
dataPrefix = getEffectiveValue(P_DATE_PREFIX).asLiteral().toString();
sourceResource = getResourceByUri(getEffectiveValue(P_SOURCE_RESOURCE_URI).asLiteral().toString());
outputMode = Mode.fromResource(
Expand Down

0 comments on commit 4c0b038

Please sign in to comment.