Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r13 - in branches/1.0.x: . doc doc/screenshots java/ch/idok/dmsd/impl/extractor/jpeg misc/sample_repository_data/images scripts/admin/test_server

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r13 - in branches/1.0.x: . doc doc/screenshots java/ch/idok/dmsd/impl/extractor/jpeg misc/sample_repository_data/images scripts/admin/test_server


Chronological Thread 
  • From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r13 - in branches/1.0.x: . doc doc/screenshots java/ch/idok/dmsd/impl/extractor/jpeg misc/sample_repository_data/images scripts/admin/test_server
  • Date: Fri, 29 Feb 2008 12:10:24 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: geus
Date: Fri Feb 29 12:10:23 2008
New Revision: 13

Log:
Merged trunk revisions r5:12 into branches/1.0.x

Added:
branches/1.0.x/doc/screenshots/searchEntryField.png
- copied unchanged from r12, /trunk/doc/screenshots/searchEntryField.png
branches/1.0.x/misc/sample_repository_data/images/jeep.jpg
- copied unchanged from r12,
/trunk/misc/sample_repository_data/images/jeep.jpg
branches/1.0.x/misc/sample_repository_data/images/sidney.jpg
- copied unchanged from r12,
/trunk/misc/sample_repository_data/images/sidney.jpg
branches/1.0.x/misc/sample_repository_data/images/traffic.jpg
- copied unchanged from r12,
/trunk/misc/sample_repository_data/images/traffic.jpg
Removed:
branches/1.0.x/doc/screenshots/search.png
Modified:
branches/1.0.x/INSTALL.html
branches/1.0.x/doc/INSTALL.odt

branches/1.0.x/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
branches/1.0.x/scripts/admin/test_server/setup_test_server_ubuntu.sh
branches/1.0.x/scripts/admin/test_server/welcome.html

Modified: branches/1.0.x/INSTALL.html
==============================================================================
--- branches/1.0.x/INSTALL.html (original)
+++ branches/1.0.x/INSTALL.html Fri Feb 29 12:10:23 2008
@@ -6,7 +6,7 @@
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.3 (Linux)">
<META NAME="CREATED" CONTENT="0;0">
<META NAME="CHANGEDBY" CONTENT="Roman Geus">
- <META NAME="CHANGED" CONTENT="20080227;17343400">
+ <META NAME="CHANGED" CONTENT="20080229;11173600">
<META NAME="SDFOOTNOTE" CONTENT=";;;;P">
<META NAME="SDENDNOTE" CONTENT="ARABIC">
<STYLE TYPE="text/css">
@@ -45,9 +45,7 @@
<H1 LANG="en-US" CLASS="western">1Audience</H1>
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm">This
document is written for people who intend to build iDok from the Java
-source code or who intend to setup an iDok server. The following
-instructions assume that a Linux operating system.
-</P>
+source code or who intend to setup an iDok server.</P>
<H1 LANG="en-US" CLASS="western">2Software overview</H1>
<P LANG="en-US" CLASS="western">The iDok software is implemented as a
client/server architecture.</P>
@@ -205,6 +203,9 @@
<CODE CLASS="western">build.xml</CODE>) as follows</P>
<PRE LANG="zxx" CLASS="western" STYLE="margin-left: 1.25cm">$ ant
dist</PRE><H1 LANG="en-US" CLASS="western">
6Local test server</H1>
+<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm">The
+following instructions assume a Linux operating system.
+</P>
<H2 LANG="en-US" CLASS="western">6.1Installation</H2>
<P LANG="en-US" CLASS="western">The ant build file <CODE
CLASS="western">local-server.xml</CODE>
can be used for setting up an a local iDok server. Such a locally
@@ -384,7 +385,8 @@
IP address by which it is reachable from the network. The IP address
can be configured statically or dynamically. <BR>By default the IP
address is configured dynamically. The network setup can be changed
- using the <CODE CLASS="western">/home/toor/configure</CODE>
script.</P>
+ using the <CODE CLASS="western">/home/toor/configure.sh</CODE>
+ script.</P>
<LI><P LANG="en-US" CLASS="western">The CORBA initialization routine
tries to determine the host name which is tied to the local IP
address of the server. If this step fails (and it will fail in

Modified: branches/1.0.x/doc/INSTALL.odt
==============================================================================
Binary files. No diff available.

Modified:
branches/1.0.x/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
==============================================================================
---
branches/1.0.x/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
(original)
+++
branches/1.0.x/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
Fri Feb 29 12:10:23 2008
@@ -25,31 +25,22 @@
*/

import java.io.ByteArrayInputStream;
-import java.io.IOException;
+import java.io.InputStream;
import java.util.Iterator;
import java.util.Map;

-import javax.imageio.ImageIO;
-import javax.imageio.ImageReader;
-import javax.imageio.metadata.IIOMetadata;
-import javax.imageio.metadata.IIOMetadataNode;
-import javax.imageio.stream.MemoryCacheImageInputStream;
-
-import org.w3c.dom.Node;
-
import ch.idok.common.errorhandling.DmsException;
import ch.idok.common.errorhandling.ErrorType;
import ch.idok.dmsd.config.Config;
import ch.idok.dmsd.indexer.ContentExtractor;
import ch.idok.dmsd.indexer.ContentExtractorFactory;

+import com.drew.imaging.jpeg.JpegMetadataReader;
+import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.metadata.Directory;
+import com.drew.metadata.Metadata;
import com.drew.metadata.MetadataException;
import com.drew.metadata.Tag;
-import com.drew.metadata.exif.ExifDirectory;
-import com.drew.metadata.exif.ExifReader;
-import com.drew.metadata.iptc.IptcDirectory;
-import com.drew.metadata.iptc.IptcReader;

/**
* @brief This factory class is able to create extractor objects that can
handle
@@ -63,12 +54,6 @@
*/
private final String mimeType = "image/jpeg";

- /** @brief EXIF metadata tag. */
- public static final int EXIF = 0xE1;
-
- /** @brief IPTC metadata tag. */
- public static final int IPTC = 0xED;
-
/**
* @brief The content extractor class for plain text.
*/
@@ -96,39 +81,38 @@

/** @see ContentExtractor.getMetaData() */
public Map<String, String> getMetaData() throws DmsException {
+ InputStream bais = null;
try {
if (raw != null) {
- MemoryCacheImageInputStream iis = new
MemoryCacheImageInputStream(
- new ByteArrayInputStream(raw));
- Iterator<ImageReader> iterator = ImageIO
- .getImageReadersByMIMEType(mimeType);
- ImageReader reader = null;
- while (iterator.hasNext()) {
- reader = iterator.next();
- if
(reader.getOriginatingProvider().canDecodeInput(iis)) {
- reader.setInput(iis);
- break;
+ bais = new ByteArrayInputStream(raw);
+ Metadata metadata =
JpegMetadataReader.readMetadata(bais);
+ Iterator<?> dirIterator =
metadata.getDirectoryIterator();
+ while (dirIterator.hasNext()) {
+ Directory dir = (Directory) dirIterator.next();
+ Iterator<?> tagIterator = dir.getTagIterator();
+ while (tagIterator.hasNext()) {
+ Tag tag = (Tag) tagIterator.next();
+ String desc = null;
+ try {
+ desc = tag.getDescription();
+ } catch (MetadataException ex) {
+ /* ignore */
+ }
+ meta.put("["+tag.getDirectoryName()+"]
"+tag.getTagName(),
+ desc == null ? "(unknown value)" : desc);
}
}
- if (!iterator.hasNext())
- DmsException.throwIt(ErrorType.DOC_HANDLING, this,
- "Cannot extract EXIF data",
- "No appropriate image reader was found");
- IIOMetadata metadata = reader.getImageMetadata(0);
- Node metaNode = metadata.getAsTree(metadata
- .getNativeMetadataFormatName());
- getMetadata(meta, metaNode, EXIF);
- getMetadata(meta, metaNode, IPTC);
- raw = null;
}
- } catch (IOException ex) {
- DmsException.throwIt(ErrorType.FILE_ACCESS, this,
- "Cannot read from jpeg image",
- "method canDecodeInput failed");
- } catch (MetadataException ex) {
- DmsException.throwIt(ErrorType.READ_DOC, this,
- "Reading jpeg metadata failed.", ex
+ } catch (JpegProcessingException ex) {
+ DmsException.throwIt(ErrorType.CONTENT_EXTRACTION, this,
+ "Cannot extract exif data from jpeg image", ex
.getLocalizedMessage(), ex);
+ } finally {
+ raw = null;
+ try {
+ bais.close();
+ } catch (Throwable th) { /* ignore */
+ }
}
return meta;
}
@@ -138,73 +122,6 @@
raw = null;
meta = null;
}
-
- /**
- * @brief Retrieve meta data directory
- * @param node
- * The image data node
- * @param tag
- * The metadata tag
- * @return Directory for the metadata
- * @throws MetadataException
- * If the metadata cannot be read from the picture
- * @throws DmsException
- */
- private Directory getDirectory(Node node, int tag)
- throws MetadataException, DmsException {
- if (node.getNodeName() == "unknown") {
- if (Integer.parseInt(node.getAttributes().getNamedItem(
- "MarkerTag").getNodeValue()) == EXIF) {
- byte[] data = (byte[]) ((IIOMetadataNode) node)
- .getUserObject();
- if (tag == EXIF)
- return new ExifReader(data).extract().getDirectory(
- ExifDirectory.class);
- else if (tag == IPTC)
- return new IptcReader(data).extract().getDirectory(
- IptcDirectory.class);
- else
- throw new DmsException(ErrorType.INTERNAL, this,
- "Internat bug detected", "Wrong metadata
tag: "
- + tag);
- }
- }
- Node child = node.getFirstChild();
- while (child != null) {
- Directory directory = getDirectory(child, tag);
- if (directory != null)
- return directory;
- child = child.getNextSibling();
- }
- return null;
- }
-
- /**
- * @brief Add metadata in the image to the matadata map
- * @param metaData
- * The metadata map
- * @param node
- * The image node
- * @param tag
- * The metadata tag
- * @throws MetadataException
- * If the metadata cannot be read from the picture
- * @throws DmsException
- * If an internal error occurred
- */
- private void getMetadata(Map<String, String> metaData, Node node,
- int tag) throws MetadataException, DmsException {
- Directory directory;
- directory = getDirectory(node, tag);
- if (directory == null)
- return;
- Iterator<?> iter = directory.getTagIterator();
- while (iter.hasNext()) {
- Tag metaTag = (Tag) iter.next();
- metaData.put("auto:" + metaTag.getTagName(), metaTag
- .getDescription());
- }
- }
}

/** @brief Constructor. */

Modified: branches/1.0.x/scripts/admin/test_server/setup_test_server_ubuntu.sh
==============================================================================
--- branches/1.0.x/scripts/admin/test_server/setup_test_server_ubuntu.sh
(original)
+++ branches/1.0.x/scripts/admin/test_server/setup_test_server_ubuntu.sh
Fri Feb 29 12:10:23 2008
@@ -36,14 +36,30 @@
IDOK_SERVER_ROOT=/var/lib/idok_server
IDOK_HOST=idokserver

-#apt-cache update
-#apt-get install sun-java6-jre
-#apt-get install ant
-#apt-get install subversion
-#apt-get install apache2
-#apt-get install openoffice.org-calc openoffice.org-draw
openoffice.org-impress openoffice.org-writer
-#apt-get install apt-get install libtiff-tools
-#apt-get install xvfb
+
+prompt() {
+ PS3='Select 1 to continue, 2 to skip: '
+ select opt in "Yes" "No"
+ do
+ break
+ done
+ [ "$opt" == "Yes" ] && return 1
+ return 0
+}
+
+echo -e "\nInstall additional packages."
+prompt
+if [ "$?" -eq "1" ]; then
+ apt-cache update
+ apt-get install sun-java6-jre
+ apt-get install ant
+ apt-get install subversion
+ apt-get install apache2
+ apt-get install openoffice.org-calc openoffice.org-draw
openoffice.org-impress openoffice.org-writer
+ apt-get install apt-get install libtiff-tools
+ apt-get install xvfb
+ apt-get install libxtst6
+fi

#
# Create directory tree and test project
@@ -242,3 +258,24 @@
# Configure services
#
update-rc.d idok defaults
+
+
+echo -e "\nDownload Qt Jambi platform specific JAR files."
+prompt
+if [ "$?" -eq "1" ]; then
+ codebase="http://www.trolltech.com/developer/download/webstart";
+ wget --directory-prefix=lib $codebase/qtjambi-win32-gpl-4.3.3_01.jar
+ wget --directory-prefix=lib $codebase/qtjambi-linux32-gpl-4.3.3_01.jar
+ wget --directory-prefix=lib $codebase/qtjambi-mac-gpl-4.3.3_01.jar
+fi
+
+echo -e "\nSign JAR files (for Java Web Start)."
+prompt
+if [ "$?" -eq "1" ]; then
+ install -D dms.jks java/ch/idok/service/common/dms.jks
+ ant -f local-server.xml sign-all-jars
+fi
+
+echo -e "\nStart iDok services."
+prompt
+[ "$?" -eq "1" ] && /etc/init.d/idok restart

Modified: branches/1.0.x/scripts/admin/test_server/welcome.html
==============================================================================
--- branches/1.0.x/scripts/admin/test_server/welcome.html (original)
+++ branches/1.0.x/scripts/admin/test_server/welcome.html Fri Feb 29
12:10:23 2008
@@ -11,7 +11,7 @@
<p>iDok is an open source document management system on Subversion.
For more information about iDok visit <a
href="http://www.idok.ch";>http://www.idok.ch</a>.
<p>To start the <i>iDok graphical user interface</i> client using
-Java webstart, please follow this link:</p>
+Java Web Start, please follow this link:</p>
<p align="center"><a href="cgi-bin/qtgui.jnlp">iDok GUI
application</a></p>
<p>The iDok test repository can be accessed by the URL <a
@@ -26,9 +26,9 @@
<h3>Client requirements</h3>
<ul>
<li>Java runtime environment (JRE) version 5 or newer with working
- Java webstart configuration</li>
+ Java Web Start configuration</li>
<li>Windows or Linux operating system</li>
- <li>200M of free disk space for caching Java webstart files and
+ <li>200M of free disk space for caching Java Web Start files and
for temporary files</li>
</ul>
<h3>Help</h3>



  • [idok-commit] idok commit r13 - in branches/1.0.x: . doc doc/screenshots java/ch/idok/dmsd/impl/extractor/jpeg misc/sample_repository_data/images scripts/admin/test_server, AFS account Roman Geus, 02/29/2008

Archive powered by MHonArc 2.6.19.

Top of Page