foray-commit Mailing List for FOray (Page 288)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(23) |
| 2026 |
Jan
(119) |
Feb
(335) |
Mar
(103) |
Apr
(43) |
May
(154) |
Jun
(107) |
Jul
(187) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2006-07-08 02:20:40
|
Revision: 7765 Author: victormote Date: 2006-07-07 19:20:35 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7765&view=rev Log Message: ----------- Minor doc changes. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java 2006-07-08 02:18:07 UTC (rev 7764) +++ trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java 2006-07-08 02:20:35 UTC (rev 7765) @@ -29,7 +29,7 @@ import java.net.URLStreamHandler; /** - * A standardized way to register a URLStreamHandler for a particular protocol. + * A strategy that registers all custom URL protocols in a standard way. */ public interface ProtocolRegistrationStrategy { @@ -37,7 +37,7 @@ * Registers a URLStreamHandler for the given protocol. When implemented, * this method should be synchronized. If a handler already exists for the * given protocol, this method does nothing. - * @param protocol The protocol to be registered + * @param protocol The protocol to be registered. * @param handler The {@link URLStreamHandler} instance which should be * used for URLs whose protocol is <code>protocol</code>. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 02:18:12
|
Revision: 7764 Author: victormote Date: 2006-07-07 19:18:07 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7764&view=rev Log Message: ----------- Make constructor public so it can be subclassed by other products. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java 2006-07-08 02:14:44 UTC (rev 7763) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java 2006-07-08 02:18:07 UTC (rev 7764) @@ -37,10 +37,9 @@ implements ProtocolRegistrationStrategy { /** - * Package-private constructor. To obtain an instance of this class, use - * the {@link ProtocolRegistrationBroker#getRegistry()} method. + * Construtor. */ - AbstractProtocolRegistration() { + public AbstractProtocolRegistration() { } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 02:14:47
|
Revision: 7763 Author: victormote Date: 2006-07-07 19:14:44 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7763&view=rev Log Message: ----------- Move HashMap and related code from the abstract class to the only subclass that uses it. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java 2006-07-08 02:07:37 UTC (rev 7762) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java 2006-07-08 02:14:44 UTC (rev 7763) @@ -27,8 +27,6 @@ package org.foray.common.url; import java.net.URLStreamHandler; -import java.util.HashMap; -import java.util.Map; /** * Abstract implementation of ProtocolHandlerRegistry which factorizes out @@ -39,14 +37,6 @@ implements ProtocolRegistrationStrategy { /** - * Map of already registered protocols. - * The key is a String containing the protocol name. - * The value is the {@link URLStreamHandler} which should be used for that - * protocol. - */ - protected Map protocols = new HashMap(); - - /** * Package-private constructor. To obtain an instance of this class, use * the {@link ProtocolRegistrationBroker#getRegistry()} method. */ @@ -60,7 +50,7 @@ abstract void doRegister(String protocol, URLStreamHandler handler); public synchronized void registerProtocolHandler(String protocol, - URLStreamHandler handler) { + URLStreamHandler handler) { if (protocol == null) { throw new IllegalArgumentException("Cannot register a null " + "protocol."); @@ -69,9 +59,7 @@ throw new IllegalArgumentException("Cannot register a null " + "URLStreamHandler."); } - if (!this.protocols.containsKey(protocol)) { - this.protocols.put(protocol, handler); - doRegister(protocol, handler); - } + doRegister(protocol, handler); } + } Modified: trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 02:07:37 UTC (rev 7762) +++ trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 02:14:44 UTC (rev 7763) @@ -27,6 +27,8 @@ package org.foray.common.url; import java.net.URLStreamHandler; +import java.util.HashMap; +import java.util.Map; import java.util.StringTokenizer; /** @@ -37,6 +39,14 @@ extends AbstractProtocolRegistration { /** + * Map of already registered protocols. + * The key is a String containing the protocol name. + * The value is the {@link URLStreamHandler} which should be used for that + * protocol. + */ + protected Map protocols = new HashMap(); + + /** * Package-private constructor. * @see ProtocolRegistrationBroker#getRegistry */ @@ -44,7 +54,10 @@ } void doRegister(String protocol, URLStreamHandler handler) { - propertyRegistration(protocol, handler); + if (! this.protocols.containsKey(protocol)) { + this.protocols.put(protocol, handler); + propertyRegistration(protocol, handler); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 02:07:44
|
Revision: 7762 Author: victormote Date: 2006-07-07 19:07:37 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7762&view=rev Log Message: ----------- Convert into a ProtocolRegistrationStrategy implementation. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java 2006-07-08 01:58:47 UTC (rev 7761) +++ trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java 2006-07-08 02:07:37 UTC (rev 7762) @@ -20,7 +20,9 @@ * */ -/* $Id$ */ +/* +$Id$ +*/ /* Known contributors: * Vincent Hennebert (original author) @@ -30,30 +32,22 @@ import java.net.URLStreamHandler; +import java.net.URLStreamHandlerFactory; /** - * Abstract superclass for all URLStreamHandlers using the FOray scheme for - * custom URLStreamHandler registration. + * Registers URL protocols in a universal manner, attempting first to register + * using a {@link URLStreamHandlerFactory}, then using the Java properties + * method as a fallback. + * @see PropertyProtocolRegistration which registers only using the Java + * properties method. */ -public abstract class UniversalProtocolRegistration extends URLStreamHandler { +public class UniversalProtocolRegistration + extends AbstractProtocolRegistration { /** - * Register an instance of this class with the custom - * URLStreamHandlerFactory so that this handler will be used for URLs of - * a specific type. - * @param protocol The name of the protocol to register. - * @param handler The handler that should be registered to handle URLs of - * type <code>protocol</code>. + * {@inheritDoc} */ - protected static void register(String protocol, URLStreamHandler handler) { - /* Validate the input. */ - if (protocol == null) { - return; - } - if (handler == null) { - return; - } - + public void doRegister(String protocol, URLStreamHandler handler) { /* Get the Factory instance. */ FOrayURLStreamHandlerFactory factory = FOrayURLStreamHandlerFactory.getURLStreamHandlerFactory(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:58:51
|
Revision: 7761 Author: victormote Date: 2006-07-07 18:58:47 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7761&view=rev Log Message: ----------- Rename class in preparation for refactoring it as ProtocolRegistrationStrategy implementation. Added Paths: ----------- trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java Removed Paths: ------------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java Deleted: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-07-08 01:53:53 UTC (rev 7760) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-07-08 01:58:47 UTC (rev 7761) @@ -1,94 +0,0 @@ -/* - * Copyright 2006 The FOray Project. - * http://www.foray.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This work is in part derived from the following work(s), used with the - * permission of the licensor: - * Apache FOP, licensed by the Apache Software Foundation - * - */ - -/* $Id$ */ - -/* Known contributors: - * Vincent Hennebert (original author) - */ - -package org.foray.common.url; - - -import java.net.URLStreamHandler; - -/** - * Abstract superclass for all URLStreamHandlers using the FOray scheme for - * custom URLStreamHandler registration. - */ -public abstract class AbstractURLStreamHandler extends URLStreamHandler { - - /** - * Register an instance of this class with the custom - * URLStreamHandlerFactory so that this handler will be used for URLs of - * a specific type. - * @param protocol The name of the protocol to register. - * @param handler The handler that should be registered to handle URLs of - * type <code>protocol</code>. - */ - protected static void register(String protocol, URLStreamHandler handler) { - /* Validate the input. */ - if (protocol == null) { - return; - } - if (handler == null) { - return; - } - - /* Get the Factory instance. */ - FOrayURLStreamHandlerFactory factory = - FOrayURLStreamHandlerFactory.getURLStreamHandlerFactory(); - - if (factory == null) { - /* If factory is null, it is because something got registered in - * URL.setURLStreamHandlerFactory(URLStreamHandlerFactory) - * before our FOrayURLStreamHandlerFactory could register. - * Therefore, the best we can do is register ours with the Java - * environment "java.protocol.handler.pkgs". */ - /* The FOray Factory will not be able to register itself with Java - * in a case where other software running has already registered - * another URLStreamHandlerFactory first. - * Therefore, we will give Java another opportunity to find our - * custom handler by placing its location in the Java environment. - */ - PropertyProtocolRegistration.propertyRegistration(protocol, - handler); - return; - } - - /* See if this protocol is already registered with the factory. */ - URLStreamHandler registeredHandler = factory.createURLStreamHandler( - protocol); - if (registeredHandler != null) { - /* If already registed, that one is the one being used, and there - * is no way to change it. If it has in fact not yet been used, - * then registering this now would make the new one used instead - * of the old one. However, until we have some indication that this - * would be the "right" thing to do, we will not. */ - return; - } - - /* Register the protocol with the Factory. */ - factory.registerProtocol(protocol, handler); - } - -} Copied: trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java (from rev 7760, trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java) =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java (rev 0) +++ trunk/foray/foray-common/src/java/org/foray/common/url/UniversalProtocolRegistration.java 2006-07-08 01:58:47 UTC (rev 7761) @@ -0,0 +1,94 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* $Id$ */ + +/* Known contributors: + * Vincent Hennebert (original author) + */ + +package org.foray.common.url; + + +import java.net.URLStreamHandler; + +/** + * Abstract superclass for all URLStreamHandlers using the FOray scheme for + * custom URLStreamHandler registration. + */ +public abstract class UniversalProtocolRegistration extends URLStreamHandler { + + /** + * Register an instance of this class with the custom + * URLStreamHandlerFactory so that this handler will be used for URLs of + * a specific type. + * @param protocol The name of the protocol to register. + * @param handler The handler that should be registered to handle URLs of + * type <code>protocol</code>. + */ + protected static void register(String protocol, URLStreamHandler handler) { + /* Validate the input. */ + if (protocol == null) { + return; + } + if (handler == null) { + return; + } + + /* Get the Factory instance. */ + FOrayURLStreamHandlerFactory factory = + FOrayURLStreamHandlerFactory.getURLStreamHandlerFactory(); + + if (factory == null) { + /* If factory is null, it is because something got registered in + * URL.setURLStreamHandlerFactory(URLStreamHandlerFactory) + * before our FOrayURLStreamHandlerFactory could register. + * Therefore, the best we can do is register ours with the Java + * environment "java.protocol.handler.pkgs". */ + /* The FOray Factory will not be able to register itself with Java + * in a case where other software running has already registered + * another URLStreamHandlerFactory first. + * Therefore, we will give Java another opportunity to find our + * custom handler by placing its location in the Java environment. + */ + PropertyProtocolRegistration.propertyRegistration(protocol, + handler); + return; + } + + /* See if this protocol is already registered with the factory. */ + URLStreamHandler registeredHandler = factory.createURLStreamHandler( + protocol); + if (registeredHandler != null) { + /* If already registed, that one is the one being used, and there + * is no way to change it. If it has in fact not yet been used, + * then registering this now would make the new one used instead + * of the old one. However, until we have some indication that this + * would be the "right" thing to do, we will not. */ + return; + } + + /* Register the protocol with the Factory. */ + factory.registerProtocol(protocol, handler); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:53:57
|
Revision: 7760 Author: victormote Date: 2006-07-07 18:53:53 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7760&view=rev Log Message: ----------- Roll up doc and code related to the property-based registration. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-07-08 01:42:02 UTC (rev 7759) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-07-08 01:53:53 UTC (rev 7760) @@ -30,7 +30,6 @@ import java.net.URLStreamHandler; -import java.util.StringTokenizer; /** * Abstract superclass for all URLStreamHandlers using the FOray scheme for @@ -65,7 +64,14 @@ * before our FOrayURLStreamHandlerFactory could register. * Therefore, the best we can do is register ours with the Java * environment "java.protocol.handler.pkgs". */ - registerInEnvironment(protocol, handler); + /* The FOray Factory will not be able to register itself with Java + * in a case where other software running has already registered + * another URLStreamHandlerFactory first. + * Therefore, we will give Java another opportunity to find our + * custom handler by placing its location in the Java environment. + */ + PropertyProtocolRegistration.propertyRegistration(protocol, + handler); return; } @@ -85,71 +91,4 @@ factory.registerProtocol(protocol, handler); } - /** - * Registers a specific protocol handler by making it available to the - * Java property "java.protocol.handler.pkgs". - * @param protocol The name of the protocol to register. - * @param handler An instance of the class that should be registered to - * handle URLs of type <code>protocol</code>. - */ - private static void registerInEnvironment(String protocol, - URLStreamHandler handler) { - /* The FOray Factory will not be able to register itself with Java in a - * case where other software running has already registered another - * URLStreamHandlerFactory first. - * Therefore, we will give Java another opportunity to find our custom - * handler by placing its location in the Java environment. - */ - - /* Parse the path. */ - Class theClass = handler.getClass(); - String classPath = theClass.getName(); - int lastTokenDelimiter = classPath.lastIndexOf('.'); - String className = classPath.substring(lastTokenDelimiter + 1, - classPath.length()); - - /* Validate the class name. */ - if (! className.equals("Handler")) { - return; - } - - Package thePackage = theClass.getPackage(); - String packageName = thePackage.getName(); - lastTokenDelimiter = packageName.lastIndexOf('.'); - String lastSubPackage = packageName.substring(lastTokenDelimiter + 1, - packageName.length()); - /* The last sub-package must be equal to the name of the protocol, or - * Java won't find it. */ - if (! lastSubPackage.equals(protocol)) { - return; - } - - /* Add the packagePrefix to the Java search path. */ - String packagePrefix = packageName.substring(0, lastTokenDelimiter); - String javaProperty = "java.protocol.handler.pkgs"; - String searchPath = System.getProperty(javaProperty); - - /* The search path doesn't exist. Create it. */ - if (searchPath == null) { - System.setProperty(javaProperty, packagePrefix); - return; - } - - /* The search path does exist. See if the package prefix is already - * registered. */ - StringTokenizer packagePrefixIter = new StringTokenizer( - searchPath, "|"); - while (packagePrefixIter.hasMoreTokens()) { - String token = packagePrefixIter.nextToken(); - if (token.equals(packagePrefix)) { - /* It is already registered. No need to do it again. */ - return; - } - } - - /* It is not registered, so we need to add it. */ - searchPath += "|" + packagePrefix; - System.setProperty(javaProperty, searchPath); - } - } Modified: trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:42:02 UTC (rev 7759) +++ trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:53:53 UTC (rev 7760) @@ -48,8 +48,11 @@ } /** - * @param protocol - * @param handler + * Registers a specific protocol handler by making it available to the + * Java property "java.protocol.handler.pkgs". + * @param protocol The name of the protocol to register. + * @param handler An instance of the class that should be registered to + * handle URLs of type <code>protocol</code>. */ public static void propertyRegistration(String protocol, URLStreamHandler handler) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:42:07
|
Revision: 7759 Author: victormote Date: 2006-07-07 18:42:02 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7759&view=rev Log Message: ----------- Extract a static method so that it can be used by other strategies. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:23:15 UTC (rev 7758) +++ trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:42:02 UTC (rev 7759) @@ -29,7 +29,6 @@ import java.net.URLStreamHandler; import java.util.StringTokenizer; - /** * An implementation of {#link ProtocolHandlerRegistry} which modifies the * "java.protocol.handler.pkgs" property to register new URLStreamHandlers. @@ -45,6 +44,15 @@ } void doRegister(String protocol, URLStreamHandler handler) { + propertyRegistration(protocol, handler); + } + + /** + * @param protocol + * @param handler + */ + public static void propertyRegistration(String protocol, + URLStreamHandler handler) { /* Parse the path. */ Class theClass = handler.getClass(); String classPath = theClass.getName(); @@ -101,4 +109,5 @@ searchPath += "|" + packagePrefix; System.setProperty(javaProperty, searchPath); } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:23:19
|
Revision: 7758 Author: victormote Date: 2006-07-07 18:23:15 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7758&view=rev Log Message: ----------- Part of Vincent's patch. Uses the new Broker class to get the predefined Strategy. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java 2006-07-08 01:12:47 UTC (rev 7757) +++ trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java 2006-07-08 01:23:15 UTC (rev 7758) @@ -28,7 +28,8 @@ package org.foray.common.url.classpath; -import org.foray.common.url.AbstractURLStreamHandler; +import org.foray.common.url.ProtocolRegistrationBroker; +import org.foray.common.url.ProtocolRegistrationStrategy; import java.io.IOException; import java.io.InputStream; @@ -45,10 +46,12 @@ * <li><code>classpath:path/to/the/resource</code></li> * </ul> */ -public class Handler extends AbstractURLStreamHandler { +public class Handler extends URLStreamHandler { private static final String PROTOCOL = "classpath"; + private static boolean alreadyRegistered = false; + protected URLConnection openConnection(URL u) { return new URLConnection(u) { public void connect() {} @@ -69,13 +72,19 @@ } /** - * Register an instance of this class with the custom - * URLStreamHandlerFactory so that this handler will be used for URLs of - * protocol "classpath". + * Register an instance of this class with the given ProtocolHandlerRegistry + * so that this handler will be used for URLs of protocol "classpath". This + * method may be safely called several times; only the first time will be + * the registration done. */ - public static void register() { - URLStreamHandler handler = new Handler(); - AbstractURLStreamHandler.register(Handler.PROTOCOL, handler); + public static synchronized void register() { + if (!alreadyRegistered) { + URLStreamHandler handler = new Handler(); + ProtocolRegistrationStrategy registry = + ProtocolRegistrationBroker.getRegistry(); + registry.registerProtocolHandler(Handler.PROTOCOL, handler); + alreadyRegistered = true; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:12:50
|
Revision: 7757 Author: victormote Date: 2006-07-07 18:12:47 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7757&view=rev Log Message: ----------- Clean up IDE warnings with whitespace-only changes. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:09:09 UTC (rev 7756) +++ trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:12:47 UTC (rev 7757) @@ -20,7 +20,9 @@ * */ -/* $Id$ */ +/* +$Id$ +*/ package org.foray.common.url; Modified: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java 2006-07-08 01:09:09 UTC (rev 7756) +++ trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java 2006-07-08 01:12:47 UTC (rev 7757) @@ -20,7 +20,9 @@ * */ -/* $Id$ */ +/* +$Id$ +*/ package org.foray.common.url; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:09:13
|
Revision: 7756 Author: victormote Date: 2006-07-07 18:09:09 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7756&view=rev Log Message: ----------- Part of Vincent's patch, probably to prevent collisions with other Handlers. Modified Paths: -------------- trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java =================================================================== --- trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-07-08 01:01:27 UTC (rev 7755) +++ trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-07-08 01:09:09 UTC (rev 7756) @@ -27,7 +27,6 @@ import org.foray.common.Environment; import org.foray.common.RandomReader; import org.foray.common.URLBuilder; -import org.foray.common.url.classpath.Handler; import org.foray.ps.encode.EncodingParser; import org.foray.ps.encode.EncodingVector; import org.foray.ps.encode.GlyphList; @@ -126,7 +125,7 @@ * only once, hence a static statement. */ static { - Handler.register(); + org.foray.common.url.classpath.Handler.register(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-08 01:01:35
|
Revision: 7755 Author: victormote Date: 2006-07-07 18:01:27 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7755&view=rev Log Message: ----------- Add new classes contributed by Vincent Hennebert. Added Paths: ----------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java Added: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java (rev 0) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java 2006-07-08 01:01:27 UTC (rev 7755) @@ -0,0 +1,77 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* +$Id$ + */ + +package org.foray.common.url; + +import java.net.URLStreamHandler; +import java.util.HashMap; +import java.util.Map; + +/** + * Abstract implementation of ProtocolHandlerRegistry which factorizes out + * things common two both registration methods: by using the + * URL.setURLStreamHandlerFactory of the "java.protocol.handler.pkgs" property. + */ +public abstract class AbstractProtocolRegistration + implements ProtocolRegistrationStrategy { + + /** + * Map of already registered protocols. + * The key is a String containing the protocol name. + * The value is the {@link URLStreamHandler} which should be used for that + * protocol. + */ + protected Map protocols = new HashMap(); + + /** + * Package-private constructor. To obtain an instance of this class, use + * the {@link ProtocolRegistrationBroker#getRegistry()} method. + */ + AbstractProtocolRegistration() { + } + + /** + * Actually does the registration. This is a hook for subclasses so that + * they perform what is needed for their particular implementations. + */ + abstract void doRegister(String protocol, URLStreamHandler handler); + + public synchronized void registerProtocolHandler(String protocol, + URLStreamHandler handler) { + if (protocol == null) { + throw new IllegalArgumentException("Cannot register a null " + + "protocol."); + } + if (handler == null) { + throw new IllegalArgumentException("Cannot register a null " + + "URLStreamHandler."); + } + if (!this.protocols.containsKey(protocol)) { + this.protocols.put(protocol, handler); + doRegister(protocol, handler); + } + } +} Property changes on: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractProtocolRegistration.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Added: trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java (rev 0) +++ trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java 2006-07-08 01:01:27 UTC (rev 7755) @@ -0,0 +1,102 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* $Id$ */ + +package org.foray.common.url; + +import java.net.URLStreamHandler; +import java.util.StringTokenizer; + + +/** + * An implementation of {#link ProtocolHandlerRegistry} which modifies the + * "java.protocol.handler.pkgs" property to register new URLStreamHandlers. + */ +public class PropertyProtocolRegistration + extends AbstractProtocolRegistration { + + /** + * Package-private constructor. + * @see ProtocolRegistrationBroker#getRegistry + */ + PropertyProtocolRegistration() { + } + + void doRegister(String protocol, URLStreamHandler handler) { + /* Parse the path. */ + Class theClass = handler.getClass(); + String classPath = theClass.getName(); + int lastTokenDelimiter = classPath.lastIndexOf('.'); + String className = classPath.substring(lastTokenDelimiter + 1, + classPath.length()); + + /* Validate the class name. */ + if (! className.equals("Handler")) { + throw new IllegalArgumentException( + "The URLStreamHandler for the protocol " + + protocol + + " should be named Handler"); + } + + String packageName = classPath.substring(0, lastTokenDelimiter); + lastTokenDelimiter = packageName.lastIndexOf('.'); + String lastSubPackage = packageName.substring(lastTokenDelimiter + 1, + packageName.length()); + /* The last sub-package must be equal to the name of the protocol, or + * Java won't find it. */ + if (! lastSubPackage.equals(protocol)) { + throw new IllegalArgumentException( + "The URLStreamHandler for the protocol " + + protocol + + " should be in a package named " + + protocol); + } + + /* Add the packagePrefix to the Java search path. */ + String packagePrefix = packageName.substring(0, lastTokenDelimiter); + String javaProperty = "java.protocol.handler.pkgs"; + String searchPath = System.getProperty(javaProperty); + + /* The search path doesn't exist. Create it. */ + if (searchPath == null) { + System.setProperty(javaProperty, packagePrefix); + return; + } + + /* The search path does exist. See if the package prefix is already + * registered. */ + StringTokenizer packagePrefixIter = new StringTokenizer( + searchPath, "|"); + while (packagePrefixIter.hasMoreTokens()) { + String token = packagePrefixIter.nextToken(); + if (token.equals(packagePrefix)) { + /* It is already registered. No need to do it again. */ + return; + } + } + + /* It is not registered, so we need to add it. */ + searchPath += "|" + packagePrefix; + System.setProperty(javaProperty, searchPath); + } +} Property changes on: trunk/foray/foray-common/src/java/org/foray/common/url/PropertyProtocolRegistration.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Added: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java (rev 0) +++ trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java 2006-07-08 01:01:27 UTC (rev 7755) @@ -0,0 +1,69 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* +$Id$ + */ + +package org.foray.common.url; + +/** + * Class that returns an instance of ProtocolHandlerRegistry which is + * unique within the whole application. + */ +public class ProtocolRegistrationBroker { + + /** The singleton instance of ProtocolHandlerRegistry. */ + private static ProtocolRegistrationStrategy registry = null; + + /** + * Sets the registry which will be used within the application for + * registering custom URL protocol handlers. This method may be called only + * once at the beginning, before any call to the {@link #getRegistry} + * method. + * @param registry the registry used to record custom URL protocol handlers + */ + public static synchronized void setRegistry( + ProtocolRegistrationStrategy registry) { + if (registry != null) { + throw new RuntimeException("ProtocolHandlerRegistryBroker: " + + "registry already set"); + } + ProtocolRegistrationBroker.registry = registry; + } + + /** + * Provides access to a ProtocolHandlerRegistry instance, creating it and + * registering it with Java if needed. + * @return The custom ProtocolHandlerRegistry instance for this session. + */ + public static synchronized ProtocolRegistrationStrategy getRegistry() { + /* Here a mechanism will have to be added to choose between the two + * methods of registering a protocol handler: URLStreamHandlerFactory + * or Java property + */ + if (registry == null) { + registry = new PropertyProtocolRegistration(); + } + return registry; + } +} Property changes on: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Added: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java (rev 0) +++ trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java 2006-07-08 01:01:27 UTC (rev 7755) @@ -0,0 +1,43 @@ +/* + * Copyright 2006 The FOray Project. + * http://www.foray.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This work is in part derived from the following work(s), used with the + * permission of the licensor: + * Apache FOP, licensed by the Apache Software Foundation + * + */ + +/* $Id$ */ + +package org.foray.common.url; + +import java.net.URLStreamHandler; + +/** + * A standardized way to register a URLStreamHandler for a particular protocol. + */ +public interface ProtocolRegistrationStrategy { + + /** + * Registers a URLStreamHandler for the given protocol. When implemented, + * this method should be synchronized. If a handler already exists for the + * given protocol, this method does nothing. + * @param protocol The protocol to be registered + * @param handler The {@link URLStreamHandler} instance which should be + * used for URLs whose protocol is <code>protocol</code>. + */ + void registerProtocolHandler(String protocol, URLStreamHandler handler); +} Property changes on: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationStrategy.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-07 23:01:03
|
Revision: 7754 Author: victormote Date: 2006-07-07 16:00:58 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7754&view=rev Log Message: ----------- After registering using the properties method, exit. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-07-01 20:12:45 UTC (rev 7753) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-07-07 23:00:58 UTC (rev 7754) @@ -66,6 +66,7 @@ * Therefore, the best we can do is register ours with the Java * environment "java.protocol.handler.pkgs". */ registerInEnvironment(protocol, handler); + return; } /* See if this protocol is already registered with the factory. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-01 20:12:50
|
Revision: 7753 Author: victormote Date: 2006-07-01 13:12:45 -0700 (Sat, 01 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7753&view=rev Log Message: ----------- Update module documentation. Modified Paths: -------------- trunk/foray/doc/web/module/index.html Modified: trunk/foray/doc/web/module/index.html =================================================================== --- trunk/foray/doc/web/module/index.html 2006-07-01 19:31:10 UTC (rev 7752) +++ trunk/foray/doc/web/module/index.html 2006-07-01 20:12:45 UTC (rev 7753) @@ -18,6 +18,7 @@ <ul> <li><a href="#intro">Introduction</a></li> + <li><a href="#axsl">aXSL</a></li> <li><a href="#list">Summary of Modules</a></li> <li><a href="#build">Building a Module</a></li> </ul> @@ -34,10 +35,21 @@ <p>The purpose of this page is to briefly describe the FOray modules and the dependencies between them.</p> +<h2><a name="axsl">aXSL</a></h2> +<p>FOray has adopted the <a href="http://www.axsl.org">aXSL</a> (API for XSL) +view of document processing. +In a nutshell, this philosophy views document processing not as a monolithic +task, but as a set of discrete modules with well-defined interfaces between them. +This means that very few FOray modules have dependencies on other FOray modules. +Instead, they depend on aXSL interfaces, the implementations of which may or may +not be other FOray modules. +This modular design not only makes improving one module a simpler, cleaner, and +less-risky task, but also allows developers to mix-and-match the "best-of-breed" +modules that may be available.</p> + <h2><a name="list">Summary of Modules</a></h2> -<p>The following table lists each component, in the order in which it should -be built:</p> +<p>The following table lists each FOray module:</p> <table border="1" cellpadding="2"> <tr> @@ -58,8 +70,9 @@ <tr> <td><a class="Menu" href="/module/common/index.html">FOrayCommon</a></td> <td>foray-common</td> - <td>Classes that contain features used by, or potentially used by, more than - one FOray module.</td> + <td>Low-level utilities that contain features used by, or potentially used +by, more than one FOray module. +These tend to be things that we wish were part of the Java distribution.</td> <td>Libraries.</td> </tr> <tr class="Heading1"> @@ -72,30 +85,41 @@ <td>Universals.</td> </tr> <tr> + <td>FOrayPretty</td> + <td>foray-pretty</td> + <td>Classes for pretty-printing XML output.</td> + <td>Universals.</td> + </tr> + <tr> <td><a class="Menu" href="/module/graphic/index.html">FOrayGraphic</a></td> <td>foray-graphic</td> <td>An axslGraphic-compliant module for handling graphics, both bitmapped images and vector drawings.</td> - <td>Universals, axslGraphic.</td> + <td>Universals</td> </tr> <tr> <td><a class="Menu" href="/module/font/index.html">FOrayFont</a></td> <td>foray-font</td> <td>An axslFont-compliant module for handling fonts.</td> - <td>Universals, FOrayPS (to parse Type1 fonts), axslFont.</td> + <td>Universals, FOrayPS (to parse Type1 fonts), FOrayPretty.</td> </tr> <tr> + <td>FOrayHyphen</td> + <td>foray-hyphen</td> + <td>Hyphenates words in various languages.</td> + <td>Universals.</td> + </tr> + <tr> <td>FOrayText</td> <td>foray-text</td> - <td>Classes for handling text-related chores such as line-breaking and - hyphenation.</td> - <td>Universals, axslFont.</td> + <td>Handles line-breaking chores.</td> + <td>Universals.</td> </tr> <tr> <td><a class="Menu" href="/module/pdf/index.html">FOrayPDF</a></td> <td>foray-pdf</td> <td>Classes for building a PDF file from scratch.</td> - <td>Universals, FOrayPS, axslGraphic, axslFont.</td> + <td>Universals, FOrayPS.</td> </tr> <tr> <td>FOrayMIF</td> @@ -109,43 +133,61 @@ <tr> <td><a class="Menu" href="/module/fotree/index.html">FOrayFOTree</a></td> <td>foray-fotree</td> - <td>Classes for parsing an XSL-FO file.</td> - <td>Universals, axslGraphic, axslFont, FOrayText.</td> + <td>Classes for parsing an XSL-FO file and making its contents available.</td> + <td>Universals.</td> </tr> <tr> <td>FOrayAreaTree</td> <td>foray-areatree</td> <td>Classes representing a formatted document.</td> - <td>Universals, axslGraphic, axslFont, FOrayText, FOrayFOTree.</td> + <td>Universals.</td> </tr> <tr> + <td>FOrayOutput</td> + <td>foray-output</td> + <td>Classes that convert an FOTree into an output document. This is useful +for output formats like MIF and RTF that do their own layout.</td> + <td>Universals, FOrayMIF.</td> + </tr> + <tr> <td>FOrayRender</td> <td>foray-render</td> - <td>Classes that convert an AreaTree into an output document.</td> - <td>Universals, axslGraphic, axslFont, FOrayAreaTree, FOrayPS, - FOrayPDF, FOrayMIF.</td> + <td>Classes that convert an AreaTree into an output document. This is useful +for output formats that require layout to be done for them.</td> + <td>Universals, FOrayOutput, FOrayPS.</td> </tr> <tr class="Heading1"> <td colspan="4">Layout Systems</td> </tr> <tr> + <td>FOrayLayout</td> + <td>foray-layout</td> + <td>Abstractions useful for any layout system.</td> + <td>Universals.</td> + </tr> + <tr> <td>FOrayPioneer</td> <td>foray-pioneer</td> <td>The original open-source XSL-FO layout system. It is “eager” and therefore not very sophisticated.</td> - <td>Universals, axslGraphic, axslFont, FOrayText, FOrayFOTree, - FOrayAreaTree.</td> + <td>Universals, FOrayLayout.</td> </tr> <tr class="Heading1"> <td colspan="4">Applications</td> </tr> <tr> + <td><a class="Menu" href="/">FOrayCore</a></td> + <td>foray-core</td> + <td>XSL-FO processing application, using any set of aXSL components.</td> + <td>Universals.</td> + </tr> + <tr> <td><a class="Menu" href="/">FOray</a></td> <td>foray-app</td> - <td>XSL-FO processing application.</td> - <td>Universals, axslGraphic, FOrayGraphic, axslFont, FOrayFont, - FOrayText, FOrayPDF, FOrayFOTree, FOrayAreaTree, FOrayPioneer, - FOrayRenderer.</td> + <td>XSL-FO processing application, using FOray modules.</td> + <td>Universals, FOrayGraphic, FOrayFont, FOrayHyphen, FOrayText, FOrayPDF, +FOrayFOTree, FOrayAreaTree, FOrayLayout, FOrayPioneer, FOrayOutput, +FOrayRenderer, FOrayCore.</td> </tr> </table> @@ -153,7 +195,7 @@ <p>Although each FOray module has its own build script, the preferred way to build FOray modules is to use the main build script, which can intelligently build any subset of FOray that is needed. -See <a href="/app/using/build.html">Building a Subset of FOray</a> for +See <a href="/app/using/build.html#subset">Building a Subset of FOray</a> for details.</p> <!--#include virtual="/00-rsrc/include/leftmenu-end.html" --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-01 19:31:16
|
Revision: 7752 Author: victormote Date: 2006-07-01 12:31:10 -0700 (Sat, 01 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7752&view=rev Log Message: ----------- Update build documentation. Modified Paths: -------------- trunk/foray/doc/web/app/using/build.html trunk/foray/doc/web/module/index.html Modified: trunk/foray/doc/web/app/using/build.html =================================================================== --- trunk/foray/doc/web/app/using/build.html 2006-07-01 01:09:57 UTC (rev 7751) +++ trunk/foray/doc/web/app/using/build.html 2006-07-01 19:31:10 UTC (rev 7752) @@ -22,6 +22,7 @@ <li><a href="#download-source">Downloading Source Code</a></li> <li><a href="#enviro">Setting Up Your Environment</a></li> <li><a href="#build">Run the Build Script</a></li> + <li><a href="#subset">Building a Subset of FOray</a></li> </ul> <h2><a name="intro">Introduction</a></h2> @@ -30,16 +31,12 @@ you need access to source code or to an unreleased feature, you probably just need to <a href="download.html">download a FOray binary distribution</a>.</p> -<p>If you are wanting to build only some FOray modules (instead of the complete -application), please consult the <a href="/module/index.html">FOray Module -User documentation</a>.</p> - <h2><a name="download-source">Downloading Source Code</a></h2> <p><!-- FOray source code can be downloaded through from <a rel="external" href="http://sourceforge.net/projects/foray/">FOray's SourceForge site</a>. --> -FOray source code is currently available only from the <a +FOray source code is currently available only from the <a rel="external" href="http://sourceforge.net/svn/?group_id=109663">source code repository</a>, maintained by SourceForge. Thank you SourceForge!</p> @@ -95,8 +92,35 @@ <h2><a name="build">Run the Build Script</a></h2> <p>The actual build process can be started from foray/scripts/build.sh (for -Unix/Linux) or foray/scripts/build.bat (for Windows).</p> +Unix/Linux) or foray/scripts/build.bat (for Windows). The results of the build +can be found in foray/build/ant/.</p> +<h2><a name="subset">Building a Subset of FOray</a></h2> +<p>Most FOray users will want to build and use the entire product, which is the +default of the build script. +However, some software developers may wish to use a subset of FOray in their +"lib". +For example, a project might wish to use FOray's font and fotree systems, but +want to build the remaining modules themselves. +The FOray build system allows the modules to be built in any combination, +automatically including all FOray dependencies. +To use this feature, select the "clean" target first, followed by the names of +the module(s) that you wish to include in the build, then followed by the +"package" target. +So for the example above, run "ant clean font fotree package".</p> + +<p>The module targets available are: common, pretty, ps, graphic, mif, font, +hyphen, text, pdf, fotree, areatree, output, layout, pioneer, render, core, +app. +For more information on the meaning of these targets, see +<a href="/module/">Modules</a>.</p> + +<p>When a subset is built, the resulting jar file includes the word "subset" in +its name. In all cases, the jar manifest includes a list of the modules that +were included in the build, in a heading entitled "FOray-Modules".</p> + +<p>Note that if a subset is built, some FOray lib entries may not be needed.</p> + <!--#include virtual="/00-rsrc/include/leftmenu-end.html" --> </body> </html> Modified: trunk/foray/doc/web/module/index.html =================================================================== --- trunk/foray/doc/web/module/index.html 2006-07-01 01:09:57 UTC (rev 7751) +++ trunk/foray/doc/web/module/index.html 2006-07-01 19:31:10 UTC (rev 7752) @@ -150,16 +150,12 @@ </table> <h2><a name="build">Building a Module</a></h2> -<p>To build a FOray module, please first make sure that you understand the -dependencies documented above. To download a FOray module, access the FOray -source code repository, and download the foray/<module> source code -module. The value for <module> can be found in the “Repository module” -column in the table above. For example, to download FOrayGraphic, download the -source module “foray/foray-graphic”.</p> +<p>Although each FOray module has its own build script, the preferred way to +build FOray modules is to use the main build script, which can intelligently +build any subset of FOray that is needed. +See <a href="/app/using/build.html">Building a Subset of FOray</a> for +details.</p> -<p>Each module has a scripts/build.sh Bourne shell script for Unix/Linux, and -a scripts/build.bat for Windows.</p> - <!--#include virtual="/00-rsrc/include/leftmenu-end.html" --> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-01 01:10:01
|
Revision: 7751 Author: victormote Date: 2006-06-30 18:09:57 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7751&view=rev Log Message: ----------- Fix outdated doc on build process. Modified Paths: -------------- trunk/foray/doc/web/app/using/build.html Modified: trunk/foray/doc/web/app/using/build.html =================================================================== --- trunk/foray/doc/web/app/using/build.html 2006-07-01 00:45:29 UTC (rev 7750) +++ trunk/foray/doc/web/app/using/build.html 2006-07-01 01:09:57 UTC (rev 7751) @@ -58,48 +58,6 @@ <li>A recent version of <a href="http://ant.apache.org/">Apache Ant</a>.</li> </ul> -<p>Before running the build scripts, you must tell them about your environment. -Set and export the following environment variables:</p> -<ul> - <li><strong>$JAVA_HOME</strong>. Set JAVA_HOME to match the location of -the JDK you wish to use.</li> - <li><strong>$ANT_HOME</strong>. Set ANT_HOME to match the location of the -root of your Ant installatioin.</li> - <li><strong>$FORAY_ROOT</strong> (optional). If you run the build scripts -from the script directories, FOray will automatically compute the FORAY_ROOT -for you. -Otherwise, set FORAY_ROOT to match the location of your foray source code. -For example, if your foray-common module is at /u/foray/foray-common, set -FORAY_ROOT = /u/foray.</li> - <li><strong>$FORAY_CONFIG</strong> (optional). If you wish to override the -Ant properties used during the build without disturbing the build files -themselves, set FORAY_CONFIG to a directory of your choosing, and create the -appropriate Ant property file in that directory. Each build script looks for -a specifically-named property file. Here are the standard file names: - <ul> - <li>foray-build-props.txt</li> - <li>foray-app-build-props.txt</li> - <li>foray-areatree-build-props.txt</li> - <li>foray-common-build-props.txt</li> - <li>foray-font-build-props.txt</li> - <li>foray-fotree-build-props.txt</li> - <li>foray-graphic-build-props.txt</li> - <li>foray-mif-build-props.txt</li> - <li>foray-pdf-build-props.txt</li> - <li>foray-pioneer-build-props.txt</li> - <li>foray-ps-build-props.txt</li> - <li>foray-render-build-props.txt</li> - <li>foray-text-build-props.txt</li> - </ul> - If you are using JAI and do not wish to place the JAI files in the -FOray lib directory, you <em>must </em> place an entry in -foray-graphic-build-props.txt similar to the following so that FOray knows -where to find the JAI code: -<pre> -additional.libs = /u/rsrc/foray/lib-addons -</pre> - </li> -</ul> <p class="Warning">The manual steps needed to handle JAI are considered to be the least of the alternative evils, which include maintaining duplicate code, discontinuing support for PNG and TIFF, or dealing with the uncertain licensing @@ -109,6 +67,32 @@ support for the graphics types for which JAI is currently used, at which time this minor inconvenience will be eliminated.</p> +<p>Before running the build scripts, you must tell them about your environment. +Set and export the following environment variables:</p> +<ul> + <li>$JAVA_HOME. Set this to the location of the JDK you wish to use.</li> + <li>$ANT_HOME. Set this to the location of the root of your Ant +installatioin.</li> + <li><strong>$FORAY_CONFIG</strong> (optional). +The default location of the FOray configuration directory is the FOray "scripts" +directory, but this environment variable can be used to point to a different +directory. +If a file named "foray-build.properties" is found in the FOray configuration +directory, it will be used by the build process. +The useful properties that can be configured in that file are: +<ul> + <li>foray.home = The root directory for FOray itself.</li> + <li>axsl.build = The location of an aXSL build that should be used instead of +the build in the FOray "lib" directory.</li> + <li>ant.home = The root directory for Ant.</li> + <li>jai.libs = Directory containing JAI. If you are using JAI, you can either +place the JAI libs in your FOray lib directory, or set a different directory +using this entry.</li> + <li>checkstyle.home = Directory containing Checkstyle.</li> +</ul> + </li> + </ul> + <h2><a name="build">Run the Build Script</a></h2> <p>The actual build process can be started from foray/scripts/build.sh (for Unix/Linux) or foray/scripts/build.bat (for Windows).</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-01 00:45:34
|
Revision: 7750 Author: victormote Date: 2006-06-30 17:45:29 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7750&view=rev Log Message: ----------- Tag the jar file name with the word "subset" if it is not a full build. Modified Paths: -------------- trunk/foray/scripts/build.xml Modified: trunk/foray/scripts/build.xml =================================================================== --- trunk/foray/scripts/build.xml 2006-07-01 00:15:18 UTC (rev 7749) +++ trunk/foray/scripts/build.xml 2006-07-01 00:45:29 UTC (rev 7750) @@ -46,10 +46,6 @@ <property name="src.dir" value="${foray.home}/src"/> <property name="build.dir" value="${foray.home}/build"/> <property name="version" value="0.2b1"/> - <property name="module.jar.name" value="${name}-modules-${version}.jar"/> - <property name="module.jar.path" value="${build.dir}/${module.jar.name}"/> - <property name="app.jar.name" value="${name}-${version}.jar"/> - <property name="app.jar.path" value="${build.dir}/${app.jar.name}"/> <property name="build.javadoc.api" value="${build.dir}/javadoc/api"/> <property name="build.javadoc.full" value="${build.dir}/javadoc/full"/> </target> @@ -84,8 +80,7 @@ <!-- =================================================================== --> <!-- Compiles all modules --> <!-- =================================================================== --> - <target name="all-modules" depends="prepare, pretty, ps, graphic, - mif, font, hyphen, text, pdf, fotree, areatree, pioneer, render, core"/> + <target name="all-modules" depends="app"/> <!-- =================================================================== --> <!-- Compiles all modules and packages them in a jar file --> @@ -98,8 +93,14 @@ <!-- =================================================================== --> <target name="package" depends="module-list" description="Generates a jar file for whatever targets have been built."> - <echo message="Creating the jar file ${module.jar.name}"/> + <!-- If the "app" target has been run, file.subset = "". In all other + cases, we are creating some subset. --> + <property name="file.subset" value="-subset"/> + <property name="app.jar.name" value="${name}-${version}${file.subset}.jar"/> + <property name="app.jar.path" value="${build.dir}/${app.jar.name}"/> + <echo message="Creating the jar file ${app.jar.name}"/> + <tstamp> <format property="ts" pattern="yyyyMMdd-HHmmss-z"/> </tstamp> @@ -760,6 +761,20 @@ </target> <!-- =================================================================== + Build the App module (unadvertised) + =================================================================== --> + <target name="app" depends="prepare, pretty, ps, graphic, mif, font, hyphen, + text, pdf, fotree, areatree, pioneer, render, core"> + <property name="module.app" value=", app"/> + <property name="file.subset" value=""/> + <ant antfile="${foray.home}/foray-app/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== Create list of modules built. This list is included in the jar manifest. (unadvertised) =================================================================== --> @@ -783,6 +798,7 @@ <property name="module.pioneer" value=""/> <property name="module.render" value=""/> <property name="module.core" value=""/> + <property name="module.app" value=""/> <!-- Subgroupings (for readability here only) --> <property name="module.list1" @@ -793,10 +809,12 @@ value="${module.pdf}${module.fotree}${module.areatree}${module.output}"/> <property name="module.list4" value="${module.layout}${module.pioneer}${module.render}${module.core}"/> + <property name="module.list5" + value="${module.app}"/> <!-- Now group them all together. --> - <property name="module.list" - value="${module.list1}${module.list2}${module.list3}${module.list4}"/> + <property name="module.list" value= +"${module.list1}${module.list2}${module.list3}${module.list4}${module.list5}"/> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-07-01 00:15:22
|
Revision: 7749 Author: victormote Date: 2006-06-30 17:15:18 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7749&view=rev Log Message: ----------- Add scheme for including a list of the modules in the jar file. Modified Paths: -------------- trunk/foray/scripts/build.xml Modified: trunk/foray/scripts/build.xml =================================================================== --- trunk/foray/scripts/build.xml 2006-06-30 23:31:10 UTC (rev 7748) +++ trunk/foray/scripts/build.xml 2006-07-01 00:15:18 UTC (rev 7749) @@ -85,9 +85,7 @@ <!-- Compiles all modules --> <!-- =================================================================== --> <target name="all-modules" depends="prepare, pretty, ps, graphic, - mif, font, hyphen, text, pdf, fotree, areatree, pioneer, render, core, - app"> - </target> + mif, font, hyphen, text, pdf, fotree, areatree, pioneer, render, core"/> <!-- =================================================================== --> <!-- Compiles all modules and packages them in a jar file --> @@ -98,7 +96,7 @@ <!-- =================================================================== --> <!-- Creates the project output --> <!-- =================================================================== --> - <target name="package" depends="" + <target name="package" depends="module-list" description="Generates a jar file for whatever targets have been built."> <echo message="Creating the jar file ${module.jar.name}"/> @@ -200,10 +198,11 @@ <fileset refid="foray-core-classes"/> <fileset refid="foray-app-classes"/> <manifest> - <attribute name="Implementation-Title" value="${name}-${module}"/> - <attribute name="Implementation-Version" value="${version}"/> - <attribute name="Implementation-Vendor" - value="${contact.info}"/> + <attribute name="Implementation-Title" value="${name}-${module}"/> + <attribute name="Implementation-Version" value="${version}"/> + <attribute name="Implementation-Vendor" + value="${contact.info}"/> + <attribute name="FOray-Modules" value="${module.list}"/> </manifest> </jar> </target> @@ -556,9 +555,10 @@ </target> <!-- =================================================================== - Build the Common module (not publicized) + Build the Common module (unadvertised) =================================================================== --> <target name="common" depends="prepare"> + <property name="module.common" value="common"/> <ant antfile="${foray.home}/foray-common/scripts/build.xml" inheritall="false" target="package"> @@ -571,6 +571,7 @@ <!-- =================================================================== --> <target name="pretty" depends="common" description="Compile the pretty module"> + <property name="module.pretty" value=", pretty"/> <ant antfile="${foray.home}/foray-pretty/scripts/build.xml" inheritall="false" target="package"> @@ -583,6 +584,7 @@ <!-- =================================================================== --> <target name="ps" depends="common" description="Compile the ps module"> + <property name="module.ps" value=", ps"/> <ant antfile="${foray.home}/foray-ps/scripts/build.xml" inheritall="false" target="package"> @@ -595,6 +597,7 @@ <!-- =================================================================== --> <target name="graphic" depends="common" description="Compile the graphic module"> + <property name="module.graphic" value=", graphic"/> <ant antfile="${foray.home}/foray-graphic/scripts/build.xml" inheritall="false" target="package"> @@ -607,6 +610,7 @@ <!-- =================================================================== --> <target name="mif" depends="common" description="Compile the mif module"> + <property name="module.mif" value=", mif"/> <ant antfile="${foray.home}/foray-mif/scripts/build.xml" inheritall="false" target="package"> @@ -619,6 +623,7 @@ <!-- =================================================================== --> <target name="font" depends="ps, pretty" description="Compile the font module"> + <property name="module.font" value=", font"/> <ant antfile="${foray.home}/foray-font/scripts/build.xml" inheritall="false" target="package"> @@ -631,6 +636,7 @@ <!-- =================================================================== --> <target name="hyphen" depends="common" description="Compile the hyphen module"> + <property name="module.hyphen" value=", hyphen"/> <ant antfile="${foray.home}/foray-hyphen-r/scripts/build.xml" inheritall="false" target="package"> @@ -643,6 +649,7 @@ <!-- =================================================================== --> <target name="text" depends="common" description="Compile the text module"> + <property name="module.text" value=", text"/> <ant antfile="${foray.home}/foray-text/scripts/build.xml" inheritall="false" target="package"> @@ -655,6 +662,7 @@ <!-- =================================================================== --> <target name="pdf" depends="ps" description="Compile the pdf module"> + <property name="module.pdf" value=", pdf"/> <ant antfile="${foray.home}/foray-pdf/scripts/build.xml" inheritall="false" target="package"> @@ -667,6 +675,7 @@ <!-- =================================================================== --> <target name="fotree" depends="common" description="Compile the fotree module"> + <property name="module.fotree" value=", fotree"/> <ant antfile="${foray.home}/foray-fotree/scripts/build.xml" inheritall="false" target="package"> @@ -679,6 +688,7 @@ <!-- =================================================================== --> <target name="areatree" depends="common" description="Compile the areatree module"> + <property name="module.areatree" value=", areatree"/> <ant antfile="${foray.home}/foray-areatree/scripts/build.xml" inheritall="false" target="package"> @@ -690,6 +700,7 @@ <!-- Build the Output module (unadvertised) --> <!-- =================================================================== --> <target name="output" depends="mif"> + <property name="module.output" value=", output"/> <ant antfile="${foray.home}/foray-output/scripts/build.xml" inheritall="false" target="package"> @@ -701,6 +712,7 @@ <!-- Build the Layout module (unadvertised) --> <!-- =================================================================== --> <target name="layout" depends="common"> + <property name="module.layout" value=", layout"/> <ant antfile="${foray.home}/foray-layout/scripts/build.xml" inheritall="false" target="package"> @@ -713,6 +725,7 @@ <!-- =================================================================== --> <target name="pioneer" depends="layout" description="Compile the pioneer module"> + <property name="module.pioneer" value=", pioneer"/> <ant antfile="${foray.home}/foray-pioneer/scripts/build.xml" inheritall="false" target="package"> @@ -725,6 +738,7 @@ <!-- =================================================================== --> <target name="render" depends="ps, output" description="Compile the render module"> + <property name="module.render" value=", render"/> <ant antfile="${foray.home}/foray-render/scripts/build.xml" inheritall="false" target="package"> @@ -737,6 +751,7 @@ <!-- =================================================================== --> <target name="core" depends="common" description="Compile the core module"> + <property name="module.core" value=", core"/> <ant antfile="${foray.home}/foray-core/scripts/build.xml" inheritall="false" target="package"> @@ -744,6 +759,46 @@ </ant> </target> + <!-- =================================================================== + Create list of modules built. This list is included in the jar + manifest. (unadvertised) + =================================================================== --> + <target name="module-list" depends=""> + <!-- Set the values to all module name properties to empty. This ensures + that some value is set for each of them. If they have already been set, + this will have no effect. --> + <property name="module.common" value=""/> + <property name="module.pretty" value=""/> + <property name="module.ps" value=""/> + <property name="module.graphic" value=""/> + <property name="module.mif" value=""/> + <property name="module.font" value=""/> + <property name="module.hyphen" value=""/> + <property name="module.text" value=""/> + <property name="module.pdf" value=""/> + <property name="module.fotree" value=""/> + <property name="module.areatree" value=""/> + <property name="module.output" value=""/> + <property name="module.layout" value=""/> + <property name="module.pioneer" value=""/> + <property name="module.render" value=""/> + <property name="module.core" value=""/> + + <!-- Subgroupings (for readability here only) --> + <property name="module.list1" + value="${module.common}${module.pretty}${module.ps}${module.graphic}"/> + <property name="module.list2" + value="${module.mif}${module.font}${module.hyphen}${module.text}"/> + <property name="module.list3" + value="${module.pdf}${module.fotree}${module.areatree}${module.output}"/> + <property name="module.list4" + value="${module.layout}${module.pioneer}${module.render}${module.core}"/> + + <!-- Now group them all together. --> + <property name="module.list" + value="${module.list1}${module.list2}${module.list3}${module.list4}"/> + </target> + </project> <!-- Last Line of File --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-30 23:31:13
|
Revision: 7748 Author: victormote Date: 2006-06-30 16:31:10 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7748&view=rev Log Message: ----------- Fix remaining modular builds. Modified Paths: -------------- trunk/foray/scripts/build.xml Modified: trunk/foray/scripts/build.xml =================================================================== --- trunk/foray/scripts/build.xml 2006-06-30 23:01:11 UTC (rev 7747) +++ trunk/foray/scripts/build.xml 2006-06-30 23:31:10 UTC (rev 7748) @@ -92,7 +92,7 @@ <!-- =================================================================== --> <!-- Compiles all modules and packages them in a jar file --> <!-- =================================================================== --> - <target name="package-all" depends="all-modules, validate-web, package" + <target name="package-all" depends="clean, all-modules, validate-web, package" description="Build all FOray modules and package them in a jar file"/> <!-- =================================================================== --> @@ -653,7 +653,7 @@ <!-- =================================================================== --> <!-- Build the PDF module --> <!-- =================================================================== --> - <target name="pdf" depends="common" + <target name="pdf" depends="ps" description="Compile the pdf module"> <ant antfile="${foray.home}/foray-pdf/scripts/build.xml" inheritall="false" @@ -689,8 +689,7 @@ <!-- =================================================================== --> <!-- Build the Output module (unadvertised) --> <!-- =================================================================== --> - <target name="output" depends="common" - description="Compile the output module"> + <target name="output" depends="mif"> <ant antfile="${foray.home}/foray-output/scripts/build.xml" inheritall="false" target="package"> @@ -699,9 +698,20 @@ </target> <!-- =================================================================== --> + <!-- Build the Layout module (unadvertised) --> + <!-- =================================================================== --> + <target name="layout" depends="common"> + <ant antfile="${foray.home}/foray-layout/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> <!-- Build the Pioneer module --> <!-- =================================================================== --> - <target name="pioneer" depends="output" + <target name="pioneer" depends="layout" description="Compile the pioneer module"> <ant antfile="${foray.home}/foray-pioneer/scripts/build.xml" inheritall="false" @@ -713,7 +723,7 @@ <!-- =================================================================== --> <!-- Build the Render module --> <!-- =================================================================== --> - <target name="render" depends="common" + <target name="render" depends="ps, output" description="Compile the render module"> <ant antfile="${foray.home}/foray-render/scripts/build.xml" inheritall="false" @@ -734,18 +744,6 @@ </ant> </target> - <!-- =================================================================== --> - <!-- Build the Application module --> - <!-- =================================================================== --> - <target name="app" depends="common" - description="Compile the app module"> - <ant antfile="${foray.home}/foray-app/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - </target> - </project> <!-- Last Line of File --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-30 23:01:15
|
Revision: 7747 Author: victormote Date: 2006-06-30 16:01:11 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7747&view=rev Log Message: ----------- 1. Rearrange targets to accommodate modular builds. 2. Get the font module build working. Modified Paths: -------------- trunk/foray/scripts/build.xml Modified: trunk/foray/scripts/build.xml =================================================================== --- trunk/foray/scripts/build.xml 2006-06-30 21:45:53 UTC (rev 7746) +++ trunk/foray/scripts/build.xml 2006-06-30 23:01:11 UTC (rev 7747) @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- $Id$ --> -<project default="package" basedir="."> +<project default="package-all" basedir="."> <!-- Set up a prefix to designate environment variables. --> <property environment="env"/> @@ -61,22 +61,45 @@ <!-- create directories --> <echo message="Preparing the build directories"/> <mkdir dir="${build.dir}"/> + <mkdir dir="${foray.home}/foray-common/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-pretty/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-graphic/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-mif/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-ps/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-pdf/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-font/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-hyphen-r/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-hyphen-r/build/ant"/> + <mkdir dir="${foray.home}/foray-text/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-fotree/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-areatree/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-layout/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-pioneer/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-output/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-render/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-core/build/ant/classes"/> + <mkdir dir="${foray.home}/foray-app/build/ant/classes"/> </target> <!-- =================================================================== --> - <!-- Compiles all packages --> + <!-- Compiles all modules --> <!-- =================================================================== --> - <target name="all-packages" depends="prepare, common, pretty, ps, graphic, + <target name="all-modules" depends="prepare, pretty, ps, graphic, mif, font, hyphen, text, pdf, fotree, areatree, pioneer, render, core, app"> - <echo message="Building the Subpackages"/> </target> <!-- =================================================================== --> + <!-- Compiles all modules and packages them in a jar file --> + <!-- =================================================================== --> + <target name="package-all" depends="all-modules, validate-web, package" + description="Build all FOray modules and package them in a jar file"/> + + <!-- =================================================================== --> <!-- Creates the project output --> <!-- =================================================================== --> - <target name="package" depends="all-packages, validate-web" - description="Generates the jar files (default target)"> + <target name="package" depends="" + description="Generates a jar file for whatever targets have been built."> <echo message="Creating the jar file ${module.jar.name}"/> <tstamp> @@ -402,7 +425,8 @@ <!-- =================================================================== --> <!-- Clean targets --> <!-- =================================================================== --> - <target name="clean" depends="init" description="Cleans the build directory"> + <target name="clean" depends="init" + description="Cleans the main build directory and all module directories."> <delete dir="${build.dir}"/> <ant antfile="${foray.home}/foray-common/scripts/build.xml" @@ -531,11 +555,10 @@ target="style"/> </target> - <!-- =================================================================== --> - <!-- Build the Common module --> - <!-- =================================================================== --> - <target name="common" depends="prepare" description="Compile the common module"> - <echo message="Building the Common Package"/> + <!-- =================================================================== + Build the Common module (not publicized) + =================================================================== --> + <target name="common" depends="prepare"> <ant antfile="${foray.home}/foray-common/scripts/build.xml" inheritall="false" target="package"> @@ -546,7 +569,8 @@ <!-- =================================================================== --> <!-- Build the Pretty module --> <!-- =================================================================== --> - <target name="pretty" depends="prepare" description="Compile the pretty module"> + <target name="pretty" depends="common" + description="Compile the pretty module"> <ant antfile="${foray.home}/foray-pretty/scripts/build.xml" inheritall="false" target="package"> @@ -557,7 +581,8 @@ <!-- =================================================================== --> <!-- Build the PostScript module --> <!-- =================================================================== --> - <target name="ps" depends="prepare" description="Compile the ps module"> + <target name="ps" depends="common" + description="Compile the ps module"> <ant antfile="${foray.home}/foray-ps/scripts/build.xml" inheritall="false" target="package"> @@ -568,7 +593,8 @@ <!-- =================================================================== --> <!-- Build the Graphic module --> <!-- =================================================================== --> - <target name="graphic" depends="prepare" description="Compile the graphic module"> + <target name="graphic" depends="common" + description="Compile the graphic module"> <ant antfile="${foray.home}/foray-graphic/scripts/build.xml" inheritall="false" target="package"> @@ -579,7 +605,8 @@ <!-- =================================================================== --> <!-- Build the MIF module --> <!-- =================================================================== --> - <target name="mif" depends="prepare" description="Compile the mif module"> + <target name="mif" depends="common" + description="Compile the mif module"> <ant antfile="${foray.home}/foray-mif/scripts/build.xml" inheritall="false" target="package"> @@ -590,7 +617,8 @@ <!-- =================================================================== --> <!-- Build the Font module --> <!-- =================================================================== --> - <target name="font" depends="prepare" description="Compile the font module"> + <target name="font" depends="ps, pretty" + description="Compile the font module"> <ant antfile="${foray.home}/foray-font/scripts/build.xml" inheritall="false" target="package"> @@ -601,7 +629,8 @@ <!-- =================================================================== --> <!-- Build the Hyphen module --> <!-- =================================================================== --> - <target name="hyphen" depends="prepare" description="Compile the hyphen module"> + <target name="hyphen" depends="common" + description="Compile the hyphen module"> <ant antfile="${foray.home}/foray-hyphen-r/scripts/build.xml" inheritall="false" target="package"> @@ -612,7 +641,8 @@ <!-- =================================================================== --> <!-- Build the Text module --> <!-- =================================================================== --> - <target name="text" depends="prepare" description="Compile the text module"> + <target name="text" depends="common" + description="Compile the text module"> <ant antfile="${foray.home}/foray-text/scripts/build.xml" inheritall="false" target="package"> @@ -623,7 +653,8 @@ <!-- =================================================================== --> <!-- Build the PDF module --> <!-- =================================================================== --> - <target name="pdf" depends="prepare" description="Compile the pdf module"> + <target name="pdf" depends="common" + description="Compile the pdf module"> <ant antfile="${foray.home}/foray-pdf/scripts/build.xml" inheritall="false" target="package"> @@ -634,7 +665,8 @@ <!-- =================================================================== --> <!-- Build the FOTree module --> <!-- =================================================================== --> - <target name="fotree" depends="prepare" description="Compile the fotree module"> + <target name="fotree" depends="common" + description="Compile the fotree module"> <ant antfile="${foray.home}/foray-fotree/scripts/build.xml" inheritall="false" target="package"> @@ -645,7 +677,8 @@ <!-- =================================================================== --> <!-- Build the AreaTree module --> <!-- =================================================================== --> - <target name="areatree" depends="prepare" description="Compile the areatree module"> + <target name="areatree" depends="common" + description="Compile the areatree module"> <ant antfile="${foray.home}/foray-areatree/scripts/build.xml" inheritall="false" target="package"> @@ -654,9 +687,22 @@ </target> <!-- =================================================================== --> + <!-- Build the Output module (unadvertised) --> + <!-- =================================================================== --> + <target name="output" depends="common" + description="Compile the output module"> + <ant antfile="${foray.home}/foray-output/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> <!-- Build the Pioneer module --> <!-- =================================================================== --> - <target name="pioneer" depends="prepare" description="Compile the pioneer module"> + <target name="pioneer" depends="output" + description="Compile the pioneer module"> <ant antfile="${foray.home}/foray-pioneer/scripts/build.xml" inheritall="false" target="package"> @@ -667,7 +713,8 @@ <!-- =================================================================== --> <!-- Build the Render module --> <!-- =================================================================== --> - <target name="render" depends="prepare" description="Compile the render module"> + <target name="render" depends="common" + description="Compile the render module"> <ant antfile="${foray.home}/foray-render/scripts/build.xml" inheritall="false" target="package"> @@ -678,7 +725,8 @@ <!-- =================================================================== --> <!-- Build the Core module --> <!-- =================================================================== --> - <target name="core" depends="prepare" description="Compile the core module"> + <target name="core" depends="common" + description="Compile the core module"> <ant antfile="${foray.home}/foray-core/scripts/build.xml" inheritall="false" target="package"> @@ -689,7 +737,8 @@ <!-- =================================================================== --> <!-- Build the Application module --> <!-- =================================================================== --> - <target name="app" depends="prepare" description="Compile the app module"> + <target name="app" depends="common" + description="Compile the app module"> <ant antfile="${foray.home}/foray-app/scripts/build.xml" inheritall="false" target="package"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-30 21:47:06
|
Revision: 7746 Author: victormote Date: 2006-06-30 14:45:53 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7746&view=rev Log Message: ----------- Start task of a modularized build. Modified Paths: -------------- trunk/foray/scripts/build.xml Modified: trunk/foray/scripts/build.xml =================================================================== --- trunk/foray/scripts/build.xml 2006-06-30 20:41:17 UTC (rev 7745) +++ trunk/foray/scripts/build.xml 2006-06-30 21:45:53 UTC (rev 7746) @@ -64,119 +64,18 @@ </target> <!-- =================================================================== --> - <!-- Compiles the source directory --> + <!-- Compiles all packages --> <!-- =================================================================== --> - <target name="subpackages" depends="prepare"> + <target name="all-packages" depends="prepare, common, pretty, ps, graphic, + mif, font, hyphen, text, pdf, fotree, areatree, pioneer, render, core, + app"> <echo message="Building the Subpackages"/> - - <ant antfile="${foray.home}/foray-common/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-pretty/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-ps/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-graphic/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-mif/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-font/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-hyphen-r/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-text/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-pdf/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-fotree/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-areatree/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-layout/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-pioneer/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-output/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-render/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-core/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - - <ant antfile="${foray.home}/foray-app/scripts/build.xml" - inheritall="false" - target="package"> - <property name="foray.config" value="${foray.config}"/> - </ant> - </target> <!-- =================================================================== --> <!-- Creates the project output --> <!-- =================================================================== --> - <target name="package" depends="subpackages, validate-web" + <target name="package" depends="all-packages, validate-web" description="Generates the jar files (default target)"> <echo message="Creating the jar file ${module.jar.name}"/> @@ -632,6 +531,172 @@ target="style"/> </target> + <!-- =================================================================== --> + <!-- Build the Common module --> + <!-- =================================================================== --> + <target name="common" depends="prepare" description="Compile the common module"> + <echo message="Building the Common Package"/> + <ant antfile="${foray.home}/foray-common/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Pretty module --> + <!-- =================================================================== --> + <target name="pretty" depends="prepare" description="Compile the pretty module"> + <ant antfile="${foray.home}/foray-pretty/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the PostScript module --> + <!-- =================================================================== --> + <target name="ps" depends="prepare" description="Compile the ps module"> + <ant antfile="${foray.home}/foray-ps/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Graphic module --> + <!-- =================================================================== --> + <target name="graphic" depends="prepare" description="Compile the graphic module"> + <ant antfile="${foray.home}/foray-graphic/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the MIF module --> + <!-- =================================================================== --> + <target name="mif" depends="prepare" description="Compile the mif module"> + <ant antfile="${foray.home}/foray-mif/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Font module --> + <!-- =================================================================== --> + <target name="font" depends="prepare" description="Compile the font module"> + <ant antfile="${foray.home}/foray-font/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Hyphen module --> + <!-- =================================================================== --> + <target name="hyphen" depends="prepare" description="Compile the hyphen module"> + <ant antfile="${foray.home}/foray-hyphen-r/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Text module --> + <!-- =================================================================== --> + <target name="text" depends="prepare" description="Compile the text module"> + <ant antfile="${foray.home}/foray-text/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the PDF module --> + <!-- =================================================================== --> + <target name="pdf" depends="prepare" description="Compile the pdf module"> + <ant antfile="${foray.home}/foray-pdf/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the FOTree module --> + <!-- =================================================================== --> + <target name="fotree" depends="prepare" description="Compile the fotree module"> + <ant antfile="${foray.home}/foray-fotree/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the AreaTree module --> + <!-- =================================================================== --> + <target name="areatree" depends="prepare" description="Compile the areatree module"> + <ant antfile="${foray.home}/foray-areatree/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Pioneer module --> + <!-- =================================================================== --> + <target name="pioneer" depends="prepare" description="Compile the pioneer module"> + <ant antfile="${foray.home}/foray-pioneer/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Render module --> + <!-- =================================================================== --> + <target name="render" depends="prepare" description="Compile the render module"> + <ant antfile="${foray.home}/foray-render/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Core module --> + <!-- =================================================================== --> + <target name="core" depends="prepare" description="Compile the core module"> + <ant antfile="${foray.home}/foray-core/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + + <!-- =================================================================== --> + <!-- Build the Application module --> + <!-- =================================================================== --> + <target name="app" depends="prepare" description="Compile the app module"> + <ant antfile="${foray.home}/foray-app/scripts/build.xml" + inheritall="false" + target="package"> + <property name="foray.config" value="${foray.config}"/> + </ant> + </target> + </project> <!-- Last Line of File --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-30 20:41:26
|
Revision: 7745 Author: victormote Date: 2006-06-30 13:41:17 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7745&view=rev Log Message: ----------- Update the axsl jar. Modified Paths: -------------- trunk/foray/lib/axsl-0.1a.jar Modified: trunk/foray/lib/axsl-0.1a.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-25 22:19:14
|
Revision: 7744 Author: victormote Date: 2006-06-25 15:19:10 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7744&view=rev Log Message: ----------- Remove throwing of the Exception if the protocol is already registered, since we have no way of definitively establishing that fact. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java Modified: trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-06-24 22:14:37 UTC (rev 7743) +++ trunk/foray/foray-common/src/java/org/foray/common/url/AbstractURLStreamHandler.java 2006-06-25 22:19:10 UTC (rev 7744) @@ -29,7 +29,6 @@ package org.foray.common.url; -import java.io.IOException; import java.net.URLStreamHandler; import java.util.StringTokenizer; @@ -74,21 +73,15 @@ protocol); if (registeredHandler != null) { /* If already registed, that one is the one being used, and there - * is no way to change it. */ + * is no way to change it. If it has in fact not yet been used, + * then registering this now would make the new one used instead + * of the old one. However, until we have some indication that this + * would be the "right" thing to do, we will not. */ return; } /* Register the protocol with the Factory. */ - try { - factory.registerProtocol(protocol, handler); - } catch (IOException e) { - /* This should never happen. We have already checked whether the - * protocol is previously registered, and we know that neither the - * protocol or handler are null. The only thing we could do is - * pass the exception upstream, but there is nothing they can do - * about it either. */ - return; - } + factory.registerProtocol(protocol, handler); } /** Modified: trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java 2006-06-24 22:14:37 UTC (rev 7743) +++ trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java 2006-06-25 22:19:10 UTC (rev 7744) @@ -30,7 +30,6 @@ package org.foray.common.url; -import java.io.IOException; import java.net.URL; import java.net.URLStreamHandler; import java.net.URLStreamHandlerFactory; @@ -77,11 +76,8 @@ * @param handler The {@link URLStreamHandler} instance which should be * used for URLs whose protocol is <code>protocol</code>. * The registration will fail silently if this parameter is null. - * @throws IOException If <code>protocol</code> has already been - * registered. */ - public void registerProtocol(String protocol, URLStreamHandler handler) - throws IOException { + public void registerProtocol(String protocol, URLStreamHandler handler) { if (protocol == null) { throw new IllegalArgumentException("Cannot register a null " + "protocol."); @@ -90,10 +86,11 @@ throw new IllegalArgumentException("Cannot register a null " + "URLStreamHandler."); } - if (this.protocols.containsKey(protocol)) { - throw new IOException("Protocol \n" + protocol - + "\" has already been registered."); - } + /* This could be futile. If a protocol has already been registered here + * and used by a URL, placing a new one in our Map will be totally + * ineffective. It is tempting to throw an exception in such a case, + * but there is no definitive way to know whether the registration was + * successful or not, so we will not. */ this.protocols.put(protocol, handler); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-24 22:14:41
|
Revision: 7743 Author: victormote Date: 2006-06-24 15:14:37 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7743&view=rev Log Message: ----------- Add file for Marshallese words. Added Paths: ----------- trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh-list.txt Added: trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh-list.txt =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh-list.txt (rev 0) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh-list.txt 2006-06-24 22:14:37 UTC (rev 7743) @@ -0,0 +1,4 @@ +# This file contains a list of Marshallese words, including their +# hyphenation points, which are designated with a "-" (hyphen). + +# Last Line of File # Property changes on: trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh-list.txt ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-24 21:47:16
|
Revision: 7742 Author: victormote Date: 2006-06-24 14:47:08 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7742&view=rev Log Message: ----------- Add a place to store Marshallese hyphenation patterns. Added Paths: ----------- trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh.xml Added: trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh.xml (rev 0) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh.xml 2006-06-24 21:47:08 UTC (rev 7742) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="US-ASCII"?> +<!DOCTYPE axsl-hyphenation + PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" + "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> + +<!-- +This document contains the hyphenation patterns for the Marshallese language. +Marshallese is the language of the Marshall Islands, a Pacific island group. +According to the Library of Congress, +http://www.loc.gov/standards/iso639-2/langcodes.html#mn, which appears to be the +ISO-639.2 registration authority, the three-letter language code for Marshallese +is "mah" and the two-letter code is "mh". +--> +<axsl-hyphenation> + +<hyphen-char value="-"/> +<hyphen-min before="3" after="2"/> + +<classes> +aA +bB +cC +dD +eE +fF +gG +hH +iI +jJ +kK +lL +mM +nN +oO +pP +qQ +rR +sS +tT +uU +vV +wW +xX +yY +zZ +</classes> + +<exceptions> +</exceptions> + +<patterns> +</patterns> + +</axsl-hyphenation> Property changes on: trunk/foray/foray-hyphen-r/resource/hyph-patterns/mh.xml ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <vic...@us...> - 2006-06-24 21:02:49
|
Revision: 7741 Author: victormote Date: 2006-06-24 14:02:39 -0700 (Sat, 24 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7741&view=rev Log Message: ----------- Conform to new axsl root element name. Modified Paths: -------------- trunk/foray/foray-hyphen-r/resource/hyph-patterns/en.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/es.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/fi.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/hu.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/it.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/pl.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/pt.xml trunk/foray/foray-hyphen-r/resource/hyph-patterns/ru.xml Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/en.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/en.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/en.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="US-ASCII"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> @@ -30,7 +30,7 @@ % These patterns require a value of about 14000 for TeX's pattern memory size. % --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> <hyphen-min before="3" after="2"/> @@ -8611,4 +8611,4 @@ zzo3 z5zot </patterns> -</hyphenation-info> +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/es.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/es.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/es.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> @@ -23,7 +23,7 @@ % ~n \361 % --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> <hyphen-min before="2" after="2"/> @@ -204,5 +204,5 @@ % deleted by JeffK: \endgroup --> </patterns> -</hyphenation-info> +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/fi.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/fi.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/fi.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> @@ -24,7 +24,7 @@ % Added by Timo Hellgren, University of Helsinki, Finland in 1998. % --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> <hyphen-min before="3" after="2"/> @@ -355,4 +355,4 @@ sc2h ts2h ch2r </patterns> -</hyphenation-info> +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/hu.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/hu.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/hu.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="iso-8859-2"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> <!-- created from huhyp.tex by sn...@ma... and converted to Latin-2 --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> <hyphen-min before="2" after="2"/> <!-- ha-zai \xE9s nem haza-i --> @@ -2374,4 +2374,4 @@ % ****************** End of Additions by GAM ************************ % dchuhyph Ver. 2.1 --> -</hyphenation-info> +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/it.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/it.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/it.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> @@ -8,7 +8,7 @@ Claudio Beccari (be...@po...). Use of the original work granted by the author. --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> <hyphen-min before="2" after="2"/> @@ -110,6 +110,4 @@ y1ou y1i 1z 2zb 2zd 2zl 2zn 2zp 2zt 2zs 2zv 2zz 2z. 2z'. 2z'' .z2 </patterns> -</hyphenation-info> - - +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/pl.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/pl.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/pl.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> @@ -49,7 +49,7 @@ % For details see MEXINFO.ENG or MEXINFO.POL in the MeX package. --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> @@ -4173,4 +4173,4 @@ ze4p3p </patterns> -</hyphenation-info> +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/pt.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/pt.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/pt.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> @@ -40,7 +40,7 @@ Novo Dicion\xE1rio Aur\xE9lio da L\xEDngua Portuguesa: - Editora Nova Fronteira. --> -<hyphenation-info> +<axsl-hyphenation> <hyphen-char value="-"/> <!-- N\xE3o mude estes ajustes, ou o algoritmo n\xE3o funcionar\xE1 corretamente; o portugu\xEAs exige os @@ -253,4 +253,4 @@ .bud4d3l .chan3d2le3r </patterns> -</hyphenation-info> +</axsl-hyphenation> Modified: trunk/foray/foray-hyphen-r/resource/hyph-patterns/ru.xml =================================================================== --- trunk/foray/foray-hyphen-r/resource/hyph-patterns/ru.xml 2006-06-24 20:50:06 UTC (rev 7740) +++ trunk/foray/foray-hyphen-r/resource/hyph-patterns/ru.xml 2006-06-24 21:02:39 UTC (rev 7741) @@ -41,11 +41,11 @@ Jeremias Maerki <jer...@ap...> --> -<!DOCTYPE hyphenation-info +<!DOCTYPE axsl-hyphenation PUBLIC "-//aXSL//DTD Hyphenation V0.1//EN" "http://www.axsl.org/dtds/0.1/en/axsl-hyphenation.dtd"> -<hyphenation-info> +<axsl-hyphenation> <classes> аА бБ @@ -6154,4 +6154,4 @@ я1ю я1я </patterns> -</hyphenation-info> \ No newline at end of file +</axsl-hyphenation> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |