From 4160279f7dfd0e378220f7dac42604e9e78f04a7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 17:14:57 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'antony'. --- CVSROOT/checkoutlist | 13 - CVSROOT/commitinfo | 15 - CVSROOT/config | 14 - CVSROOT/cvswrappers | 23 - CVSROOT/editinfo | 21 - CVSROOT/loginfo | 26 - CVSROOT/modules | 26 - CVSROOT/notify | 12 - CVSROOT/rcsinfo | 13 - CVSROOT/taginfo | 20 - CVSROOT/verifymsg | 21 - runsql/example/config/CmdLine.properties | 5 - runsql/example/jndi.properties | 2 - runsql/example/sql/BOOTSTRAP.sql | 4 - runsql/example/sql/CHECK.sql | 1 - runsql/example/sql/QUERY.sql | 1 - runsql/example/sql/SCHEMA.sql | 11 - runsql/project.properties | 6 - runsql/project.xml | 92 --- runsql/src/java/org/osjava/runsql/RunSql.java | 67 -- scraping-engine/LICENSE.txt | 31 - scraping-engine/TODO | 48 -- scraping-engine/project.properties | 9 - scraping-engine/project.xml | 156 ---- scraping-engine/run.sh | 1 - scraping-engine/runc.sh | 1 - .../org/osjava/scraping/AbstractConfig.java | 101 --- .../org/osjava/scraping/AbstractPage.java | 109 --- .../org/osjava/scraping/AbstractParser.java | 44 - .../org/osjava/scraping/CheckingParser.java | 54 -- .../src/java/org/osjava/scraping/Config.java | 50 -- .../org/osjava/scraping/ConfigFactory.java | 40 - .../src/java/org/osjava/scraping/Engine.java | 124 --- .../src/java/org/osjava/scraping/Fetcher.java | 43 - .../osjava/scraping/FetchingException.java | 43 - .../org/osjava/scraping/FetchingFactory.java | 52 -- .../src/java/org/osjava/scraping/Header.java | 38 - .../java/org/osjava/scraping/HttpFetcher.java | 65 -- .../org/osjava/scraping/HttpsFetcher.java | 84 -- .../java/org/osjava/scraping/JdbcStore.java | 93 --- .../java/org/osjava/scraping/JndiConfig.java | 66 -- .../java/org/osjava/scraping/LoopParser.java | 55 -- .../java/org/osjava/scraping/MemoryPage.java | 50 -- .../java/org/osjava/scraping/MultiParser.java | 57 -- .../java/org/osjava/scraping/MultiResult.java | 86 -- .../org/osjava/scraping/NamespaceSession.java | 61 -- .../scraping/NotificationException.java | 43 - .../osjava/scraping/NotificationFactory.java | 59 -- .../java/org/osjava/scraping/Notifier.java | 42 - .../java/org/osjava/scraping/NullFetcher.java | 40 - .../org/osjava/scraping/NullNotifier.java | 44 - .../java/org/osjava/scraping/NullPage.java | 47 -- .../java/org/osjava/scraping/NullParser.java | 43 - .../java/org/osjava/scraping/NullResult.java | 43 - .../java/org/osjava/scraping/NullStore.java | 55 -- .../src/java/org/osjava/scraping/Page.java | 46 -- .../src/java/org/osjava/scraping/Parser.java | 39 - .../org/osjava/scraping/ParserFactory.java | 47 -- .../org/osjava/scraping/ParsingException.java | 43 - .../java/org/osjava/scraping/QuartzJob.java | 55 -- .../org/osjava/scraping/QuartzScheduler.java | 129 --- .../src/java/org/osjava/scraping/Result.java | 40 - .../src/java/org/osjava/scraping/Runner.java | 38 - .../java/org/osjava/scraping/Scheduler.java | 38 - .../org/osjava/scraping/SchedulerFactory.java | 58 -- .../osjava/scraping/ScrapingException.java | 43 - .../src/java/org/osjava/scraping/Session.java | 45 -- .../org/osjava/scraping/SimpleScheduler.java | 43 - .../src/java/org/osjava/scraping/Store.java | 40 - .../org/osjava/scraping/StoreFactory.java | 47 -- .../org/osjava/scraping/StoringException.java | 43 - .../org/osjava/scraping/TabularResult.java | 51 -- .../scraping/parser/PassThroughParser.java | 51 -- .../osjava/scraping/util/FactoryUtils.java | 65 -- simple-jndi/LICENSE.txt | 31 - simple-jndi/project.properties | 11 - simple-jndi/project.xml | 146 ---- .../org/osjava/convert/BooleanConverter.java | 59 -- .../src/java/org/osjava/convert/Convert.java | 60 -- .../java/org/osjava/convert/Converter.java | 39 - .../org/osjava/convert/NumberConverter.java | 43 - .../java/org/osjava/convert/URLConverter.java | 48 -- .../org/osjava/jndi/PropertiesContext.java | 750 ------------------ .../org/osjava/jndi/PropertiesDataSource.java | 140 ---- .../org/osjava/jndi/PropertiesFactory.java | 48 -- .../osjava/jndi/util/CustomProperties.java | 151 ---- .../org/osjava/jndi/util/XmlProperties.java | 122 --- .../src/java/org/osjava/naming/Jndi.java | 73 -- .../src/test/config/GenscapeDS.properties | 5 - .../src/test/config/default.properties | 4 - simple-jndi/src/test/config/java.properties | 5 - simple-jndi/src/test/config/test.properties | 1 - .../src/test/config/thing/db.properties | 5 - .../src/test/config/thing/type/bob.properties | 4 - .../test/config/thing/type/default.properties | 3 - simple-jndi/src/test/jndi.properties | 8 - .../src/test/org/osjava/jndi/LookupTest.java | 142 ---- simple-jndi/xdocs/Archives.xml | 14 - simple-jndi/xdocs/Download.xml | 45 -- simple-jndi/xdocs/Examples.xml | 80 -- simple-jndi/xdocs/FAQ.xml | 26 - simple-jndi/xdocs/Intro.xml | 78 -- simple-jndi/xdocs/News.xml | 44 - simple-jndi/xdocs/Tasks.xml | 60 -- simple-jndi/xdocs/images/1x1.gif | Bin 807 -> 0 bytes simple-jndi/xdocs/images/core-logo.jpg | Bin 2047 -> 0 bytes simple-jndi/xdocs/images/initials.jpg | Bin 2047 -> 0 bytes simple-jndi/xdocs/images/osjava.gif | Bin 395 -> 0 bytes simple-jndi/xdocs/navigation.xml | 26 - 109 files changed, 5602 deletions(-) delete mode 100644 CVSROOT/checkoutlist delete mode 100644 CVSROOT/commitinfo delete mode 100644 CVSROOT/config delete mode 100644 CVSROOT/cvswrappers delete mode 100644 CVSROOT/editinfo delete mode 100644 CVSROOT/loginfo delete mode 100644 CVSROOT/modules delete mode 100644 CVSROOT/notify delete mode 100644 CVSROOT/rcsinfo delete mode 100644 CVSROOT/taginfo delete mode 100644 CVSROOT/verifymsg delete mode 100644 runsql/example/config/CmdLine.properties delete mode 100644 runsql/example/jndi.properties delete mode 100644 runsql/example/sql/BOOTSTRAP.sql delete mode 100644 runsql/example/sql/CHECK.sql delete mode 100644 runsql/example/sql/QUERY.sql delete mode 100644 runsql/example/sql/SCHEMA.sql delete mode 100644 runsql/project.properties delete mode 100644 runsql/project.xml delete mode 100644 runsql/src/java/org/osjava/runsql/RunSql.java delete mode 100644 scraping-engine/LICENSE.txt delete mode 100644 scraping-engine/TODO delete mode 100644 scraping-engine/project.properties delete mode 100644 scraping-engine/project.xml delete mode 100755 scraping-engine/run.sh delete mode 100755 scraping-engine/runc.sh delete mode 100644 scraping-engine/src/java/org/osjava/scraping/AbstractConfig.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/AbstractPage.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/AbstractParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/CheckingParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Config.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ConfigFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Engine.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Fetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/FetchingException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/FetchingFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Header.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/HttpFetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/HttpsFetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/JdbcStore.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/JndiConfig.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/LoopParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/MemoryPage.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/MultiParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/MultiResult.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NamespaceSession.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NotificationException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NotificationFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Notifier.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullFetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullNotifier.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullPage.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullResult.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullStore.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Page.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Parser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ParserFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ParsingException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/QuartzJob.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/QuartzScheduler.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Result.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Runner.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Scheduler.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/SchedulerFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ScrapingException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Session.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/SimpleScheduler.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Store.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/StoreFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/StoringException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/TabularResult.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/parser/PassThroughParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/util/FactoryUtils.java delete mode 100644 simple-jndi/LICENSE.txt delete mode 100644 simple-jndi/project.properties delete mode 100644 simple-jndi/project.xml delete mode 100644 simple-jndi/src/java/org/osjava/convert/BooleanConverter.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/Convert.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/Converter.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/NumberConverter.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/URLConverter.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/PropertiesContext.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/PropertiesDataSource.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/PropertiesFactory.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/util/CustomProperties.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/util/XmlProperties.java delete mode 100644 simple-jndi/src/java/org/osjava/naming/Jndi.java delete mode 100644 simple-jndi/src/test/config/GenscapeDS.properties delete mode 100644 simple-jndi/src/test/config/default.properties delete mode 100644 simple-jndi/src/test/config/java.properties delete mode 100644 simple-jndi/src/test/config/test.properties delete mode 100644 simple-jndi/src/test/config/thing/db.properties delete mode 100644 simple-jndi/src/test/config/thing/type/bob.properties delete mode 100644 simple-jndi/src/test/config/thing/type/default.properties delete mode 100644 simple-jndi/src/test/jndi.properties delete mode 100644 simple-jndi/src/test/org/osjava/jndi/LookupTest.java delete mode 100644 simple-jndi/xdocs/Archives.xml delete mode 100644 simple-jndi/xdocs/Download.xml delete mode 100644 simple-jndi/xdocs/Examples.xml delete mode 100644 simple-jndi/xdocs/FAQ.xml delete mode 100644 simple-jndi/xdocs/Intro.xml delete mode 100644 simple-jndi/xdocs/News.xml delete mode 100644 simple-jndi/xdocs/Tasks.xml delete mode 100644 simple-jndi/xdocs/images/1x1.gif delete mode 100644 simple-jndi/xdocs/images/core-logo.jpg delete mode 100644 simple-jndi/xdocs/images/initials.jpg delete mode 100644 simple-jndi/xdocs/images/osjava.gif delete mode 100644 simple-jndi/xdocs/navigation.xml diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist deleted file mode 100644 index b04b3501..00000000 --- a/CVSROOT/checkoutlist +++ /dev/null @@ -1,13 +0,0 @@ -# The "checkoutlist" file is used to support additional version controlled -# administrative files in $CVSROOT/CVSROOT, such as template files. -# -# The first entry on a line is a filename which will be checked out from -# the corresponding RCS file in the $CVSROOT/CVSROOT directory. -# The remainder of the line is an error message to use if the file cannot -# be checked out. -# -# File format: -# -# [] -# -# comment lines begin with '#' diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo deleted file mode 100644 index b19e7b7a..00000000 --- a/CVSROOT/commitinfo +++ /dev/null @@ -1,15 +0,0 @@ -# The "commitinfo" file is used to control pre-commit checks. -# The filter on the right is invoked with the repository and a list -# of files to check. A non-zero exit of the filter program will -# cause the commit to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/config b/CVSROOT/config deleted file mode 100644 index ff43ec00..00000000 --- a/CVSROOT/config +++ /dev/null @@ -1,14 +0,0 @@ -# Set this to "no" if pserver shouldn't check system users/passwords -#SystemAuth=no - -# Put CVS lock files in this directory rather than directly in the repository. -#LockDir=/var/lock/cvs - -# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top -# level of the new working directory when using the `cvs checkout' -# command. -#TopLevelAdmin=no - -# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the -# history file, or a subset as needed (ie `TMAR' logs all write operations) -#LogHistory=TOFEWGCMAR diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers deleted file mode 100644 index 0accaf1b..00000000 --- a/CVSROOT/cvswrappers +++ /dev/null @@ -1,23 +0,0 @@ -# This file affects handling of files based on their names. -# -# The -t/-f options allow one to treat directories of files -# as a single file, or to transform a file in other ways on -# its way in and out of CVS. -# -# The -m option specifies whether CVS attempts to merge files. -# -# The -k option specifies keyword expansion (e.g. -kb for binary). -# -# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) -# -# wildcard [option value][option value]... -# -# where option is one of -# -f from cvs filter value: path to filter -# -t to cvs filter value: path to filter -# -m update methodology value: MERGE or COPY -# -k expansion mode value: b, o, kkv, &c -# -# and value is a single-quote delimited value. -# For example: -#*.gif -k 'b' diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo deleted file mode 100644 index d78886c1..00000000 --- a/CVSROOT/editinfo +++ /dev/null @@ -1,21 +0,0 @@ -# The "editinfo" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo deleted file mode 100644 index 5a59f0a5..00000000 --- a/CVSROOT/loginfo +++ /dev/null @@ -1,26 +0,0 @@ -# The "loginfo" file controls where "cvs commit" log information -# is sent. The first entry on a line is a regular expression which must match -# the directory that the change is being made to, relative to the -# $CVSROOT. If a match is found, then the remainder of the line is a filter -# program that should expect log information on its standard input. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name ALL appears as a regular expression it is always used -# in addition to the first matching regex or DEFAULT. -# -# You may specify a format string as part of the -# filter. The string is composed of a `%' followed -# by a single format character, or followed by a set of format -# characters surrounded by `{' and `}' as separators. The format -# characters are: -# -# s = file name -# V = old version number (pre-checkin) -# v = new version number (post-checkin) -# -# For example: -#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog -# or -#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog diff --git a/CVSROOT/modules b/CVSROOT/modules deleted file mode 100644 index cb9e9efc..00000000 --- a/CVSROOT/modules +++ /dev/null @@ -1,26 +0,0 @@ -# Three different line formats are valid: -# key -a aliases... -# key [options] directory -# key [options] directory files... -# -# Where "options" are composed of: -# -i prog Run "prog" on "cvs commit" from top-level of module. -# -o prog Run "prog" on "cvs checkout" of module. -# -e prog Run "prog" on "cvs export" of module. -# -t prog Run "prog" on "cvs rtag" of module. -# -u prog Run "prog" on "cvs update" of module. -# -d dir Place module in directory "dir" instead of module name. -# -l Top-level directory only -- do not recurse. -# -# NOTE: If you change any of the "Run" options above, you'll have to -# release and re-checkout any working directories of these modules. -# -# And "directory" is a path to a directory relative to $CVSROOT. -# -# The "-a" option specifies an alias. An alias is interpreted as if -# everything on the right of the "-a" had been typed on the command line. -# -# You can encode a module within a module by using the special '&' -# character to interpose another module into the current module. This -# can be useful for creating a module that consists of many directories -# spread out over the entire source repository. diff --git a/CVSROOT/notify b/CVSROOT/notify deleted file mode 100644 index 34f0bc28..00000000 --- a/CVSROOT/notify +++ /dev/null @@ -1,12 +0,0 @@ -# The "notify" file controls where notifications from watches set by -# "cvs watch add" or "cvs edit" are sent. The first entry on a line is -# a regular expression which is tested against the directory that the -# change is being made to, relative to the $CVSROOT. If it matches, -# then the remainder of the line is a filter program that should contain -# one occurrence of %s for the user to notify, and information on its -# standard input. -# -# "ALL" or "DEFAULT" can be used in place of the regular expression. -# -# For example: -#ALL mail %s -s "CVS notification" diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo deleted file mode 100644 index 49e59f4d..00000000 --- a/CVSROOT/rcsinfo +++ /dev/null @@ -1,13 +0,0 @@ -# The "rcsinfo" file is used to control templates with which the editor -# is invoked on commit and import. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being made to, relative to the -# $CVSROOT. For the first match that is found, then the remainder of the -# line is the name of the file that contains the template. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo deleted file mode 100644 index 274a46dd..00000000 --- a/CVSROOT/taginfo +++ /dev/null @@ -1,20 +0,0 @@ -# The "taginfo" file is used to control pre-tag checks. -# The filter on the right is invoked with the following arguments: -# -# $1 -- tagname -# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d -# $3 -- repository -# $4-> file revision [file revision ...] -# -# A non-zero exit of the filter program will cause the tag to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg deleted file mode 100644 index 86f747ce..00000000 --- a/CVSROOT/verifymsg +++ /dev/null @@ -1,21 +0,0 @@ -# The "verifymsg" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/runsql/example/config/CmdLine.properties b/runsql/example/config/CmdLine.properties deleted file mode 100644 index 2bc4007a..00000000 --- a/runsql/example/config/CmdLine.properties +++ /dev/null @@ -1,5 +0,0 @@ -com.generationjava.jndi.datasource=true -driver=org.hsqldb.jdbcDriver -url=jdbc:hsqldb:hsql://localhost -user=sa -password= diff --git a/runsql/example/jndi.properties b/runsql/example/jndi.properties deleted file mode 100644 index 4b7b0e4b..00000000 --- a/runsql/example/jndi.properties +++ /dev/null @@ -1,2 +0,0 @@ -java.naming.factory.initial=com.generationjava.jndi.PropertiesFactory -com.generationjava.jndi.root=config/ diff --git a/runsql/example/sql/BOOTSTRAP.sql b/runsql/example/sql/BOOTSTRAP.sql deleted file mode 100644 index 9373894c..00000000 --- a/runsql/example/sql/BOOTSTRAP.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO Report (name, sql, age) VALUES ('foo', 'select foo', '95'); -INSERT INTO Report (name, sql, age) VALUES ('bar', 'select poo', '5'); -INSERT INTO Report (name, sql, age) VALUES ('poo', 'delete foo', '9'); -INSERT INTO Report (name, sql, age) VALUES ('barry', 'select wfoo', '9191'); diff --git a/runsql/example/sql/CHECK.sql b/runsql/example/sql/CHECK.sql deleted file mode 100644 index 9be0a1fc..00000000 --- a/runsql/example/sql/CHECK.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT count(*) AS total FROM Report diff --git a/runsql/example/sql/QUERY.sql b/runsql/example/sql/QUERY.sql deleted file mode 100644 index f8cb6ce8..00000000 --- a/runsql/example/sql/QUERY.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT * FROM Bandwidth diff --git a/runsql/example/sql/SCHEMA.sql b/runsql/example/sql/SCHEMA.sql deleted file mode 100644 index bba7192d..00000000 --- a/runsql/example/sql/SCHEMA.sql +++ /dev/null @@ -1,11 +0,0 @@ -DROP TABLE Bandwidth; -CREATE TABLE Bandwidth ( - last_total varchar(255), - this_total varchar(255), - last_in varchar(255), - this_in varchar(255), - last_out varchar(255), - this_out varchar(255), - last_sess varchar(255), - this_sess varchar(255) -); diff --git a/runsql/project.properties b/runsql/project.properties deleted file mode 100644 index 18a9eb1e..00000000 --- a/runsql/project.properties +++ /dev/null @@ -1,6 +0,0 @@ -maven.checkstyle.header.file=/dev/null -maven.repo.remote=http://www.generationjava.com/jars/,http://www.ibiblio.org/maven/ - -maven.ui.banner.background=#000 -maven.ui.section.background=#000 -maven.ui.subsection.background=#000 diff --git a/runsql/project.xml b/runsql/project.xml deleted file mode 100644 index f07a0e21..00000000 --- a/runsql/project.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 3 - runsql - runsql - 0.1 - - GenerationJava - http://www.generationjava.com/ - /images/initials.jpg - - 2003 - org.osjava.runsql - /images/core-logo.jpg - - - A command line runner of SQL statements. I like piping sql statements into the mysql command on a unix machine. This is designed to let me do the same things in a database independent way. - - - SQL Script Runner - - http://www.osjava.org/runsql/ - www.osjava.org/runsql - /sites/org/osjava/www/runsql/ - /sites/org/osjava/www/builds/releases/runsql/ - - - scm:cvshen@umbongo.flamefew.net:/var/cvs:runsql - http://www.generationjava.com/view-cvs/viewcvs.cgi/runsql/ - - - - - 0.1 - 0.1 - HEAD - - - - - - - - - - - - Henri Yandell - hen - bayard@generationjava.com - GenerationJava - - Java Developer - - - - - - - - commons-dbutils - SNAPSHOT - - - genjava-core - 2.0 - http://www.generationjava.com/projects/GenJavaCore.shtml - - - commons-lang - 1.0 - http://jakarta.apache.org/commons/lang.html - - - - - - bayard@www.generationjava.com - - src/java - - src/test - - - - diff --git a/runsql/src/java/org/osjava/runsql/RunSql.java b/runsql/src/java/org/osjava/runsql/RunSql.java deleted file mode 100644 index 27885c7d..00000000 --- a/runsql/src/java/org/osjava/runsql/RunSql.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.osjava.runsql; - -import java.io.*; -import java.sql.*; -import javax.sql.*; -import javax.naming.*; -import org.apache.commons.dbutils.*; -import org.apache.commons.lang.*; -import com.generationjava.io.*; - -public class RunSql { - - static public void main(String[] args) throws Exception { - String dsname = args[0]; - InitialContext ctxt = new InitialContext(); - DataSource ds = (DataSource)ctxt.lookup(dsname); - Connection conn = ds.getConnection(); - try { - runScript(conn, System.in); - } catch(SQLException sqle) { - System.err.println("Script failure. "); - sqle.printStackTrace(); - } finally { - DbUtils.closeQuietly(conn); - } - } - - static public void runScript(Connection conn, InputStream in) throws SQLException { - runScript(conn, FileW.loadFile(in)); - } - - static public void runScript(Connection conn, String script) throws SQLException { - // TODO: Improve so a ; inside a string is ignored. - String[] stmts = StringUtils.split(script, ";"); - Statement stmt = conn.createStatement(); - try { - for(int i=0; i - - - 3 - scraping-engine - scraping-engine - 0.1 - - OSJava - http://www.osjava.org/ - http://www.osjava.org/images/osjava.gif - - 2003 - org.osjava.scraping - http://www.osjava.org/images/1x1.gif - - - scraping-engine - - - A web-scraping engine. - - - A web-scraping engine - - http://www.osjava.org/ - - www.generationjava.com/maven/scraping-engine - /sites/org/osjava/www/maven/scraping-engine/ - /sites/org/osjava/www/releases/official/ - - - scm:cvshen@umbongo.flamefew.net:/var/cvs:scraping-engine - http://www.generationjava.com/view-cvs/viewcvs.cgi/scraping-engine/ - - - - - 1.0 - 1.0 - HEAD - - - - - - - - - - - - Henri Yandell - hen - bayard@generationjava.com - GenerationJava - - Java Developer - - - - - - - - - - - - - jdbc - 2.0 - - - log4j - 1.2.7 - http://jakarta.apache.org/log4j/ - - - commons-lang - 1.0 - http://jakarta.apache.org/commons/lang.html - - - commons-httpclient - 2.0-alpha2 - http://jakarta.apache.org/commons/ - - - commons-collections - 2.1 - http://jakarta.apache.org/commons/ - - - commons-dbutils - SNAPSHOT - http://jakarta.apache.org/commons/ - - - genjava-core - 2.0 - http://www.generationjava.com/ - - - simple-jndi - 0.5 - http://www.generationjava.com/ - - - quartz - 1.0.7 - http://www.part.net/quartz.html - - - - - - bayard@www.generationjava.com - - src/java - - src/test - - - - - - - include = *.dtd - include = log4j.properties - - - - - - - diff --git a/scraping-engine/run.sh b/scraping-engine/run.sh deleted file mode 100755 index 92290745..00000000 --- a/scraping-engine/run.sh +++ /dev/null @@ -1 +0,0 @@ -java -classpath .:target/scraping-engine-0.1.jar:/usr/local/javalib/commons-collections-2.1.jar:/usr/local/javalib/commons-lang-1.0.1.jar:/usr/local/javalib/genjava-core-2.0.jar:config/:/usr/local/javalib/maven/repository/simple-jndi/jars/simple-jndi-0.5.jar:/usr/local/javalib/commons-httpclient-2.0-alpha2.jar:/usr/local/javalib/commons-logging-1.0.1.jar:/usr/local/javalib/maven/repository/commons-dbutils/jars/commons-dbutils-SNAPSHOT.jar:/usr/local/javalib/mm.mysql-2.0.9-bin.jar:/Users/hen/Desktop/hsqldb/lib/hsqldb.jar:/usr/local/javalib/maven/repository/log4j/jars/log4j-1.2.7.jar:/usr/local/javalib/maven/repository/quartz/jars/quartz-1.0.7.jar org.osjava.scraping.Engine diff --git a/scraping-engine/runc.sh b/scraping-engine/runc.sh deleted file mode 100755 index 6837e24d..00000000 --- a/scraping-engine/runc.sh +++ /dev/null @@ -1 +0,0 @@ -javac -classpath /usr/local/javalib/commons-lang-1.0.1.jar:/usr/local/javalib/genjava-core-2.0.jar:target/scraping-engine-0.1.jar:.:/usr/local/javalib/maven/repository/log4j/jars/log4j-1.2.7.jar com/*/scraper/*.java diff --git a/scraping-engine/src/java/org/osjava/scraping/AbstractConfig.java b/scraping-engine/src/java/org/osjava/scraping/AbstractConfig.java deleted file mode 100644 index 4c32e0b3..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/AbstractConfig.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scraping-Engine nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -import java.util.ArrayList; -import java.util.List; -import org.apache.commons.lang.NumberUtils; -import java.util.Date; - -public abstract class AbstractConfig implements Config { - - private String context = ""; - - protected abstract Object getValue(String key); - - public Object get(String key) { - return getValue( getContext()+key ); - } - - public boolean has(String key) { - return (get(key) != null); - } - - public Object getAbsolute(String key) { - return getValue(key); - } - - public String getString(String key) { - return (String)get(key); - } - - public Date getDate(String key) { - try { - return java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT).parse(key); - } catch(java.text.ParseException pe) { - return null; - } - } - - // rely on simple-jndi's type - public int getInt(String key) { - return NumberUtils.stringToInt(getString(key)); - } - - public List getList(String key) { - Object obj = get(key); - if(!(obj instanceof List)) { - List list = new ArrayList(1); - list.add(obj); - obj = list; - } - return (List)obj; - } - - public void setContext(String context) { - this.context = context; - } - - public String getContext() { - return this.context; - } - - public Config cloneConfig() { - try { - return (Config)this.clone(); - } catch(CloneNotSupportedException cnse) { - // ignore - throw new RuntimeException("Cloning of a Config failed. This should be impossible. "); - } - } - -} diff --git a/scraping-engine/src/java/org/osjava/scraping/AbstractPage.java b/scraping-engine/src/java/org/osjava/scraping/AbstractPage.java deleted file mode 100644 index a67e19f6..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/AbstractPage.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scabies nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; - -import java.io.BufferedReader; - -import org.apache.log4j.Logger; - -public abstract class AbstractPage implements Page { - - private static Logger logger = Logger.getLogger(AbstractPage.class); - - private String documentBase; - - public AbstractPage() { - } - - public abstract Reader read() throws IOException; - - public Page fetch(String uri, Config cfg, Session session) throws FetchingException { - - // TODO: This knows about HTTP PROTOCOL urls. Fix. - int idx = uri.indexOf("://"); - if(idx == -1) { - // TODO: also check it is less than 15 or something?? - if(uri.startsWith("/")) { - // Here we need to work backwards to the 'root' of the - // protocol. How do we define that?? - int idx2 = this.documentBase.indexOf("://"); - idx2 = this.documentBase.indexOf("/", idx2 + 3); - uri = this.documentBase.substring(0, idx2) + "/" + uri; - } else { - uri = this.documentBase + "/" + uri; - } - } - - - logger.debug("Fetching: "+uri); - Fetcher fetcher = FetchingFactory.getFetcher(cfg, session); - Page page = fetcher.fetch(uri, cfg, session); - return page; - } - - public void setDocumentBase(String documentBase) { - logger.debug("Document base: "+documentBase); - this.documentBase = documentBase; - } - - public String getDocumentBase() { - return this.documentBase; - } - - public String readAsString() throws IOException { - Reader rdr = null; - try { - rdr = this.read(); - BufferedReader bfr = new BufferedReader(rdr); - StringBuffer buffer = new StringBuffer(); - String line = ""; - while( (line = bfr.readLine()) != null) { - buffer.append(line); - buffer.append("\n"); - } - return buffer.toString(); - } finally { - if(rdr != null) { - try { - rdr.close(); - } catch(IOException ioe) { - // ignore - } - } - } - } - -} diff --git a/scraping-engine/src/java/org/osjava/scraping/AbstractParser.java b/scraping-engine/src/java/org/osjava/scraping/AbstractParser.java deleted file mode 100644 index 9efd4bd1..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/AbstractParser.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scabies nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -public abstract class AbstractParser implements Parser { - - abstract public Result parse(Page page, Config cfg, Session session) throws ParsingException; - - public void startUp(Config cfg) throws Exception { } - public void bringDown(Config cfg) throws Exception { } - - // helper methods - // ?? - -} diff --git a/scraping-engine/src/java/org/osjava/scraping/CheckingParser.java b/scraping-engine/src/java/org/osjava/scraping/CheckingParser.java deleted file mode 100644 index 0bad03d7..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/CheckingParser.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scabies nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -public abstract class CheckingParser extends AbstractParser { - - public Result parse(Page page, Config cfg, Session session) throws ParsingException { - Header header = parseHeader(page, cfg, session); - Store store = StoreFactory.getStore(cfg, session); - try { - boolean found = store.exists(header, cfg, session); - if(found) { - return new NullResult(); - } else { - return parseBody(page, header, cfg, session); - } - } catch(StoringException se) { - return new NullResult(); - } - } - - public abstract Header parseHeader(Page page, Config cfg, Session session) throws ParsingException; - public abstract Result parseBody(Page page, Header header, Config cfg, Session session) throws ParsingException; - -} diff --git a/scraping-engine/src/java/org/osjava/scraping/Config.java b/scraping-engine/src/java/org/osjava/scraping/Config.java deleted file mode 100644 index bf4e368c..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/Config.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scabies nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -import java.util.List; -import java.util.Date; - -public interface Config extends Cloneable { - - public Object get(String key); - public boolean has(String key); - public Object getAbsolute(String key); - public String getString(String key); - public int getInt(String key); - public Date getDate(String key); - public List getList(String key); - public void setContext(String context); - public String getContext(); - public Config cloneConfig(); - -} diff --git a/scraping-engine/src/java/org/osjava/scraping/ConfigFactory.java b/scraping-engine/src/java/org/osjava/scraping/ConfigFactory.java deleted file mode 100644 index 3983f455..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/ConfigFactory.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scabies nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -public class ConfigFactory { - - static public Config getConfig(String[] args) { - return new JndiConfig(); - } - -} diff --git a/scraping-engine/src/java/org/osjava/scraping/Engine.java b/scraping-engine/src/java/org/osjava/scraping/Engine.java deleted file mode 100644 index 9c644c88..00000000 --- a/scraping-engine/src/java/org/osjava/scraping/Engine.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2003, Henri Yandell - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * + Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * + Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * + Neither the name of Scabies nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.osjava.scraping; - -import java.util.List; -import java.io.Reader; - -public class Engine implements Runner { - - public static void main(String[] args) { - Engine engine = new Engine(); - engine.run(args); - } - -/// TODO: Implement the Scheduler aspect -/// The Scheduler notifies only this class. It is -/// then up to this Engine to run the parsers. -/// TODO: Put the scraping and db in a different thread - public void run(String[] args) { - // load the config - Config cfg = ConfigFactory.getConfig(args); - - - // test and how schedule=startup will be handled - List list = cfg.getList("org.osjava.scrapers"); - for(int i=0; i