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

Proposed by Cezar Andrei
Status: Merged
Approved by: Cezar Andrei
Approved revision: 10959
Merged at revision: 11081
Proposed branch: lp:~zorba-coders/zorba/fread-pdf-trunk
Merge into: lp:zorba
Diff against target: 182 lines (+41/-12)
7 files modified
ChangeLog (+1/-1)
cmake_modules/ZorbaModule.cmake (+26/-1)
include/zorba/item_factory.h (+7/-7)
modules/ExternalModules.conf (+2/-0)
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
Juan Zacarias Approve
Matthias Brantner Approve
Cezar Andrei Approve
Review via email: mp+126824@code.launchpad.net

This proposal supersedes 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) : 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-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 : Posted in a previous version of this proposal

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

review: Approve
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

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

text conflict in modules/ExternalModules.conf

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

Merged and solved conflict.

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 modules/ExternalModules.conf

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

Merged and solved conflict.

review: Approve
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
Cezar Andrei (cezar-andrei) wrote :

Now with tag for read-pdf.

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

Validation queue job fread-pdf-trunk-2012-09-27T23-13-49.404Z 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
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Juan Zacarias (juan457) :
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 ChangeLog

10959. By Cezar Andrei <email address hidden>

Merge from trunk, resolve Changelog conflict.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job fread-pdf-trunk-2012-10-02T15-03-54.622Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-10-02 12:30:32 +0000
3+++ ChangeLog 2012-10-02 15:00:43 +0000
4@@ -22,6 +22,7 @@
5 * new xqDoc feature; reporting collections and indexes
6 * new xqDoc function parameter to enable/disable xqDoc generation of certain
7 components
8+ * Adding new external module read-pdf, it converts PDF documents to text or rendered images.
9
10 Optimizations:
11 * Improved memory management for compiler expressions (no more ref counting)
12@@ -134,7 +135,6 @@
13 * The XML plan serialization format is not supported anymore
14
15
16->>>>>>> MERGE-SOURCE
17 version 2.5
18
19 New Features:
20
21=== modified file 'cmake_modules/ZorbaModule.cmake'
22--- cmake_modules/ZorbaModule.cmake 2012-09-17 00:36:37 +0000
23+++ cmake_modules/ZorbaModule.cmake 2012-10-02 15:00:43 +0000
24@@ -114,9 +114,20 @@
25 # relative to CMAKE_CURRENT_SOURCE_DIR)
26 # LINK_LIBRARIES - (optional) List of libraries to link external
27 # function library against
28+# CONFIG_FILES - (optional) List of files to configure with package
29+# information; see below
30 # TEST_ONLY - (optional) Module is for testcases only and should not
31 # be installed
32 #
33+# CONFIG_FILES - any files specific here will be copied to
34+# CMAKE_CURRENT_BINARY_DIR using CONFIGURE_FILE(). They may contain
35+# the following @VARIABLES@ which will be substituted:
36+# ZORBA_MODULE_RELATIVE_DIR - directory portion of mangled URI
37+# ZORBA_MODULE_LIBFILE_WE - filename (without extension) portion of
38+# mangled URI
39+# The input files should have a .in extension. The resulting file in
40+# the build directory will have the .in removed.
41+#
42 # QQQ this currently doesn't support modules with multiple component
43 # .xq files. (Neither does Zorba's automatic loading mechanism, so
44 # this probably isn't a huge deal, but worth thinking about.)
45@@ -125,7 +136,7 @@
46 # file enough to deduce the URI and version?
47 MACRO (DECLARE_ZORBA_MODULE)
48 # Parse and validate arguments
49- PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES"
50+ PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES"
51 "URI;FILE;VERSION" "TEST_ONLY" ${ARGN})
52 IF (NOT MODULE_FILE)
53 MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_MODULE()")
54@@ -353,6 +364,20 @@
55 "${version_infix}" "" 1 "${MODULE_TEST_ONLY}")
56 ENDFOREACH (version_infix)
57
58+ # Configure any module-specified config files.
59+ SET (ZORBA_MODULE_RELATIVE_DIR ${module_path})
60+ SET (ZORBA_MODULE_LIBFILE_WE ${module_filewe})
61+ FOREACH (_config_file ${MODULE_CONFIG_FILES})
62+ # Strip off .in - can't use GET_FILENAME_COMPONENT as it always removes
63+ # the longest possible extension
64+ STRING (REGEX REPLACE "\\.in$" "" _config_filename_we "${_config_file}")
65+ IF (NOT IS_ABSOLUTE "${_config_file}")
66+ SET (_config_file "${CMAKE_CURRENT_SOURCE_DIR}/${_config_file}")
67+ ENDIF (NOT IS_ABSOLUTE "${_config_file}")
68+ CONFIGURE_FILE (${_config_file}
69+ "${CMAKE_CURRENT_BINARY_DIR}/${_config_filename_we}" @ONLY)
70+ ENDFOREACH (_config_file)
71+
72 # Last but not least, whip up a test case that ensures the module
73 # can at least be compiled. Don't bother for test-only modules
74 # (presumably they're there to be tested!).
75
76=== modified file 'include/zorba/item_factory.h'
77--- include/zorba/item_factory.h 2012-09-26 17:09:11 +0000
78+++ include/zorba/item_factory.h 2012-10-02 15:00:43 +0000
79@@ -123,8 +123,8 @@
80 /** \brief Creates a Base64Binary Item
81 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
82 *
83- * @param aBinData a pointer to the base6c4 binary data.
84- * @param aLength the length of the base64 binary data.
85+ * @param aBinData a pointer to the base64 encoded data. The data is copied from aBinData.
86+ * @param aLength the length of the base64 encoded data.
87 * @return The Base64Binary Item.
88 */
89 virtual Item
90@@ -133,7 +133,7 @@
91 /** \brief Creates a Base64Binary Item
92 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
93 *
94- * @param aStream A stream containing the Base64 encoded data.
95+ * @param aStream A stream containing the Base64 encoded data. The data is copied from aStream imediately.
96 * @return the Base64Binary Item.
97 */
98 virtual Item
99@@ -142,11 +142,11 @@
100 /** \brief Creates a Base64Binary Item
101 * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
102 *
103- * @param aBinData the data in binary form. The data is copied from aBinData.
104- * @param aLength the length of the data
105+ * @param aBinData the data in binary form (not encoded). The data is copied from aBinData.
106+ * @param aLength the length of the binary data
107 * @return the Base64Binary Item.
108 */
109- virtual Item
110+ virtual Item
111 createBase64Binary(const unsigned char* aBinData, size_t aLength) = 0;
112
113 /** \brief Creates a streamable Base64Binary Item
114@@ -742,7 +742,7 @@
115 * @param aNames A vector containing the name and value of each pair.
116 */
117 virtual Item createJSONObject(std::vector<std::pair<Item, Item> >& aNames) = 0;
118-
119+
120 /**
121 * Create a JSON Array containing the specified items.
122 *
123
124=== modified file 'modules/ExternalModules.conf'
125--- modules/ExternalModules.conf 2012-09-26 04:47:44 +0000
126+++ modules/ExternalModules.conf 2012-10-02 15:00:43 +0000
127@@ -39,6 +39,7 @@
128 languages bzr lp:zorba/languages-module zorba-2.7
129 oauth bzr lp:zorba/oauth-module zorba-2.7
130 process bzr lp:zorba/process-module zorba-2.7
131+read-pdf bzr lp:zorba/read-pdf-module zorba-2.7
132 security bzr lp:zorba/security-module zorba-2.7
133 system bzr lp:zorba/system-module zorba-2.7
134 xqxq bzr lp:zorba/xqxq-module zorba-2.7
135@@ -47,3 +48,4 @@
136 schema-tools bzr lp:zorba/schema-tools-module zorba-2.7
137 stack bzr lp:zorba/stack-module zorba-2.7
138 queue bzr lp:zorba/queue-module zorba-2.7
139+
140
141=== modified file 'src/store/naive/atomic_items.h'
142--- src/store/naive/atomic_items.h 2012-09-17 00:36:37 +0000
143+++ src/store/naive/atomic_items.h 2012-10-02 15:00:43 +0000
144@@ -1776,7 +1776,7 @@
145 friend class AtomicItem;
146
147 protected:
148- int32_t theValue;
149+ xs_int theValue;
150
151 protected:
152 IntItem(xs_int aValue) : theValue(aValue) {}
153@@ -1792,7 +1792,7 @@
154
155 xs_long getLongValue() const { return static_cast<xs_long>(theValue); }
156
157- int32_t getIntValue() const { return theValue; }
158+ xs_int getIntValue() const { return theValue; }
159
160 store::SchemaTypeCode getTypeCode() const { return store::XS_INT; }
161
162
163=== modified file 'test/rbkt/modules/CMakeLists.txt'
164--- test/rbkt/modules/CMakeLists.txt 2012-09-17 00:36:37 +0000
165+++ test/rbkt/modules/CMakeLists.txt 2012-10-02 15:00:43 +0000
166@@ -27,8 +27,9 @@
167 DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/B" VERSION 1.0
168 FILE "${CMAKE_CURRENT_SOURCE_DIR}/module-B.xq" TEST_ONLY)
169
170+# This one also has a CONFIG_FILE
171 DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext"
172- VERSION 2.0 FILE "ext2.xq" TEST_ONLY)
173+ VERSION 2.0 FILE "ext2.xq" TEST_ONLY CONFIG_FILES ext2_config.txt.in)
174 DECLARE_ZORBA_MODULE(URI "http://zorba-tests.28msec.us/modules/ext"
175 VERSION 1.0 FILE "ext.xq" TEST_ONLY)
176
177
178=== added file 'test/rbkt/modules/ext2_config.txt.in'
179--- test/rbkt/modules/ext2_config.txt.in 1970-01-01 00:00:00 +0000
180+++ test/rbkt/modules/ext2_config.txt.in 2012-10-02 15:00:43 +0000
181@@ -0,0 +1,1 @@
182+This is a test: "@ZORBA_MODULE_RELATIVE_DIR@" "@ZORBA_MODULE_LIBFILE_WE@"

Subscribers

People subscribed via source and target branches