remove augmented parsing activation from frontend

experimental implementation not used and based on error prone experimental rdfaparser
This commit is contained in:
reger 2015-06-05 00:51:00 +02:00
parent 11aa2edfe1
commit 7478338a40
4 changed files with 1 additions and 70 deletions

View File

@ -1,36 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Augmented Parsing</title>
#%env/templates/metas.template%#
</head>
<body id="Settings">
#%env/templates/header.template%#
#%env/templates/submenuSemantic.template%#
<h2>Augmented Parsing</h2>
<form id="parsersettings" action="AugmentedParsing_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend id="urlproxy">Global Status</legend>
<p>
With this settings you can activate or deactivate augmented parsing which combines the documents with information from external sources (tags etc.).
</p>
<dl>
<dt><label for="content">Augmented Parser:</label></dt>
<dd>
<input type="checkbox" name="augmentedparserenabled" id="augmentedparserenabled" #(augmentedparserenabled_checked)#:: checked="checked"#(/augmentedparserenabled_checked)# />Enabled<br/>
<p class="help">
Globally enables or disables the augmented parser. This setting requires a restart.
</p>
</dd>
</dl>
<input type="submit" name="augmentedparserSettings" value="Submit" class="btn btn-primary"/>
</fieldset>
</form>
#%env/templates/footer.template%#
</body>
</html>

View File

@ -1,30 +0,0 @@
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
public final class AugmentedParsing_p {
public static serverObjects respond(@SuppressWarnings("unused") 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);
}
}
prop.put("augmentedparserenabled_checked",
env.getConfigBool("parserAugmentation", false) ? "1" : "0");
// return rewrite properties
return prop;
}
}

View File

@ -14,7 +14,6 @@
<h3>Augmented Content</h3>
<ul class="SubMenu">
<li><a href="AugmentedBrowsing_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Augmented Browsing</a></li>
<li><a href="AugmentedParsing_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Augmented Parsing</a></li>
</ul>
</div>
</div>

View File

@ -64,12 +64,10 @@ import net.yacy.document.parser.vcfParser;
import net.yacy.document.parser.vsdParser;
import net.yacy.document.parser.xlsParser;
import net.yacy.document.parser.zipParser;
import net.yacy.document.parser.augment.AugmentParser;
import net.yacy.document.parser.images.genericImageParser;
import net.yacy.document.parser.images.metadataImageParser;
import net.yacy.kelondro.util.FileUtils;
import net.yacy.kelondro.util.MemoryControl;
import net.yacy.search.Switchboard;
public final class TextParser {
@ -90,7 +88,7 @@ public final class TextParser {
initParser(new docParser());
initParser(new gzipParser());
// AugmentParser calls internally RDFaParser (therefore add before RDFa)
if (Switchboard.getSwitchboard().getConfigBool("parserAugmentation", true)) initParser(new AugmentParser());
// if (Switchboard.getSwitchboard().getConfigBool("parserAugmentation", true)) initParser(new AugmentParser()); // experimental implementation, not working yet (2015-06-05)
// RDFaParser calls internally htmlParser (therefore add before html)
// if (Switchboard.getSwitchboard().getConfigBool("parserAugmentation.RDFa", true)) initParser(new RDFaParser()); // experimental implementation, not working yet (2015-06-04)
initParser(new htmlParser()); // called within rdfa parser