diff --git a/source/de/anomic/data/blogBoard.java b/source/de/anomic/data/blogBoard.java index 8d4b62a94..ab9f3fa07 100644 --- a/source/de/anomic/data/blogBoard.java +++ b/source/de/anomic/data/blogBoard.java @@ -55,7 +55,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -import de.anomic.data.wiki.wikiBoard; +import de.anomic.data.wiki.WikiBoard; import java.util.List; import java.util.Set; @@ -97,7 +97,7 @@ public class blogBoard { } public String guessAuthor(final String ip) { - return wikiBoard.guessAuthor(ip); + return WikiBoard.guessAuthor(ip); } /** @@ -362,7 +362,7 @@ public class blogBoard { // TODO: implement this function record.put("privacy", "public"); - wikiBoard.setAuthor(ip, new String(author)); + WikiBoard.setAuthor(ip, new String(author)); } BlogEntry(final String key, final Map record) { diff --git a/source/de/anomic/data/blogBoardComments.java b/source/de/anomic/data/blogBoardComments.java index c00931966..c31edd110 100644 --- a/source/de/anomic/data/blogBoardComments.java +++ b/source/de/anomic/data/blogBoardComments.java @@ -53,7 +53,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -import de.anomic.data.wiki.wikiBoard; +import de.anomic.data.wiki.WikiBoard; public class blogBoardComments { @@ -102,7 +102,7 @@ public class blogBoardComments { } public String guessAuthor(final String ip) { - return wikiBoard.guessAuthor(ip); + return WikiBoard.guessAuthor(ip); } public CommentEntry newEntry(final String key, final byte[] subject, final byte[] author, final String ip, final Date date, final byte[] page) { @@ -255,7 +255,7 @@ public class blogBoardComments { setIp(ip); setPage(page); - wikiBoard.setAuthor(ip, new String(author)); + WikiBoard.setAuthor(ip, new String(author)); } CommentEntry(final String key, final Map record) { diff --git a/source/de/anomic/data/wiki/abstractWikiParser.java b/source/de/anomic/data/wiki/AbstractWikiParser.java similarity index 96% rename from source/de/anomic/data/wiki/abstractWikiParser.java rename to source/de/anomic/data/wiki/AbstractWikiParser.java index da49e35ec..ef59ee34b 100644 --- a/source/de/anomic/data/wiki/abstractWikiParser.java +++ b/source/de/anomic/data/wiki/AbstractWikiParser.java @@ -32,11 +32,11 @@ import java.io.InputStreamReader; import java.io.StringReader; import java.io.UnsupportedEncodingException; -abstract class abstractWikiParser implements wikiParser { +abstract class AbstractWikiParser implements WikiParser { final String address; - public abstractWikiParser(final String address) { + public AbstractWikiParser(final String address) { this.address = address; } diff --git a/source/de/anomic/data/wiki/wikiBoard.java b/source/de/anomic/data/wiki/WikiBoard.java similarity index 96% rename from source/de/anomic/data/wiki/wikiBoard.java rename to source/de/anomic/data/wiki/WikiBoard.java index cb51b69d2..1e7c60cd3 100644 --- a/source/de/anomic/data/wiki/wikiBoard.java +++ b/source/de/anomic/data/wiki/WikiBoard.java @@ -44,7 +44,7 @@ import net.yacy.kelondro.order.NaturalOrder; /** * */ -public class wikiBoard { +public class WikiBoard { public static final int keyLength = 64; private static final String DATE_FORMAT = "yyyyMMddHHmmss"; @@ -66,7 +66,7 @@ public class wikiBoard { * @param bkppath path of backup database. * @throws IOException if error occurs during HDD access. */ - public wikiBoard(final File actpath, final File bkppath) throws IOException { + public WikiBoard(final File actpath, final File bkppath) throws IOException { new File(actpath.getParent()).mkdirs(); if (datbase == null) { //datbase = new MapView(BLOBTree.toHeap(actpath, true, true, keyLength, recordSize, '_', NaturalOrder.naturalOrder, actpathNew), 500, '_'); diff --git a/source/de/anomic/data/wiki/wikiCode.java b/source/de/anomic/data/wiki/WikiCode.java similarity index 97% rename from source/de/anomic/data/wiki/wikiCode.java rename to source/de/anomic/data/wiki/WikiCode.java index 294b2c3cb..784b912e6 100644 --- a/source/de/anomic/data/wiki/wikiCode.java +++ b/source/de/anomic/data/wiki/WikiCode.java @@ -40,7 +40,7 @@ import de.anomic.server.serverCore; * * @author Alexander Schier [AS], Franz Brausze [FB], Marc Nause [MN] */ -public class wikiCode extends abstractWikiParser implements wikiParser { +public class WikiCode extends AbstractWikiParser implements WikiParser { private static final String EMPTY = ""; private static final String PIPE_ESCAPED = "|"; @@ -190,7 +190,7 @@ public class wikiCode extends abstractWikiParser implements wikiParser { * Constructor * @param address */ - public wikiCode(final String address) { + public WikiCode(final String address) { super(address); } diff --git a/source/de/anomic/data/wiki/wikiParser.java b/source/de/anomic/data/wiki/WikiParser.java similarity index 97% rename from source/de/anomic/data/wiki/wikiParser.java rename to source/de/anomic/data/wiki/WikiParser.java index f63ee13d1..32e06b8a7 100644 --- a/source/de/anomic/data/wiki/wikiParser.java +++ b/source/de/anomic/data/wiki/WikiParser.java @@ -27,7 +27,7 @@ package de.anomic.data.wiki; import java.io.UnsupportedEncodingException; -public interface wikiParser { +public interface WikiParser { public String transform(String text); public String transform(byte[] text) throws UnsupportedEncodingException; diff --git a/source/de/anomic/data/wiki/wikiParserException.java b/source/de/anomic/data/wiki/wikiParserException.java deleted file mode 100644 index 1d6627b48..000000000 --- a/source/de/anomic/data/wiki/wikiParserException.java +++ /dev/null @@ -1,45 +0,0 @@ -// wikiParserException.java -// --------- -// part of YaCy -// (C) by Michael Peter Christen; mc@yacy.net -// first published on http://www.anomic.de -// Frankfurt, Germany, 2007 -// -// $LastChangedDate$ -// $LastChangedRevision$ -// $LastChangedBy$ -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -package de.anomic.data.wiki; - -public class wikiParserException extends Exception { - - private static final long serialVersionUID = 1L; - - public wikiParserException() { } - - public wikiParserException(final String message) { - super(message); - } - - public wikiParserException(final Throwable cause) { - super(cause); - } - - public wikiParserException(final String message, final Throwable cause) { - super(message, cause); - } -} diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index b37a7da1b..3d03c1313 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -138,9 +138,9 @@ import de.anomic.data.bookmarksDB; import de.anomic.data.listManager; import de.anomic.data.messageBoard; import de.anomic.data.userDB; -import de.anomic.data.wiki.wikiBoard; -import de.anomic.data.wiki.wikiCode; -import de.anomic.data.wiki.wikiParser; +import de.anomic.data.wiki.WikiBoard; +import de.anomic.data.wiki.WikiCode; +import de.anomic.data.wiki.WikiParser; import de.anomic.http.client.Cache; import de.anomic.http.server.HTTPDemon; import de.anomic.http.server.RobotsTxtConfig; @@ -181,7 +181,7 @@ public final class Switchboard extends serverSwitch { public static HandleSet stopwordHashes = null; public static Blacklist urlBlacklist = null; - public static wikiParser wikiParser = null; + public static WikiParser wikiParser = null; // storage management public File htCachePath; @@ -203,7 +203,7 @@ public final class Switchboard extends serverSwitch { public ResultURLs crawlResults; public CrawlStacker crawlStacker; public messageBoard messageDB; - public wikiBoard wikiDB; + public WikiBoard wikiDB; public blogBoard blogDB; public blogBoardComments blogCommentDB; public RobotsTxt robots; @@ -559,7 +559,7 @@ public final class Switchboard extends serverSwitch { log.logConfig("Initializing Snippet Cache"); // init the wiki - wikiParser = new wikiCode(this.peers.mySeed().getClusterAddress()); + wikiParser = new WikiCode(this.peers.mySeed().getClusterAddress()); // initializing the resourceObserver InstantBusyThread.oneTimeJob(ResourceObserver.class, "initThread", ResourceObserver.log, 0); @@ -1004,7 +1004,7 @@ public final class Switchboard extends serverSwitch { public void initWiki() throws IOException { this.log.logConfig("Starting Wiki Board"); final File wikiDbFile = new File(workPath, "wiki.heap"); - this.wikiDB = new wikiBoard(wikiDbFile, new File(workPath, "wiki-bkp.heap")); + this.wikiDB = new WikiBoard(wikiDbFile, new File(workPath, "wiki-bkp.heap")); this.log.logConfig("Loaded Wiki Board DB from file " + wikiDbFile.getName() + ", " + this.wikiDB.size() + " entries" + ", " + ppRamString(wikiDbFile.length()/1024)); diff --git a/source/net/yacy/document/importer/MediawikiImporter.java b/source/net/yacy/document/importer/MediawikiImporter.java index 2b96f4ec1..c825bdfe7 100644 --- a/source/net/yacy/document/importer/MediawikiImporter.java +++ b/source/net/yacy/document/importer/MediawikiImporter.java @@ -59,8 +59,8 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import de.anomic.data.wiki.wikiCode; -import de.anomic.data.wiki.wikiParser; +import de.anomic.data.wiki.WikiCode; +import de.anomic.data.wiki.WikiParser; /* * this class provides data structures to read a mediawiki dump file in xml format @@ -79,7 +79,7 @@ public class MediawikiImporter extends Thread implements Importer { public static Importer job; // if started from a servlet, this object is used to store the thread - protected wikiParser wparser; + protected WikiParser wparser; protected String urlStub; public File sourcefile; public File targetdir; @@ -95,7 +95,7 @@ public class MediawikiImporter extends Thread implements Importer { this.approxdocs = (int) (this.docsize * (long) docspermbinxmlbz2 / 1024L / 1024L); this.targetdir = targetdir; this.urlStub = baseURL; - this.wparser = new wikiCode(new URL(baseURL).getHost()); + this.wparser = new WikiCode(new URL(baseURL).getHost()); this.count = 0; this.start = 0; }