You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by ks...@apache.org on 2002/01/23 13:00:51 UTC
cvs commit: xml-xindice/java/examples/guide/src/org/apache/xindice/examples Example1.java XUpdate.java
kstaken 02/01/23 04:00:50
Modified: docs AUTHORS INSTALL INSTALL.windows
docs/src DevelopersGuide.xml
java/examples/api/src/org/apache/xindice/examples
APIExample.java
java/examples/guide/src/org/apache/xindice/examples
Example1.java XUpdate.java
Log:
Updating examples and documentation to reflect the lack of default collections.
Revision Changes Path
1.3 +2 -1 xml-xindice/docs/AUTHORS
Index: AUTHORS
===================================================================
RCS file: /home/cvs/xml-xindice/docs/AUTHORS,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AUTHORS 16 Jan 2002 13:22:13 -0000 1.2
+++ AUTHORS 23 Jan 2002 12:00:50 -0000 1.3
@@ -24,4 +24,5 @@
Fernando Padilla fern@interdemensions.com
Gianugo Rabellino g.rabellino@bibop.it
Dolan Halbrook dhalbrook@hotmail.com
- Timothy Dean tdean@visi.com
\ No newline at end of file
+ Timothy Dean tdean@visi.com
+ Mike Gratton mike@vee.net
1.3 +6 -6 xml-xindice/docs/INSTALL
Index: INSTALL
===================================================================
RCS file: /home/cvs/xml-xindice/docs/INSTALL,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- INSTALL 15 Jan 2002 14:39:42 -0000 1.2
+++ INSTALL 23 Jan 2002 12:00:50 -0000 1.3
@@ -34,13 +34,13 @@
running the examples.
Type:
- xindiceadmin ac -c /db -n root
+ xindiceadmin ac -c /db -n addressbook
If it worked successfully you should see
- Created : /db/root
+ Created : /db/addressbook
- This just created a collection named "root" in the default database instance.
+ This just created a collection named "addressbook" in the default database instance.
6. Skip to the what can I do with it section below.
@@ -83,13 +83,13 @@
running the examples.
Type:
- xindiceadmin ac -c /db -n root
+ xindiceadmin ac -c /db -n addressbook
If it worked successfully you should see
- Created : /db/root
+ Created : /db/addressbook
- This just created a collection named "root" in the default database instance.
+ This just created a collection named "addressbook" in the default database instance.
9. Skip to the what can I do with it section below.
1.3 +6 -6 xml-xindice/docs/INSTALL.windows
Index: INSTALL.windows
===================================================================
RCS file: /home/cvs/xml-xindice/docs/INSTALL.windows,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- INSTALL.windows 15 Jan 2002 14:39:42 -0000 1.2
+++ INSTALL.windows 23 Jan 2002 12:00:50 -0000 1.3
@@ -39,13 +39,13 @@
running the examples.
Type:
- xindiceadmin ac -c /db -n root
+ xindiceadmin ac -c /db -n addressbook
If it worked successfully you should see
- Created : /db/root
+ Created : /db/addressbook
- This just created a collection named "root" in the default database instance.
+ This just created a collection named "addressbook" in the default database instance.
10. Run the API example (optional)
@@ -112,13 +112,13 @@
running the examples.
Type:
- xindiceadmin ac -c /db -n root
+ xindiceadmin ac -c /db -n addressbook
If it worked successfully you should see
- Created : /db/root
+ Created : /db/addressbook
- This just created a collection named "root" in the default database instance.
+ This just created a collection named "addressbook" in the default database instance.
12. Build the examples. (optional)
1.3 +12 -12 xml-xindice/docs/src/DevelopersGuide.xml
Index: DevelopersGuide.xml
===================================================================
RCS file: /home/cvs/xml-xindice/docs/src/DevelopersGuide.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DevelopersGuide.xml 15 Jan 2002 14:39:42 -0000 1.2
+++ DevelopersGuide.xml 23 Jan 2002 12:00:50 -0000 1.3
@@ -18,7 +18,7 @@
<year>2001</year>
<holder>The Apache Software Foundation</holder>
</copyright>
- <pubdate><![CDATA[$Id: DevelopersGuide.xml,v 1.2 2002/01/15 14:39:42 kstaken Exp $]]></pubdate>
+ <pubdate><![CDATA[$Id: DevelopersGuide.xml,v 1.3 2002/01/23 12:00:50 kstaken Exp $]]></pubdate>
<legalnotice>
<para>
This documentation is a work in progress. Links to the most current
@@ -242,9 +242,9 @@
Database database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);
- col = DatabaseManager.getCollection("xmldb:xindice:///db/root/ocs");
+ col = DatabaseManager.getCollection("xmldb:xindice:///db/addressbook");
- String xpath = "//test[text()='Hello']";
+ String xpath = "//person[fname='John']";
XPathQueryService service =
(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
@@ -310,7 +310,7 @@
</para>
<programlisting>
Collection col =
- DatabaseManager.getCollection("xmldb:xindice:///db/root/ocs");
+ DatabaseManager.getCollection("xmldb:xindice:///db/addressbook");
</programlisting>
<para>
In the XML:DB API collections are retrieved
@@ -360,7 +360,7 @@
service for that collection.
</para>
<programlisting>
-String xpath = "//test[text()='Hello'";
+String xpath = "//person[fname='John']";
XPathQueryService service =
(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
@@ -501,9 +501,9 @@
port that the Xindice HTTP server is listening on. The port setting is
displayed when you start the server. By default the
configuration used is <filename>xindice://localhost:4080</filename>.
- To access the collection /db/root/ocs on host xml.apache.org port
+ To access the collection /db/addressbook on host xml.apache.org port
4090 the URI would look something like this
- <filename>xindice://xml.apache.org:4090/db/root/ocs</filename>. If you
+ <filename>xindice://xml.apache.org:4090/db/addressbook</filename>. If you
are running the client and server on the same machine you do not
need to specify a host or port. All examples in this document assume
the client and server are on the same machine.
@@ -899,9 +899,9 @@
Database database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);
- col = DatabaseManager.getCollection("xmldb:xindice:///db/root/ocs");
+ col = DatabaseManager.getCollection("xmldb:xindice:///db/addressbook");
- String xpath = "//test[text()='Hello']";
+ String xpath = "//person[fname='John']";
XPathQueryService service =
(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
@@ -1199,16 +1199,16 @@
<para>
Once you have your classpath setup you can compile the XMLObject
like any other Java class and then install it in the
- <filename>/db/root</filename> collection.
+ <filename>/db/addressbook</filename> collection.
</para>
<screen>
-xindiceadmin add_xmlobject -i org.apache.xindice.examples.HelloWorldXMLObject -n Hello -c /db/root
+xindiceadmin add_xmlobject -i org.apache.xindice.examples.HelloWorldXMLObject -n Hello -c /db/addressbook
</screen>
<para>
And then you can run it.
</para>
<screen>
-xindice invoke -c /db/root -o Hello
+xindice invoke -c /db/addressbook -o Hello
</screen>
<para>
One thing to note about this is that when you invoke the
1.2 +2 -2 xml-xindice/java/examples/api/src/org/apache/xindice/examples/APIExample.java
Index: APIExample.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/examples/api/src/org/apache/xindice/examples/APIExample.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- APIExample.java 6 Dec 2001 19:33:52 -0000 1.1
+++ APIExample.java 23 Jan 2002 12:00:50 -0000 1.2
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: APIExample.java,v 1.1 2001/12/06 19:33:52 bradford Exp $
+ * $Id: APIExample.java,v 1.2 2002/01/23 12:00:50 kstaken Exp $
*/
import org.apache.xindice.client.xmldb.DatabaseImpl;
@@ -79,7 +79,7 @@
Database dbxml = new DatabaseImpl();
DatabaseManager.registerDatabase(dbxml);
Collection col =
- DatabaseManager.getCollection("xmldb:dbxml:///db/root/ocs");
+ DatabaseManager.getCollection("xmldb:dbxml:///db/addressbook");
col.setProperty("ResourceType", "XMLText");
1.2 +3 -3 xml-xindice/java/examples/guide/src/org/apache/xindice/examples/Example1.java
Index: Example1.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/examples/guide/src/org/apache/xindice/examples/Example1.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Example1.java 6 Dec 2001 19:33:53 -0000 1.1
+++ Example1.java 23 Jan 2002 12:00:50 -0000 1.2
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: Example1.java,v 1.1 2001/12/06 19:33:53 bradford Exp $
+ * $Id: Example1.java,v 1.2 2002/01/23 12:00:50 kstaken Exp $
*/
import org.xmldb.api.base.*;
@@ -76,9 +76,9 @@
Database database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);
col =
- DatabaseManager.getCollection("xmldb:dbxml:///db/root/ocs");
+ DatabaseManager.getCollection("xmldb:dbxml:///db/addressbook");
- String xpath = "//test[text()='Hello']";
+ String xpath = "//person[fname='John']";
XPathQueryService service =
(XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = service.query(xpath);
1.2 +2 -2 xml-xindice/java/examples/guide/src/org/apache/xindice/examples/XUpdate.java
Index: XUpdate.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/examples/guide/src/org/apache/xindice/examples/XUpdate.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XUpdate.java 6 Dec 2001 19:33:53 -0000 1.1
+++ XUpdate.java 23 Jan 2002 12:00:50 -0000 1.2
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: XUpdate.java,v 1.1 2001/12/06 19:33:53 bradford Exp $
+ * $Id: XUpdate.java,v 1.2 2002/01/23 12:00:50 kstaken Exp $
*/
import org.xmldb.api.base.*;
@@ -76,7 +76,7 @@
Database database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);
col =
- DatabaseManager.getCollection("xmldb:dbxml:///db/root");
+ DatabaseManager.getCollection("xmldb:dbxml:///db/addressbook");
String xupdate = "<xu:modifications version=\"1.0\"" +
" xmlns:xu=\"http://www.xmldb.org/xupdate\">" +