- added copyright header of ResourceObserver

- commented/removed some code to eliminate code warnings

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4974 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 1400cdc91e
commit 7052f2f61f

@ -1,3 +1,23 @@
// ResourceObserver.java
// -----------------------
// part of YaCy
// (C) by Detlef Reichl; detlef!reichl()gmx!org
// Pforzheim, Germany, 2008
//
// 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.crawler;

@ -30,14 +30,11 @@ package de.anomic.plasma;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -127,21 +124,25 @@ public final class plasmaParser {
* which seems to be additional content parsers.
* Currently the filenames of all content parser classes must end with <code>Parser.class</code>
*/
/*
private static final FilenameFilter parserFileNameFilter = new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.endsWith("Parser.class");
}
};
*/
/**
* This {@link FileFilter} is used to get all subpackages
* of the parser package.
*/
/*
private static final FileFilter parserDirectoryFilter = new FileFilter() {
public boolean accept(File file) {
return file.isDirectory();
}
};
};
*/
/**
* Initializing the

@ -44,8 +44,6 @@
package de.anomic.server.logging;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashMap;
@ -182,10 +180,11 @@ public class LogalizerHandler extends Handler {
// TODO Auto-generated method stub
}
/*
private static final FilenameFilter parserNameFilter = new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.matches(".*.class");
}
};
*/
}

@ -27,9 +27,6 @@
package de.anomic.tools;
import java.io.File;
import java.io.FilenameFilter;
import java.io.FileFilter;
import java.io.InputStream;
import java.util.jar.JarFile;
import java.util.jar.JarEntry;
import java.util.Enumeration;
@ -38,8 +35,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.io.IOException;
import de.anomic.server.logging.serverLog;
public class ListDirs {
private boolean isJar = false;
@ -73,9 +68,9 @@ public class ListDirs {
private ArrayList<String> getAllFiles() {
ArrayList<String> files = new ArrayList<String>(50);
if(isJar) {
Enumeration entries = JarFileObject.entries();
Enumeration<JarEntry> entries = JarFileObject.entries();
while(entries.hasMoreElements()) {
JarEntry entry = (JarEntry)entries.nextElement();
JarEntry entry = entries.nextElement();
String entryname = entry.getName();
if(entryname.startsWith(pathInJar) && entryname.charAt(entryname.length()-1)!='/') {
files.add(entryname);

@ -47,7 +47,7 @@ public class opensearchdescriptionReader extends DefaultHandler {
// statics for item generation and automatic categorization
static int guidcount = 0;
private static final String recordTag = "OpenSearchDescription";
//private static final String recordTag = "OpenSearchDescription";
private static final String[] tagsDef = new String[]{
"ShortName",
"LongName",
@ -94,7 +94,7 @@ public class opensearchdescriptionReader extends DefaultHandler {
}
// class variables
private Item channel, item;
private Item channel;
private StringBuffer buffer;
private boolean parsingChannel;
private String imageURL;
@ -106,7 +106,6 @@ public class opensearchdescriptionReader extends DefaultHandler {
itemsGUID = new ArrayList<String>();
items = new HashMap<String, Item>();
buffer = new StringBuffer();
item = null;
channel = null;
parsingChannel = false;
}

Loading…
Cancel
Save