diff --git a/defaults/yacy.init b/defaults/yacy.init index ac83868db..309531a50 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -1056,7 +1056,8 @@ federated.service.solr.indexing.schemefile = solr.keys.default.list triplestore.persistent = false # Augmentation settings -parserAugmentation = true +parserAugmentation = false +parserAugmentation.RDFa = false proxyAugmentation = false augmentation.reflect = false augmentation.addDoctype = false diff --git a/htroot/AugmentedParsing_p.html b/htroot/AugmentedParsing_p.html new file mode 100644 index 000000000..2e07c9944 --- /dev/null +++ b/htroot/AugmentedParsing_p.html @@ -0,0 +1,47 @@ + + + + YaCy '#[clientname]#': Augmented Parsing + #%env/templates/metas.template%# + + + #%env/templates/header.template%# + #%env/templates/submenuAugmentedParsing.template%# +

Augmented Parsing

+ +
+
Global Status +

+ With this settings you can activate or deactivate augmented parsing which combines the documents with information from external sources (tags etc.). +

+ +
+ +
+
+ Enabled
+

+ Globally enables or disables the augmented parser. This setting requires a restart. +

+
+ +
+
+ Enabled
+

+ Globally enables or disables the RDFa parser. This setting requires a restart. +

+
+ + +
+ + + +
+
+ + + #%env/templates/footer.template%# + + diff --git a/htroot/AugmentedParsing_p.java b/htroot/AugmentedParsing_p.java new file mode 100644 index 000000000..2c36d32f5 --- /dev/null +++ b/htroot/AugmentedParsing_p.java @@ -0,0 +1,39 @@ +import net.yacy.cora.protocol.RequestHeader; +import de.anomic.server.serverObjects; +import de.anomic.server.serverSwitch; + +public final class AugmentedParsing_p { + + public static serverObjects respond(final RequestHeader header, + final serverObjects post, final serverSwitch env) { + // return variable that accumulates replacements + final serverObjects prop = new serverObjects(); + + if (post != null) { + + if (post.containsKey("augmentedparserSettings")) { + + + env.setConfig("parserAugmentation", + "on".equals(post.get("augmentedparserenabled")) ? true : false); + + env.setConfig("parserAugmentation.RDFa", + "on".equals(post.get("augmentedparserRDFenabled")) ? true : false); + + + } + + + } + + prop.put("augmentedparserenabled_checked", + env.getConfigBool("parserAugmentation", false) ? "1" : "0"); + + prop.put("augmentedparserRDFenabled_checked", + env.getConfigBool("parserAugmentation.RDFa", false) ? "1" : "0"); + + // return rewrite properties + return prop; + } + +} diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template index 852521b42..2a83ebf8a 100644 --- a/htroot/env/templates/header.template +++ b/htroot/env/templates/header.template @@ -27,6 +27,7 @@

Interaction