Merge lp:~zorba-coders/zorba/fread-pdf-trunk into lp:zorba

Proposed by Cezar Andrei
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/fread-pdf-trunk
Merge into: lp:zorba
Diff against target: 180 lines (+42/-13)
7 files modified
ChangeLog (+2/-1)
cmake_modules/ZorbaModule.cmake (+26/-1)
include/zorba/item_factory.h (+7/-7)
modules/ExternalModules.conf (+2/-1)
src/store/naive/atomic_items.h (+2/-2)
test/rbkt/modules/CMakeLists.txt (+2/-1)
test/rbkt/modules/ext2_config.txt.in (+1/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/fread-pdf-trunk
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Cezar Andrei Approve
Juan Zacarias Pending
Review via email: mp+126743@code.launchpad.net

This proposal supersedes a proposal from 2012-09-26.

This proposal has been superseded by a proposal from 2012-09-27.

Commit message

Add read-pdf module for getting text and rendered images from pdf documents.
Make doc comments for createBaser64Binary more explicit on what parameters they expect and what they do.
Change, return value to xs_int for getIntValue() method.

Description of the change

Add read-pdf module for getting text and rendered images from pdf documents.
Make doc comments for createBaser64Binary more explicit on what parameters they expect and what they do.
Change, return value to xs_int for getIntValue() method.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

You changed the URIs of the test modules back to www.zorba-xquery.com, instead of zorba-tests.28msec.us. That will cause test failures. Make sure you've merged from the trunk recently.

review: Needs Fixing
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

(Other than that the changes look fine)

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

It's up to date now.

review: Approve
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

You still haven't corrected the URIs of the test modules, though (test/rbkt/modules/CMakeLists.txt).

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

Let me add the new module.

review: Needs Fixing
Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

The ref to the new module is in, please review it too: lp:zorba/read-pdf-module at
https://code.launchpad.net/~zorba-coders/zorba/fread-pdf-the-module .

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

Back to zorba-tests.28msec.us in test/rbkt/modules/CMakeLists.txt and mention in Changelog.

Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

Great, thanks.

review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

It looks nice (without being able to testing it ;-)

- The module should follow XQuery coding conventions. For example, no camel-case
but function and variable names using dashes.

- The read-pdf:renderToImages-internal function is not documented. This will probably cause
the xqdoc test to fail.

- There is a conflict in the ChangeLog.

- The schema contains some commented out code => remove?

- The declaration of the $options variable for the -internal functions should not allow for
an optional occurrence indicator.

review: Needs Fixing
Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

I fixed all the comments with the exception of the optional occurrence indicator for internal functions. I tested it with empty sequence and works fine.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job fread-pdf-trunk-2012-09-20T03-03-43.261Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 2 Needs Fixing.

Revision history for this message
Paul J. Lucas (paul-lucas) wrote : Posted in a previous version of this proposal

It doesn't look like the fpdf.* files were added via "bzr add" -- were they supposed to be?

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

Paul,

If you're asking about my last commit msg, it is as it should be just one line change, by deleting the tag name, it makes trunk use the latest HEAD version of the module branch. The files in util-jvm were already reviewed and merged see this merge: https://code.launchpad.net/~zorba-coders/zorba/fread-pdf-utiljvm-module/+merge/125332 .

The changes in file: modules/ExternalModules.conf'

117 --- modules/ExternalModules.conf 2012-09-17 00:36:37 +0000
118 +++ modules/ExternalModules.conf 2012-09-21 15:25:26 +0000
119 @@ -39,11 +39,12 @@
123 +read-pdf bzr lp:zorba/read-pdf-module
128 -util-jvm bzr lp:zorba/util-jvm-module zorba-2.6
129 +util-jvm bzr lp:zorba/util-jvm-module

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

The module works pretty decent. I was able to extract text or generate images for several pdfs without any problems.
There are some minor things that should be discussed and/or fixed:

- the error seems to be too general, essentially it always raises JAVA-EXCEPTION no matter what goes wrong (e.g. it the given input is not a valid pdf)

- the java stack trace seems to be sent to standard error

- Renders the each page of the PDF document as an image. => Renders each page of the PDF document as an image.

- the names of the private functions should also adhere to the code conventions renderToImages => render-to-images

- make xqdoc failes because the comments seem to contain invalid xml
</home/mbrantner/zorba/build/URI_PATH/com/zorba-xquery/www/modules/project_xqdoc.xq>:142,9: user-defined error [err:UE004]: Error processing module zerr:ZXQD0002 - " This module provides funtionality to read the text from PDF documents and
 to render PDF documents to images.
 <a href="http://pdfbox.apache.org">Apache PDFBox</a> library is used to
 implement these functions.
 <br />
 <br />
 <b>Note:</b> Since this module has a Java library dependency a JVM required
 to be installed on the system. For Windows: jvm.dll is required on the system
 path ( usually located in "C:\Program Files\Java\jre6\bin\client".
 <b>Note:<b> For Debian based Linux distributions install PdfBox and FontBox
 packages: sudo apt-get install libpdfbox-java libfontbox-java
": can not parse as XML for xqdoc: loader parsing error: Opening and ending tag mismatch: b line 0 and root
; raised at /home/mbrantner/zorba/sandbox/src/runtime/errors_and_diagnostics/errors_and_diagnostics_impl.cpp:81

- adapt the year in "Copyright 2006-2009 The FLWOR Foundation." in the .xq file (and some other files also)

- would it make sense to return one string per page in the pdf instead of one big string?

- remove commented out code in read-pdf.cpp

- valgrind shows tons of invalid writes. Why? Are they critical? Is there anything we can do?

- would it make sense to return the images in a streaming fashion (i.e. don't create all base64's in a vector)?

- encoding each image shouldn't be necessary and will probably we wasted effort because the images might be written to a file in their binary form

review: Needs Fixing
Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

See answers inline:
- the error seems to be too general, essentially it always raises JAVA-EXCEPTION no matter what goes wrong (e.g. it the given input is not a valid pdf)
I adapted the error msg to be more clear/specific.

- the java stack trace seems to be sent to standard error
Goes to std err.

- Renders the each page of the PDF document as an image. => Renders each page of the PDF document as an image.
Done.

- the names of the private functions should also adhere to the code conventions renderToImages => render-to-images
Done.

- make xqdoc failes because the comments seem to contain invalid xml
</home/mbrantner/zorba/build/URI_PATH/com/zorba-xquery/www/modules/project_xqdoc.xq>:142,9: user-defined error [err:UE004]: Error processing module zerr:ZXQD0002 - " This module provides funtionality to read the text from PDF documents and
 to render PDF documents to images.
 <a href="http://pdfbox.apache.org">Apache PDFBox</a> library is used to
 implement these functions.
 <br />
 <br />
 <b>Note:</b> Since this module has a Java library dependency a JVM required
 to be installed on the system. For Windows: jvm.dll is required on the system
 path ( usually located in "C:\Program Files\Java\jre6\bin\client".
 <b>Note:<b> For Debian based Linux distributions install PdfBox and FontBox
 packages: sudo apt-get install libpdfbox-java libfontbox-java
": can not parse as XML for xqdoc: loader parsing error: Opening and ending tag mismatch: b line 0 and root
; raised at /home/mbrantner/zorba/sandbox/src/runtime/errors_and_diagnostics/errors_and_diagnostics_impl.cpp:81
Done.

- adapt the year in "Copyright 2006-2009 The FLWOR Foundation." in the .xq file (and some other files also)
Done.

- would it make sense to return one string per page in the pdf instead of one big string?
The API doesn't alow it, but I added two more optional options, to insert a user defined string at the start and end of each page.

- remove commented out code in read-pdf.cpp
Done.

- valgrind shows tons of invalid writes. Why? Are they critical? Is there anything we can do?
Jvm always shows in valgrind, even if nothing is done with it. I was careful to remove any allocated memory.

- would it make sense to return the images in a streaming fashion (i.e. don't create all base64's in a vector)?
No, because it's a push write of all images. And as discussed, optimize only a copy in some cases isn't worth the effort.

- encoding each image shouldn't be necessary and will probably we wasted effort because the images might be written to a file in their binary form
Done.

Revision history for this message
Cezar Andrei (cezar-andrei) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job fread-pdf-trunk-2012-09-22T21-29-56.025Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 2 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job fread-pdf-trunk-2012-09-25T20-57-55.26Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 2 Approve, 1 Pending.

Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

Cezar - The remote queue is still not finding the jars, although they are installed correctly in /usr/share/java as requested. (This is also probably why the experimental build isn't including the module.) The problem, I believe, is that you are using FIND_FILE() to find them, and you only list a few specific version numbers to find - I installed 1.7.1 from the URL you sent, but that isn't one of the versions listed in CMakeLists.txt in the read-pdf module.

The correct solution is to use ZORBA_FIND_JAR(), which will look for .jar files with any embedded version number. See src/com/zorba-xquery/www/modules/CMakeLists.txt in the data-formatting module for an example. If you make that change in the module, this merge proposal should succeed.

Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

I have re-assigned my review request to Juan, since I will not be around much longer to vote on this proposal.

Juan, all you need to review is the CMake stuff in the lp:zorba/read-pdf-module branch, specifically to ensure that it uses FIND_ZORBA_JAR() appropriately. Once Cezar makes that change, you can vote Approve on this proposal.

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

I've modified read-pdf's CMakeLists.txt to use ZORBA_FIND_JAR instead of FIND_FILE.

review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~zorba-coders/zorba/fread-pdf-trunk into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job fread-pdf-trunk-2012-09-25T23-51-47.915Z is finished.
  The final status was:

  No tests were run - build or configure step must have failed.

  Not commiting changes.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

The read-pdf module was found and built with this latest RQ run.

However, it has no tests. I personally don't think that's acceptable, even for a beta release.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~zorba-coders/zorba/fread-pdf-trunk into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job fread-pdf-trunk-2012-09-26T04-11-47.786Z is finished.
  The final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

Error message from failed test:

</home/ceej/zo/testing/zorbatest/tester/remotequeue/fread-pdf-trunk-2012-09-26T04-11-47.786Z/bzr/zorba/build/URI_PATH/com/zorba-xquery/www/modules/read-pdf_0.xq>:127,18: Zorba error [zerr:ZXQP0008]: "{http://www.zorba-xquery.com/modules/read-pdf}extract-text-internal#2": function implementation not found

Remember that the RQ runs in release mode.

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

I added texts for all functions.

review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog

Revision history for this message
Cezar Andrei (cezar-andrei) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~zorba-coders/zorba/fread-pdf-trunk into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job fread-pdf-trunk-2012-09-26T23-05-52.544Z is finished.
  The final status was:

  13 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~zorba-coders/zorba/fread-pdf-trunk into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job fread-pdf-trunk-2012-09-27T01-51-44.419Z is finished.
  The final status was:

  7 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

It's strange that a few tests where failing because pdfbox was trying to use lob4j. The website clearly says it depends on commons-logging which can use log4j if available but fall down to java's default logging api.

I added explicit checks for jempbox and commons-lib to read-pdf module. And also added them to classpath.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog

Revision history for this message
Cezar Andrei (cezar-andrei) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/fread-pdf-trunk into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job fread-pdf-trunk-2012-09-27T19-32-56.467Z is finished.
  The final status was:

  7 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

Fixed fonts on build box and changed tests to be machine independent.

review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in modules/ExternalModules.conf

10957. By Cezar Andrei <email address hidden>

Merge from trunk. Resolved conflict in ExternalModules.conf.

10958. By Cezar Andrei <email address hidden>

Add tag to read-pdf module.

10959. By Cezar Andrei <email address hidden>

Merge from trunk, resolve Changelog conflict.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2012-09-27 10:33:31 +0000
+++ ChangeLog 2012-09-27 17:07:28 +0000
@@ -17,10 +17,11 @@
17 * Implemented semantics of null for comparison and arithmetics operations.17 * Implemented semantics of null for comparison and arithmetics operations.
18 * Positional pagination support for index probes 18 * Positional pagination support for index probes
19 * Recognize the no-copy pragma to avoid copying nodes before insertion into a collection.19 * Recognize the no-copy pragma to avoid copying nodes before insertion into a collection.
20 * Added createUntypedAtomic to API's ItemFactory.20 * Added createUntypedAtomic to API's ItemFactory.
21 * new xqDoc feature; reporting collections and indexes21 * new xqDoc feature; reporting collections and indexes
22 * new xqDoc function parameter to enable/disable xqDoc generation of22 * new xqDoc function parameter to enable/disable xqDoc generation of
23 certain components23 certain components
24 * Adding new external module read-pdf, it converts PDF documents to text or rendered images.
2425
25Optimizations:26Optimizations:
26 * New memory management for compiler expressions (no more ref counting)27 * New memory management for compiler expressions (no more ref counting)
2728
=== modified file 'cmake_modules/ZorbaModule.cmake'
--- cmake_modules/ZorbaModule.cmake 2012-09-17 00:36:37 +0000
+++ cmake_modules/ZorbaModule.cmake 2012-09-27 17:07:28 +0000
@@ -114,9 +114,20 @@
114# relative to CMAKE_CURRENT_SOURCE_DIR)114# relative to CMAKE_CURRENT_SOURCE_DIR)
115# LINK_LIBRARIES - (optional) List of libraries to link external115# LINK_LIBRARIES - (optional) List of libraries to link external
116# function library against116# function library against
117# CONFIG_FILES - (optional) List of files to configure with package
118# information; see below
117# TEST_ONLY - (optional) Module is for testcases only and should not119# TEST_ONLY - (optional) Module is for testcases only and should not
118# be installed120# be installed
119#121#
122# CONFIG_FILES - any files specific here will be copied to
123# CMAKE_CURRENT_BINARY_DIR using CONFIGURE_FILE(). They may contain
124# the following @VARIABLES@ which will be substituted:
125# ZORBA_MODULE_RELATIVE_DIR - directory portion of mangled URI
126# ZORBA_MODULE_LIBFILE_WE - filename (without extension) portion of
127# mangled URI
128# The input files should have a .in extension. The resulting file in
129# the build directory will have the .in removed.
130#
120# QQQ this currently doesn't support modules with multiple component131# QQQ this currently doesn't support modules with multiple component
121# .xq files. (Neither does Zorba's automatic loading mechanism, so132# .xq files. (Neither does Zorba's automatic loading mechanism, so
122# this probably isn't a huge deal, but worth thinking about.)133# this probably isn't a huge deal, but worth thinking about.)
@@ -125,7 +136,7 @@
125# file enough to deduce the URI and version?136# file enough to deduce the URI and version?
126MACRO (DECLARE_ZORBA_MODULE)137MACRO (DECLARE_ZORBA_MODULE)
127 # Parse and validate arguments138 # Parse and validate arguments
128 PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES"139 PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES"
129 "URI;FILE;VERSION" "TEST_ONLY" ${ARGN})140 "URI;FILE;VERSION" "TEST_ONLY" ${ARGN})
130 IF (NOT MODULE_FILE)141 IF (NOT MODULE_FILE)
131 MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_MODULE()")142 MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_MODULE()")
@@ -353,6 +364,20 @@
353 "${version_infix}" "" 1 "${MODULE_TEST_ONLY}")364 "${version_infix}" "" 1 "${MODULE_TEST_ONLY}")
354 ENDFOREACH (version_infix)365 ENDFOREACH (version_infix)
355366
367 # Configure any module-specified config files.
368 SET (ZORBA_MODULE_RELATIVE_DIR ${module_path})
369 SET (ZORBA_MODULE_LIBFILE_WE ${module_filewe})
370 FOREACH (_config_file ${MODULE_CONFIG_FILES})
371 # Strip off .in - can't use GET_FILENAME_COMPONENT as it always removes
372 # the longest possible extension
373 STRING (REGEX REPLACE "\\.in$" "" _config_filename_we "${_config_file}")
374 IF (NOT IS_ABSOLUTE "${_config_file}")
375 SET (_config_file "${CMAKE_CURRENT_SOURCE_DIR}/${_config_file}")
376 ENDIF (NOT IS_ABSOLUTE "${_config_file}")
377 CONFIGURE_FILE (${_config_file}
378 "${CMAKE_CURRENT_BINARY_DIR}/${_config_filename_we}" @ONLY)
379 ENDFOREACH (_config_file)
380
356 # Last but not least, whip up a test case that ensures the module381 # Last but not least, whip up a test case that ensures the module
357 # can at least be compiled. Don't bother for test-only modules382 # can at least be compiled. Don't bother for test-only modules
358 # (presumably they're there to be tested!).383 # (presumably they're there to be tested!).
359384
=== modified file 'include/zorba/item_factory.h'
--- include/zorba/item_factory.h 2012-09-26 17:09:11 +0000
+++ include/zorba/item_factory.h 2012-09-27 17:07:28 +0000
@@ -123,8 +123,8 @@
123 /** \brief Creates a Base64Binary Item123 /** \brief Creates a Base64Binary Item
124 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]124 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
125 *125 *
126 * @param aBinData a pointer to the base6c4 binary data.126 * @param aBinData a pointer to the base64 encoded data. The data is copied from aBinData.
127 * @param aLength the length of the base64 binary data.127 * @param aLength the length of the base64 encoded data.
128 * @return The Base64Binary Item.128 * @return The Base64Binary Item.
129 */129 */
130 virtual Item130 virtual Item
@@ -133,7 +133,7 @@
133 /** \brief Creates a Base64Binary Item133 /** \brief Creates a Base64Binary Item
134 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]134 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
135 *135 *
136 * @param aStream A stream containing the Base64 encoded data.136 * @param aStream A stream containing the Base64 encoded data. The data is copied from aStream imediately.
137 * @return the Base64Binary Item.137 * @return the Base64Binary Item.
138 */138 */
139 virtual Item139 virtual Item
@@ -142,11 +142,11 @@
142 /** \brief Creates a Base64Binary Item142 /** \brief Creates a Base64Binary Item
143 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]143 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
144 *144 *
145 * @param aBinData the data in binary form. The data is copied from aBinData.145 * @param aBinData the data in binary form (not encoded). The data is copied from aBinData.
146 * @param aLength the length of the data146 * @param aLength the length of the binary data
147 * @return the Base64Binary Item.147 * @return the Base64Binary Item.
148 */148 */
149 virtual Item 149 virtual Item
150 createBase64Binary(const unsigned char* aBinData, size_t aLength) = 0;150 createBase64Binary(const unsigned char* aBinData, size_t aLength) = 0;
151151
152 /** \brief Creates a streamable Base64Binary Item152 /** \brief Creates a streamable Base64Binary Item
@@ -742,7 +742,7 @@
742 * @param aNames A vector containing the name and value of each pair.742 * @param aNames A vector containing the name and value of each pair.
743 */743 */
744 virtual Item createJSONObject(std::vector<std::pair<Item, Item> >& aNames) = 0;744 virtual Item createJSONObject(std::vector<std::pair<Item, Item> >& aNames) = 0;
745 745
746 /**746 /**
747 * Create a JSON Array containing the specified items.747 * Create a JSON Array containing the specified items.
748 *748 *
749749
=== modified file 'modules/ExternalModules.conf'
--- modules/ExternalModules.conf 2012-09-17 00:36:37 +0000
+++ modules/ExternalModules.conf 2012-09-27 17:07:28 +0000
@@ -39,11 +39,12 @@
39languages bzr lp:zorba/languages-module zorba-2.639languages bzr lp:zorba/languages-module zorba-2.6
40oauth bzr lp:zorba/oauth-module zorba-2.640oauth bzr lp:zorba/oauth-module zorba-2.6
41process bzr lp:zorba/process-module zorba-2.641process bzr lp:zorba/process-module zorba-2.6
42read-pdf bzr lp:zorba/read-pdf-module
42security bzr lp:zorba/security-module zorba-2.643security bzr lp:zorba/security-module zorba-2.6
43system bzr lp:zorba/system-module zorba-2.644system bzr lp:zorba/system-module zorba-2.6
44xqxq bzr lp:zorba/xqxq-module zorba-2.645xqxq bzr lp:zorba/xqxq-module zorba-2.6
45email bzr lp:zorba/email-module zorba-2.646email bzr lp:zorba/email-module zorba-2.6
46util-jvm bzr lp:zorba/util-jvm-module zorba-2.647util-jvm bzr lp:zorba/util-jvm-module
47schema-tools bzr lp:zorba/schema-tools-module zorba-2.648schema-tools bzr lp:zorba/schema-tools-module zorba-2.6
48stack bzr lp:zorba/stack-module zorba-2.649stack bzr lp:zorba/stack-module zorba-2.6
49queue bzr lp:zorba/queue-module zorba-2.650queue bzr lp:zorba/queue-module zorba-2.6
5051
=== modified file 'src/store/naive/atomic_items.h'
--- src/store/naive/atomic_items.h 2012-09-17 00:36:37 +0000
+++ src/store/naive/atomic_items.h 2012-09-27 17:07:28 +0000
@@ -1776,7 +1776,7 @@
1776 friend class AtomicItem;1776 friend class AtomicItem;
17771777
1778protected:1778protected:
1779 int32_t theValue;1779 xs_int theValue;
17801780
1781protected:1781protected:
1782 IntItem(xs_int aValue) : theValue(aValue) {}1782 IntItem(xs_int aValue) : theValue(aValue) {}
@@ -1792,7 +1792,7 @@
17921792
1793 xs_long getLongValue() const { return static_cast<xs_long>(theValue); }1793 xs_long getLongValue() const { return static_cast<xs_long>(theValue); }
17941794
1795 int32_t getIntValue() const { return theValue; }1795 xs_int getIntValue() const { return theValue; }
17961796
1797 store::SchemaTypeCode getTypeCode() const { return store::XS_INT; }1797 store::SchemaTypeCode getTypeCode() const { return store::XS_INT; }
17981798
17991799
=== modified file 'test/rbkt/modules/CMakeLists.txt'
--- test/rbkt/modules/CMakeLists.txt 2012-09-17 00:36:37 +0000
+++ test/rbkt/modules/CMakeLists.txt 2012-09-27 17:07:28 +0000
@@ -27,8 +27,9 @@
27DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/B" VERSION 1.027DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/B" VERSION 1.0
28 FILE "${CMAKE_CURRENT_SOURCE_DIR}/module-B.xq" TEST_ONLY)28 FILE "${CMAKE_CURRENT_SOURCE_DIR}/module-B.xq" TEST_ONLY)
2929
30# This one also has a CONFIG_FILE
30DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext"31DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext"
31 VERSION 2.0 FILE "ext2.xq" TEST_ONLY)32 VERSION 2.0 FILE "ext2.xq" TEST_ONLY CONFIG_FILES ext2_config.txt.in)
32DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext"33DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext"
33 VERSION 1.0 FILE "ext.xq" TEST_ONLY)34 VERSION 1.0 FILE "ext.xq" TEST_ONLY)
3435
3536
=== added file 'test/rbkt/modules/ext2_config.txt.in'
--- test/rbkt/modules/ext2_config.txt.in 1970-01-01 00:00:00 +0000
+++ test/rbkt/modules/ext2_config.txt.in 2012-09-27 17:07:28 +0000
@@ -0,0 +1,1 @@
1This is a test: "@ZORBA_MODULE_RELATIVE_DIR@" "@ZORBA_MODULE_LIBFILE_WE@"

Subscribers

People subscribed via source and target branches