Skip to content

Commit

Permalink
GSearch: updates to point to the recently updated JARs, bug fix in th…
Browse files Browse the repository at this point in the history
…e RESTClient.
  • Loading branch information
bbranan committed Dec 5, 2008
1 parent f1c132d commit 785ff22
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 62 deletions.
28 changes: 17 additions & 11 deletions FedoraGenericSearch/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/activation-1.0.2.jar"/>
<classpathentry kind="lib" path="lib/axis.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="lib/commons-discovery.jar"/>
<classpathentry kind="lib" path="lib/commons-httpclient-3.1-beta1.jar"/>
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
<classpathentry kind="lib" path="lib/fedora-3.0-client.jar"/>
<classpathentry kind="lib" path="lib/jaxrpc.jar"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
<classpathentry kind="lib" path="lib/mail.jar"/>
<classpathentry kind="lib" path="lib/PDFBox-0.7.2.jar"/>
<classpathentry kind="lib" path="lib/saaj.jar"/>
<classpathentry kind="lib" path="lib/serializer.jar"/>
<classpathentry kind="lib" path="lib/servlet-api.jar"/>
<classpathentry kind="lib" path="lib/trippi-1.1.1-core.jar"/>
Expand All @@ -26,12 +19,25 @@
<classpathentry kind="lib" path="lib/abdera-parser-0.4.0-incubating.jar"/>
<classpathentry kind="lib" path="lib/axiom-api-1.2.5.jar"/>
<classpathentry kind="lib" path="lib/axiom-impl-1.2.5.jar"/>
<classpathentry kind="lib" path="lib/fedora-3.0-messaging-client.jar"/>
<classpathentry kind="lib" path="lib/jaxen-1.1-beta-9.jar"/>
<classpathentry kind="lib" path="lib/jsr173_1.0_api.jar"/>
<classpathentry kind="lib" path="lib/sjsxp.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-2.3.2.jar"/>
<classpathentry kind="lib" path="lib/lucene-demos-2.3.2.jar"/>
<classpathentry kind="lib" path="lib/activemq-all-5.1.0.jar"/>
<classpathentry kind="lib" path="lib/abdera-i18n-0.4.0-incubating.jar"/>
<classpathentry kind="lib" path="lib/activation-1.1.1.jar"/>
<classpathentry kind="lib" path="lib/commons-httpclient-3.1.jar"/>
<classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/fedora-client-3.1.jar"/>
<classpathentry kind="lib" path="lib/fedora-messaging-client-3.1r7812.jar"/>
<classpathentry kind="lib" path="lib/fedora-server.jar"/>
<classpathentry kind="lib" path="lib/jaxen-1.1.1.jar"/>
<classpathentry kind="lib" path="lib/jaxrpc-api-1.1.jar"/>
<classpathentry kind="lib" path="lib/jrdf-0.3.4.3.jar"/>
<classpathentry kind="lib" path="lib/junit-4.5.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-2.4.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-demos-2.4.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-highlighter-2.4.0.jar"/>
<classpathentry kind="lib" path="lib/saaj-api-1.3.jar"/>
<classpathentry kind="lib" path="lib/xmlunit-1.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
12 changes: 6 additions & 6 deletions FedoraGenericSearch/lib/lib.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Library Properties
#

lib.activation = lib/activation-1.0.2.jar
lib.activation = lib/activation-1.1.1.jar
lib.axis = lib/axis.jar
lib.commons-codec = lib/commons-codec-1.3.jar
lib.commons-discovery = lib/commons-discovery.jar
lib.commons-httpclient = lib/commons-httpclient-3.1-beta1.jar
lib.commons-httpclient = lib/commons-httpclient-3.1.jar
lib.commons-logging = lib/commons-logging.jar

# Fedora 3.1 client
Expand All @@ -15,29 +15,29 @@ lib.fedora-client = lib/fedora-client-3.1.jar
# Fedora 3.1 messaging client
lib.fedora-messaging-client = lib/fedora-messaging-client-3.1r7812.jar

lib.jaxrpc = lib/jaxrpc.jar
lib.jaxrpc = lib/jaxrpc-api-1.1.jar
lib.junit = lib/junit-4.5.jar
lib.log4j = lib/log4j-1.2.15.jar
lib.lucene = lib/lucene-core-2.4.0.jar
lib.lucene-demos = lib/lucene-demos-2.4.0.jar
lib.lucene-highlighter = lib/lucene-highlighter-2.4.0.jar
lib.mail = lib/mail.jar
lib.pdfbox = lib/PDFBox-0.7.2.jar
lib.saaj = lib/saaj.jar
lib.saaj = lib/saaj-api-1.3.jar
lib.serializer = lib/serializer.jar
lib.servlet-api = lib/servlet-api.jar
lib.trippi-core = lib/trippi-1.1.1-core.jar
lib.wsdl4j = lib/wsdl4j-1.5.1.jar
lib.xalan = lib/xalan.jar
lib.xerces = lib/xercesImpl.jar
lib.xml-apis = lib/xml-apis.jar
lib.xmlunit = lib/xmlunit1.0.jar
lib.xmlunit = lib/xmlunit-1.2.jar

lib.activemq-all = lib/activemq-all-5.1.0.jar
lib.abdera.core = lib/abdera.core.0.4.0-incubating.jar
lib.abdera.parser = lib/abdera.parser.0.4.0-incubating.jar
lib.axiom-api = lib/axiom-api-1.2.5.jar
lib.axiom-impl = lib/axiom-impl-1.2.5.jar
lib.jaxen = lib/jaxen-1.1-beta-9.jar
lib.jaxen = lib/jaxen-1.1.1.jar
lib.staxapi = lib/jsr173_1.0_api.jar
lib.sjsxp = lib/sjsxp.jar
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

/**
* Performs REST operations from command line with runRESTClient.
*
*
* @author [email protected]
* @version
* @version
*/
public class RESTClient {

private Object content;

private void updateIndex(
String restUrl,
String action,
Expand All @@ -45,7 +45,7 @@ private void updateIndex(
+ "&indexDocXslt=" + indexDocXslt
+ "&restXslt=copyXml");
}

private void browseIndex(
String restUrl,
String startTerm,
Expand All @@ -66,7 +66,7 @@ private void browseIndex(
e.printStackTrace();
}
}

private void gfindObjects(
String restUrl,
String query,
Expand All @@ -93,7 +93,7 @@ private void gfindObjects(
e.printStackTrace();
}
}

private void getRepositoryInfo(
String restUrl,
String repositoryName,
Expand All @@ -104,7 +104,7 @@ private void getRepositoryInfo(
+ "&restXslt=copyXml"
+ "&resultPageXslt=" + resultPageXslt);
}

private void getIndexInfo(
String restUrl,
String indexName,
Expand All @@ -115,7 +115,7 @@ private void getIndexInfo(
+ "&restXslt=copyXml"
+ "&resultPageXslt=" + resultPageXslt);
}

private void configure(
String restUrl,
String configName,
Expand All @@ -126,13 +126,13 @@ private void configure(
+ "&propertyName=" + propertyName
+ "&propertyValue=" + propertyValue);
}

private void run(
String restUrl,
String queryString) {
doOp(restUrl + queryString);
}

private void doOp(
String urlString) {
URL url = null;
Expand All @@ -145,7 +145,7 @@ private void doOp(
URLConnection conn = null;
try {
conn = url.openConnection();
conn.setRequestProperty("Authorization",
conn.setRequestProperty("Authorization",
"Basic "+(new BASE64Encoder()).encode((System.getProperty("fedoragsearch.fgsUserName")+":"+System.getProperty("fedoragsearch.fgsPassword")).getBytes()));
conn.connect();
} catch (IOException e) {
Expand All @@ -169,14 +169,13 @@ private void doOp(
e1.printStackTrace();
}
}

public static void main(String[] args) {
try {
System.out.println("Args");
int argsLength = 0;
while (args[argsLength].length()>0) {
System.out.println(" "+argsLength+"="+args[argsLength]);
argsLength++;
int argsLength = args.length;
for(int i=0; i<argsLength; i++) {
System.out.println(" "+i+"="+args[i]);
}
if (argsLength<2) usage();
RESTClient client = new RESTClient();
Expand Down Expand Up @@ -229,7 +228,7 @@ public static void main(String[] args) {
}
}
String resultPageXslt = "";
if (argsLength>6)
if (argsLength>6)
resultPageXslt = args[6];
client.browseIndex(restUrl, startTerm, fieldName, indexName, termPageSize, resultPageXslt);
}
Expand Down Expand Up @@ -269,10 +268,10 @@ public static void main(String[] args) {
}
}
String sortFields = "";
if (argsLength>8)
if (argsLength>8)
sortFields = args[8];
String resultPageXslt = "";
if (argsLength>9)
if (argsLength>9)
resultPageXslt = args[9];
client.gfindObjects(restUrl, query, indexName, hitPageStart, hitPageSize, snippetsMax, fieldMaxLength, sortFields, resultPageXslt);
}
Expand All @@ -282,7 +281,7 @@ public static void main(String[] args) {
if (argsLength>2)
repositoryName = args[2];
String resultPageXslt = "";
if (argsLength>3)
if (argsLength>3)
resultPageXslt = args[3];
client.getRepositoryInfo(restUrl, repositoryName, resultPageXslt);
}
Expand All @@ -292,7 +291,7 @@ public static void main(String[] args) {
if (argsLength>2)
indexName = args[2];
String resultPageXslt = "";
if (argsLength>3)
if (argsLength>3)
resultPageXslt = args[3];
client.getIndexInfo(restUrl, indexName, resultPageXslt);
}
Expand Down Expand Up @@ -321,10 +320,10 @@ public static void main(String[] args) {
} catch (Exception e) {
System.out.println("Exception in main: " + e.getMessage());
e.printStackTrace();
}
}
}
public static void usage() {

public static void usage() {
System.out.println("Usage");
System.out.println("host:port updateIndex # shows number of index documents #");
System.out.println("host:port updateIndex createEmpty [indexName] # index dir must exist #");
Expand All @@ -341,5 +340,5 @@ public static void usage() {
System.out.println("host:port may be [protocol://]host:port[/webappname/restname], default is http://host:port/fedoragsearch/rest");
System.exit(1);
}

}
2 changes: 1 addition & 1 deletion FedoraGenericSearch/src/sh/client/runRESTClient.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off

set LIB=..\WEB-INF\lib
set JARS=%LIB%\fedora-3.0-client.jar;%LIB%\log4j-1.2.14.jar;%LIB%\activation-1.0.2.jar;%LIB%\axis.jar;%LIB%\commons-discovery.jar;%LIB%\commons-logging.jar;%LIB%\jaxrpc.jar;%LIB%\mail.jar;%LIB%\saaj.jar;%LIB%\lucene-core-1.9.1.jar;%LIB%\wsdl4j-1.5.1.jar;%LIB%\PDFBox-0.7.2.jar;%LIB%\xml-apis.jar
set JARS=%LIB%\fedora-client-3.1.jar;%LIB%\log4j-1.2.15.jar;%LIB%\activation-1.1.1.jar;%LIB%\axis.jar;%LIB%\commons-discovery.jar;%LIB%\commons-logging.jar;%LIB%\jaxrpc-api-1.1.jar;%LIB%\mail.jar;%LIB%\saaj-api-1.3.jar;%LIB%\lucene-core-2.4.0.jar;%LIB%\wsdl4j-1.5.1.jar;%LIB%\PDFBox-0.7.2.jar;%LIB%\xml-apis.jar

java -cp ..\WEB-INF\classes;%JARS% dk.defxws.fedoragsearch.client.RESTClient %1 %2 %3 %4 %5 %6 %7 %8
2 changes: 1 addition & 1 deletion FedoraGenericSearch/src/sh/client/runRESTClient.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
fi;

LIB=../WEB-INF/lib
JARS=$LIB/log4j-1.2.14.jar:$LIB/activation-1.0.2.jar:$LIB/axis.jar:$LIB/commons-discovery.jar:$LIB/commons-logging.jar:$LIB/jaxrpc.jar:$LIB/mail.jar:$LIB/saaj.jar:$LIB/lucene-core-2.3.2.jar:$LIB/wsdl4j-1.5.1.jar:$LIB/PDFBox-0.7.2.jar:$LIB/xml-apis.jar
JARS=$LIB/log4j-1.2.15.jar:$LIB/activation-1.1.1.jar:$LIB/axis.jar:$LIB/commons-discovery.jar:$LIB/commons-logging.jar:$LIB/jaxrpc-api-1.1.jar:$LIB/mail.jar:$LIB/saaj-api-1.3.jar:$LIB/lucene-core-2.4.0.jar:$LIB/wsdl4j-1.5.1.jar:$LIB/PDFBox-0.7.2.jar:$LIB/xml-apis.jar

java -Xms64m -Xmx96m -Dfedoragsearch.fgsUserName=$fgsUserName -Dfedoragsearch.fgsPassword=$fgsPassword -cp ../WEB-INF/classes:$JARS dk.defxws.fedoragsearch.client.RESTClient "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
2 changes: 1 addition & 1 deletion FedoraGenericSearch/src/sh/client/runSOAPClient.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
fi;

LIB=../WEB-INF/lib
JARS=$LIB/fedora-3.0-client.jar:$LIB/log4j-1.2.14.jar:$LIB/activation-1.0.2.jar:$LIB/axis.jar:$LIB/commons-discovery.jar:$LIB/commons-logging.jar:$LIB/jaxrpc.jar:$LIB/mail.jar:$LIB/saaj.jar:$LIB/lucene-core-2.0.0.jar:$LIB/wsdl4j-1.5.1.jar:$LIB/PDFBox-0.7.2.jar:$LIB/xml-apis.jar
JARS=$LIB/fedora-client-3.1.jar:$LIB/log4j-1.2.15.jar:$LIB/activation-1.1.1.jar:$LIB/axis.jar:$LIB/commons-discovery.jar:$LIB/commons-logging.jar:$LIB/jaxrpc-api-1.1.jar:$LIB/mail.jar:$LIB/saaj-api-1.3.jar:$LIB/lucene-core-2.4.0.jar:$LIB/wsdl4j-1.5.1.jar:$LIB/PDFBox-0.7.2.jar:$LIB/xml-apis.jar
USER=
java -Xms64m -Xmx96m -Dfedoragsearch.fgsUserName=$fgsUserName -Dfedoragsearch.fgsPassword=$fgsPassword -cp ../WEB-INF/classes:$JARS dk.defxws.fedoragsearch.client.SOAPClient "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
8 changes: 4 additions & 4 deletions FgsLucene/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/FedoraGenericSearch"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/log4j-1.2.14.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/fedora-3.0-client.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-core-2.3.2.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-highlighter-2.3.2.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/fedora-client-3.1.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-core-2.4.0.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-highlighter-2.4.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
22 changes: 11 additions & 11 deletions FgsSolr2/.classpath
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/fedora-3.0-client.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/log4j-1.2.14.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/FedoraGenericSearch"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-core-2.3.2.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-highlighter-2.3.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/FedoraGenericSearch"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/fedora-client-3.1.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-core-2.4.0.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/lucene-highlighter-2.4.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 1 addition & 1 deletion FgsZebra/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/FedoraGenericSearch"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/log4j-1.2.14.jar"/>
<classpathentry kind="lib" path="/FedoraGenericSearch/lib/log4j-1.2.15.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

0 comments on commit 785ff22

Please sign in to comment.