xmldb-org-xapi Mailing List for XML:DB Initiative for XML Databases (Page 2)
Brought to you by:
reinhapa
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
(23) |
Aug
(6) |
Sep
(7) |
Oct
|
Nov
(4) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Per N. <per...@re...> - 2004-07-18 12:39:12
|
Hi Wolfgang, Thanks for your reply. Please see my answers inline below: tisdagen den 13 juli 2004 15.04 skrev Wolfgang Meier: > Hi Per, > > > does anyone know why XPathQueryService.queryResource(String id, String > > query) is returning a ResourceSet? Would it not make more sense to return > > a XObject (org.xmldb.common.xml.queries.XObject) instead? > > > > i.e.change > > ResourceSet queryResource( String id, String query ) throws > > XMLDBException; to > > XObject queryResource( String id, String query ) throws XMLDBException; > > > > We are querying a single resource and are not expecting a result from any > > other resource and certainly not a set of resources. > > I agree that returning a ResourceSet is somewhat misleading. The query > result could be anything: a set of atomic values, a node set or a document > fragment. While storing a document fragment back into the database with > Collection.storeResource is possible, storing an integer value doesn't make > much sense. > > However, XObject seems too limited to me. First, because the name makes me > expect a single object, second XObject restricts the possible range of data > types. Why not use a more generic concept compatible with the XPath2/XQuery > semantics? Every query returns a "Sequence" containing zero or more > "Items". An item might be a node or an atomic value. JSR 225 chooses this > path. Yes but returning an array of XObjects is just this: a sequence of items that can contain atomic values, document fragments or nodesets. As you know, an XObject is possible to get content as a int, boolean, double string, NodeList and DocumentFragment. I think this covers all possibilities from an XPath result but we can easily add new ones if needed. > > > Returning an XObject makes it possible to handle xpaths that returns > > numbers such as count() in a cleaner way than wrapping the result in XML > > and turning it into a resource. > > > > Actually why not use the same logic for collection scope queries and > > change it from: > > > > ResourceSet query( String query ) throws XMLDBException; > > to > > XObject[] query( String query ) throws XMLDBException; > > ? > > I don't see why collection scope queries should have a different return > type? query() and queryResource() just pre-set the context of the query, > but this context can be changed at any time within the query expression, > using the standard doc() and collection() functions. It is not possible to > determine the result in advance. I was thinking that if an XObject is a returned from a Resource than returning an array of XObjects from a a collection of Resources (one Xobject for each resource that has a match) would make sense. Best regards, Per > > Regards, > > Wolfgang > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Xmldb-org-xapi mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmldb-org-xapi |
From: Per N. <per...@us...> - 2004-07-17 17:32:59
|
Update of /cvsroot/xmldb-org/xapi/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29356/xmldb.org/xapi/src/lib Added Files: jars.README xerces.jar Log Message: jars.README holds information on jar files in the lib dir xerces is needed by reference impl --- NEW FILE: jars.README --- junit.jar --------- url: www.junit.org version: 3.8.1. used by: Testsuite xalan.jar --------- url: www.apache.org/xml version: used by: common xerces.jar ---------- url: www.apache.org/xml version: 1.2.0 used by: Reference implementation (e.g. SimpleResourceSet) omquery.jar ----------- xtdash.jar ---------- --- NEW FILE: xerces.jar --- (This appears to be a binary file; contents omitted.) |
From: Per N. <per...@us...> - 2004-07-17 16:59:47
|
Update of /cvsroot/xmldb-org/xapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi/src Modified Files: AUTHORS build.xml Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly Index: build.xml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- build.xml 17 Jul 2004 09:27:36 -0000 1.4 +++ build.xml 17 Jul 2004 16:59:38 -0000 1.5 @@ -29,6 +29,7 @@ <property name="src.dir" value="${root.dir}/api"/> <property name="common.src.dir" value="${root.dir}/common"/> <property name="build.dir" value="${root.dir}/build"/> + <property name="jar.build.dir" value="${build.dir}/jar"/> <property name="build.doc" value="${build.dir}/javadoc"/> <property name="api.build.dir" value="${build.dir}/classes-api"/> <property name="sdk.build.dir" value="${build.dir}/classes-sdk"/> @@ -55,6 +56,7 @@ <tstamp/> <property name="jarname" value="xmldb-api"/> <property name="sdk.jarname" value="xmldb-api-sdk"/> + <property name="common.jarname" value="xmldb-common"/> </target> <!-- =================================================================== --> @@ -64,10 +66,11 @@ <mkdir dir="${api.build.dir}"/> <mkdir dir="${sdk.build.dir}"/> <mkdir dir="${common.build.dir}"/> + <mkdir dir="${jar.build.dir}"/> <mkdir dir="${jar.dir}"/> </target> - <target name="main" depends="compile-api, compile-sdk, bin-jar, bin-jar-sdk"> + <target name="main" depends="bin-jar, bin-jar-sdk, bin-jar-common"> </target> <!-- =================================================================== --> @@ -83,9 +86,8 @@ </target> <target name="bin-jar" depends="prepare, compile-api"> - <jar jarfile="${jar.dir}/${jarname}.jar" - basedir="${api.build.dir}" - /> + <jar jarfile="${jar.build.dir}/${jarname}.jar" + basedir="${api.build.dir}"/> </target> <target name="sdk" depends="compile-sdk, bin-jar-sdk"> @@ -102,8 +104,8 @@ </javac> </target> - <target name="bin-jar-sdk" depends="prepare"> - <jar jarfile="${jar.dir}/${sdk.jarname}.jar" + <target name="bin-jar-sdk" depends="prepare, compile-sdk"> + <jar jarfile="${jar.build.dir}/${sdk.jarname}.jar" basedir="${sdk.build.dir}" /> </target> @@ -120,6 +122,12 @@ <!--classpath refid="project.classpath"/--> </target> + <target name="bin-jar-common" depends="compile-common"> + <jar jarfile="${jar.build.dir}/${common.jarname}.jar" + basedir="${common.build.dir}" + /> + </target> + <!-- =================================================================== --> <!-- Tasks to manage execution of tests --> <!-- =================================================================== --> @@ -232,7 +240,8 @@ <target name="clean-jar"> <delete file="${jar.dir}/${jarname}.jar"/> - <delete file="${jar.dir}/${sdk.jarname}.jar"/> + <delete file="${jar.dir}/${sdk.jarname}.jar"/> + <delete file="${jar.dir}/${common.jarname}.jar"/> </target> </project> Index: AUTHORS =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AUTHORS 30 May 2004 11:54:44 -0000 1.1 +++ AUTHORS 17 Jul 2004 16:59:38 -0000 1.2 @@ -1,8 +1,8 @@ Maintainer Kimbro Staken <ks...@xm...> -Contributers +Contributors Lars Martin <Lar...@sm...> - Per Nyfelt <per...@no...> + Per Nyfelt <per...@re...> Vladimir R. Bossicard <vla...@ap...> Jeroen Breedveld <je...@x-...> |
From: Per N. <per...@us...> - 2004-07-17 16:59:47
|
Update of /cvsroot/xmldb-org/xapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi Modified Files: xapi.iml Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly Index: xapi.iml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/xapi.iml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- xapi.iml 17 Jul 2004 09:27:36 -0000 1.4 +++ xapi.iml 17 Jul 2004 16:59:38 -0000 1.5 @@ -37,6 +37,15 @@ <SOURCES /> </library> </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/xerces.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> </component> </module> |
From: Per N. <per...@us...> - 2004-07-17 16:59:46
|
Update of /cvsroot/xmldb-org/xapi/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi/src/lib Added Files: xalan.jar Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly --- NEW FILE: xalan.jar --- (This appears to be a binary file; contents omitted.) |
From: Per N. <per...@us...> - 2004-07-17 16:59:46
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/reference In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi/src/api/org/xmldb/api/reference Modified Files: ResourceSetImpl.java Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly Index: ResourceSetImpl.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/reference/ResourceSetImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ResourceSetImpl.java 30 May 2004 11:54:44 -0000 1.1 +++ ResourceSetImpl.java 17 Jul 2004 16:59:37 -0000 1.2 @@ -58,12 +58,10 @@ import org.xmldb.api.sdk.*; import org.xmldb.api.reference.modules.*; -import java.util.List; import java.io.*; import org.w3c.dom.*; -import org.apache.xerces.parsers.*; import org.apache.xml.serialize.*; /** @@ -93,7 +91,7 @@ } } } - + /** * Returns a <code>Resource</code> containing an XML representation of all * resources stored in the set. |
From: Per N. <per...@us...> - 2004-07-17 16:59:46
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/sdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi/src/api/org/xmldb/api/sdk Modified Files: SimpleResourceSet.java Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly Index: SimpleResourceSet.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/sdk/SimpleResourceSet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SimpleResourceSet.java 30 May 2004 11:54:45 -0000 1.1 +++ SimpleResourceSet.java 17 Jul 2004 16:59:37 -0000 1.2 @@ -52,9 +52,6 @@ * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ - -import org.xmldb.api.reference.modules.*; - import org.xmldb.api.base.*; import org.xmldb.api.modules.*; @@ -100,8 +97,8 @@ * @return the <code>Resource</code> instance. * @exception XMLDBException */ - public Resource getResource(long index) throws XMLDBException { - return (XMLResource) resources.get((int) index); + public Resource getResource(int index) throws XMLDBException { + return (XMLResource) resources.get(index); } /** @@ -110,7 +107,7 @@ * @return the number of <code>Resource</code> instances in the set. * @exception XMLDBException */ - public long getSize() throws XMLDBException { + public int getSize() throws XMLDBException { return resources.size(); } @@ -122,7 +119,25 @@ public void addResource(Resource res) throws XMLDBException { resources.add(res); } - + + /** + * Adds all <code>Resource</code> instances in the resourceSet + * to this set. + * + * @param rSet The <code>ResourceSet</code> containing all the <code>Resource</code>'s + * to add to the set. + * @throws org.xmldb.api.base.XMLDBException + * with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + public void addAll(ResourceSet rSet) throws XMLDBException { + ResourceIterator it = rSet.getIterator(); + while (it.hasMoreResources()) { + addResource(it.nextResource()); + } + } + /** * Removes all <code>Resource</code> instances from the set. * @@ -139,8 +154,8 @@ * @param index The index of the <code>Resource</code> instance to remove. * @exception XMLDBException */ - public void removeResource(long index) throws XMLDBException { - resources.remove((int) index); + public void removeResource(int index) throws XMLDBException { + resources.remove(index); } /** |
From: Per N. <per...@us...> - 2004-07-17 16:59:46
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi/src/api/org/xmldb/api/base Modified Files: ResourceSet.java Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly Index: ResourceSet.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/base/ResourceSet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ResourceSet.java 30 May 2004 11:54:44 -0000 1.1 +++ ResourceSet.java 17 Jul 2004 16:59:37 -0000 1.2 @@ -53,94 +53,107 @@ * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ - /** - * ResourceSet is a container for a set of resources. Generally a +/** + * ResourceSet is a container for a set of resources. Generally a * <code>ResourceSet</code> is obtained as the result of a query. */ public interface ResourceSet { - /** - * Returns the <code>Resource</code> instance stored at the index specified - * by index. - * <p /> - * If the underlying implementation uses a paging or streaming optimization - * for retrieving Resource instances. Calling this method MAY result in a - * block until the requested Resource has been downloaded. - * - * @param index the index of the resource to retrieve. - * @return The <code>Resource</code> instance - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - * <code>ErrorCodes.NO_SUCH_RESOURCE if the index is out of range for the - * set. - */ - Resource getResource(long index) throws XMLDBException; + /** + * Returns the <code>Resource</code> instance stored at the index specified + * by index. + * <p /> + * If the underlying implementation uses a paging or streaming optimization + * for retrieving Resource instances. Calling this method MAY result in a + * block until the requested Resource has been downloaded. + * + * @param index the index of the resource to retrieve. + * @return The <code>Resource</code> instance + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + * <code>ErrorCodes.NO_SUCH_RESOURCE if the index is out of range for the + * set. + */ + Resource getResource(int index) throws XMLDBException; - /** - * Adds a <code>Resource</code> instance to the set. - * - * @param res The <code>Resource</code> to add to the set. - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - */ - void addResource(Resource res) throws XMLDBException; + /** + * Adds a <code>Resource</code> instance to the set. + * + * @param res The <code>Resource</code> to add to the set. + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + void addResource(Resource res) throws XMLDBException; - /** - * Removes the Resource located at <code>index</code> from the set. - * - * @param index The index of the <code>Resource</code> instance to remove. - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - */ - void removeResource(long index) throws XMLDBException; + /** + * Adds all <code>Resource</code> instances in the resourceSet + * to this set. + * + * @param rSet The <code>ResourceSet</code> containing all the <code>Resource</code>'s + * to add to the set. + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + void addAll(ResourceSet rSet) throws XMLDBException; - /** - * Returns an iterator over all <code>Resource</code> instances stored in the set. - * - * @return a <code>ResourceIterator</code> over all <code>Resource</code> - * instances in the set. - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - */ - ResourceIterator getIterator() throws XMLDBException; - /** - * Returns a Resource containing an XML representation of all resources - * stored in the set. <p /> - * TODO: Specify the schema used for this - * - * @return A <code>Resource</code> instance containing an XML representation - * of all set members. - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - */ - Resource getMembersAsResource() throws XMLDBException; + /** + * Removes the Resource located at <code>index</code> from the set. + * + * @param index The index of the <code>Resource</code> instance to remove. + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + void removeResource(int index) throws XMLDBException; - /** - * Returns the number of resources contained in the set. - * <p /> - * If the underlying implementation uses a paging or streaming optimization - * for retrieving <code>Resource</code> instances. Calling this method MAY - * force the downloading of all set members before the size can be determined. - * - * @return The number of <code>Resource</code> instances in the set. - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - */ - long getSize() throws XMLDBException; + /** + * Returns an iterator over all <code>Resource</code> instances stored in the set. + * + * @return a <code>ResourceIterator</code> over all <code>Resource</code> + * instances in the set. + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + ResourceIterator getIterator() throws XMLDBException; - /** - * Removes all <code>Resource</code> instances from the set. - * - * @exception XMLDBException with expected error codes.<br /> - * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor - * specific errors that occur.<br /> - */ - void clear() throws XMLDBException; + /** + * Returns a Resource containing an XML representation of all resources + * stored in the set. <p /> + * TODO: Specify the schema used for this + * + * @return A <code>Resource</code> instance containing an XML representation + * of all set members. + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + Resource getMembersAsResource() throws XMLDBException; + + /** + * Returns the number of resources contained in the set. + * <p /> + * If the underlying implementation uses a paging or streaming optimization + * for retrieving <code>Resource</code> instances. Calling this method MAY + * force the downloading of all set members before the size can be determined. + * + * @return The number of <code>Resource</code> instances in the set. + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + int getSize() throws XMLDBException; + + /** + * Removes all <code>Resource</code> instances from the set. + * + * @throws XMLDBException with expected error codes.<br /> + * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor + * specific errors that occur.<br /> + */ + void clear() throws XMLDBException; } |
From: Per N. <per...@us...> - 2004-07-17 16:59:45
|
Update of /cvsroot/xmldb-org/xapi/idl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25394/xmldb.org/xapi/idl Modified Files: Makefile base.idl Log Message: Fixed data type for ResourceSets (long in IDL is an int in Java, a java long is a long long in IDL) Xalan is needed for common to build properly Index: base.idl =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/base.idl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- base.idl 12 Jun 2004 20:41:24 -0000 1.2 +++ base.idl 17 Jul 2004 16:59:37 -0000 1.3 @@ -161,6 +161,7 @@ interface ResourceSet { Resource getResource( in long index ) raises (XMLDBException); void addResource( in Resource res ) raises (XMLDBException); + void addAll( in ResourceSet rSet ) raises (XMLDBException); void removeResource( in long index ) raises (XMLDBException); ResourceIterator getIterator() raises (XMLDBException); Resource getMembersAsResource() raises (XMLDBException); Index: Makefile =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 17 Jul 2004 09:27:36 -0000 1.2 +++ Makefile 17 Jul 2004 16:59:37 -0000 1.3 @@ -20,6 +20,6 @@ rm $(BUILD)/org/xmldb/api/base/*POA.java rm $(BUILD)/org/xmldb/api/base/*Helper.java rm $(BUILD)/org/xmldb/api/base/*Holder.java - rm $(BUILD)/org/xmldb/api/base/security/*POA.java + rm $(BUILD)/org/xmldb/api/security/*POA.java rm $(BUILD)/org/xmldb/api/modules/*POA.java |
From: Per N. <per...@us...> - 2004-07-17 09:37:00
|
Update of /cvsroot/xmldb-org/xapi/idl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3610a/xmldb.org/xapi/idl Modified Files: Changes Log Message: Very early attempt to add two new services, to a great extent based on eXist definition of these services, as a base for discussion. Index: Changes =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/Changes,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Changes 12 Jun 2004 20:41:24 -0000 1.2 +++ Changes 17 Jul 2004 09:36:52 -0000 1.3 @@ -54,4 +54,7 @@ -- 2004-jun-12 Added XQueryService and CompiledExpression +-- 2004-jul-17 +Added first initial version of DatabaseInstanceManagerService and UserManagementService + |
From: Per N. <per...@us...> - 2004-07-17 09:34:54
|
Update of /cvsroot/xmldb-org/xapi/idl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3393/xmldb.org/xapi/idl Added Files: DatabaseInstanceManagerService.idl UserManagementService.idl security.idl Log Message: Very early attempt to add two new services, to a great extent based on eXist definition of these services, as a base for discussion. --- NEW FILE: DatabaseInstanceManagerService.idl --- /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ #include "base.idl" module org { module xmldb { module api { module modules { interface DatabaseInstanceManagerService : base::Service { const string serviceName = "DatabaseInstanceManagerService"; const string version = "1.0"; void shutdown() raises (base::XMLDBException); }; }; }; }; }; --- NEW FILE: security.idl --- /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2003 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ module org { module xmldb { module api { module security { interface User; interface Group; interface Permission; typedef sequence<User> UserList; typedef sequence<Group> GroupList; typedef sequence<Permission> PermissionList; interface Group { string getName(); long getId(); long compareTo(in Object other); }; interface User { /** * Add the user to a group * *@param group The feature to be added to the Group attribute */ void addGroup( in string group ); /** * Get all groups this user belongs to * *@return An array of groups */ GroupList getGroups(); /** * Get the user name * *@return The user name value */ string getName(); /** * Get the user's password * *@return Thes user's password in unencrypted string format */ string getPassword(); /** * Get the primary group this user belongs to * *@return The primaryGroup value */ string getPrimaryGroup(); /** * Is the user a member of group? * *@param group Description of the Parameter *@return Description of the Return Value */ boolean hasGroup( in string group ); /** * Sets the password attribute of the User object * *@param passwd The new password value */ void setPassword( in string passwd ); /** * Sets the passwordDigest attribute of the User object * *@param passwd The new passwordDigest value */ void setPasswordDigest( in string passwd ); // not sure if this should be enforced //string digest(in string passwd); boolean validate( in string passwd ); void setHome(in string homeCollection); string getHome(); }; interface Permission { const long DEFAULT_PERM = 0755; const long READ = 4; const long UPDATE = 1; const long WRITE = 2; long getGroupPermissions(); string getOwner(); string getOwnerGroup(); long getPermissions(); long getPublicPermissions(); long getUserPermissions(); void setGroup( in string group ); void setGroupPermissions( in long permissions ); void setOwner( in User user ); // cannot override in idl //void setOwner( in string user ); // cannot override in idl //void setPermissions( in string permissions ) raises (base::XMLDBException); void setPermissions( in long permissions ); void setPublicPermissions( in long permissions ); void setUserPermissions( in long permissions ); boolean validate( in User user, in long permissions ); //void read( in DataInput istream ) raises (base::XMLDBException); //void write( in DataOutput ostream ) raises (base::XMLDBException); //void store( in string prefix, in Properties props ); }; }; }; }; }; --- NEW FILE: UserManagementService.idl --- /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2003 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ #include "security.idl" #include "base.idl" module org { module xmldb { module api { module modules { interface UserManagementService : base::Service { const string serviceName = "UserManagementService"; const string version = "1.0"; void setCollectionPermissions(in base::Collection child, in security::Permission perm) raises (base::XMLDBException); void setResourcePermissions(in base::Resource resource, in security::Permission perm) raises (base::XMLDBException); void chownCollection( in security::User u, in string group ) raises (base::XMLDBException); void chownResource( in base::Resource res, in security::User u, in string group ) raises (base::XMLDBException); //void chmod( in base::Resource resource, in string modeStr ) raises (base::XMLDBException); //void chmod( in string modeStr ) raises (base::XMLDBException); void chmodCollection( in long mode ) raises (base::XMLDBException); void chmodResource( in base::Resource resource, in long mode ) raises (base::XMLDBException); void lockResource(in base::Resource res, in security::User u) raises (base::XMLDBException); string hasUserLock(in base::Resource res) raises (base::XMLDBException); void unlockResource(in base::Resource res) raises (base::XMLDBException); void addUser( in security::User user ) raises (base::XMLDBException); void updateUser( in security::User user ) raises (base::XMLDBException); security::User getUser( in string name ) raises (base::XMLDBException); security::UserList getUsers() raises (base::XMLDBException); security::GroupList getGroups() raises (base::XMLDBException); security::Permission getCollectionPermissions( in base::Collection coll ) raises (base::XMLDBException); security::Permission getResourcePermissions( in base::Resource res ) raises (base::XMLDBException); security::PermissionList listResourcePermissions() raises (base::XMLDBException); security::PermissionList listCollectionPermissions() raises (base::XMLDBException); void removeUser( in security::User user ) raises (base::XMLDBException); }; }; }; }; }; |
From: Per N. <per...@us...> - 2004-07-17 09:27:45
|
Update of /cvsroot/xmldb-org/xapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2644/xmldb.org/xapi Modified Files: build.xml xapi.iml Log Message: Include java doc for commons in dist build Index: xapi.iml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/xapi.iml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xapi.iml 8 Jun 2004 20:17:16 -0000 1.3 +++ xapi.iml 17 Jul 2004 09:27:36 -0000 1.4 @@ -1,33 +1,42 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module version="4" relativePaths="false"> - <component name="ModuleRootManager" /> - <component name="NewModuleRootManager"> - <output url="file://$MODULE_DIR$/classes" /> - <exclude-output /> - <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/api" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/common" isTestSource="false" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/src/lib/xtdash.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/src/lib/omquery.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - +<?xml version="1.0" encoding="UTF-8"?> +<module version="4" relativePaths="false"> + <component name="ModuleRootManager" /> + <component name="NewModuleRootManager"> + <output url="file://$MODULE_DIR$/classes" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/api" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/common" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/xtdash.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/omquery.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/xalan.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + Index: build.xml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- build.xml 8 Jun 2004 20:10:30 -0000 1.3 +++ build.xml 17 Jul 2004 09:27:36 -0000 1.4 @@ -37,6 +37,9 @@ <ant dir="src" target="javadoc-spec" inheritall="false"> <property name="build.doc" value="${build.dir}" /> </ant> + <ant dir="src" target="javadoc-full" inheritall="false"> + <property name="build.doc" value="${build.dir}" /> + </ant> </target> <!--====================================================================== |
From: Per N. <per...@us...> - 2004-07-17 09:27:45
|
Update of /cvsroot/xmldb-org/xapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2644/xmldb.org/xapi/src Modified Files: build.xml Log Message: Include java doc for commons in dist build Index: build.xml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- build.xml 8 Jun 2004 19:45:02 -0000 1.3 +++ build.xml 17 Jul 2004 09:27:36 -0000 1.4 @@ -26,11 +26,13 @@ <!-- default directory structure definitions --> <property name="root.dir" value="${basedir}"/> <property name="jar.dir" value="${root.dir}/lib"/> - <property name="src.dir" value="${root.dir}/api"/> + <property name="src.dir" value="${root.dir}/api"/> + <property name="common.src.dir" value="${root.dir}/common"/> <property name="build.dir" value="${root.dir}/build"/> <property name="build.doc" value="${build.dir}/javadoc"/> <property name="api.build.dir" value="${build.dir}/classes-api"/> <property name="sdk.build.dir" value="${build.dir}/classes-sdk"/> + <property name="common.build.dir" value="${build.dir}/common"/> <property name="dist.build.dir" value="${root.dir}/dist/xmldb"/> <property name="javadoc.pkgs" value="org.xmldb.*"/> @@ -61,16 +63,17 @@ <target name="prepare" depends="init"> <mkdir dir="${api.build.dir}"/> <mkdir dir="${sdk.build.dir}"/> + <mkdir dir="${common.build.dir}"/> <mkdir dir="${jar.dir}"/> </target> - <target name="main" depends="compile, compile-sdk, bin-jar, bin-jar-sdk"> + <target name="main" depends="compile-api, compile-sdk, bin-jar, bin-jar-sdk"> </target> <!-- =================================================================== --> <!-- Compiles the XML:DB API sources --> <!-- =================================================================== --> - <target name="compile" depends="prepare"> + <target name="compile-api" depends="prepare"> <echo message="Compiling XML:DB API - Interfaces"/> <javac srcdir="${src.dir}" destdir="${api.build.dir}" @@ -79,7 +82,7 @@ <!--classpath refid="project.classpath"/--> </target> - <target name="bin-jar" depends="prepare, compile"> + <target name="bin-jar" depends="prepare, compile-api"> <jar jarfile="${jar.dir}/${jarname}.jar" basedir="${api.build.dir}" /> @@ -88,7 +91,7 @@ <target name="sdk" depends="compile-sdk, bin-jar-sdk"> </target> - <target name="compile-sdk" depends="prepare, compile"> + <target name="compile-sdk" depends="prepare, compile-api"> <echo message="Compiling XML:DB API - SDK"/> <javac srcdir="${src.dir}" destdir="${sdk.build.dir}" @@ -104,7 +107,19 @@ basedir="${sdk.build.dir}" /> </target> - + + <!-- =================================================================== --> + <!-- Compiles the XML:DB Common sources --> + <!-- =================================================================== --> + + <target name="compile-common" depends="prepare"> + <echo message="Compiling XML:DB common"/> + <javac srcdir="${common.src.dir}" + destdir="${common.build.dir}" + classpathref="project.classpath" /> + <!--classpath refid="project.classpath"/--> + </target> + <!-- =================================================================== --> <!-- Tasks to manage execution of tests --> <!-- =================================================================== --> @@ -128,21 +143,25 @@ <!-- =================================================================== --> <!-- Build Full API docs including SDK files --> <!-- =================================================================== --> - <target name="javadoc" depends="prepare"> + <target name="javadoc-full" depends="prepare"> <delete dir="${build.doc}/full"/> <mkdir dir="${build.doc}/full"/> - <javadoc packagenames="org.xmldb.**" - sourcepath="${src.dir}" + <javadoc packagenames="org.xmldb.*" destdir="${build.doc}/full" public="true" version="true" author="true" doctitle="XML:DB API Specification" header="<b>XML:DB API</b>" - bottom="<font size=2>Copyright (C) <a href=http://www.xmldb.org>XML:DB Initiative</a>. All rights reserved.%lt;/font>" - classpathref="project.classpath"/> + bottom="<font size=2>Copyright (C) <a href=http://xmldb-org.sourceforge.net>XML:DB Initiative</a>. All rights reserved.%lt;/font>" + classpathref="project.classpath"> + + <sourcepath path="${src.dir}"/> + <sourcepath path="${common.src.dir}"/> + + </javadoc> </target> @@ -165,14 +184,14 @@ author="true" doctitle="XML:DB API Specification" header="<b>XML:DB API</b>" - bottom="<font size=2>Copyright (C) <a href=http://www.xmldb.org>XML:DB Initiative</a>. All rights reserved.%lt;/font>" + bottom="<font size=2>Copyright (C) <a href=http://xmldb-org.sourceforge.net>XML:DB Initiative</a>. All rights reserved.%lt;/font>" classpathref="project.classpath"/> </target> <!-- =================================================================== --> <!-- Builds the distribution tar and zips --> <!-- =================================================================== --> - <target name="dist" depends="main, sdk, javadoc, setup, clean-build"> + <target name="dist" depends="main, sdk, javadoc-full, setup, clean-build"> <mkdir dir="${dist.build.dir}"/> @@ -208,6 +227,7 @@ <target name="clean-build"> <delete dir="${build.dir}"/> <delete dir="${sdk.build.dir}"/> + <delete dir="${common.build.dir}"/> </target> <target name="clean-jar"> |
From: Per N. <per...@us...> - 2004-07-17 09:27:44
|
Update of /cvsroot/xmldb-org/xapi/idl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2644/xmldb.org/xapi/idl Modified Files: Makefile Log Message: Include java doc for commons in dist build Index: Makefile =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 12 Jun 2004 20:41:24 -0000 1.1 +++ Makefile 17 Jul 2004 09:27:36 -0000 1.2 @@ -2,6 +2,7 @@ BUILD = ../build/interfaces interfaces: + mkdir -p $(BUILD) rm -r $(BUILD) mkdir -p $(BUILD) #idlj -td $(BUILD) $(SOURCES) @@ -13,8 +14,12 @@ idlj -f server -td $(BUILD) TransactionService.idl idlj -f server -td $(BUILD) XUpdateQueryService.idl idlj -f server -td $(BUILD) XQueryService.idl + idlj -f server -td $(BUILD) DatabaseInstanceManagerService.idl + idlj -f server -td $(BUILD) security.idl + idlj -f server -td $(BUILD) UserManagementService.idl rm $(BUILD)/org/xmldb/api/base/*POA.java rm $(BUILD)/org/xmldb/api/base/*Helper.java rm $(BUILD)/org/xmldb/api/base/*Holder.java + rm $(BUILD)/org/xmldb/api/base/security/*POA.java rm $(BUILD)/org/xmldb/api/modules/*POA.java |
From: Per N. <per...@re...> - 2004-07-16 09:38:02
|
torsdagen den 8 juli 2004 18.22 skrev rpb...@rp...: > Probably because an XPath query can return multiple nodes, so you need a > ResourceSet, rather than a single object. (I'm not sure what XObject is. > It's not listed in the JavaDocs for Xindice and the xmldb.org Web site is > gone, so I can't look at the spec.) You can get a list of nodes from the XPath query result in an XObject form: NodeList nodeList = result.nodeset(); Btw: Web page is at: http://xmldb-org.sourceforge.net I notices that I have not put the javadoc for the commons stuff on-line. I'll fix this shortly. Meanwhile, CVS sources is available at cvs.sourceforge.net:/cvsroot/xmldb-org Best regards, Per > > -- Ron > > > does anyone know why XPathQueryService.queryResource(String id, String > > query) is returning a ResourceSet? Would it not make more sense to return > > a XObject (org.xmldb.common.xml.queries.XObject) instead? > > > > i.e.change > > ResourceSet queryResource( String id, String query ) throws > > XMLDBException; to > > XObject queryResource( String id, String query ) throws XMLDBException; > > > > We are querying a single resource and are not expecting a result from any > > other resource and certainly not a set of resources. > > > > Returning an XObject makes it possible to handle xpaths that returns > > numbers such as count() in a cleaner way than wrapping the result in XML > > and turning it into a resource. > > > > Actually why not use the same logic for collection scope queries and > > change it from: > > > > ResourceSet query( String query ) throws XMLDBException; > > to > > XObject[] query( String query ) throws XMLDBException; > > ? |
From: Wolfgang M. <wol...@ex...> - 2004-07-13 15:04:12
|
Hi Per, > does anyone know why XPathQueryService.queryResource(String id, String > query) is returning a ResourceSet? Would it not make more sense to return a > XObject (org.xmldb.common.xml.queries.XObject) instead? > > i.e.change > ResourceSet queryResource( String id, String query ) throws XMLDBException; > to > XObject queryResource( String id, String query ) throws XMLDBException; > > We are querying a single resource and are not expecting a result from any > other resource and certainly not a set of resources. I agree that returning a ResourceSet is somewhat misleading. The query result could be anything: a set of atomic values, a node set or a document fragment. While storing a document fragment back into the database with Collection.storeResource is possible, storing an integer value doesn't make much sense. However, XObject seems too limited to me. First, because the name makes me expect a single object, second XObject restricts the possible range of data types. Why not use a more generic concept compatible with the XPath2/XQuery semantics? Every query returns a "Sequence" containing zero or more "Items". An item might be a node or an atomic value. JSR 225 chooses this path. > Returning an XObject makes it possible to handle xpaths that returns > numbers such as count() in a cleaner way than wrapping the result in XML > and turning it into a resource. > > Actually why not use the same logic for collection scope queries and change > it from: > > ResourceSet query( String query ) throws XMLDBException; > to > XObject[] query( String query ) throws XMLDBException; > ? I don't see why collection scope queries should have a different return type? query() and queryResource() just pre-set the context of the query, but this context can be changed at any time within the query expression, using the standard doc() and collection() functions. It is not possible to determine the result in advance. Regards, Wolfgang |
From: Per N. <per...@re...> - 2004-07-08 16:35:55
|
does anyone know why XPathQueryService.queryResource(String id, String query) is returning a ResourceSet? Would it not make more sense to return a XObject (org.xmldb.common.xml.queries.XObject) instead? i.e.change ResourceSet queryResource( String id, String query ) throws XMLDBException; to XObject queryResource( String id, String query ) throws XMLDBException; We are querying a single resource and are not expecting a result from any other resource and certainly not a set of resources. Returning an XObject makes it possible to handle xpaths that returns numbers such as count() in a cleaner way than wrapping the result in XML and turning it into a resource. Actually why not use the same logic for collection scope queries and change it from: ResourceSet query( String query ) throws XMLDBException; to XObject[] query( String query ) throws XMLDBException; ? Best regards, Per |
From: Per N. <per...@us...> - 2004-06-20 07:48:15
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16821/xmldb.org/xapi/src/api/org/xmldb/api Modified Files: DatabaseManager.java Log Message: removed println when registering database (requested by some Xindice project members) Index: DatabaseManager.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/DatabaseManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DatabaseManager.java 30 May 2004 11:54:44 -0000 1.1 +++ DatabaseManager.java 20 Jun 2004 07:48:05 -0000 1.2 @@ -105,7 +105,7 @@ * </code> instance is invalid. */ public static void registerDatabase (Database database) throws XMLDBException { - System.out.println( "trying to register database" ); + //System.out.println( "trying to register database" ); if ((database.getName() == null) || (database.getName().equals(""))) { throw new XMLDBException(ErrorCodes.INVALID_DATABASE); } |
From: Ronald B. <rpb...@rp...> - 2004-06-18 09:01:31
|
Per Nyfelt wrote: > > > 2. Make it possible to do Xpath queries directly on a Resource (and > > > possibly a Collection) without having to go through a XPathQueryService. > > > > What is the reason behind this? And why should the queries be limited to > > XPath? It would make more sense to support XQuery here. > The reasoning is that querying/navigating is such a fundamental thing to an > XML database that the usability would be "greatly improved" if it was > possible to query resources with XPath directly. > > For more info see the discussion on the eXist wiki at > http://wiki.exist-db.org:80/space/ImprovedJavaAPI OK. I understand this now. Some comments: 1) It is application-dependent whether it is useful to query individual documents or collections of documents. An example of a single document query is that I have a document representing a single chapter in a book and I want to find the third section of this chapter. An example of a multi-document query is that I want to find all contracts (documents) in which the plaintiff's lawyer is "Smith". The first query is most naturally done with a call like Resource.query(...). The second is most naturally done with a call like Query.execute(). So it does make sense to want to do queries directly on resources. 2) I see no reason that the query language should be XPath. XQuery is widely implemented and far more powerful than XPath, so it makes more sense to use XQuery queries than XPath queries. (Technically, XML:DB is supposed to be query language independent, which would mean that you would somehow have to indicate which language you were using -- XPath, XQuery, XML-QL, Joe's Special XML Query Language -- but I don't think it would be too bad to just support XQuery.) 3) I'm still not sure if this is a good idea from an architectural point of view. The problem is that XML:DB separates services from resources, and adding a query method to Resource blurs this line. Still it might be a very useful shortcut. > > 1) A very nice change would be to remove the the "centrality" of > > collections. For example, applications currently connect to collections > > and get services from collections. This makes about as much sense as > > connecting to tables or getting SQL statement objects from tables on a > > relational database. It would make a lot more sense to connect to a > > database, get a service from a connection, etc. While this change is > > backwards incompatible, it would greatly improve the API. > > I agree with this to some extent. I too find it awkward to get services from a > Collection instead of the Database. But some services are contextual in > nature such as the query services which apply from the collection where the > service was retrieved and down. This can be handled by associating a > collection with a service but it is not as nice as just getting it right from > the collection IMHO. Maybe we should make it possible to get some core > contextual services directly from a collection through named method calls > such as getXPathService() and move the general, loose typed way of getting > services to the Database class instead? This might take care of the need for > adding query methods to Resources and Collections... I agree that some services are contextual, but I don't think all services should be penalized for this. For example, an XPath service is contextual because one needs to know the context of the XPath query -- a single document, a collection of documents, an entire database. On the other hand, an XQuery service will have much less context, as the target of the query (collection or document) is specified in the query itself. Other services, such as administrative services, take the entire database as their context. To my mind, the cleanest service-based architecture is to connect to the database and get services from the database. If a service needs a particular context (a collection or a resource), then it can be explicitly associated with that context. On the other hand, it is awkward to keep associating context-based services with particular constructs. This is illustrated by the wish to add a query method to Resource. So perhaps the best thing to do is something like the following: 1) Abandon a purely service-based architecture. 2) Integrate particular services where they make the most sense. For example, add a query method to Collection and to Resource. Note that this requires us to commit to a particular query language. 3) Connect to databases, not collections, as connecting to collections is very artificial and unexpected. 4) Create a ServiceFactory interface and let Database, Collection, and Resource all extend it. This will allow some generality. > eXist has defined the following additional services besides XQueryService > mentioned above, which i think we should consider adopting in the API: > > UserManagementService - manages users and permissions I haven't looked at their service, but the idea is good. This is an example of a service that makes sense on the database. > DatabaseInstanceManager - makes it possible to shut down the database. Again, this makes sense on the database. Are there other things this service should do? > IndexQueryService - this one i do not think we should adopt at the moment as > index handling is probably very different between implementations. Agreed. > > 2) Given that JSR 225 (XML Query API for Java) is already in early draft > > release, does it make sense to continue working on the XML:DB API? I > > realize that XQJ is for Java only, but it seems that the marketing power > > of Sun, IBM, and Oracle will mean it is widely adopted. > > I do not know the details of JSR 225. Does it cover everything the XML:DB api > is aiming for? Would it be possible to make our api work together with JSR > 225 and/or vice versa? JSR 225 now has a public draft available, but I haven't had time to read it. The easiest way to think of it is instead of having JDBC and SQL, you have JSR 225 and XQuery. JSR 225 provides ways to connect to the database, execute queries, iterate through results, etc. My guess is that it should be possible to implement JSR 225 on top of XML:DB and vice versa, although they aren't an exact match. The only major difference I see (from looking at the table of contents of the JSR 225 spec) is that XML:DB connects to collections while JSR 225 connects to the database. Minor differences (from a mapping point of view) are things like: 1) JSR 225 has objects for XQuery items and sequences, while XML:DB supports ResourceSets and Resources. The JSR 225 structures are thus more general. 2) JSR 225 supports query preparation while XPathQueryService does not. -- Ron |
From: Per N. <per...@re...> - 2004-06-17 05:58:49
|
Hi Ronald, Thanks for your reply, please see my respons below: m=E5ndagen den 14 juni 2004 21.18 skrev Ronald Bourret: > Per Nyfelt wrote: > > I wonder if there are suggestions for what should be added or changed f= or > > the next release. The following suggestions comes from the eXist team: = 1. > > Add a XQueryService > > Good! :) > > > 2. Make it possible to do Xpath queries directly on a Resource (and > > possibly a Collection) without having to go through a XPathQueryService. > > What is the reason behind this? And why should the queries be limited to > XPath? It would make more sense to support XQuery here. The reasoning is that querying/navigating is such a fundamental thing to an= =20 XML database that the usability would be "greatly improved" if it was=20 possible to query resources with XPath directly.=20 =46or more info see the discussion on the eXist wiki at=20 http://wiki.exist-db.org:80/space/ImprovedJavaAPI > > > If there are other things that has been done to overcome deficiencies on > > the API, or good ideas about changes or additions that should be made > > please let me know so that these things could be added to the list. > > I have two comments, neither of which is likely to be popular :) > > 1) A very nice change would be to remove the the "centrality" of > collections. For example, applications currently connect to collections > and get services from collections. This makes about as much sense as > connecting to tables or getting SQL statement objects from tables on a > relational database. It would make a lot more sense to connect to a > database, get a service from a connection, etc. While this change is > backwards incompatible, it would greatly improve the API. I agree with this to some extent. I too find it awkward to get services fro= m a=20 Collection instead of the Database. But some services are contextual in=20 nature such as the query services which apply from the collection where the= =20 service was retrieved and down. This can be handled by associating a=20 collection with a service but it is not as nice as just getting it right fr= om=20 the collection IMHO. Maybe we should make it possible to get some core=20 contextual services directly from a collection through named method calls=20 such as getXPathService() and move the general, loose typed way of getting= =20 services to the Database class instead? This might take care of the need fo= r=20 adding query methods to Resources and Collections... eXist has defined the following additional services besides XQueryService=20 mentioned above, which i think we should consider adopting in the API: UserManagementService - manages users and permissions DatabaseInstanceManager - makes it possible to shut down the database. IndexQueryService - this one i do not think we should adopt at the moment a= s=20 index handling is probably very different between implementations. > > 2) Given that JSR 225 (XML Query API for Java) is already in early draft > release, does it make sense to continue working on the XML:DB API? I > realize that XQJ is for Java only, but it seems that the marketing power > of Sun, IBM, and Oracle will mean it is widely adopted. > > -- Ron I do not know the details of JSR 225. Does it cover everything the XML:DB a= pi=20 is aiming for? Would it be possible to make our api work together with JSR= =20 225 and/or vice versa? Best regards, Per |
From: Per N. <per...@us...> - 2004-06-12 20:41:32
|
Update of /cvsroot/xmldb-org/xapi/idl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32262/xmldb.org/xapi/idl Modified Files: Changes XMLResource.idl base.idl Added Files: Makefile XQueryService.idl Log Message: added XQueryService Index: base.idl =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/base.idl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- base.idl 30 May 2004 11:54:44 -0000 1.1 +++ base.idl 12 Jun 2004 20:41:24 -0000 1.2 @@ -166,6 +166,13 @@ Resource getMembersAsResource() raises (XMLDBException); long getSize() raises (XMLDBException); void clear() raises (XMLDBException); - } + }; + + interface CompiledExpression { + /** + * Prepare the expression for being reused. + */ + void reset(); + }; }; }; }; }; --- NEW FILE: Makefile --- SOURCES = `find . -name "*.idl"` BUILD = ../build/interfaces interfaces: rm -r $(BUILD) mkdir -p $(BUILD) #idlj -td $(BUILD) $(SOURCES) idlj -f server -td $(BUILD) base.idl idlj -f server -td $(BUILD) XMLResource.idl idlj -f server -td $(BUILD) BinaryResource.idl idlj -f server -td $(BUILD) CollectionManagementService.idl idlj -f server -td $(BUILD) XPathQueryService.idl idlj -f server -td $(BUILD) TransactionService.idl idlj -f server -td $(BUILD) XUpdateQueryService.idl idlj -f server -td $(BUILD) XQueryService.idl rm $(BUILD)/org/xmldb/api/base/*POA.java rm $(BUILD)/org/xmldb/api/base/*Helper.java rm $(BUILD)/org/xmldb/api/base/*Holder.java rm $(BUILD)/org/xmldb/api/modules/*POA.java --- NEW FILE: XQueryService.idl --- /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ #include "base.idl" module org { module xmldb { module api { module modules { interface XQueryService : base::Service { const string serviceName = "XQueryService"; const string version = "1.0"; /** * Sets a namespace mapping in the internal namespace map used to evaluate * queries. If <code>prefix</code> is null or empty the default namespace is * associated with the provided URI. A null or empty <code>uri</code> results * in an exception being thrown. * * @param prefix The prefix to set in the map. If * <code>prefix</code> is empty or null the * default namespace will be associated with the provided URI. * @param uri The URI for the namespace to be associated with prefix. * */ void setNamespace( in string prefix, in string uri ) raises (base::XMLDBException); /** * Returns the URI string associated with <code>prefix</code> from * the internal namespace map. If <code>prefix</code> is null or empty the * URI for the default namespace will be returned. If a mapping for the * <code>prefix</code> can not be found null is returned. * * @param prefix The prefix to retrieve from the namespace map. * @return The URI associated with <code>prefix</code> * @exception XMLDBException with expected error codes.<br /> * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor * specific errors that occur.<br /> */ string getNamespace( in string prefix ) raises (base::XMLDBException); /** * Removes the namespace mapping associated with <code>prefix</code> from * the internal namespace map. If <code>prefix</code> is null or empty the * mapping for the default namespace will be removed. * * @param prefix The prefix to remove from the namespace map. If * <code>prefix</code> is null or empty the mapping for the default * namespace will be removed. * @exception XMLDBException with expected error codes.<br /> * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor * specific errors that occur.<br /> */ void removeNamespace( in string prefix ) raises (base::XMLDBException); void clearNamespaces() raises (base::XMLDBException); base::ResourceSet query( in string query ) raises (base::XMLDBException); base::ResourceSet queryResource( in string id, in string query ) raises (base::XMLDBException); /** * Compiles the specified XQuery and returns a handle to the compiled * code, which can then be passed to {@link #execute(CompiledExpression)}. */ base::CompiledExpression compile(in string query) raises (base::XMLDBException); /** * Execute a compiled XQuery. * * The implementation should pass all namespaces and variables declared through * {@link XQueryService} to the compiled XQuery code. */ base::ResourceSet execute(in base::CompiledExpression expression) raises (base::XMLDBException); /** * Declare a global, external XQuery variable and assign a value to it. The variable * has the same status as a variable declare through the <code>declare variable</code> * statement in the XQuery prolog. * * The variable can be referenced inside the XQuery expression as * <code>$variable</code>. For example, if you declare a variable with * * <pre> * declareVariable("name", "HAMLET"); * </pre> * * you may use the variable in an XQuery expression as follows: * * <pre> * //SPEECH[SPEAKER=$name] * </pre> * * * @param qname a valid QName by which the variable is identified. Any * prefix should have been mapped to a namespace, using {@link #setNamespace(String, String)}. * For example, if a variable is called <b>x:name</b>, a prefix/namespace mapping should have * been defined for prefix <code>x</code> before calling this method. * * @param initialValue the initial value, which is assigned to the variable * */ void declareVariable(in string qname, in Object initialValue) raises (base::XMLDBException); /** * Enable or disable XPath 1.0 compatibility mode. In XPath 1.0 * compatibility mode, some XQuery expressions will behave different. * In particular, additional automatic type conversions will be applied * to the operands of numeric operators. * * @param backwardsCompatible */ void setXPathCompatibility(in boolean backwardsCompatible); void setModuleLoadPath(in string path); }; }; }; }; }; Index: XMLResource.idl =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/XMLResource.idl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XMLResource.idl 30 May 2004 11:54:44 -0000 1.1 +++ XMLResource.idl 12 Jun 2004 20:41:24 -0000 1.2 @@ -65,7 +65,7 @@ interface XMLResource : base::Resource { const string RESOURCE_TYPE = "XMLResource"; - string getDocumentId() raises (XMLDBException); + string getDocumentId() raises (base::XMLDBException); Node getContentAsDOM() raises (base::XMLDBException); void setContentAsDOM( in Node content) raises (base::XMLDBException); void getContentAsSAX( in ContentHandler handler ) raises (base::XMLDBException); Index: Changes =================================================================== RCS file: /cvsroot/xmldb-org/xapi/idl/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Changes 30 May 2004 11:54:44 -0000 1.1 +++ Changes 12 Jun 2004 20:41:24 -0000 1.2 @@ -51,4 +51,7 @@ Changed DatabaseManager.getProperty, setProperty and getDatabases to not throw exceptions. Added a resourceType parameter to Collection.createResource() +-- 2004-jun-12 +Added XQueryService and CompiledExpression + |
From: Per N. <per...@re...> - 2004-06-12 20:40:23
|
I wonder if there are suggestions for what should be added or changed for the next release. The following suggestions comes from the eXist team: 1. Add a XQueryService 2. Make it possible to do Xpath queries directly on a Resource (and possibly a Collection) without having to go through a XPathQueryService. I've added a XQueryService but I have not implemented it in the reference implementation. If anyone has time to give it a go please let me know. If there are other things that has been done to overcome deficiencies on the API, or good ideas about changes or additions that should be made please let me know so that these things could be added to the list. Best regards, Per |
From: Per N. <per...@us...> - 2004-06-12 20:39:26
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30008/xmldb.org/xapi/src/api/org/xmldb/api/modules Modified Files: BinaryResource.java CollectionManagementService.java TransactionService.java XMLResource.java XPathQueryService.java XUpdateQueryService.java Added Files: XQueryService.java Log Message: added XQueryService Index: BinaryResource.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/BinaryResource.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BinaryResource.java 30 May 2004 11:54:44 -0000 1.1 +++ BinaryResource.java 12 Jun 2004 20:39:17 -0000 1.2 @@ -4,7 +4,7 @@ * The XML:DB Initiative Software License, Version 1.0 * * - * Copyright (c) 2000-2003 The XML:DB Initiative. All rights + * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without Index: TransactionService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/TransactionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TransactionService.java 30 May 2004 11:54:44 -0000 1.1 +++ TransactionService.java 12 Jun 2004 20:39:17 -0000 1.2 @@ -4,7 +4,7 @@ * The XML:DB Initiative Software License, Version 1.0 * * - * Copyright (c) 2000-2003 The XML:DB Initiative. All rights + * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without Index: XPathQueryService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/XPathQueryService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XPathQueryService.java 30 May 2004 11:54:44 -0000 1.1 +++ XPathQueryService.java 12 Jun 2004 20:39:17 -0000 1.2 @@ -4,7 +4,7 @@ * The XML:DB Initiative Software License, Version 1.0 * * - * Copyright (c) 2000-2003 The XML:DB Initiative. All rights + * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without Index: XMLResource.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/XMLResource.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XMLResource.java 30 May 2004 11:54:44 -0000 1.1 +++ XMLResource.java 12 Jun 2004 20:39:17 -0000 1.2 @@ -4,7 +4,7 @@ * The XML:DB Initiative Software License, Version 1.0 * * - * Copyright (c) 2000-2003 The XML:DB Initiative. All rights + * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without Index: CollectionManagementService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/CollectionManagementService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CollectionManagementService.java 30 May 2004 11:54:44 -0000 1.1 +++ CollectionManagementService.java 12 Jun 2004 20:39:17 -0000 1.2 @@ -4,7 +4,7 @@ * The XML:DB Initiative Software License, Version 1.0 * * - * Copyright (c) 2000-2003 The XML:DB Initiative. All rights + * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without --- NEW FILE: XQueryService.java --- package org.xmldb.api.modules; /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ import org.xmldb.api.base.Service; import org.xmldb.api.base.XMLDBException; import org.xmldb.api.base.CompiledExpression; public interface XQueryService extends Service { /** * Sets a namespace mapping in the internal namespace map used to evaluate * queries. If <code>prefix</code> is null or empty the default namespace is * associated with the provided URI. A null or empty <code>uri</code> results * in an exception being thrown. * * @param prefix The prefix to set in the map. If * <code>prefix</code> is empty or null the * default namespace will be associated with the provided URI. * @param uri The URI for the namespace to be associated with prefix. * */ void setNamespace (String prefix, String uri) throws XMLDBException; /** * Returns the URI string associated with <code>prefix</code> from * the internal namespace map. If <code>prefix</code> is null or empty the * URI for the default namespace will be returned. If a mapping for the * <code>prefix</code> can not be found null is returned. * * @param prefix The prefix to retrieve from the namespace map. * @return The URI associated with <code>prefix</code> * @exception org.xmldb.api.base.XMLDBException with expected error codes.<br /> * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor * specific errors that occur.<br /> */ String getNamespace (String prefix) throws XMLDBException; /** * Removes the namespace mapping associated with <code>prefix</code> from * the internal namespace map. If <code>prefix</code> is null or empty the * mapping for the default namespace will be removed. * * @param prefix The prefix to remove from the namespace map. If * <code>prefix</code> is null or empty the mapping for the default * namespace will be removed. * @exception org.xmldb.api.base.XMLDBException with expected error codes.<br /> * <code>ErrorCodes.VENDOR_ERROR</code> for any vendor * specific errors that occur.<br /> */ void removeNamespace (String prefix) throws XMLDBException; void clearNamespaces () throws XMLDBException; org.xmldb.api.base.ResourceSet query (String query) throws XMLDBException; org.xmldb.api.base.ResourceSet queryResource (String id, String query) throws XMLDBException; /** * Compiles the specified XQuery and returns a handle to the compiled * code, which can then be passed to {@link #execute(org.xmldb.api.base.CompiledExpression)}. */ org.xmldb.api.base.CompiledExpression compile (String query) throws XMLDBException; /** * Execute a compiled XQuery. * * The implementation should pass all namespaces and variables declared through * {@link XQueryService} to the compiled XQuery code. */ org.xmldb.api.base.ResourceSet execute (CompiledExpression expression) throws XMLDBException; /** * Declare a global, external XQuery variable and assign a value to it. The variable * has the same status as a variable declare through the <code>declare variable</code> * statement in the XQuery prolog. * * The variable can be referenced inside the XQuery expression as * <code>$variable</code>. For example, if you declare a variable with * * <pre> * declareVariable("name", "HAMLET"); * </pre> * * you may use the variable in an XQuery expression as follows: * * <pre> * //SPEECH[SPEAKER=$name] * </pre> * * * @param qname a valid QName by which the variable is identified. Any * prefix should have been mapped to a namespace, using {@link #setNamespace(String, String)}. * For example, if a variable is called <b>x:name</b>, a prefix/namespace mapping should have * been defined for prefix <code>x</code> before calling this method. * * @param initialValue the initial value, which is assigned to the variable * */ void declareVariable (String qname, Object initialValue) throws XMLDBException; /** * Enable or disable XPath 1.0 compatibility mode. In XPath 1.0 * compatibility mode, some XQuery expressions will behave different. * In particular, additional automatic type conversions will be applied * to the operands of numeric operators. * * @param backwardsCompatible */ void setXPathCompatibility (boolean backwardsCompatible); void setModuleLoadPath (String path); } Index: XUpdateQueryService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/XUpdateQueryService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XUpdateQueryService.java 30 May 2004 11:54:44 -0000 1.1 +++ XUpdateQueryService.java 12 Jun 2004 20:39:17 -0000 1.2 @@ -4,7 +4,7 @@ * The XML:DB Initiative Software License, Version 1.0 * * - * Copyright (c) 2000-2003 The XML:DB Initiative. All rights + * Copyright (c) 2000-2004 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without |
From: Per N. <per...@us...> - 2004-06-12 20:39:25
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30008/xmldb.org/xapi/src/api/org/xmldb/api/base Added Files: CompiledExpression.java Log Message: added XQueryService --- NEW FILE: CompiledExpression.java --- package org.xmldb.api.base; /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2003 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ public interface CompiledExpression { /** * Prepare the expression for being reused. */ void reset (); } |
From: Per N. <per...@us...> - 2004-06-08 20:18:00
|
Update of /cvsroot/xmldb-org/xapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10355/xapi Modified Files: xapi.iml Log Message: using build and dist dir for output makes is easier to discriminate generated files and real source files Index: xapi.iml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/xapi.iml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xapi.iml 8 Jun 2004 20:10:31 -0000 1.2 +++ xapi.iml 8 Jun 2004 20:17:16 -0000 1.3 @@ -1,33 +1,33 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module version="4" relativePaths="false"> - <component name="ModuleRootManager" /> - <component name="NewModuleRootManager"> - <output url="file://$MODULE_DIR$/classes" /> - <exclude-output /> - <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src/api" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/src/common" isTestSource="false" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/src/lib/xtdash.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$MODULE_DIR$/src/lib/omquery.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - </component> -</module> - +<?xml version="1.0" encoding="UTF-8"?> +<module version="4" relativePaths="false"> + <component name="ModuleRootManager" /> + <component name="NewModuleRootManager"> + <output url="file://$MODULE_DIR$/classes" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/api" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/common" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/xtdash.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/omquery.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> + |