You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2014/06/13 10:58:15 UTC
[055/100] [abbrv] git commit: fixed minor detail serializing prefix
mappings to rdfa
fixed minor detail serializing prefix mappings to rdfa
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/97403295
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/97403295
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/97403295
Branch: refs/heads/ldp
Commit: 974032953536dd07443966e615b9724bbec25ee3
Parents: 89fe9d4
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Apr 8 10:46:18 2014 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Apr 8 10:46:18 2014 +0200
----------------------------------------------------------------------
.../core/services/prefix/PrefixServiceImpl.java | 30 ++++++++++----------
1 file changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/97403295/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/prefix/PrefixServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/prefix/PrefixServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/prefix/PrefixServiceImpl.java
index b26afe3..ba3ab78 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/prefix/PrefixServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/prefix/PrefixServiceImpl.java
@@ -38,9 +38,8 @@ import com.google.common.collect.HashBiMap;
/**
* Prefix Manager default implementation
- *
+ *
* @author Sergio Fernández
- *
*/
@ApplicationScoped
public class PrefixServiceImpl implements PrefixService {
@@ -51,7 +50,7 @@ public class PrefixServiceImpl implements PrefixService {
private Logger log;
@Inject
- private ConfigurationService configurationService;
+ private ConfigurationService configurationService;
private BiMap<String, String> cache;
@@ -127,17 +126,17 @@ public class PrefixServiceImpl implements PrefixService {
public Map<String, String> getMappings() {
return Collections.unmodifiableMap(cache);
}
-
- @Override
- public boolean remove(String prefix) {
- if (cache.containsKey(prefix)) {
- cache.remove(prefix);
- configurationService.removeConfiguration(CONFIGURATION_PREFIX + "." + prefix);
- return true;
- } else {
- return false;
- }
- }
+
+ @Override
+ public boolean remove(String prefix) {
+ if (cache.containsKey(prefix)) {
+ cache.remove(prefix);
+ configurationService.removeConfiguration(CONFIGURATION_PREFIX + "." + prefix);
+ return true;
+ } else {
+ return false;
+ }
+ }
@Override
public boolean containsPrefix(String prefix) {
@@ -180,8 +179,9 @@ public class PrefixServiceImpl implements PrefixService {
public String serializePrefixMapping() {
StringBuffer sb = new StringBuffer();
for (Map.Entry<String, String> mapping : cache.entrySet()) {
- sb.append("\n").append(mapping.getKey()).append(": ").append(mapping.getValue()).append(" ");
+ sb.append(mapping.getKey()).append(": ").append(mapping.getValue()).append("\n");
}
+ sb.setLength(sb.length() - 1);
return sb.toString();
}