Skip to Content.
Sympa Menu

idok-commit - [idok-commit] SUSPECT: idok commit r85 - in trunk: java/ch/idok/cli java/ch/idok/cli/admin java/ch/idok/common/client java/ch/idok/common/config java/ch/idok/common/impl/repository/svn java/ch/idok/common/impl/repository/svn/kerberized java/ch/idok/common/repository java/ch/idok/common/util java/ch/idok/dmsd/config java/ch/idok/dmsd/impl/config/svnlucene java/ch/idok/dmsd/impl/extractor java/ch/idok/dmsd/impl/extractor/jpeg java/ch/idok/dmsd/impl/extractor/microsoft java/ch/idok/dmsd/impl/extractor/openoffice java/ch/idok/dmsd/impl/extractor/tiff java/ch/idok/dmsd/impl/indexer/lucene java/ch/idok/dmsd/impl/updatelist java/ch/idok/dmsd/main java/ch/idok/dmsd/management java/ch/idok/dmsd/pipeline java/ch/idok/qtgui java/ch/idok/service/client/admin/corba java/ch/idok/service/client/cli/corba java/ch/idok/service/client/clienthandler/corba java/ch/idok/service/client/search/corba java/ch/idok/service/server java/ch/idok/service/server/admin java/ch/idok/service/server/admin/corba java/ch/idok/service/server/clienthandler/corba java/ch/idok/tools sites/psi/java/ch/psi/idok/common/config sites/psi/java/ch/psi/idok/qtgui sites/psi/java/ch/psi/idok/service/server/admin

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] SUSPECT: idok commit r85 - in trunk: java/ch/idok/cli java/ch/idok/cli/admin java/ch/idok/common/client java/ch/idok/common/config java/ch/idok/common/impl/repository/svn java/ch/idok/common/impl/repository/svn/kerberized java/ch/idok/common/repository java/ch/idok/common/util java/ch/idok/dmsd/config java/ch/idok/dmsd/impl/config/svnlucene java/ch/idok/dmsd/impl/extractor java/ch/idok/dmsd/impl/extractor/jpeg java/ch/idok/dmsd/impl/extractor/microsoft java/ch/idok/dmsd/impl/extractor/openoffice java/ch/idok/dmsd/impl/extractor/tiff java/ch/idok/dmsd/impl/indexer/lucene java/ch/idok/dmsd/impl/updatelist java/ch/idok/dmsd/main java/ch/idok/dmsd/management java/ch/idok/dmsd/pipeline java/ch/idok/qtgui java/ch/idok/service/client/admin/corba java/ch/idok/service/client/cli/corba java/ch/idok/service/client/clienthandler/corba java/ch/idok/service/client/search/corba java/ch/idok/service/server java/ch/idok/service/server/admin java/ch/idok/service/server/admin/corba java/ch/idok/service/server/clienthandler/corba java/ch/idok/tools sites/psi/java/ch/psi/idok/common/config sites/psi/java/ch/psi/idok/qtgui sites/psi/java/ch/psi/idok/service/server/admin


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] SUSPECT: idok commit r85 - in trunk: java/ch/idok/cli java/ch/idok/cli/admin java/ch/idok/common/client java/ch/idok/common/config java/ch/idok/common/impl/repository/svn java/ch/idok/common/impl/repository/svn/kerberized java/ch/idok/common/repository java/ch/idok/common/util java/ch/idok/dmsd/config java/ch/idok/dmsd/impl/config/svnlucene java/ch/idok/dmsd/impl/extractor java/ch/idok/dmsd/impl/extractor/jpeg java/ch/idok/dmsd/impl/extractor/microsoft java/ch/idok/dmsd/impl/extractor/openoffice java/ch/idok/dmsd/impl/extractor/tiff java/ch/idok/dmsd/impl/indexer/lucene java/ch/idok/dmsd/impl/updatelist java/ch/idok/dmsd/main java/ch/idok/dmsd/management java/ch/idok/dmsd/pipeline java/ch/idok/qtgui java/ch/idok/service/client/admin/corba java/ch/idok/service/client/cli/corba java/ch/idok/service/client/clienthandler/corba java/ch/idok/service/client/search/corba java/ch/idok/service/server java/ch/idok/service/server/admin java/ch/idok/service/server/admin/corba java/ch/idok/service/server/clienthandler/corba java/ch/idok/tools sites/psi/java/ch/psi/idok/common/config sites/psi/java/ch/psi/idok/qtgui sites/psi/java/ch/psi/idok/service/server/admin
  • Date: Mon, 5 May 2008 11:15:59 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: huebner AT PSI.CH
Date: Mon May 5 11:15:57 2008
New Revision: 85

Log:
Applied formating rules to comply with the iDok code format.

Modified:
trunk/java/ch/idok/cli/CliTest.java
trunk/java/ch/idok/cli/DMS.java
trunk/java/ch/idok/cli/admin/GroupCommand.java
trunk/java/ch/idok/cli/admin/InitAuthDBCommand.java
trunk/java/ch/idok/cli/admin/MailNotificationCommand.java
trunk/java/ch/idok/common/client/LocalClientHandler.java
trunk/java/ch/idok/common/config/Setup.java
trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java
trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryManager.java
trunk/java/ch/idok/common/impl/repository/svn/kerberized/HTTPRequest.java
trunk/java/ch/idok/common/repository/Repository.java
trunk/java/ch/idok/common/util/AnybodyDmsCredentials.java
trunk/java/ch/idok/common/util/AuthUtil.java
trunk/java/ch/idok/common/util/DmsPermission.java
trunk/java/ch/idok/common/util/MimeType.java
trunk/java/ch/idok/dmsd/config/Config.java
trunk/java/ch/idok/dmsd/config/Setup.java
trunk/java/ch/idok/dmsd/impl/config/svnlucene/Config.java
trunk/java/ch/idok/dmsd/impl/extractor/Extractor.java
trunk/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java

trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java

trunk/java/ch/idok/dmsd/impl/extractor/openoffice/OpenOfficeExtractorFactory.java
trunk/java/ch/idok/dmsd/impl/extractor/tiff/TiffExtractorFactory.java
trunk/java/ch/idok/dmsd/impl/indexer/lucene/AllFieldsReader.java
trunk/java/ch/idok/dmsd/impl/indexer/lucene/Indexer.java
trunk/java/ch/idok/dmsd/impl/updatelist/SimpleUpdateListGenerator.java
trunk/java/ch/idok/dmsd/main/Daemon.java
trunk/java/ch/idok/dmsd/management/DaemonManager.java
trunk/java/ch/idok/dmsd/management/ExternalDaemonControl.java
trunk/java/ch/idok/dmsd/pipeline/PipelineData.java
trunk/java/ch/idok/dmsd/pipeline/PipelineQueue.java
trunk/java/ch/idok/dmsd/pipeline/PipelineSignal.java
trunk/java/ch/idok/dmsd/pipeline/PipelineStage.java
trunk/java/ch/idok/qtgui/AdvancedSearchController.java
trunk/java/ch/idok/qtgui/AuthorizationController.java
trunk/java/ch/idok/qtgui/Convert.java
trunk/java/ch/idok/qtgui/FolderTree.java
trunk/java/ch/idok/qtgui/MainWindow.java
trunk/java/ch/idok/qtgui/PreviewWidget.java
trunk/java/ch/idok/qtgui/SortableTreeWidgetItem.java
trunk/java/ch/idok/qtgui/VirtualFolderController.java
trunk/java/ch/idok/service/client/admin/corba/CorbaAdminService.java
trunk/java/ch/idok/service/client/cli/corba/CorbaCLIFactoryService.java

trunk/java/ch/idok/service/client/clienthandler/corba/ClientHandlerServiceImpl.java
trunk/java/ch/idok/service/client/search/corba/CorbaSearchService.java
trunk/java/ch/idok/service/server/Daemon.java
trunk/java/ch/idok/service/server/admin/Admin.java
trunk/java/ch/idok/service/server/admin/ApacheConfUpdaterThread.java
trunk/java/ch/idok/service/server/admin/AuthPermissionCollection.java
trunk/java/ch/idok/service/server/admin/PermissionRoleDBAdapter.java
trunk/java/ch/idok/service/server/admin/ProjectAndRepositoryCreator.java

trunk/java/ch/idok/service/server/admin/SimpleProjectAndRepositoryCreator.java
trunk/java/ch/idok/service/server/admin/corba/AdminServiceImpl.java

trunk/java/ch/idok/service/server/clienthandler/corba/CorbaClientHandler.java
trunk/java/ch/idok/tools/GetRevisionInfo.java
trunk/sites/psi/java/ch/psi/idok/common/config/Setup.java
trunk/sites/psi/java/ch/psi/idok/qtgui/DmsGui.java
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIApacheHandler.java

trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIProjectAndRepositoryCreator.java

Modified: trunk/java/ch/idok/cli/CliTest.java
==============================================================================
--- trunk/java/ch/idok/cli/CliTest.java (original)
+++ trunk/java/ch/idok/cli/CliTest.java Mon May 5 11:15:57 2008
@@ -17,164 +17,164 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/

-package ch.idok.cli;

-

-import java.net.URI;

-import java.net.URISyntaxException;

-

-import junit.framework.JUnit4TestAdapter;

-

-import org.junit.BeforeClass;

-import org.junit.Ignore;

-import org.junit.Test;

-import org.junit.internal.runners.TextListener;

-import org.junit.runner.JUnitCore;

-import org.junit.runner.notification.RunListener;

-

-import ch.idok.common.client.TestClientHandler;

-import ch.idok.common.errorhandling.DmsException;

-import ch.idok.common.impl.repository.svn.SvnRepositoryManager;

-import ch.idok.common.repository.DocumentId;

-import ch.idok.common.repository.PathType;

-import ch.idok.common.repository.Repository;

-import ch.idok.common.repository.RepositoryId;

-import ch.idok.common.repository.RepositoryManager;

-

-public class CliTest {

-

- static URI repoURI_;

- static TestClientHandler handler_;

- static RepositoryManager mgr_;

- static Repository repo_;

-

- @BeforeClass

- public static void setUpClass() throws DmsException, URISyntaxException {

-

- handler_ = new TestClientHandler();

- mgr_ = new SvnRepositoryManager(handler_);

- repoURI_ = new URI("https://dms03.psi.ch/projectA/develrepo";);

- RepositoryId repoId = mgr_.getRepositoryId(repoURI_);

- repo_ = mgr_.getRepository(repoId);

-

- // Delete ""repositoryTest" if it exists

- DocumentId id = repo_.getDocumentId("repositoryTest");

- if (repo_.getPathType(id) != PathType.NONE) {

- Repository.Transaction t = repo_.startTransaction();

- t.deleteEntry(id);

- t.end("test folder deleted.");

- }

-

- // Create "repositoryTest"

- Repository.Transaction t = repo_.startTransaction();

- t.createFolder(id);

- t.createFolder(repo_.getDocumentId("repositoryTest/to_be_deleted"));

- t.end("new test folder created.");

- }

-

- @Test

- public void help() throws DmsException {

- runCLI("help");

- runCLI("?");

- runCLI("? ?");

- runCLI("? list");

- runCLI("? ls");

- runCLI("? get");

- runCLI("? put");

- runCLI("? log");

- runCLI("? delete");

- }

-

- @Test

- public void info() throws DmsException {

- runCLI("info " + repoURI_.toString());

- }

-

- @Test

- public void list() throws DmsException {

- // FIXME: check if file exists first

- runCLI(String.format("list %s", repoURI_.toString()));

- }

-

- @Test

- public void storeOne() throws DmsException {

- handler_.writeFile("localfile", "blabla".getBytes());

- DocumentId docId = repo_.getDocumentId("repositoryTest/file");

- runCLI(String.format("put -m clitest localfile %s", repo_

- .getDocumentURI(docId)));

- runCLI("info " + repo_.getDocumentURI(docId));

- }

-

- @Test

- public void storeOneWithMeta() throws DmsException {

- handler_.writeFile("localfile", "this file has meta
data".getBytes());

- DocumentId docId = repo_.getDocumentId("repositoryTest/file1");

- runCLI(String

- .format(

- "put -m clitest localfile @author=Roman
@document_type=Report %s",

- repo_.getDocumentURI(docId)));

- runCLI("info " + repo_.getDocumentURI(docId));

- }

-

- @Test

- public void storeMany() throws DmsException {

- handler_.writeFile("file1", "".getBytes());

- handler_.writeFile("file2", "".getBytes());

- DocumentId docId = repo_.getDocumentId("repositoryTest");

- runCLI(String

- .format(

- "put --message \"store two files\" file1 %s/file1
file2 %s/file2",

- repo_.getDocumentURI(docId), repo_

- .getDocumentURI(docId)));

- runCLI("ls " + repo_.getDocumentURI(docId));

- }

-

- @Ignore

- @Test

- public void storeManyWithMeta() throws DmsException {

- DocumentId docId = repo_.getDocumentId("repositoryTest");

- runCLI(String

- .format(

- "put file1 @author=\"Roman Geus\" %s/file1 file2
@author=\"Hans Christian Stadler\" %s/file2",

- repo_.getDocumentURI(docId), repo_

- .getDocumentURI(docId)));

- }

-

- @Ignore

- @Test

- public void storeRecursive() throws DmsException {

- DocumentId docId = repo_.getDocumentId("repositoryTest");

- runCLI(String

- .format(

- "put -m \"Recursive put\" -R dir %s/dir
@author=\"Roman Geus\"",

- repo_.getDocumentURI(docId)));

- }

-

- @Test

- public void delete() throws DmsException {

- DocumentId docId =
repo_.getDocumentId("repositoryTest/to_be_deleted");

- runCLI(String.format("delete -m clitest %s", repo_

- .getDocumentURI(docId)));

- runCLI("ls " + repo_.getDocumentURI(docId));

- }

-

- public void runCLI(String commandLine) throws DmsException {

- DMS.run(commandLine, handler_);

- }

-

- /**

- * Run all unit tests in the SvnRepository package.

- *

- * @param args

- * Command line arguments.

- */

- public static void main(String[] args) {

- JUnitCore core = new JUnitCore();

- RunListener listener = new TextListener();

- core.addListener(listener);

- core.run(CliTest.class);

- }

-

- public static junit.framework.Test suite() {

- return new JUnit4TestAdapter(CliTest.class);

- }

-}

+package ch.idok.cli;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.internal.runners.TextListener;
+import org.junit.runner.JUnitCore;
+import org.junit.runner.notification.RunListener;
+
+import ch.idok.common.client.TestClientHandler;
+import ch.idok.common.errorhandling.DmsException;
+import ch.idok.common.impl.repository.svn.SvnRepositoryManager;
+import ch.idok.common.repository.DocumentId;
+import ch.idok.common.repository.PathType;
+import ch.idok.common.repository.Repository;
+import ch.idok.common.repository.RepositoryId;
+import ch.idok.common.repository.RepositoryManager;
+
+public class CliTest {
+
+ static URI repoURI_;
+ static TestClientHandler handler_;
+ static RepositoryManager mgr_;
+ static Repository repo_;
+
+ @BeforeClass
+ public static void setUpClass() throws DmsException, URISyntaxException {
+
+ handler_ = new TestClientHandler();
+ mgr_ = new SvnRepositoryManager(handler_);
+ repoURI_ = new URI("https://dms03.psi.ch/projectA/develrepo";);
+ RepositoryId repoId = mgr_.getRepositoryId(repoURI_);
+ repo_ = mgr_.getRepository(repoId);
+
+ // Delete ""repositoryTest" if it exists
+ DocumentId id = repo_.getDocumentId("repositoryTest");
+ if (repo_.getPathType(id) != PathType.NONE) {
+ Repository.Transaction t = repo_.startTransaction();
+ t.deleteEntry(id);
+ t.end("test folder deleted.");
+ }
+
+ // Create "repositoryTest"
+ Repository.Transaction t = repo_.startTransaction();
+ t.createFolder(id);
+ t.createFolder(repo_.getDocumentId("repositoryTest/to_be_deleted"));
+ t.end("new test folder created.");
+ }
+
+ @Test
+ public void help() throws DmsException {
+ runCLI("help");
+ runCLI("?");
+ runCLI("? ?");
+ runCLI("? list");
+ runCLI("? ls");
+ runCLI("? get");
+ runCLI("? put");
+ runCLI("? log");
+ runCLI("? delete");
+ }
+
+ @Test
+ public void info() throws DmsException {
+ runCLI("info " + repoURI_.toString());
+ }
+
+ @Test
+ public void list() throws DmsException {
+ // FIXME: check if file exists first
+ runCLI(String.format("list %s", repoURI_.toString()));
+ }
+
+ @Test
+ public void storeOne() throws DmsException {
+ handler_.writeFile("localfile", "blabla".getBytes());
+ DocumentId docId = repo_.getDocumentId("repositoryTest/file");
+ runCLI(String.format("put -m clitest localfile %s", repo_
+ .getDocumentURI(docId)));
+ runCLI("info " + repo_.getDocumentURI(docId));
+ }
+
+ @Test
+ public void storeOneWithMeta() throws DmsException {
+ handler_.writeFile("localfile", "this file has meta
data".getBytes());
+ DocumentId docId = repo_.getDocumentId("repositoryTest/file1");
+ runCLI(String
+ .format(
+ "put -m clitest localfile @author=Roman
@document_type=Report %s",
+ repo_.getDocumentURI(docId)));
+ runCLI("info " + repo_.getDocumentURI(docId));
+ }
+
+ @Test
+ public void storeMany() throws DmsException {
+ handler_.writeFile("file1", "".getBytes());
+ handler_.writeFile("file2", "".getBytes());
+ DocumentId docId = repo_.getDocumentId("repositoryTest");
+ runCLI(String
+ .format(
+ "put --message \"store two files\" file1 %s/file1
file2 %s/file2",
+ repo_.getDocumentURI(docId), repo_
+ .getDocumentURI(docId)));
+ runCLI("ls " + repo_.getDocumentURI(docId));
+ }
+
+ @Ignore
+ @Test
+ public void storeManyWithMeta() throws DmsException {
+ DocumentId docId = repo_.getDocumentId("repositoryTest");
+ runCLI(String
+ .format(
+ "put file1 @author=\"Roman Geus\" %s/file1 file2
@author=\"Hans Christian Stadler\" %s/file2",
+ repo_.getDocumentURI(docId), repo_
+ .getDocumentURI(docId)));
+ }
+
+ @Ignore
+ @Test
+ public void storeRecursive() throws DmsException {
+ DocumentId docId = repo_.getDocumentId("repositoryTest");
+ runCLI(String
+ .format(
+ "put -m \"Recursive put\" -R dir %s/dir
@author=\"Roman Geus\"",
+ repo_.getDocumentURI(docId)));
+ }
+
+ @Test
+ public void delete() throws DmsException {
+ DocumentId docId =
repo_.getDocumentId("repositoryTest/to_be_deleted");
+ runCLI(String.format("delete -m clitest %s", repo_
+ .getDocumentURI(docId)));
+ runCLI("ls " + repo_.getDocumentURI(docId));
+ }
+
+ public void runCLI(String commandLine) throws DmsException {
+ DMS.run(commandLine, handler_);
+ }
+
+ /**
+ * Run all unit tests in the SvnRepository package.
+ *
+ * @param args
+ * Command line arguments.
+ */
+ public static void main(String[] args) {
+ JUnitCore core = new JUnitCore();
+ RunListener listener = new TextListener();
+ core.addListener(listener);
+ core.run(CliTest.class);
+ }
+
+ public static junit.framework.Test suite() {
+ return new JUnit4TestAdapter(CliTest.class);
+ }
+}

Modified: trunk/java/ch/idok/cli/DMS.java
==============================================================================
--- trunk/java/ch/idok/cli/DMS.java (original)
+++ trunk/java/ch/idok/cli/DMS.java Mon May 5 11:15:57 2008
@@ -51,7 +51,7 @@
Setup setup = Setup.getInstance();
setup.initClient();
Logger l = setup.getRootLogger();
-
+
try {
// Create LocalClientHandler
ClientHandler clientHandler = new LocalClientHandler();
@@ -62,8 +62,7 @@

} catch (DmsException e) {
System.err.printf("Error: %s%n", e.getUserMessage());
- System.err.println("See logfile "
- + setup.getClientLogfilePath()
+ System.err.println("See logfile " + setup.getClientLogfilePath()
+ " for more details.");
l.log(Level.INFO, DMSCommand.getClientProgramName()
+ " terminated with error", e);

Modified: trunk/java/ch/idok/cli/admin/GroupCommand.java
==============================================================================
--- trunk/java/ch/idok/cli/admin/GroupCommand.java (original)
+++ trunk/java/ch/idok/cli/admin/GroupCommand.java Mon May 5 11:15:57
2008
@@ -150,8 +150,8 @@
System.out

.println("-----------------------------------------------------------------");
for (int i = 0; i < result.length; ++i) {
- System.out.printf("%-32s %s%n", result[i].getName(),
- result[i].getTask());
+ System.out.printf("%-32s %s%n", result[i].getName(),
result[i]
+ .getTask());
}
}
}

Modified: trunk/java/ch/idok/cli/admin/InitAuthDBCommand.java
==============================================================================
--- trunk/java/ch/idok/cli/admin/InitAuthDBCommand.java (original)
+++ trunk/java/ch/idok/cli/admin/InitAuthDBCommand.java Mon May 5 11:15:57
2008
@@ -78,7 +78,7 @@
if (parsedArgs.length != 1)
throw new DmsException(ErrorType.BAD_ARG, this,
"No command line argument expected", "");
-
+
// Get credentials
DmsCredentials cred = DMS.getCLICredentials(handler);


Modified: trunk/java/ch/idok/cli/admin/MailNotificationCommand.java
==============================================================================
--- trunk/java/ch/idok/cli/admin/MailNotificationCommand.java (original)
+++ trunk/java/ch/idok/cli/admin/MailNotificationCommand.java Mon May 5
11:15:57 2008
@@ -150,14 +150,14 @@
mailingList = "default";
DmsCredentials cred = DMS.getCLICredentials(handler);
if (cmd.hasOption('a')) {
- adminService_.addToMailingList(cred, projectName,
- repositoryName, mailingList, userName);
+ adminService_.addToMailingList(cred, projectName, repositoryName,
+ mailingList, userName);
} else if (cmd.hasOption('d')) {
adminService_.removeFromMailingList(cred, projectName,
repositoryName, mailingList, userName);
} else if (cmd.hasOption('l')) {
- String[] members = adminService_.listMailingList(cred,
- projectName, repositoryName, mailingList);
+ String[] members = adminService_.listMailingList(cred,
projectName,
+ repositoryName, mailingList);
for (int i = 0; i < members.length; ++i) {
System.out.println(members[i]);
}

Modified: trunk/java/ch/idok/common/client/LocalClientHandler.java
==============================================================================
--- trunk/java/ch/idok/common/client/LocalClientHandler.java (original)
+++ trunk/java/ch/idok/common/client/LocalClientHandler.java Mon May 5
11:15:57 2008
@@ -68,8 +68,8 @@
* @see
ch.idok.common.client.ClientHandler#getCredentials(java.lang.String,
* java.net.URL, java.lang.String)
*/
- public DmsCredentials getCredentials(String kind, String serviceName,
String realm)
- throws DmsException {
+ public DmsCredentials getCredentials(String kind, String serviceName,
+ String realm) throws DmsException {
Krb5DmsCredentials cred = new Krb5DmsCredentials(null, null, null);

if (kind.equals(ISVNAuthenticationManager.PASSWORD)) {
@@ -115,10 +115,10 @@
* Generate a GSS-API token for Negotiate auth.
*
* We generate the token here without actually using it.
This is
- * done for detecting error conditions and possibly fall back
- * to basic authentication. Since the Kerberos 5 ticket is
- * cached in the Subject object, it is cheap to generate the
- * GSS-API token again in SVNKit.
+ * done for detecting error conditions and possibly fall
back to
+ * basic authentication. Since the Kerberos 5 ticket is
cached
+ * in the Subject object, it is cheap to generate the GSS-API
+ * token again in SVNKit.
*/
ServiceTokenAction action = new
ServiceTokenAction(serviceName);
try {

Modified: trunk/java/ch/idok/common/config/Setup.java
==============================================================================
--- trunk/java/ch/idok/common/config/Setup.java (original)
+++ trunk/java/ch/idok/common/config/Setup.java Mon May 5 11:15:57 2008
@@ -58,8 +58,8 @@
}

/**
- * Instantiate singleton Setup class defined by "ch.idok.setupClass"
- * system property
+ * Instantiate singleton Setup class defined by "ch.idok.setupClass"
system
+ * property
*
* If an error occurs in the routine, a stack trace is printed to
standard
* error and the process is aborted.

Modified: trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java
==============================================================================
--- trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java
(original)
+++ trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java Mon
May 5 11:15:57 2008
@@ -112,27 +112,34 @@
SVNRepository getSVNRepository() {
return repository_;
}
-
- /** @see
common.repository.Repository.getFileOverHttp(ch.idok.common.repository.REpository
,java.lang.String) */
- @Override
- public ByteArrayOutputStream getFileOverHttp(Repository
currentRepository, RepositoryPath repositoryPath, String HttpRequest)
- throws DmsException {
-
- Repository repo = currentRepository;
+
+ /**
+ * @see
common.repository.Repository.getFileOverHttp(ch.idok.common.repository.REpository
+ * ,java.lang.String)
+ */
+ @Override
+ public ByteArrayOutputStream getFileOverHttp(Repository
currentRepository,
+ RepositoryPath repositoryPath, String HttpRequest)
+ throws DmsException {
+
+ Repository repo = currentRepository;
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
DmsHTTPConnectionFactory f = new DmsHTTPConnectionFactory();
IHTTPConnection myHttpConnection;
- try {
- myHttpConnection =
f.createHTTPConnection(((SvnRepository)repo).repository_);
- SVNErrorMessage context =
SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "GET request
failed for ''{0}''", repositoryPath);
- myHttpConnection.request("GET", HttpRequest, null,
(StringBuffer) null, 200, 226, outStream, null, context);
- } catch (SVNException e) {
- e.printStackTrace();
- }
- return outStream;
- }
-
-
+ try {
+ myHttpConnection = f
+ .createHTTPConnection(((SvnRepository)
repo).repository_);
+ SVNErrorMessage context = SVNErrorMessage.create(
+ SVNErrorCode.RA_DAV_REQUEST_FAILED,
+ "GET request failed for ''{0}''", repositoryPath);
+ myHttpConnection.request("GET", HttpRequest, null,
+ (StringBuffer) null, 200, 226, outStream, null, context);
+ } catch (SVNException e) {
+ e.printStackTrace();
+ }
+ return outStream;
+ }
+
/** @see common.repository.Repository.getPathType() */
public PathType getPathType(DocumentId documentId, DocumentVersion
version)
throws DmsException {
@@ -919,8 +926,8 @@
HashMap<String, String> meta = new
HashMap<String, String>();
getDocumentData(getRepositoryPath(op.dest),
(String) null, meta);
- String checksumRepo = meta.get(Setup
- .getInstance().getChecksumKey());
+ String checksumRepo =
meta.get(Setup.getInstance()
+ .getChecksumKey());

logger_.finer(String.format(
"local md5: %s, remote md5: %s",
@@ -1165,6 +1172,4 @@
}
}

-
-
}

Modified:
trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryManager.java
==============================================================================
--- trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryManager.java
(original)
+++ trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryManager.java
Mon May 5 11:15:57 2008
@@ -54,7 +54,8 @@

/**
* @package common.impl.repository.svn
- * @brief Provide classes for accessing SVN repositories and for handling
authentication.
+ * @brief Provide classes for accessing SVN repositories and for handling
+ * authentication.
*/

/**

Modified:
trunk/java/ch/idok/common/impl/repository/svn/kerberized/HTTPRequest.java
==============================================================================
--- trunk/java/ch/idok/common/impl/repository/svn/kerberized/HTTPRequest.java
(original)
+++ trunk/java/ch/idok/common/impl/repository/svn/kerberized/HTTPRequest.java
Mon May 5 11:15:57 2008
@@ -144,13 +144,11 @@
* failure results in returning error message. - code that process ssl
* exceptions and re-prompts for client certificate when allowed. // auth
* error, ssl exception and "moved" errors should be processed by the
- * caller.
- * - code to send request body. - code to parse svn error response in
case
- * return code is not ok1 and ok2. - standard http error should be
returned
- * otherwise.
- * - body may be resetable inputStream + length - IMeasurable. // this
may
- * throw IOException that will be converted to: timeout error, can't
connect
- * error, or ssl will re-prompt.
+ * caller. - code to send request body. - code to parse svn error
response
+ * in case return code is not ok1 and ok2. - standard http error should
be
+ * returned otherwise. - body may be resetable inputStream + length -
+ * IMeasurable. // this may throw IOException that will be converted to:
+ * timeout error, can't connect error, or ssl will re-prompt.
*/
public void dispatch(String request, String path, HTTPHeader header,
int ok1, int ok2, SVNErrorMessage context) throws IOException {

Modified: trunk/java/ch/idok/common/repository/Repository.java
==============================================================================
--- trunk/java/ch/idok/common/repository/Repository.java (original)
+++ trunk/java/ch/idok/common/repository/Repository.java Mon May 5
11:15:57 2008
@@ -56,9 +56,10 @@
* @throws DmsException
* If the document path cannot be retrieved.
*/
- ByteArrayOutputStream getFileOverHttp (Repository currentRepository,
RepositoryPath repositoryPath, String HttpRequest)
- throws DmsException;
-
+ ByteArrayOutputStream getFileOverHttp(Repository currentRepository,
+ RepositoryPath repositoryPath, String HttpRequest)
+ throws DmsException;
+
/**
* @brief Retrieve the repository path for a specific version of a
document.
*

Modified: trunk/java/ch/idok/common/util/AnybodyDmsCredentials.java
==============================================================================
--- trunk/java/ch/idok/common/util/AnybodyDmsCredentials.java (original)
+++ trunk/java/ch/idok/common/util/AnybodyDmsCredentials.java Mon May 5
11:15:57 2008
@@ -64,8 +64,7 @@
synchronized public Subject getSubject() {
if (theSubject == null) {
theSubject = new Subject();
- theSubject.getPrincipals()
- .add(new DmsGroupPrincipal(anybodyGroup));
+ theSubject.getPrincipals().add(new
DmsGroupPrincipal(anybodyGroup));
}
return theSubject;
}

Modified: trunk/java/ch/idok/common/util/AuthUtil.java
==============================================================================
--- trunk/java/ch/idok/common/util/AuthUtil.java (original)
+++ trunk/java/ch/idok/common/util/AuthUtil.java Mon May 5 11:15:57
2008
@@ -58,7 +58,8 @@
/**
* Logger object.
*/
- private static Logger logger_ =
Setup.getInstance().getLogger("common.util");
+ private static Logger logger_ = Setup.getInstance()
+ .getLogger("common.util");

/**
* Instantiate a <code>LoginContext</code> using the provided application

Modified: trunk/java/ch/idok/common/util/DmsPermission.java
==============================================================================
--- trunk/java/ch/idok/common/util/DmsPermission.java (original)
+++ trunk/java/ch/idok/common/util/DmsPermission.java Mon May 5 11:15:57
2008
@@ -85,7 +85,8 @@
/**
* Logger object.
*/
- private static Logger logger_ =
Setup.getInstance().getLogger("service.admin");
+ private static Logger logger_ = Setup.getInstance().getLogger(
+ "service.admin");

/**
* Action associated with the DmsPermission. Index into

Modified: trunk/java/ch/idok/common/util/MimeType.java
==============================================================================
--- trunk/java/ch/idok/common/util/MimeType.java (original)
+++ trunk/java/ch/idok/common/util/MimeType.java Mon May 5 11:15:57
2008
@@ -42,7 +42,8 @@
public class MimeType {

/** @brief The logger for this class. */
- static final Logger logger =
Setup.getInstance().getLogger("common.util.MimeType");
+ static final Logger logger = Setup.getInstance().getLogger(
+ "common.util.MimeType");

/** @brief Cache for extension to mime type mapping. */
static final HashMap<String, String> mimeCache = new HashMap<String,
String>();
@@ -95,8 +96,7 @@
if (mimeType != null)
return mimeType;
File mimeTypes = new File(System.getProperty(
- "ch.idok.dmsd.impl.extractor.mimetypes",
- "/etc/mime.types"));
+ "ch.idok.dmsd.impl.extractor.mimetypes",
"/etc/mime.types"));
BufferedReader R = new BufferedReader(new FileReader(mimeTypes));
Pattern p = Pattern.compile("^\\s*(\\S+).*\\s" + extension
+ "(?:\\s.*)*$");

Modified: trunk/java/ch/idok/dmsd/config/Config.java
==============================================================================
--- trunk/java/ch/idok/dmsd/config/Config.java (original)
+++ trunk/java/ch/idok/dmsd/config/Config.java Mon May 5 11:15:57 2008
@@ -21,7 +21,8 @@

/**
* @package dmsd.config
- * @brief Provide classes and interfaces for building the document handling
pipeline.
+ * @brief Provide classes and interfaces for building the document handling
+ * pipeline.
*/

import java.util.Map;
@@ -55,10 +56,9 @@
*
* The first two arguments are handled by the ch.idok.dmsd.config.Setup
* class. However, They are also passed to objects implementing this
- * interface.
- * - args[0] is the log level for the java.util.logging.Logger instance
- * that the Config class instantiates. - args[2..] Arguments specific to
the
- * implementation.
+ * interface. - args[0] is the log level for the java.util.logging.Logger
+ * instance that the Config class instantiates. - args[2..] Arguments
+ * specific to the implementation.
*/
void initialize(String args[]) throws DmsException;

@@ -216,8 +216,7 @@
/**
* @brief Return a description of the configurator arguments.
*
- * The description must have lines of the form
- * \<tab\>arg\<N\>: \<description\>\<newline\>
+ * The description must have lines of the form \<tab\>arg\<N\>:
\<description\>\<newline\>
*
* where N is the argument number.
*/

Modified: trunk/java/ch/idok/dmsd/config/Setup.java
==============================================================================
--- trunk/java/ch/idok/dmsd/config/Setup.java (original)
+++ trunk/java/ch/idok/dmsd/config/Setup.java Mon May 5 11:15:57 2008
@@ -89,7 +89,7 @@
Logger rootLogger = ch.idok.common.config.Setup.getInstance()
.getRootLogger();
String logFile =
System.getProperty("ch.idok.dmsd.config.logFile",
- "/var/log/dmsd");
+ "/var/log/dmsd");
Handler logHandler = null;
if (logFile.equals("-"))
logHandler = new ConsoleHandler();

Modified: trunk/java/ch/idok/dmsd/impl/config/svnlucene/Config.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/config/svnlucene/Config.java (original)
+++ trunk/java/ch/idok/dmsd/impl/config/svnlucene/Config.java Mon May 5
11:15:57 2008
@@ -78,9 +78,9 @@
* @package dmsd.impl.config.svnlucene
* @brief Provides configurators for the DMS based on SVN and Lucene.
*
- * This package contains the Config class which is responsible for building
- * up the indexing pipeline and for providing the text extractors for
- * the supported mime types.
+ * This package contains the Config class which is responsible for building
up
+ * the indexing pipeline and for providing the text extractors for the
supported
+ * mime types.
*
* @author Hans-Christian Stadler
* @version 0.1
@@ -508,7 +508,7 @@
// TODO Make the next steps atomic
if (pipelineParts.size() == 1)
connectNoOp(); // Connect NoOp stage, since the pipeline should
- // still
+ // still
// be functional after having removed the last indexing
// pipeline part.
PipelinePart pipelinePart = pipelineParts.remove(repo);

Modified: trunk/java/ch/idok/dmsd/impl/extractor/Extractor.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/extractor/Extractor.java (original)
+++ trunk/java/ch/idok/dmsd/impl/extractor/Extractor.java Mon May 5
11:15:57 2008
@@ -153,9 +153,8 @@
}

/**
- * @brief Handle pipeline signals.
- * - GET_COUNTERS: Call the monitoring manager with the local
- * monitoring data.
+ * @brief Handle pipeline signals. - GET_COUNTERS: Call the monitoring
+ * manager with the local monitoring data.
*/
@Override
public void processSignal(PipelineSignal signal, PipelineStage
originator)

Modified:
trunk/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
(original)
+++ trunk/java/ch/idok/dmsd/impl/extractor/jpeg/JpegExtractorFactory.java
Mon May 5 11:15:57 2008
@@ -98,7 +98,8 @@
} catch (MetadataException ex) {
/* ignore */
}
- meta.put("["+tag.getDirectoryName()+"]
"+tag.getTagName(),
+ meta.put("[" + tag.getDirectoryName() + "] "
+ + tag.getTagName(),
desc == null ? "(unknown value)" : desc);
}
}

Modified:
trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
==============================================================================
---
trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
(original)
+++
trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
Mon May 5 11:15:57 2008
@@ -368,8 +368,8 @@
}
if (soffice != null) {
// Kill soffice if it is already running
-// soffice.destroy();
-// soffice = null;
+ // soffice.destroy();
+ // soffice = null;
}

if (procBuilder == null) {
@@ -377,8 +377,7 @@
String screen = System

.getProperty("ch.idok.dmsd.impl.extractor.microsoft.screen");
String tmpDir = System.getProperty(
- "ch.idok.dmsd.impl.extractor.microsoft.tmpdir",
- "/tmp");
+ "ch.idok.dmsd.impl.extractor.microsoft.tmpdir",
"/tmp");
unoPort = System

.getProperty("ch.idok.dmsd.impl.extractor.microsoft.unoport");
if (screen == null)
@@ -395,7 +394,9 @@
this,
"Missing property:
ch.idok.dmsd.impl.extractor.microsoft.unoport",
"The property must be set to the port
that openoffice must listen to");
- procBuilder = new ProcessBuilder("bash", "-c",
+ procBuilder = new ProcessBuilder(
+ "bash",
+ "-c",
"soffice -accept='socket,host=localhost,port="
+ unoPort
+ ";urp;' -headless -invisible
-nofirststartwizard -nologo");
@@ -417,11 +418,11 @@
try {
// start open office
if (soffice == null)
-// soffice = procBuilder.start();
- unoObj = urlResolver
- .resolve("uno:socket,host=localhost,port="
- + unoPort
- + ";urp;StarOffice.ServiceManager");
+ // soffice = procBuilder.start();
+ unoObj = urlResolver
+ .resolve("uno:socket,host=localhost,port="
+ + unoPort
+ + ";urp;StarOffice.ServiceManager");
} catch (Throwable ex) {
logger
.finest("OpenOffice connection error, remaining
retries: "
@@ -448,8 +449,8 @@
} else {
logger.warning("OpenOffice terminated\n" +
sb);
}
-// soffice.destroy();
-// soffice = null;
+ // soffice.destroy();
+ // soffice = null;
} catch (IllegalThreadStateException tsex) {
// soffice has not terminated yet, as it should
not
} finally {
@@ -458,8 +459,8 @@
}
} // if (soffic != null)
} finally {
-// if (soffice != null)
-// soffice.getOutputStream().close();
+ // if (soffice != null)
+ // soffice.getOutputStream().close();
}
}
if (unoObj == null)

Modified:
trunk/java/ch/idok/dmsd/impl/extractor/openoffice/OpenOfficeExtractorFactory.java
==============================================================================
---
trunk/java/ch/idok/dmsd/impl/extractor/openoffice/OpenOfficeExtractorFactory.java
(original)
+++
trunk/java/ch/idok/dmsd/impl/extractor/openoffice/OpenOfficeExtractorFactory.java
Mon May 5 11:15:57 2008
@@ -22,7 +22,6 @@
// This software is released under the GPL (www.fsf.org)
// For an alternative non-GPL license: contact the author
// THIS SOFTWARE COMES WITH NO WARRANTY
-
package ch.idok.dmsd.impl.extractor.openoffice;

/**

Modified:
trunk/java/ch/idok/dmsd/impl/extractor/tiff/TiffExtractorFactory.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/extractor/tiff/TiffExtractorFactory.java
(original)
+++ trunk/java/ch/idok/dmsd/impl/extractor/tiff/TiffExtractorFactory.java
Mon May 5 11:15:57 2008
@@ -161,7 +161,7 @@
String errorMsg = errors.toString();
if (errorMsg.length() != 0) {
if (metadataPresent) // Better to convey partial
- // info than none at all
+ // info than none at all
logger.warning(errorMsg);
else
DmsException

Modified: trunk/java/ch/idok/dmsd/impl/indexer/lucene/AllFieldsReader.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/indexer/lucene/AllFieldsReader.java
(original)
+++ trunk/java/ch/idok/dmsd/impl/indexer/lucene/AllFieldsReader.java Mon
May 5 11:15:57 2008
@@ -33,9 +33,8 @@
private StringBuffer meta;

/**
- * @brief Execution state.
- * - -2: Closed - -1: Read from content field - >=0: Read from
- * metadata fields - meta.length: Switch to state -1
+ * @brief Execution state. - -2: Closed - -1: Read from content field -
>=0:
+ * Read from metadata fields - meta.length: Switch to state -1
*/
private int state;

@@ -132,7 +131,7 @@
if (accum == 0)
return -1;
return accum; // WARNING: Assume that read returns -1
next
- // time as well
+ // time as well
}
if (res == length)
return accum;

Modified: trunk/java/ch/idok/dmsd/impl/indexer/lucene/Indexer.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/indexer/lucene/Indexer.java (original)
+++ trunk/java/ch/idok/dmsd/impl/indexer/lucene/Indexer.java Mon May 5
11:15:57 2008
@@ -268,15 +268,13 @@
Field.Index.TOKENIZED));
stringWriter.close();
sb.append("Added field: content\n");
- String version = metadata
- .get(ch.idok.common.config.Setup.getInstance()
- .getVersionKey());
+ String version = metadata.get(ch.idok.common.config.Setup
+ .getInstance().getVersionKey());
if (version != null) {
String searchableVersion = NumberTools
.longToString(Long.parseLong(version));
- metadata.put(ch.idok.common.config.Setup
- .getInstance().getSearchableVersionKey(),
- searchableVersion);
+
metadata.put(ch.idok.common.config.Setup.getInstance()
+ .getSearchableVersionKey(),
searchableVersion);
}
for (String metaDatum : metadata.keySet()) {
String metaValue = metadata.get(metaDatum);

Modified:
trunk/java/ch/idok/dmsd/impl/updatelist/SimpleUpdateListGenerator.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/updatelist/SimpleUpdateListGenerator.java
(original)
+++ trunk/java/ch/idok/dmsd/impl/updatelist/SimpleUpdateListGenerator.java
Mon May 5 11:15:57 2008
@@ -166,7 +166,7 @@
} else {
updateListIterator = null;
getOut().signal(PipelineSignal.COMMIT, this); // May call
- //
stopOperation(true)
+ // stopOperation(true)
if (repository != null) {
stopOperation(true);
config.setLastVersion(repositoryId, lastVersion);
@@ -200,12 +200,11 @@
}

/**
- * Process pipeline signals.
- * - START: Generate the update list. - STOP: Destroy the empty update
list
- * and record last indexed version. If it is not empty, en emergency STOP
- * happened. - DOWNSTREAM_PROBLEM: Downstream is not able to START or
index
- * properly - emergency STOP. - GET_COUNTERS: Send the local monitoring
data
- * to the monitoring manager.
+ * Process pipeline signals. - START: Generate the update list. - STOP:
+ * Destroy the empty update list and record last indexed version. If it
is
+ * not empty, en emergency STOP happened. - DOWNSTREAM_PROBLEM:
Downstream
+ * is not able to START or index properly - emergency STOP. -
GET_COUNTERS:
+ * Send the local monitoring data to the monitoring manager.
*
* In case of an emrgency STOP, the update list will be treated as if
empty,
* and the last indexed version will not be set (to an increased value).

Modified: trunk/java/ch/idok/dmsd/main/Daemon.java
==============================================================================
--- trunk/java/ch/idok/dmsd/main/Daemon.java (original)
+++ trunk/java/ch/idok/dmsd/main/Daemon.java Mon May 5 11:15:57 2008
@@ -31,9 +31,8 @@
* @package dmsd.main
* @brief Provides classes for starting up the DMS daemon.
*
- * This package contains the main Daemon class that
- * provides the main entry point for starting up the
- * daemon.
+ * This package contains the main Daemon class that provides the main entry
+ * point for starting up the daemon.
*/

/**
@@ -97,15 +96,14 @@
* Command line arguments.
*
* The first two arguments are handled by the ch.idok.dmsd.config.Setup
- * class.
- * - args[0] is command, "daemon" for daemon startup, "stop" for
external
- * daemon shutdown, "xxx" for configurator specific commands. - args[1]
is
- * the log level for the java.util.logging.Logger instance that the
Daemon
- * class instantiates. This Logger instance has the name "dmsd" and
should
- * be the top level logger. This implies, that all other loggers should
have
- * a name with the prefix "dmsd.". - args[2] is the name of the
configurator
- * class that builds up the indexer pipeline. The configurator class
must be
- * in the classpath.
+ * class. - args[0] is command, "daemon" for daemon startup, "stop" for
+ * external daemon shutdown, "xxx" for configurator specific commands. -
+ * args[1] is the log level for the java.util.logging.Logger instance
that
+ * the Daemon class instantiates. This Logger instance has the name
"dmsd"
+ * and should be the top level logger. This implies, that all other
loggers
+ * should have a name with the prefix "dmsd.". - args[2] is the name of
the
+ * configurator class that builds up the indexer pipeline. The
configurator
+ * class must be in the classpath.
*
* The remaining arguments are handled by the configurator class. At the
* moment, there is only one configurator class:
@@ -153,31 +151,30 @@
/**
* @mainpage The Document Management Daemon
*
- * @section intro Introduction
- * The Document Management Daemon - dmsd in short - is used to generate
- * search indices from document repositories.
- *
- * @section overall_design Overall Design
- * Dmsd uses a pipeline of processing elements connected by queues to create
a search index.
- * The pipeline is built by configurators. At the moment, there is only one
configurator -
- * ch.idok.dmsd.impl.config.svnlucene.Config for Subversion document
repositories and Lucene
- * search indices. The pipeline built by this configurator looks like this:
- *
- * - ch.idok.dmsd.impl.controller.SimpleController
- * - ch.idok.dmsd.impl.queue.SimplePipelineQueue
- * - ch.idok.dmsd.impl.updatelist.SimpleUpdateListGenerator
- * - ch.idok.dmsd.impl.queue.SimplePipelineQueue
- * - ch.idok.dmsd.impl.loader.ContentLoader
- * - ch.idok.dmsd.impl.queue.SimplePipelineQueue
- * - ch.idok.dmsd.impl.extractor.Extractor
- * - ch.idok.dmsd.impl.queue.SimplePipelineQueue
- * - ch.idok.dmsd.impl.indexer.lucene.Indexer
- * - ch.idok.dmsd.impl.queue.SimplePipelineQueue
- * - ch.idok.dmsd.impl.controller.SimpleController
- *
- * The pipeline is a circular structure with the pipeline controller at the
head and at the
- * tail. Pipeline data items flow out of the pipeline controller and back
into the pipeline
- * controller.
+ * @section intro Introduction The Document Management Daemon - dmsd in
short -
+ * is used to generate search indices from document repositories.
+ *
+ * @section overall_design Overall Design Dmsd uses a pipeline of processing
+ * elements connected by queues to create a search index. The
pipeline
+ * is built by configurators. At the moment, there is only one
+ * configurator - ch.idok.dmsd.impl.config.svnlucene.Config for
+ * Subversion document repositories and Lucene search indices. The
+ * pipeline built by this configurator looks like this: -
+ * ch.idok.dmsd.impl.controller.SimpleController -
+ * ch.idok.dmsd.impl.queue.SimplePipelineQueue -
+ * ch.idok.dmsd.impl.updatelist.SimpleUpdateListGenerator -
+ * ch.idok.dmsd.impl.queue.SimplePipelineQueue -
+ * ch.idok.dmsd.impl.loader.ContentLoader -
+ * ch.idok.dmsd.impl.queue.SimplePipelineQueue -
+ * ch.idok.dmsd.impl.extractor.Extractor -
+ * ch.idok.dmsd.impl.queue.SimplePipelineQueue -
+ * ch.idok.dmsd.impl.indexer.lucene.Indexer -
+ * ch.idok.dmsd.impl.queue.SimplePipelineQueue -
+ * ch.idok.dmsd.impl.controller.SimpleController
+ *
+ * The pipeline is a circular structure with the pipeline controller at the
head
+ * and at the tail. Pipeline data items flow out of the pipeline controller
and
+ * back into the pipeline controller.
*
* @subsection error_handling Error Handling Pipeline implementations must
make
* sure, that all exceptions are catched and sent to the pipeline
@@ -185,8 +182,8 @@
* after an error has occurred. Operation feasibility tests
should
* be carried out when the START signal is received.
*
- * @subsection logging Logging The ch.idok.dmsd.config.Setup singleton keeps
- * the logger object with name "dmsd" which should be the common
+ * @subsection logging Logging The ch.idok.dmsd.config.Setup singleton keeps
the
+ * logger object with name "dmsd" which should be the common
* ancestor of all other logger objects in this framework. New
* logger objects should only be createt by calling the
* config.Config.getLogger() method.
@@ -194,15 +191,14 @@
* @subsection monitoring Daemon Operations Monitoring Monitoring data must
be
* recorded in objects of type
* ch.idok.dmsd.monitoring.MonitoringData. There are two types of
- * monitoring data:
- * - Monitoring data per pipeline data item. Pipeline stages may
- * modify this data. The monitoring data flows back to the pipeline
controller
- * together as part of the pipeline data and may be handled by the pipeline
- * controller.
- * - Monitoring data per pipeline stage. The pipeline controller
- * collects and handles the monitoring data by sending a signal
- * (ch.idok.dmsd.pipeline.PipeleineSignal.GET_COUNTERS) to all pipeline
- * stages.
+ * monitoring data: - Monitoring data per pipeline data item.
+ * Pipeline stages may modify this data. The monitoring data
flows
+ * back to the pipeline controller together as part of the
pipeline
+ * data and may be handled by the pipeline controller. -
Monitoring
+ * data per pipeline stage. The pipeline controller collects and
+ * handles the monitoring data by sending a signal
+ * (ch.idok.dmsd.pipeline.PipeleineSignal.GET_COUNTERS) to all
+ * pipeline stages.
*
* @subsection config Daemon Configuration The daemon takes the file system
path
* to a configurator class as its argument. After creating a

Modified: trunk/java/ch/idok/dmsd/management/DaemonManager.java
==============================================================================
--- trunk/java/ch/idok/dmsd/management/DaemonManager.java (original)
+++ trunk/java/ch/idok/dmsd/management/DaemonManager.java Mon May 5
11:15:57 2008
@@ -23,9 +23,8 @@
* @package dmsd.management
* @brief Provides classes for daemon management.
*
- * Provides the classes for managing the dmsd. Managing functions include
- * - Stopping the daemon
- * - Starting the daemon
+ * Provides the classes for managing the dmsd. Managing functions include -
+ * Stopping the daemon - Starting the daemon
*/

/**

Modified: trunk/java/ch/idok/dmsd/management/ExternalDaemonControl.java
==============================================================================
--- trunk/java/ch/idok/dmsd/management/ExternalDaemonControl.java
(original)
+++ trunk/java/ch/idok/dmsd/management/ExternalDaemonControl.java Mon
May 5 11:15:57 2008
@@ -31,11 +31,11 @@
* the DMS daemon itself.
*
* It is designed for commandline tool support. The following commands are
- * standardised:
- * - daemon logLevel configClass <args..> - Start the DMS daemon. This
command
- * is not implemented by the external daemon controller, but by the daemon
- * itself. - stop logLevel configClass <args..> - Stop the DMS daemon. -
status
- * logLevel configClass - Get the status (running / not running) of the
daemon
+ * standardised: - daemon logLevel configClass <args..> - Start the DMS
daemon.
+ * This command is not implemented by the external daemon controller, but by
the
+ * daemon itself. - stop logLevel configClass <args..> - Stop the DMS
daemon. -
+ * status logLevel configClass - Get the status (running / not running) of
the
+ * daemon
*
* Other commands can be implemented as well.
*/
@@ -53,11 +53,10 @@
/**
* @brief Return a description of the (commandline) tool usage.
*
- * @return Usage description. The description must have the form
- * \<tab\>extra commands: \<description\>\<newline\>
+ * @return Usage description. The description must have the form
\<tab\>extra
+ * commands: \<description\>\<newline\>
*
- * and for each command
- * \<tab\>\<command\>-argN: \<description\>\<newline\>
+ * and for each command \<tab\>\<command\>-argN:
\<description\>\<newline\>
*
* with N>=3, the command specific arguments
*/

Modified: trunk/java/ch/idok/dmsd/pipeline/PipelineData.java
==============================================================================
--- trunk/java/ch/idok/dmsd/pipeline/PipelineData.java (original)
+++ trunk/java/ch/idok/dmsd/pipeline/PipelineData.java Mon May 5 11:15:57
2008
@@ -37,7 +37,7 @@
* @brief The repository change that has to be handled.
*/
public RepositoryChange repositoryChange; // generated by update list
- // generator
+ // generator

/**
* @brief Content of the document associated with the repository change.
@@ -46,7 +46,7 @@
* The content extractor should replace the raw data with indexable text.
*/
public byte[] documentContent; // generated by loader, modified by
- // extractor
+ // extractor

/**
* @brief Meta data of the document associated with the repository
change.
@@ -55,7 +55,7 @@
* data. The content extractor might add some extra meta data.
*/
public Map<String, String> documentMetadata; // generated by loader,
- // modified by extractor
+ // modified by extractor

/**
* @brief The pipeline stage that handles this data item at the moment.
@@ -67,7 +67,7 @@
* item.
*/
public DmsException exception; // not null if the data item cannot be
- // handled
+ // handled

/**
* @brief Retry counter for use by the pipeline controller.

Modified: trunk/java/ch/idok/dmsd/pipeline/PipelineQueue.java
==============================================================================
--- trunk/java/ch/idok/dmsd/pipeline/PipelineQueue.java (original)
+++ trunk/java/ch/idok/dmsd/pipeline/PipelineQueue.java Mon May 5 11:15:57
2008
@@ -26,12 +26,9 @@
/**
* @brief Queue connecting pipeline stages.
*
- * A pipeline queue is responsible for
- * distributing the pipeline data from
- * stage to stage.
- * It receives pipeline data via its own
- * push() method and distributes the data
- * using the PipelineStage.push() method.
+ * A pipeline queue is responsible for distributing the pipeline data from
stage
+ * to stage. It receives pipeline data via its own push() method and
distributes
+ * the data using the PipelineStage.push() method.
*/
public abstract class PipelineQueue {


Modified: trunk/java/ch/idok/dmsd/pipeline/PipelineSignal.java
==============================================================================
--- trunk/java/ch/idok/dmsd/pipeline/PipelineSignal.java (original)
+++ trunk/java/ch/idok/dmsd/pipeline/PipelineSignal.java Mon May 5
11:15:57 2008
@@ -20,9 +20,9 @@
package ch.idok.dmsd.pipeline;

/**
- * @brief The different pipeline signals.
- * - Upstream signals have direction UP. - Downstream signals have
- * direction DOWN. - Nonpropagating signals have direction NONE.
+ * @brief The different pipeline signals. - Upstream signals have direction
UP. -
+ * Downstream signals have direction DOWN. - Nonpropagating signals
have
+ * direction NONE.
*/
public enum PipelineSignal {
/** @name Downstream signals */

Modified: trunk/java/ch/idok/dmsd/pipeline/PipelineStage.java
==============================================================================
--- trunk/java/ch/idok/dmsd/pipeline/PipelineStage.java (original)
+++ trunk/java/ch/idok/dmsd/pipeline/PipelineStage.java Mon May 5 11:15:57
2008
@@ -189,7 +189,8 @@
* The pipeline data item to be processed by this stage.
*/
public abstract void push(PipelineData data); // Data might be null for a
- // stage that generates
data
+
+ // stage that generates data

/**
* @brief Initialize this stage according to the stage properties
@@ -197,7 +198,8 @@
* This method must be called before any stage properties are recognized.
*/
public abstract void initialize() throws DmsException; // Called after
- // property
changes
+
+ // property changes

/**
* @brief Process pipeline signals.

Modified: trunk/java/ch/idok/qtgui/AdvancedSearchController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/AdvancedSearchController.java (original)
+++ trunk/java/ch/idok/qtgui/AdvancedSearchController.java Mon May 5
11:15:57 2008
@@ -31,13 +31,12 @@
import com.trolltech.qt.gui.QMessageBox;

/**
- * This class is responsible for creating and controlling an
- * advanced search dialog. It is the backend to the class
- * defined in AdvancedSearchDialog.jui. The advanced search
- * dialog allows the user to define more complicated
- * search expressions e.g. containing specific meta fields or
- * using the extended Lucene search syntax.
- *
+ * This class is responsible for creating and controlling an advanced search
+ * dialog. It is the backend to the class defined in
AdvancedSearchDialog.jui.
+ * The advanced search dialog allows the user to define more complicated
search
+ * expressions e.g. containing specific meta fields or using the extended
Lucene
+ * search syntax.
+ *
*/
public class AdvancedSearchController extends QSignalEmitter {

@@ -109,13 +108,12 @@
if (cred == null)
return;
SearchService ss = ServiceProvider.getInstance().getSearchService();
- if (ss == null) return;
+ if (ss == null)
+ return;
String[] fieldList = null;
try {
- fieldList = ss.listMetafields(
- cred,
- repoC_.getCurrentProjectName() + "/"
- + repoC_.getCurrentRepoName());
+ fieldList = ss.listMetafields(cred,
repoC_.getCurrentProjectName()
+ + "/" + repoC_.getCurrentRepoName());
} catch (DmsException e) {
// TODO Auto-generated catch block
e.printStackTrace();

Modified: trunk/java/ch/idok/qtgui/AuthorizationController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/AuthorizationController.java (original)
+++ trunk/java/ch/idok/qtgui/AuthorizationController.java Mon May 5
11:15:57 2008
@@ -48,8 +48,8 @@

/**
* This class controls the settings of authorization data . One can add and
- * remove principals to groups and assign ACLs to folders and repositories.
- * It is the backend to the GUI class defined in
AuthorizationSettingsDialog.jui
+ * remove principals to groups and assign ACLs to folders and repositories.
It
+ * is the backend to the GUI class defined in AuthorizationSettingsDialog.jui
*
*/
public class AuthorizationController extends QObject {
@@ -530,11 +530,10 @@
}

/**
- * TODO:
- * - give hint to use right mouse click for changes
- * - add toolbar, icons and menus for manipulation of rights
- * - ensure that you can not take away your own admin rights
- * - ensure that disabled principals do not react to clicks on checklist
icons any more
+ * TODO: - give hint to use right mouse click for changes - add toolbar,
+ * icons and menus for manipulation of rights - ensure that you can not
take
+ * away your own admin rights - ensure that disabled principals do not
react
+ * to clicks on checklist icons any more
*/

private final void applyAuthorizationSettings() {

Modified: trunk/java/ch/idok/qtgui/Convert.java
==============================================================================
--- trunk/java/ch/idok/qtgui/Convert.java (original)
+++ trunk/java/ch/idok/qtgui/Convert.java Mon May 5 11:15:57 2008
@@ -17,9 +17,9 @@
import
com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter;

public class Convert {
-
- private static int unoPort = 8016;
-
+
+ private static int unoPort = 8016;
+
public static void ensureStartedOpenOfficeService() {
try {
new Socket("127.0.0.1", unoPort);
@@ -41,39 +41,47 @@
}
}

- public static void convert(InputStream source,String
sourceFileExtension, OutputStream dest) {
+ public static void convert(InputStream source, String
sourceFileExtension,
+ OutputStream dest) {
ensureStartedOpenOfficeService();
OpenOfficeConnection connection = null;
- DefaultDocumentFormatRegistry registry = new
DefaultDocumentFormatRegistry();
- DocumentFormat jpg = new DocumentFormat("JPEG",
DocumentFamily.DRAWING, "image/jpeg", "jpg");
+ DefaultDocumentFormatRegistry registry = new
DefaultDocumentFormatRegistry();
+ DocumentFormat jpg = new DocumentFormat("JPEG",
DocumentFamily.DRAWING,
+ "image/jpeg", "jpg");
registry.addDocumentFormat(jpg);
- DocumentFormat png = new DocumentFormat("Portable Network Graphics",
DocumentFamily.DRAWING, "image/x-png", "png");
+ DocumentFormat png = new DocumentFormat("Portable Network Graphics",
+ DocumentFamily.DRAWING, "image/x-png", "png");
registry.addDocumentFormat(png);
- DocumentFormat tiff = new DocumentFormat("TIFF",
DocumentFamily.DRAWING, "image/tiff", "tif");
+ DocumentFormat tiff = new DocumentFormat("TIFF",
+ DocumentFamily.DRAWING, "image/tiff", "tif");
registry.addDocumentFormat(tiff);
- DocumentFormat gif = new DocumentFormat("GIF",
DocumentFamily.DRAWING, "image/gif", "gif");
+ DocumentFormat gif = new DocumentFormat("GIF",
DocumentFamily.DRAWING,
+ "image/gif", "gif");
registry.addDocumentFormat(gif);
- DocumentFormat sourceFormat =
registry.getFormatByFileExtension(sourceFileExtension);
- DocumentFormat destFormat =
registry.getFormatByFileExtension("pdf");
+ DocumentFormat sourceFormat = registry
+ .getFormatByFileExtension(sourceFileExtension);
+ DocumentFormat destFormat = registry.getFormatByFileExtension("pdf");
try {
connection = new SocketOpenOfficeConnection(unoPort);
connection.connect();
System.out.println("connected");
- DocumentConverter converter = new
StreamOpenOfficeDocumentConverter(connection,registry);
- converter.convert(source,sourceFormat,dest,destFormat);
+ DocumentConverter converter = new
StreamOpenOfficeDocumentConverter(
+ connection, registry);
+ converter.convert(source, sourceFormat, dest, destFormat);
System.out.println("converted");
try {
source.close();
dest.close();
} catch (IOException e) {
e.printStackTrace();
- }
+ }
} catch (ConnectException e) {
throw new RuntimeException(e);
} finally {
connection.disconnect();
}
}
+
public static void convert(String source, String dest) {
ensureStartedOpenOfficeService();
OpenOfficeConnection connection = null;
@@ -83,9 +91,10 @@
connection = new SocketOpenOfficeConnection(unoPort);
connection.connect();
System.out.println("connected");
- DocumentConverter converter = new
OpenOfficeDocumentConverter(connection);
- outputFile = new File( dest );
- inputFile = new File( source );
+ DocumentConverter converter = new OpenOfficeDocumentConverter(
+ connection);
+ outputFile = new File(dest);
+ inputFile = new File(source);
converter.convert(inputFile, outputFile);
System.out.println("converted");
} catch (ConnectException e) {

Modified: trunk/java/ch/idok/qtgui/FolderTree.java
==============================================================================
--- trunk/java/ch/idok/qtgui/FolderTree.java (original)
+++ trunk/java/ch/idok/qtgui/FolderTree.java Mon May 5 11:15:57 2008
@@ -134,8 +134,8 @@
folderDropDownMenu_ = new QMenu(ui.dmsDirWidget);

openFolderAction_ = new QAction(new QIcon(
- "classpath:ch/idok/qtgui/images/fileopen.png"),
- "Open Folder", ui.dmsDirWidget);
+ "classpath:ch/idok/qtgui/images/fileopen.png"), "Open
Folder",
+ ui.dmsDirWidget);
openFolderAction_.triggered.connect(this, "openFolder()");
folderDropDownMenu_.addAction(openFolderAction_);

@@ -145,9 +145,8 @@
searchInFolderAction_.triggered.connect(this, "searchInFolder()");
folderDropDownMenu_.addAction(searchInFolderAction_);

- searchInFolderSinceDateAction_ = new QAction(
- new QIcon(
-
"classpath:ch/idok/qtgui/images/alcaline_spiral_calendar.png"),
+ searchInFolderSinceDateAction_ = new QAction(new QIcon(
+
"classpath:ch/idok/qtgui/images/alcaline_spiral_calendar.png"),
"Search since a given Date within Folder", ui.dmsDirWidget);
searchInFolderSinceDateAction_.triggered.connect(this,
"searchSinceDate()");

Modified: trunk/java/ch/idok/qtgui/MainWindow.java
==============================================================================
--- trunk/java/ch/idok/qtgui/MainWindow.java (original)
+++ trunk/java/ch/idok/qtgui/MainWindow.java Mon May 5 11:15:57 2008
@@ -280,7 +280,7 @@
ui_.dmsDirWidget.receivedFileDrop.connect(poc_,
"handleFileDrops(List,String)");
ui_.dmsDirWidget.setDragEnabled(false);
-
+
ui_.browseTreeWidget.receivedFileDrop.connect(this,
"handleFileDrops(List,String)");

@@ -612,8 +612,10 @@
return;
RepositoryPath repPath = (RepositoryPath) selectedDocItem_.data(0,
Qt.ItemDataRole.UserRole);
- String nameSuggestion = new String
(repPath.getDocumentId().toString().split("/")[1]);
- String f = QFileDialog.getSaveFileName(null, "Save document
as",nameSuggestion);
+ String nameSuggestion = new String(repPath.getDocumentId().toString()
+ .split("/")[1]);
+ String f = QFileDialog.getSaveFileName(null, "Save document as",
+ nameSuggestion);
if (f == null || f.equals(""))
return;
FileOutputStream os;

Modified: trunk/java/ch/idok/qtgui/PreviewWidget.java
==============================================================================
--- trunk/java/ch/idok/qtgui/PreviewWidget.java (original)
+++ trunk/java/ch/idok/qtgui/PreviewWidget.java Mon May 5 11:15:57 2008
@@ -104,7 +104,7 @@
private static List<String> imageFilters_;

private RepositoryPath repPath_;
-
+
private RepositoryController repoCon_;

private File tempPageFile_ = null;
@@ -112,8 +112,8 @@
public Signal1<RepositoryPath> documentSelected = new
Signal1<RepositoryPath>();

private PDFFile pdfFile_ = null;
-
- private QImage[] pictureArray;
+
+ private QImage[] pictureArray;

private static QCursor BUSYCURSOR = new
QCursor(Qt.CursorShape.BusyCursor);

@@ -224,7 +224,7 @@
int pos = name.lastIndexOf(".");
String ext = name.substring(pos + 1, pos + 4).toLowerCase();
if (imageFilters_.contains(ext)) {
- //Should contain: bmp,pbm,pgm,png,ppm,xbm,xpm
+ // Should contain: bmp,pbm,pgm,png,ppm,xbm,xpm
previewImage();
pdfPageSpinBox_.hide();
} else if (ext.equals("txt") | ext.equals("htm") | ext.equals("xml")
@@ -235,13 +235,14 @@
} else if (ext.equals("pdf")) {
// fileName_ contains the local copy of the PDF file
try {
- QTime time = new QTime();
+ QTime time = new QTime();
int displayTime = 0;
time.start();
File file = new File(fileName_);
RandomAccessFile raf = new RandomAccessFile(file, "r");
FileChannel channel = raf.getChannel();
- ByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY,
0, channel.size());
+ ByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY,
0,
+ channel.size());
pdfFile_ = new PDFFile(buf);
numPages_ = pdfFile_.getNumPages();
pictureArray = new QImage[numPages_];
@@ -250,88 +251,101 @@
pdfPageSpinBox_.show();
pdfPageSpinBox_.setValue(1);
displayTime = time.elapsed();
- System.out.println("Display time: "+ displayTime+ " ms");
+ System.out.println("Display time: " + displayTime + " ms");
} catch (Exception e) {
QMessageBox.warning(null, tr("iDok Warning"),
tr("General PDF decoding problem:") +
e.getMessage());
}
} else if (ext.equals("odt") | ext.equals("sxw") | ext.equals("rtf")
- | ext.equals("doc")| ext.equals("wpd")| ext.equals("ods")
- | ext.equals("sxc")| ext.equals("xls")| ext.equals("csv")
- | ext.equals("tsv")| ext.equals("odp")| ext.equals("sxi")
- | ext.equals("ppt")) {
- try {
- QTime time = new QTime();
- int convertTime = 0;
- int displayTime = 0;
- time.start();
- if(fileName_.startsWith("/tmp/lastViewedFile")){
- ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
- outStream =
repoCon_.getCurrentRepo().getFileOverHttp(repoCon_.getCurrentRepo(),
repPath_, repPath_.getRelativeFilesystemPath() + "?pdf");
- ByteBuffer outBuffer =
ByteBuffer.wrap(outStream.toByteArray());
- pdfFile_ = new PDFFile(outBuffer);
- numPages_ = pdfFile_.getNumPages();
- pictureArray = new QImage[numPages_];
- pdfPageSpinBox_.setRange(1, numPages_);
- previewPdfFile(1);
- pdfPageSpinBox_.show();
- pdfPageSpinBox_.setValue(1);
- displayTime = time.elapsed();
- System.out.println("Display time: "+
displayTime+ " ms");
- System.out.println("Conversion+Display= "+
(convertTime+displayTime) + " ms");
- }else{
- textView_.setText("<b> Sorry, preview of this
file type on a local drive is not yet supported </b>");
- enableTextView();
- }
- } catch (Exception e) {
- QMessageBox.warning(null, tr("iDok Warning"),
- tr("General PDF decoding problem:") +
e.getMessage());
- }
-
- } else if (ext.equals("jpg")| ext.equals("gif")| ext.equals("tif")|
ext.equals("svg")) {
- try {
- QTime time = new QTime();
- time.start();
- if(fileName_.startsWith("/tmp/lastViewedFile")){
- ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
- outStream =
repoCon_.getCurrentRepo().getFileOverHttp(repoCon_.getCurrentRepo(),
repPath_, repPath_.getRelativeFilesystemPath() + "?png");
- byte[] buf = outStream.toByteArray();
- QPixmap pixMap = new QPixmap();
- pixMap.loadFromData(buf);
- QImage image = pixMap.toImage();
- imageView_.setImage(image);
- enableImageView();
- pdfPageSpinBox_.hide();
- System.out.println("Display time: "+
time.elapsed() + " ms");
- }else{
- textView_.setText("<b> Sorry, preview of this file
type on a local drive is not yet supported </b>");
- enableTextView();
- }
- } catch (Exception e) {
- QMessageBox.warning(null, tr("iDok Warning"),
- tr("General PDF decoding problem:") +
e.getMessage());
- }
-
-
- }else{
+ | ext.equals("doc") | ext.equals("wpd") | ext.equals("ods")
+ | ext.equals("sxc") | ext.equals("xls") | ext.equals("csv")
+ | ext.equals("tsv") | ext.equals("odp") | ext.equals("sxi")
+ | ext.equals("ppt")) {
+ try {
+ QTime time = new QTime();
+ int convertTime = 0;
+ int displayTime = 0;
+ time.start();
+ if (fileName_.startsWith("/tmp/lastViewedFile")) {
+ ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
+ outStream = repoCon_.getCurrentRepo().getFileOverHttp(
+ repoCon_.getCurrentRepo(), repPath_,
+ repPath_.getRelativeFilesystemPath() + "?pdf");
+ ByteBuffer outBuffer = ByteBuffer.wrap(outStream
+ .toByteArray());
+ pdfFile_ = new PDFFile(outBuffer);
+ numPages_ = pdfFile_.getNumPages();
+ pictureArray = new QImage[numPages_];
+ pdfPageSpinBox_.setRange(1, numPages_);
+ previewPdfFile(1);
+ pdfPageSpinBox_.show();
+ pdfPageSpinBox_.setValue(1);
+ displayTime = time.elapsed();
+ System.out.println("Display time: " + displayTime + "
ms");
+ System.out.println("Conversion+Display= "
+ + (convertTime + displayTime) + " ms");
+ } else {
+ textView_
+ .setText("<b> Sorry, preview of this file type
on a local drive is not yet supported </b>");
+ enableTextView();
+ }
+ } catch (Exception e) {
+ QMessageBox.warning(null, tr("iDok Warning"),
+ tr("General PDF decoding problem:") +
e.getMessage());
+ }
+
+ } else if (ext.equals("jpg") | ext.equals("gif") | ext.equals("tif")
+ | ext.equals("svg")) {
+ try {
+ QTime time = new QTime();
+ time.start();
+ if (fileName_.startsWith("/tmp/lastViewedFile")) {
+ ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
+ outStream = repoCon_.getCurrentRepo().getFileOverHttp(
+ repoCon_.getCurrentRepo(), repPath_,
+ repPath_.getRelativeFilesystemPath() + "?png");
+ byte[] buf = outStream.toByteArray();
+ QPixmap pixMap = new QPixmap();
+ pixMap.loadFromData(buf);
+ QImage image = pixMap.toImage();
+ imageView_.setImage(image);
+ enableImageView();
+ pdfPageSpinBox_.hide();
+ System.out.println("Display time: " + time.elapsed()
+ + " ms");
+ } else {
+ textView_
+ .setText("<b> Sorry, preview of this file type
on a local drive is not yet supported </b>");
+ enableTextView();
+ }
+ } catch (Exception e) {
+ QMessageBox.warning(null, tr("iDok Warning"),
+ tr("General PDF decoding problem:") +
e.getMessage());
+ }
+
+ } else {
textView_
.setText("<b> Sorry, preview of this file type is not
yet supported </b> <br> (Doubleclick on document to start external viewer)");
enableTextView();
}
}
-
-
+
static class MyAuthenticator extends Authenticator {
-
- static final String kuser =
GuiClientHandler.getInstance().getCredentials().getUsername(); // your
account name
- static final char[] kpass =
GuiClientHandler.getInstance().getCredentials().getPassword();; // your
password for the account
- public PasswordAuthentication getPasswordAuthentication() {
- System.err.println("Feeding username and password for " +
getRequestingScheme());
- return (new PasswordAuthentication(kuser, kpass));
- }
- }

-
+ static final String kuser = GuiClientHandler.getInstance()
+ .getCredentials().getUsername(); // your account name
+ static final char[] kpass = GuiClientHandler.getInstance()
+ .getCredentials().getPassword();; // your password for the
+
+ // account
+
+ public PasswordAuthentication getPasswordAuthentication() {
+ System.err.println("Feeding username and password for "
+ + getRequestingScheme());
+ return (new PasswordAuthentication(kuser, kpass));
+ }
+ }
+
private void previewImage() {
image_ = new QImage(fileName_);
if (image_.width() * image_.height() < 8000000) {
@@ -371,48 +385,61 @@
}

/**
- * routine to decode and preview a PDF file
+ * routine to decode and preview a PDF file
*/
private void previewPdfFile(int page) {
setCursor(BUSYCURSOR);
try {
QTime time = new QTime();
- time.start();
- if(pictureArray[page-1] == null){
- PDFPage pdfPage = pdfFile_.getPage(page);
- System.out.println("Loading Page #"+page);
- System.out.println("New page time(generate page): "+
time.restart() + " ms");
- Rectangle rect = new
Rectangle(0,0,(int)pdfPage.getBBox().getWidth(),(int)pdfPage.getBBox().getHeight());

- int width = rect.width;
- int height =rect.height;
- BufferedImage image = (BufferedImage)pdfPage.getImage(
- width, height, //width & height
- rect, // clip rect
- null, // null for the ImageObserver
- true, // fill background with white
- true // block until drawing is done
- );
- System.out.println("New page time(generate image): "+
time.restart() + " ms");
- if (image != null) {
- ByteArrayOutputStream out = new
ByteArrayOutputStream();
- ImageIO.write(image, "png", out);
- System.out.println("New page time(convert image to
stream): "+ time.restart() + " ms");
- byte[] buf = out.toByteArray();
- System.out.println("New page time(convert stream to
byte[]): "+ time.restart() + " ms");
- QPixmap pixMap = new QPixmap(width,height);
- pixMap.loadFromData(buf);
- System.out.println("New page time(convert byte[] tp
pixmap): "+ time.restart() + " ms");
- pictureArray[page-1] = pixMap.toImage();
- System.out.println("New page time(Convert pixmap to
Image): "+ time.restart() + " ms");
- imageView_.setImage(pictureArray[page-1]);
- System.out.println("New page time(Set imageView): "+
time.restart() + " ms");
- enableImageView();
- }
- }else{
- imageView_.setImage(pictureArray[page-1]);
+ time.start();
+ if (pictureArray[page - 1] == null) {
+ PDFPage pdfPage = pdfFile_.getPage(page);
+ System.out.println("Loading Page #" + page);
+ System.out.println("New page time(generate page): "
+ + time.restart() + " ms");
+ Rectangle rect = new Rectangle(0, 0, (int) pdfPage.getBBox()
+ .getWidth(), (int) pdfPage.getBBox().getHeight());
+ int width = rect.width;
+ int height = rect.height;
+ BufferedImage image = (BufferedImage) pdfPage.getImage(width,
+ height, // width & height
+ rect, // clip rect
+ null, // null for the ImageObserver
+ true, // fill background with white
+ true // block until drawing is done
+ );
+ System.out.println("New page time(generate image): "
+ + time.restart() + " ms");
+ if (image != null) {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ ImageIO.write(image, "png", out);
+ System.out
+ .println("New page time(convert image to
stream): "
+ + time.restart() + " ms");
+ byte[] buf = out.toByteArray();
+ System.out
+ .println("New page time(convert stream to
byte[]): "
+ + time.restart() + " ms");
+ QPixmap pixMap = new QPixmap(width, height);
+ pixMap.loadFromData(buf);
+ System.out
+ .println("New page time(convert byte[] tp
pixmap): "
+ + time.restart() + " ms");
+ pictureArray[page - 1] = pixMap.toImage();
+ System.out
+ .println("New page time(Convert pixmap to
Image): "
+ + time.restart() + " ms");
+ imageView_.setImage(pictureArray[page - 1]);
+ System.out.println("New page time(Set imageView): "
+ + time.restart() + " ms");
+ enableImageView();
+ }
+ } else {
+ imageView_.setImage(pictureArray[page - 1]);
enableImageView();
}
- System.out.println("New page time(enabeImageView): "+
time.restart() + " ms");
+ System.out.println("New page time(enabeImageView): "
+ + time.restart() + " ms");
System.out.println("");
} catch (Exception e) {
QMessageBox.warning(null, tr("iDok Warning"),

Modified: trunk/java/ch/idok/qtgui/SortableTreeWidgetItem.java
==============================================================================
--- trunk/java/ch/idok/qtgui/SortableTreeWidgetItem.java (original)
+++ trunk/java/ch/idok/qtgui/SortableTreeWidgetItem.java Mon May 5
11:15:57 2008
@@ -25,7 +25,8 @@
import com.trolltech.qt.gui.QTreeWidgetItem;

// This class can not be used, because:
-// In Jambi it seems currently impossible to overwrite the "<" operator,
therefore
+// In Jambi it seems currently impossible to overwrite the "<" operator,
+// therefore
// no numerically sorting of items can be implemented. Current Workaround is
// to display all numbers and dates in a format where the lexographical
sorting
// coincides with the numerical sorting

Modified: trunk/java/ch/idok/qtgui/VirtualFolderController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/VirtualFolderController.java (original)
+++ trunk/java/ch/idok/qtgui/VirtualFolderController.java Mon May 5
11:15:57 2008
@@ -35,8 +35,10 @@
import com.trolltech.qt.gui.QShortcut;

// still: sort metadata alphabetically
-// still: allow to net virtual folders and to join conditions from nested
virtual folders
-// still: enable search and creation of virtual folder for the drop down
menu of virtual folders
+// still: allow to net virtual folders and to join conditions from nested
+// virtual folders
+// still: enable search and creation of virtual folder for the drop down
menu of
+// virtual folders

public class VirtualFolderController extends QSignalEmitter {


Modified: trunk/java/ch/idok/service/client/admin/corba/CorbaAdminService.java
==============================================================================
--- trunk/java/ch/idok/service/client/admin/corba/CorbaAdminService.java
(original)
+++ trunk/java/ch/idok/service/client/admin/corba/CorbaAdminService.java
Mon May 5 11:15:57 2008
@@ -190,9 +190,11 @@
/**
* @see
ch.idok.service.common.admin.AdminService#queryProjectsAndRepositories(ch.idok.common.util.DmsCredentials)
*/
- public String[] queryTask(DmsCredentials cred, String action) throws
DmsException {
+ public String[] queryTask(DmsCredentials cred, String action)
+ throws DmsException {
try {
- return adminObj_.queryTask(CredentialsConverter.toCorba(cred),
action);
+ return adminObj_.queryTask(CredentialsConverter.toCorba(cred),
+ action);
} catch (ServiceException e) {
throw Util.toDmsException(this, e);
}

Modified:
trunk/java/ch/idok/service/client/cli/corba/CorbaCLIFactoryService.java
==============================================================================
--- trunk/java/ch/idok/service/client/cli/corba/CorbaCLIFactoryService.java
(original)
+++ trunk/java/ch/idok/service/client/cli/corba/CorbaCLIFactoryService.java
Mon May 5 11:15:57 2008
@@ -88,8 +88,7 @@
ch.idok.service.common.cli.corba.obj.CLIService cliService_;
CLIServiceFactory factory_;

- CorbaCLIService(
- ch.idok.service.common.cli.corba.obj.CLIService cliService,
+ CorbaCLIService(ch.idok.service.common.cli.corba.obj.CLIService
cliService,
CLIServiceFactory factory) {
cliService_ = cliService;
factory_ = factory;

Modified:
trunk/java/ch/idok/service/client/clienthandler/corba/ClientHandlerServiceImpl.java
==============================================================================
---
trunk/java/ch/idok/service/client/clienthandler/corba/ClientHandlerServiceImpl.java
(original)
+++
trunk/java/ch/idok/service/client/clienthandler/corba/ClientHandlerServiceImpl.java
Mon May 5 11:15:57 2008
@@ -80,7 +80,8 @@
*/
try {
LocalClientHandler localHandler = new LocalClientHandler();
- // Transform empty string back to null value (see
CorbaClientHandler.getCredentials())
+ // Transform empty string back to null value (see
+ // CorbaClientHandler.getCredentials())
if (serviceName.equals(""))
serviceName = null;
DmsCredentials cred = localHandler.getCredentials(kind,
@@ -179,7 +180,8 @@
public String getLastModified(String pathname) throws ServiceException {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
df.setTimeZone(TimeZone.getTimeZone("GMT"));
- String date_string = df.format(new Date(new
File(pathname).lastModified()));
+ String date_string = df.format(new Date(new File(pathname)
+ .lastModified()));
return date_string;
}


Modified:
trunk/java/ch/idok/service/client/search/corba/CorbaSearchService.java
==============================================================================
--- trunk/java/ch/idok/service/client/search/corba/CorbaSearchService.java
(original)
+++ trunk/java/ch/idok/service/client/search/corba/CorbaSearchService.java
Mon May 5 11:15:57 2008
@@ -74,8 +74,7 @@
final HashMap<String, String> map;

/** @brief Constructor. */
- public Result(
- ch.idok.service.common.search.corba.obj.QueryMatch match) {
+ public Result(ch.idok.service.common.search.corba.obj.QueryMatch
match) {
corbaMatch = match;
Metadatum[] metadata = corbaMatch.metadata;
map = new HashMap<String, String>(metadata.length);
@@ -134,7 +133,7 @@

/** @brief Corba iterator object. */
QueryResultIterator corbaIterator; // null => corbaResult=null AND
- // finished
+ // finished

/** @brief Corba query result object. */
QueryResult corbaResult; // null => getMoreMatches OR finished

Modified: trunk/java/ch/idok/service/server/Daemon.java
==============================================================================
--- trunk/java/ch/idok/service/server/Daemon.java (original)
+++ trunk/java/ch/idok/service/server/Daemon.java Mon May 5 11:15:57
2008
@@ -45,9 +45,9 @@
public static void main(String[] args) {
// Initialisation
Setup setup = Setup.getInstance();
- setup.initServer();
+ setup.initServer();
Logger logger = setup.getRootLogger();
-
+
try {
logger.warning("Starting dmssd...");


Modified: trunk/java/ch/idok/service/server/admin/Admin.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/Admin.java (original)
+++ trunk/java/ch/idok/service/server/admin/Admin.java Mon May 5 11:15:57
2008
@@ -50,7 +50,8 @@
*/
public class Admin {

- static private Logger logger_ =
Setup.getInstance().getLogger("service.admin");
+ static private Logger logger_ = Setup.getInstance().getLogger(
+ "service.admin");

static private String projectRoot = System
.getProperty("ch.idok.server.projectRoot");
@@ -74,14 +75,14 @@

static private Pattern actionNamePattern = Pattern
.compile("(?:admin)|(?:read)|(?:write)");
-
+
static ProjectAndRepositoryCreator projectCreator;
-
+
static {
// Instantiate class responsible for creating projects and
repositories
- String className = System.getProperty(
- "ch.idok.service.projectAndRepositoryCreator",
-
"ch.idok.service.server.admin.SimpleProjectAndRepositoryCreator");
+ String className = System
+ .getProperty("ch.idok.service.projectAndRepositoryCreator",
+
"ch.idok.service.server.admin.SimpleProjectAndRepositoryCreator");
try {
projectCreator = (ProjectAndRepositoryCreator) Class.forName(
className).newInstance();
@@ -89,7 +90,7 @@
e.printStackTrace();
System.exit(1);
}
-
+
}

/**
@@ -437,7 +438,8 @@
}

/** Return directory containing repository */
- public static File getRepositoryDir(String projectName, String
repositoryName) {
+ public static File getRepositoryDir(String projectName,
+ String repositoryName) {
return new File(getProjectDir(projectName), repositoryName);
}

@@ -463,7 +465,8 @@
}

/** Return apache configuration file related to repository */
- public static File getApacheConfFile(String projectName, String
repositoryName) {
+ public static File getApacheConfFile(String projectName,
+ String repositoryName) {
return new File(httpdConfDir, projectName + "." + repositoryName
+ ".conf");
}

Modified: trunk/java/ch/idok/service/server/admin/ApacheConfUpdaterThread.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/ApacheConfUpdaterThread.java
(original)
+++ trunk/java/ch/idok/service/server/admin/ApacheConfUpdaterThread.java
Mon May 5 11:15:57 2008
@@ -62,8 +62,8 @@

public ApacheConfUpdaterThread(PermissionAdapter permissionAdapter) {
permissionAdapter_ = permissionAdapter;
- String apacheConfWriterClassName = System.getProperty(
- "ch.idok.service.apacheConfWriter");
+ String apacheConfWriterClassName = System
+ .getProperty("ch.idok.service.apacheConfWriter");
try {
if (apacheConfWriterClassName == null)
apacheConf_ = new SimpleApacheHandler();

Modified:
trunk/java/ch/idok/service/server/admin/AuthPermissionCollection.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/AuthPermissionCollection.java
(original)
+++ trunk/java/ch/idok/service/server/admin/AuthPermissionCollection.java
Mon May 5 11:15:57 2008
@@ -29,7 +29,8 @@
import ch.idok.common.config.Setup;

public class AuthPermissionCollection extends PermissionCollection {
- static private Logger logger_ =
Setup.getInstance().getLogger("service.admin");
+ static private Logger logger_ = Setup.getInstance().getLogger(
+ "service.admin");
private Vector _perms = new Vector();

/*

Modified: trunk/java/ch/idok/service/server/admin/PermissionRoleDBAdapter.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/PermissionRoleDBAdapter.java
(original)
+++ trunk/java/ch/idok/service/server/admin/PermissionRoleDBAdapter.java
Mon May 5 11:15:57 2008
@@ -145,13 +145,12 @@
}

private Connection getConnection(boolean createNew) throws DmsException {
- String driver = System.getProperty(
- "ch.idok.service.admin.jdbc.driver",
+ String driver =
System.getProperty("ch.idok.service.admin.jdbc.driver",
"org.apache.derby.jdbc.EmbeddedDriver");
String user = System.getProperty("ch.idok.service.admin.jdbc.user",
"dms_admin");
- String password = System.getProperty(
- "ch.idok.service.admin.jdbc.user", "");
+ String password =
System.getProperty("ch.idok.service.admin.jdbc.user",
+ "");
String url = System.getProperty("ch.idok.service.admin.jdbc.url",
"jdbc:derby:adminDB");


Modified:
trunk/java/ch/idok/service/server/admin/ProjectAndRepositoryCreator.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/ProjectAndRepositoryCreator.java
(original)
+++ trunk/java/ch/idok/service/server/admin/ProjectAndRepositoryCreator.java
Mon May 5 11:15:57 2008
@@ -49,5 +49,6 @@
* Repository name
* @throws DmsException
*/
- void createRepository(String projectName, String repositoryName) throws
DmsException;
+ void createRepository(String projectName, String repositoryName)
+ throws DmsException;
}

Modified:
trunk/java/ch/idok/service/server/admin/SimpleProjectAndRepositoryCreator.java
==============================================================================
---
trunk/java/ch/idok/service/server/admin/SimpleProjectAndRepositoryCreator.java
(original)
+++
trunk/java/ch/idok/service/server/admin/SimpleProjectAndRepositoryCreator.java
Mon May 5 11:15:57 2008
@@ -33,8 +33,9 @@
public class SimpleProjectAndRepositoryCreator implements
ProjectAndRepositoryCreator {

- static private Logger logger_ =
Setup.getInstance().getLogger("service.admin");
-
+ static private Logger logger_ = Setup.getInstance().getLogger(
+ "service.admin");
+
/**
* @see
ch.idok.service.server.admin.ProjectAndRepositoryCreator#createProject(java.lang.String,
* int)
@@ -62,13 +63,15 @@
*/
public void createRepository(String projectName, String repositoryName)
throws DmsException {
- File repositoryDir = Admin.getRepositoryDir(projectName,
repositoryName);
+ File repositoryDir = Admin
+ .getRepositoryDir(projectName, repositoryName);
File schemaDir = Admin.getSchemaDir(projectName, repositoryName);
InputStream schemaFileFrom = Admin.class
.getResourceAsStream("schema/DublinCore.schema");
File schemaFileTo = Admin.getSchemaFile(projectName, repositoryName,
"DublinCore");
- File apacheConfFile = Admin.getApacheConfFile(projectName,
repositoryName);
+ File apacheConfFile = Admin.getApacheConfFile(projectName,
+ repositoryName);

// Test if project exists
if (!Admin.projectExists(projectName))

Modified: trunk/java/ch/idok/service/server/admin/corba/AdminServiceImpl.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/corba/AdminServiceImpl.java
(original)
+++ trunk/java/ch/idok/service/server/admin/corba/AdminServiceImpl.java Mon
May 5 11:15:57 2008
@@ -300,7 +300,8 @@
*
* @see
ch.idok.service.common.admin.corba.obj.AdminOperations#queryProjectsAndRepositories(ch.idok.service.common.common.corba.obj.CredentialsType)
*/
- public String[] queryTask(CredentialsType cred, String action) throws
ServiceException {
+ public String[] queryTask(CredentialsType cred, String action)
+ throws ServiceException {
try {
logger_.info("queryTask() called by " + cred.username);
Subject subject = aa(cred, null, adapter_);

Modified:
trunk/java/ch/idok/service/server/clienthandler/corba/CorbaClientHandler.java
==============================================================================
---
trunk/java/ch/idok/service/server/clienthandler/corba/CorbaClientHandler.java
(original)
+++
trunk/java/ch/idok/service/server/clienthandler/corba/CorbaClientHandler.java
Mon May 5 11:15:57 2008
@@ -52,14 +52,14 @@
* @see
ch.idok.common.client.ClientHandler#getCredentials(java.lang.String,
* java.net.URI, java.lang.String)
*/
- public DmsCredentials getCredentials(String kind, String serviceName,
String realm)
- throws DmsException {
+ public DmsCredentials getCredentials(String kind, String serviceName,
+ String realm) throws DmsException {
try {
// null is an illegal CORBA value: replace by empty string
if (serviceName == null)
serviceName = "";
- CredentialsType cred = service_.getCredentials(kind,
- serviceName, realm);
+ CredentialsType cred = service_.getCredentials(kind, serviceName,
+ realm);
return CredentialsConverter.fromCorba(cred);
} catch (ServiceException e) {
throw convertException(this, e);

Modified: trunk/java/ch/idok/tools/GetRevisionInfo.java
==============================================================================
--- trunk/java/ch/idok/tools/GetRevisionInfo.java (original)
+++ trunk/java/ch/idok/tools/GetRevisionInfo.java Mon May 5 11:15:57
2008
@@ -46,7 +46,8 @@
try {
svnClient.doInfo(new File(""), SVNRevision.WORKING, false,
new ISVNInfoHandler() {
- public void handleInfo(SVNInfo info) throws
SVNException {
+ public void handleInfo(SVNInfo info)
+ throws SVNException {
if (args[0].equals("revision"))

System.out.println(info.getCommittedRevision()
.getNumber());

Modified: trunk/sites/psi/java/ch/psi/idok/common/config/Setup.java
==============================================================================
--- trunk/sites/psi/java/ch/psi/idok/common/config/Setup.java (original)
+++ trunk/sites/psi/java/ch/psi/idok/common/config/Setup.java Mon May 5
11:15:57 2008
@@ -30,7 +30,8 @@
/**
* Constructor: Should not be called directly
*/
- public Setup() throws Exception { }
+ public Setup() throws Exception {
+ }

/**
* PSI specific JAAS setup

Modified: trunk/sites/psi/java/ch/psi/idok/qtgui/DmsGui.java
==============================================================================
--- trunk/sites/psi/java/ch/psi/idok/qtgui/DmsGui.java (original)
+++ trunk/sites/psi/java/ch/psi/idok/qtgui/DmsGui.java Mon May 5 11:15:57
2008
@@ -59,9 +59,10 @@
// load translations
String locale = QLocale.system().name();
QTranslator translator = new QTranslator();
- if (translator.load("classpath:ch/idok/qtgui/translations/iDok_"
+ locale+ ".qm")){
+ if (translator.load("classpath:ch/idok/qtgui/translations/iDok_"
+ + locale + ".qm")) {
QApplication.installTranslator(translator);
- }
+ }

// Start GUI
MainWindow d = new MainWindow();

Modified:
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIApacheHandler.java
==============================================================================
---
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIApacheHandler.java
(original)
+++
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIApacheHandler.java
Mon May 5 11:15:57 2008
@@ -63,12 +63,13 @@
}

/**
- * @throws DmsException
+ * @throws DmsException
* @see
ch.idok.service.server.admin.ApacheHandler#writeSvnAccessFile(java.lang.String,
* java.lang.String, java.util.Map, java.io.Writer)
*/
public void writeSvnAccessFile(String projectName, String repositoryName,
- Map<String, Map<String, Set<String>>> svnAccessInfo, Writer
writer) throws DmsException {
+ Map<String, Map<String, Set<String>>> svnAccessInfo, Writer
writer)
+ throws DmsException {
String krbDomain = System.getProperty("ch.idok.kerberos.domain");
PrintWriter pw = new PrintWriter(writer);
pw.println("# DO NOT EDIT THIS FILE!");
@@ -139,5 +140,5 @@
"/usr/sbin/apachectl returned with error code " +
status);
}
}
-
+
}

Modified:
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIProjectAndRepositoryCreator.java
==============================================================================
---
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIProjectAndRepositoryCreator.java
(original)
+++
trunk/sites/psi/java/ch/psi/idok/service/server/admin/PSIProjectAndRepositoryCreator.java
Mon May 5 11:15:57 2008
@@ -36,8 +36,9 @@
public class PSIProjectAndRepositoryCreator implements
ProjectAndRepositoryCreator {

- static private Logger logger_ =
Setup.getInstance().getLogger("service.admin");
-
+ static private Logger logger_ = Setup.getInstance().getLogger(
+ "service.admin");
+
/**
* Create a new afs volume and the project directory which acts as a
mount
* point to the afs volume.
@@ -84,8 +85,9 @@

// Obtain TGT for dmsop AT PSI.CH
int status;
- status = Admin.runShellCommand(new String[] {
"/usr/kerberos/bin/kinit",
- "-k", "-t", "/etc/krb5.keytab.dmsop", "dmsop AT PSI.CH" },
+ status = Admin.runShellCommand(new String[] {
+ "/usr/kerberos/bin/kinit", "-k", "-t",
+ "/etc/krb5.keytab.dmsop", "dmsop AT PSI.CH" },
new String[] { "KRB5CCNAME=/tmp/krb5cc_dmsop" });
if (status != 0) {
throw new DmsException(ErrorType.INTERNAL, null,
@@ -114,7 +116,8 @@
*/
public void createRepository(String projectName, String repositoryName)
throws DmsException {
- File repositoryDir = Admin.getRepositoryDir(projectName,
repositoryName);
+ File repositoryDir = Admin
+ .getRepositoryDir(projectName, repositoryName);
File schemaDir = Admin.getSchemaDir(projectName, repositoryName);
InputStream schemaFileFrom = Admin.class
.getResourceAsStream("schema/DublinCore.schema");
@@ -128,7 +131,8 @@
repositoryName), "post-commit");
File mailerConfFileTo = new File(Admin.getSvnConfDir(projectName,
repositoryName), "mailer.conf");
- File apacheConfFile = Admin.getApacheConfFile(projectName,
repositoryName);
+ File apacheConfFile = Admin.getApacheConfFile(projectName,
+ repositoryName);

// Test if project exists
if (!Admin.projectExists(projectName))



  • [idok-commit] SUSPECT: idok commit r85 - in trunk: java/ch/idok/cli java/ch/idok/cli/admin java/ch/idok/common/client java/ch/idok/common/config java/ch/idok/common/impl/repository/svn java/ch/idok/common/impl/repository/svn/kerberized java/ch/idok/common/repository java/ch/idok/common/util java/ch/idok/dmsd/config java/ch/idok/dmsd/impl/config/svnlucene java/ch/idok/dmsd/impl/extractor java/ch/idok/dmsd/impl/extractor/jpeg java/ch/idok/dmsd/impl/extractor/microsoft java/ch/idok/dmsd/impl/extractor/openoffice java/ch/idok/dmsd/impl/extractor/tiff java/ch/idok/dmsd/impl/indexer/lucene java/ch/idok/dmsd/impl/updatelist java/ch/idok/dmsd/main java/ch/idok/dmsd/management java/ch/idok/dmsd/pipeline java/ch/idok/qtgui java/ch/idok/service/client/admin/corba java/ch/idok/service/client/cli/corba java/ch/idok/service/client/clienthandler/corba java/ch/idok/service/client/search/corba java/ch/idok/service/server java/ch/idok/service/server/admin java/ch/idok/service/server/admin/corba java/ch/idok/service/server/clienthandler/corba java/ch/idok/tools sites/psi/java/ch/psi/idok/common/config sites/psi/java/ch/psi/idok/qtgui sites/psi/java/ch/psi/idok/service/server/admin, Apache, 05/05/2008

Archive powered by MHonArc 2.6.19.

Top of Page