You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2010/05/27 20:10:26 UTC
svn commit: r948937 [32/33] - in /ode/trunk: ./
agents/src/main/java/org/apache/ode/agents/memory/ axis2-war/
axis2-war/src/main/assembly/ axis2-war/src/main/webapp/
axis2-war/src/main/webapp/WEB-INF/
axis2-war/src/main/webapp/WEB-INF/classes/ axis2-wa...
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/RelativeDateParser.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/RelativeDateParser.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/RelativeDateParser.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/RelativeDateParser.java Thu May 27 18:09:53 2010
@@ -26,19 +26,19 @@ import java.util.StringTokenizer;
public class RelativeDateParser {
private static final char YEAR_TEMPLATE_MODIFIER = 'y';
-
+
private static final char MONTH_TEMPLATE_MODIFIER = 'M';
-
+
private static final char WEEK_TEMPLATE_MODIFIER = 'w';
-
+
private static final char DAY_TEMPLATE_MODIFIER = 'd';
-
+
private static final char HOUR_TEMPLATE_MODIFIER = 'h';
-
+
private static final char MINUTE_TEMPLATE_MODIFIER = 'm';
-
+
private static final char SECOND_TEMPLATE_MODIFIER = 's';
-
+
/**
* This array of strings contains all supported "modifiers" for method <code>parseRelativeDate</code>.
* NOTE: An order of elements in this array is important and used in algorithm of above method!
@@ -48,7 +48,7 @@ public class RelativeDateParser {
WEEK_TEMPLATE_MODIFIER, DAY_TEMPLATE_MODIFIER,
HOUR_TEMPLATE_MODIFIER, MINUTE_TEMPLATE_MODIFIER,
SECOND_TEMPLATE_MODIFIER, };
-
+
/**
* Returns a date which is less than current system date/time on a specified number of days, years, minutes, weeks
* etc.<p/>
@@ -83,7 +83,7 @@ public class RelativeDateParser {
throws java.text.ParseException {
int[] agoValues = new int[TEMPLATE_MODIFIERS_LIST.length];
int currentModifierPointer = 0;
-
+
StringTokenizer tokens = new StringTokenizer(dateTemplate.trim());
while (tokens.hasMoreTokens()) {
String token = tokens.nextToken();
@@ -91,7 +91,7 @@ public class RelativeDateParser {
throw new ParseException("Invalid token length. Token: "
+ token, dateTemplate.indexOf(token));
}
-
+
int modValue;
try {
modValue = Integer.parseInt(token.substring(0,
@@ -105,7 +105,7 @@ public class RelativeDateParser {
throw new ParseException("Can't parse integer value. Token: "
+ token, dateTemplate.indexOf(token));
}
-
+
char mod = token.charAt(token.length() - 1);
while (true) {
if (currentModifierPointer >= TEMPLATE_MODIFIERS_LIST.length) {
@@ -126,7 +126,7 @@ public class RelativeDateParser {
}
}
}//while (tokens)
-
+
final Calendar calendar = GregorianCalendar.getInstance();
for (int i = 0; i < agoValues.length; i++) {
if (agoValues[i] == 0) {
@@ -135,10 +135,10 @@ public class RelativeDateParser {
int calendarField = templateModifierIndexToCalendarField(i);
calendar.add(calendarField, 0 - agoValues[i]);
}
-
+
return calendar.getTime();
}
-
+
private static int templateModifierIndexToCalendarField(int modifierIndex)
throws IllegalArgumentException {
switch (modifierIndex) {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/SchemaBucket.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/SchemaBucket.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/SchemaBucket.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/SchemaBucket.java Thu May 27 18:09:53 2010
@@ -25,7 +25,7 @@ import java.net.URL;
* Utility class for obtaining XML schemas for commonly used document types.
*/
public class SchemaBucket {
-
+
/**
* Get the Basic Profile 1.0 schema for WSDL, amended to include the errata.
* @return a <code>URL</code> to the resource
@@ -33,5 +33,5 @@ public class SchemaBucket {
public static URL getBp1_0WsdlSchema() {
return SchemaBucket.class.getResource("wsdl.xsd");
}
-
+
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/SerializableUtils.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/SerializableUtils.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/SerializableUtils.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/SerializableUtils.java Thu May 27 18:09:53 2010
@@ -29,12 +29,12 @@ public class SerializableUtils {
/**
* Clone a <code>Serializable</code> object; for use when a
* <code>clone()</code> method is not available.
- *
+ *
* @param obj
* object to clone
- *
+ *
* @return clone object
- *
+ *
* @throws RuntimeException
*/
public static Object cloneSerializable(Object obj) {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/StreamUtils.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/StreamUtils.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/StreamUtils.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/StreamUtils.java Thu May 27 18:09:53 2010
@@ -36,7 +36,7 @@ public class StreamUtils {
/**
* Read the contents of the given URL into a byte array.
- *
+ *
* @param input
* the URL to read
* @return an array of bytes.
@@ -51,7 +51,7 @@ public class StreamUtils {
/**
* Read the contents of the given InputStream into a byte array.
- *
+ *
* @param input
* the InputStream to read
* @return an array of bytes.
@@ -69,7 +69,7 @@ public class StreamUtils {
* end-of-stream is reached on the source {@link InputStream}. This method
* does <em>not</em> attempt to close either the source or the destination
* stream.
- *
+ *
* @param dest
* destination {@link OutputStream}
* @param source
@@ -93,7 +93,7 @@ public class StreamUtils {
* end-of-stream is reached on the source {@link Reader}. This method does
* <em>not</em> attempt to close either the source or the destination
* stream.
- *
+ *
* @param dest
* destination {@link Writer}
* @param source
@@ -113,7 +113,7 @@ public class StreamUtils {
/**
* Copy with default buffer size.
- *
+ *
* @see #copy(java.io.OutputStream, java.io.InputStream)
* @see #DEFAULT_BUFFER_SIZE
*/
@@ -123,7 +123,7 @@ public class StreamUtils {
/**
* Copy from {@link URL} stream.
- *
+ *
* @see #copy(java.io.OutputStream, java.io.InputStream, int)
* @param dest
* destination {@link OutputStream}
@@ -139,7 +139,7 @@ public class StreamUtils {
/**
* Write a {@link Serializable} object to an output stream using the
* {@link ObjectOutputStream} mechanism.
- *
+ *
* @param dest
* destination {@link OutputStream}
* @param src
@@ -156,7 +156,7 @@ public class StreamUtils {
ObjectInputStream iis = new ObjectInputStream(is);
return iis.readObject();
}
-
+
/**
* Expand a Jar input stream.
*/
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/SystemConfigurationException.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/SystemConfigurationException.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/SystemConfigurationException.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/SystemConfigurationException.java Thu May 27 18:09:53 2010
@@ -28,7 +28,7 @@ public class SystemConfigurationExceptio
/**
* Construct a new instance with the specified message.
- *
+ *
* @param message
* a descriptive message.
* @see RuntimeException#RuntimeException(java.lang.String)
@@ -40,7 +40,7 @@ public class SystemConfigurationExceptio
/**
* Construct a new instance with the specified message and a
* {@link Throwable} that triggered this exception.
- *
+ *
* @param message
* a descriptive message
* @param cause
@@ -55,7 +55,7 @@ public class SystemConfigurationExceptio
/**
* Construct a new instance with the specified {@link Throwable} as the root
* cause.
- *
+ *
* @param cause
* the cause
* @see RuntimeException#RuntimeException(java.lang.Throwable)
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/URITemplate.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/URITemplate.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/URITemplate.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/URITemplate.java Thu May 27 18:09:53 2010
@@ -196,7 +196,7 @@ public class URITemplate {
private static String expand(String uriTemplate, Map<String, String> nameValuePairs, boolean preserveUndefinedVar) throws URIException, UnsupportedOperationException {
Matcher m = PATTERN.matcher(uriTemplate);
// Strings are immutable in java
- // so let's use a buffer, and append all substrings between 2 matches and the replacement value for each match
+ // so let's use a buffer, and append all substrings between 2 matches and the replacement value for each match
StringBuilder sb = new StringBuilder(uriTemplate.length());
int prevEnd = 0;
while (m.find()) {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/Version.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/Version.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/Version.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/Version.java Thu May 27 18:09:53 2010
@@ -76,7 +76,7 @@ public class Version {
/**
* Get the full name of the version, e.g., "1.0B15".
- *
+ *
* @return the full version name or an empty String if not available.
*/
public static String getVersionName() {
@@ -85,7 +85,7 @@ public class Version {
/**
* Get the full name of the version, e.g., "1.0B15".
- *
+ *
* @return the build number.
*/
public static String getBuildNumber() {
@@ -94,7 +94,7 @@ public class Version {
/**
* Get the build date.
- *
+ *
* @return the build date as a string of the form yyyyMMdd
*/
public static String getBuildDate() {
@@ -104,7 +104,7 @@ public class Version {
/**
* Get the major version number, i.e., the <code>x</code> in version
* <code>x.y</code>.
- *
+ *
* @return the minor version number or <code>-1</code> for a development
* build
*/
@@ -116,7 +116,7 @@ public class Version {
/**
* Get the minor version number, i.e., the <code>y</code> in version
* <code>x.y</code>.
- *
+ *
* @return the minor version number or <code>-1</code> for a development
* build
*/
@@ -127,7 +127,7 @@ public class Version {
/**
* Print the full version number and licensing information to the console.
- *
+ *
* @param argv
* command-line arguments (ignored)
*/
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/VersionMessages.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/VersionMessages.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/VersionMessages.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/VersionMessages.java Thu May 27 18:09:53 2010
@@ -23,7 +23,7 @@ import org.apache.ode.utils.msg.MessageB
/**
* Message bundle for the <code>Version</code> class.
- *
+ *
* @see org.apache.ode.utils.Version
*/
public class VersionMessages extends MessageBundle {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/WatchDog.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/WatchDog.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/WatchDog.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/WatchDog.java Thu May 27 18:09:53 2010
@@ -200,7 +200,7 @@ public class WatchDog<T, C extends Watch
}
public boolean hasChangedSince(Long since) {
- // do use 'greater than' to handle file deletion. The timestamp of a non-exising file is 0L.
+ // do use 'greater than' to handle file deletion. The timestamp of a non-exising file is 0L.
return lastModified().longValue() != since.longValue();
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/XMLParserUtils.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/XMLParserUtils.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/XMLParserUtils.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/XMLParserUtils.java Thu May 27 18:09:53 2010
@@ -37,8 +37,8 @@ import java.util.StringTokenizer;
* A collection of utility methods for the Apache Xerces XML parser.
*/
public class XMLParserUtils {
-
- public static final String NAMESPACES_SAXF =
+
+ public static final String NAMESPACES_SAXF =
"http://xml.org/sax/features/namespaces";
public static final String VALIDATION_SAXF =
"http://xml.org/sax/features/validation";
@@ -46,9 +46,9 @@ public class XMLParserUtils {
"http://apache.org/xml/features/validation/schema";
private static final String XERCES_P_ROOT =
"http://apache.org/xml/properties/schema/";
- private static final String EXTERNAL_SCHEMA_LOC_XERCESP =
+ private static final String EXTERNAL_SCHEMA_LOC_XERCESP =
XERCES_P_ROOT + "external-schemaLocation";
- private static final String EXTERNAL_SCHEMA_NNS_LOC_XERCESP =
+ private static final String EXTERNAL_SCHEMA_NNS_LOC_XERCESP =
XERCES_P_ROOT + "external-noNamespaceSchemaLocation";
/**
@@ -62,7 +62,7 @@ public class XMLParserUtils {
public static SAXParserFactory getSAXParserFactory() {
return new SAXParserFactoryImpl();
}
-
+
/**
* <p>
* Get the 'correct' implementation of a JAXP <code>DocumentBuilderFactory</code>;
@@ -74,7 +74,7 @@ public class XMLParserUtils {
public static DocumentBuilderFactory getDocumentBuilderFactory() {
return new DocumentBuilderFactoryImpl();
}
-
+
/**
* Set the <code>namespaces</code> SAX property on the supplied
* <code>XMLReader</code>.
@@ -87,21 +87,21 @@ public class XMLParserUtils {
throw new SystemConfigurationException(snse);
}
}
-
+
/**
* @return a Xerces-specific <code>XMLReader</code> instance.
*/
public static XMLReader getXMLReader() {
return new SAXParser();
}
-
+
/**
* @return a Xerces-specific DOM parser.
*/
public static DOMParser getDOMParser() {
return new DOMParser();
}
-
+
/**
* <p>
* Specify an external schema location and turn on validation via setting features
@@ -126,9 +126,9 @@ public class XMLParserUtils {
xr.setProperty(EXTERNAL_SCHEMA_NNS_LOC_XERCESP, u);
}
xr.setFeature(VALIDATION_SAXF,true);
- xr.setFeature(SCHEMA_V_XERCESF,true);
+ xr.setFeature(SCHEMA_V_XERCESF,true);
}
-
+
/**
* <p>
* Specify an external schema location and turn on validation via setting features
@@ -142,7 +142,7 @@ public class XMLParserUtils {
* settings does.
* @throws SAXNotRecognizedException if one of the underlying feature/property
* settings does.
- */
+ */
public static void setExternalSchemaURL(DOMParser dp, String namespace, String u)
throws SAXNotRecognizedException, SAXNotSupportedException
{
@@ -154,7 +154,7 @@ public class XMLParserUtils {
dp.setProperty(EXTERNAL_SCHEMA_NNS_LOC_XERCESP, u);
}
}
-
+
/**
* <p>
* Add a namespace/URL pair to the mapping between namespaces and the schemas used
@@ -175,7 +175,7 @@ public class XMLParserUtils {
if (namespace == null || namespace.length() == 0) {
setExternalSchemaURL(xr,namespace,u);
return;
- }
+ }
String s = (String) xr.getProperty(EXTERNAL_SCHEMA_LOC_XERCESP);
if (s == null) {
setExternalSchemaURL(xr,namespace,u);
@@ -206,9 +206,9 @@ public class XMLParserUtils {
}
xr.setProperty(EXTERNAL_SCHEMA_LOC_XERCESP,sb.toString());
xr.setFeature(VALIDATION_SAXF,true);
- xr.setFeature(SCHEMA_V_XERCESF,true);
+ xr.setFeature(SCHEMA_V_XERCESF,true);
}
-
+
/**
* <p>
* Add a namespace/URL pair to the mapping between namespaces and the schemas used
@@ -263,7 +263,7 @@ public class XMLParserUtils {
}
dp.setProperty(EXTERNAL_SCHEMA_LOC_XERCESP,sb.toString());
dp.setFeature(VALIDATION_SAXF,true);
- dp.setFeature(SCHEMA_V_XERCESF,true);
+ dp.setFeature(SCHEMA_V_XERCESF,true);
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Argument.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Argument.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Argument.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Argument.java Thu May 27 18:09:53 2010
@@ -24,7 +24,7 @@ import java.util.List;
/**
* <p>
- * Models an argument, e.g., the <code>baz</code> in <code>foo baz</code>,
+ * Models an argument, e.g., the <code>baz</code> in <code>foo baz</code>,
* where <code>foo</code> is the command.
* </p>
*/
@@ -34,18 +34,18 @@ public class Argument implements Command
private String _description;
private boolean _isOptional;
private String _value;
-
-
+
+
public Argument(String argName, String description, boolean optional) {
_argName = argName;
_description = description;
_isOptional = optional;
}
-
+
public void reset() {
_value = null;
}
-
+
public List<String> consume(List<String> s) throws CommandlineSyntaxException {
if (s.size() == 0) {
if (_isOptional) {
@@ -64,15 +64,15 @@ public class Argument implements Command
public boolean isOptional() {
return _isOptional;
}
-
+
public boolean isSet() {
return _value != null;
}
-
+
public String getValue() {
return _value;
}
-
+
public String getUsage() {
return "<" + _argName + ">";
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java Thu May 27 18:09:53 2010
@@ -87,7 +87,7 @@ public abstract class BaseCommandlineToo
* be limited to error messages on standard error, unless user-specified
* logging options are present. Among other things, this method looks for the
* <code>-v</code> option and configures logging verbosity appropriately
- *
+ *
* @param level
*/
protected static void initLogging(int level) {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandLineMessages.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandLineMessages.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandLineMessages.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandLineMessages.java Thu May 27 18:09:53 2010
@@ -29,14 +29,14 @@ public class CommandLineMessages extends
/**
* Format a header for display by a commandline tool at startup.
- *
+ *
* @param cmd
* the name of the command or class with <code>main(...)</code>
* @param version
* the full version name, e.g., <code>2.0B101</code>
* @param date
* the build date
- *
+ *
* {0} - FiveSight ODE v{1} ({2})\nCopyright (c) 2003-2005 FiveSight
* Technologies, Inc.
*/
@@ -47,7 +47,7 @@ public class CommandLineMessages extends
/**
* Format the description of the commandline help option.
- *
+ *
* print detailed help information to the console
*/
public String msgHelp() {
@@ -56,7 +56,7 @@ public class CommandLineMessages extends
/**
* Format the description of the verbose option.
- *
+ *
* provide verbose logging information to the console (on standard error)
*/
public String msgVerbose() {
@@ -66,7 +66,7 @@ public class CommandLineMessages extends
/**
* Format the description of the very verbose option.
- *
+ *
*/
public String msgVeryVerbose() {
return this.format("provide very verbose logging information to the console"
@@ -75,7 +75,7 @@ public class CommandLineMessages extends
/**
* Format the description of the version information option.
- *
+ *
* display version information and exit
*/
public String msgVersion() {
@@ -84,7 +84,7 @@ public class CommandLineMessages extends
/**
* Format the description of the quiet option.
- *
+ *
* do not output the program name and version header to standard out at
* startup
*/
@@ -95,10 +95,10 @@ public class CommandLineMessages extends
/**
* Format an error message about an option missing a required argument.
- *
+ *
* @param opt
* the name of the option missing the argument
- *
+ *
* the option {0} requires an agument.
*/
public String msgMissingArgument(String opt) {
@@ -107,10 +107,10 @@ public class CommandLineMessages extends
/**
* Format an error message about a missing required option.
- *
+ *
* @param opt
* the name of the the option
- *
+ *
* the option {0} is required.
*/
public String msgMissingOption(String opt) {
@@ -119,10 +119,10 @@ public class CommandLineMessages extends
/**
* Format an error message about an unrecognized commandline option.
- *
+ *
* @param opt
* the unrecognized option
- *
+ *
* the option {0} is not recognized.
*/
public String msgUnrecognizedOption(String opt) {
@@ -131,10 +131,10 @@ public class CommandLineMessages extends
/**
* Format an error message about a repeated option.
- *
+ *
* @param opt
* the name of the option
- *
+ *
* the option {0} was already specified.
*/
public String msgAlreadySelectedOption(String opt) {
@@ -143,7 +143,7 @@ public class CommandLineMessages extends
/**
* Format a generic error about an unparseable commandline.
- *
+ *
* unable to parse commandline.
*/
public String msgCommandLineError() {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandlineFragment.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandlineFragment.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandlineFragment.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/CommandlineFragment.java Thu May 27 18:09:53 2010
@@ -27,12 +27,12 @@ import java.util.List;
* </p>
*/
public interface CommandlineFragment {
-
+
/**
* The prefix ("-") that signifies that an argument is a flag.
*/
public static String COMMAND_PREFIX = "-";
-
+
/**
* <p>
* Reset the fragment to its initial state. This is useful for reusing fragments
@@ -40,7 +40,7 @@ public interface CommandlineFragment {
* </p>
*/
public void reset();
-
+
/**
* <p>
* Grab the pieces of the commandline relevant to this argument, configure the
@@ -52,16 +52,16 @@ public interface CommandlineFragment {
* @throws CommandlineSyntaxException if the commandline is <em>structurally</em> invalid.
*/
public List<String> consume(List<String> s) throws CommandlineSyntaxException;
-
+
/**
* <p>
* Construct a usage string for this commandline fragment. The usage string is
* used when constructing a strawman commandline example and when formatting help.
* </p>
- * @return the usage string
+ * @return the usage string
*/
public String getUsage();
-
+
/**
* <p>
* Return a description of this commandline fragment. The description should be a
@@ -71,10 +71,10 @@ public interface CommandlineFragment {
* @return the description
*/
public String getDescription();
-
+
/**
* @return <code>true</code> if this fragment is optional.
*/
public boolean isOptional();
-
+
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/ConsoleFormatter.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/ConsoleFormatter.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/ConsoleFormatter.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/ConsoleFormatter.java Thu May 27 18:09:53 2010
@@ -22,12 +22,12 @@ import java.util.StringTokenizer;
public class ConsoleFormatter {
-
+
private static final int LINE_WIDTH = 76;
-
+
// for help
private static final int LEFT_MARGIN = 20;
-
+
private static String spaces(int n) {
StringBuffer sb = new StringBuffer(n);
for (int i=0; i < n; ++i) {
@@ -35,7 +35,7 @@ public class ConsoleFormatter {
}
return sb.toString();
}
-
+
// long command name is a pathological case, which we'll ignore.
public static String formatUsage(String command, Fragments f) {
StringBuffer sb = new StringBuffer(command + " ");
@@ -62,7 +62,7 @@ public class ConsoleFormatter {
}
return sb.toString();
}
-
+
public static String formatHelp(Fragments f) {
CommandlineFragment[] ff = f.getFragmentsInUserOrder();
StringBuffer sb = new StringBuffer();
@@ -80,7 +80,7 @@ public class ConsoleFormatter {
}
return sb.toString();
}
-
+
public static String rightPadToWidth(String s, int w) {
if (s.length() > w) {
return s;
@@ -88,7 +88,7 @@ public class ConsoleFormatter {
return s + spaces(w-s.length());
}
}
-
+
public static String wrap(String s, int left) {
String spaces = spaces(left);
int cll = left;
@@ -109,7 +109,7 @@ public class ConsoleFormatter {
sb.append('\n');
return sb.toString();
}
-
+
public static void printSynopsis(String command, String synposis, Fragments[] frags) {
System.out.print(command + " - ");
System.out.println(wrap(synposis, command.length() + 3));
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Flag.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Flag.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Flag.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Flag.java Thu May 27 18:09:53 2010
@@ -27,18 +27,18 @@ public class Flag implements Commandline
private boolean _isSet;
private String _description;
private boolean _isOptional;
-
+
public Flag(String name, String description, boolean optional) {
_name = COMMAND_PREFIX + name;
_description = description;
_isSet = false;
_isOptional = optional;
}
-
+
public void reset() {
_isSet = false;
}
-
+
public boolean isOptional() {
return _isOptional;
}
@@ -58,7 +58,7 @@ public class Flag implements Commandline
public boolean isSet() {
return _isSet;
}
-
+
public String getUsage() {
return _name;
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/FlagWithArgument.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/FlagWithArgument.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/FlagWithArgument.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/FlagWithArgument.java Thu May 27 18:09:53 2010
@@ -33,7 +33,7 @@ public class FlagWithArgument implements
private String _description;
private String _arg;
private boolean _isOptional;
-
+
/**
* Construct a new fragment holder.
* @param name the name of the flag, as it will be used on the commandline
@@ -48,15 +48,15 @@ public class FlagWithArgument implements
_argName = argName;
_isOptional = optional;
}
-
+
public boolean isOptional() {
return _isOptional;
}
-
+
public void setOptional(boolean o) {
_isOptional = o;
}
-
+
public List<String> consume(List<String> s) throws CommandlineSyntaxException {
if (!s.contains(_name)) {
if (!_isOptional) {
@@ -81,15 +81,15 @@ public class FlagWithArgument implements
public void reset() {
_arg = null;
}
-
+
public boolean isSet() {
return _arg != null;
}
-
+
public String getValue() {
return _arg;
}
-
+
public String getUsage() {
return _name + " <" + _argName + ">";
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Fragments.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Fragments.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Fragments.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Fragments.java Thu May 27 18:09:53 2010
@@ -29,10 +29,10 @@ import java.util.Iterator;
* </p>
*/
public class Fragments {
-
+
private CommandlineFragment[] _cl;
private CommandlineSyntaxException _reason;
-
+
/**
* <p>
* Create a new instance.
@@ -42,7 +42,7 @@ public class Fragments {
public Fragments(CommandlineFragment[] frags) {
_cl = frags;
}
-
+
/**
* <p>
* Reset the constituent fragments to their initial states.
@@ -53,7 +53,7 @@ public class Fragments {
_cl[i].reset();
}
}
-
+
/**
* <p>
* Used after the {@link #matches(String[])} method, this returns the fragments
@@ -67,7 +67,7 @@ public class Fragments {
public CommandlineFragment[] getFragments() {
return _cl;
}
-
+
/**
* <p>
* For use in formatting commandline help, this method orders the constituent
@@ -93,7 +93,7 @@ public class Fragments {
}
return cf;
}
-
+
/**
* <p>
* Used after the {@link #matches(String[])} method, this returns the reason, if
@@ -105,7 +105,7 @@ public class Fragments {
public CommandlineSyntaxException getReason() {
return _reason;
}
-
+
/**
* <p>
* Apply the {@link CommandlineFragment}s to the supplied arguments (after calling
@@ -131,7 +131,7 @@ public class Fragments {
if (sb.length() != 0) {
sb.append(' ');
}
- sb.append((String) it.next());
+ sb.append((String) it.next());
}
_reason = new CommandlineSyntaxException(
"Not sure what to do with the extra items: " + sb.toString());
@@ -144,5 +144,5 @@ public class Fragments {
return false;
}
}
-
+
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/LastArgument.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/LastArgument.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/LastArgument.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/LastArgument.java Thu May 27 18:09:53 2010
@@ -30,11 +30,11 @@ import java.util.List;
* </p>
*/
public class LastArgument extends Argument {
-
+
public LastArgument(String argName, String description, boolean optional) {
super(argName, description, optional);
}
-
+
public List<String> consume(List<String> s) throws CommandlineSyntaxException {
// if there is only one item or there are no items, then the last item is
// the same as the first.
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Main.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Main.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Main.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/Main.java Thu May 27 18:09:53 2010
@@ -27,7 +27,7 @@ import java.util.Properties;
/**
* <p>
- * Class used for starting the <code>main(...)</code> method of command-line
+ * Class used for starting the <code>main(...)</code> method of command-line
* utilities. Provides a general startup mechanism.
* </p>
* <p>
@@ -69,7 +69,7 @@ public class Main {
System.arraycopy(args, 1, realArgs, 0, realArgs.length);
Class mainClass = Class.forName(mainClassName);
-
+
Method mainMethod = mainClass.getMethod("main",new Class[] { String[].class } );
try {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/MultiArgument.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/MultiArgument.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/MultiArgument.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/MultiArgument.java Thu May 27 18:09:53 2010
@@ -25,7 +25,7 @@ import java.util.List;
/**
* <p>
* A multiple argument commandline fragment that greedily consumes what's left on
- * the commandline as arguments.
+ * the commandline as arguments.
* </p>
*/
public class MultiArgument implements CommandlineFragment {
@@ -34,18 +34,18 @@ public class MultiArgument implements Co
private String _description;
private String[] _values;
private boolean _isOptional;
-
-
+
+
public MultiArgument(String argName, String description, boolean optional) {
_argName = argName;
_description = description;
_isOptional = optional;
}
-
+
public void reset() {
_values = null;
}
-
+
public List<String> consume(List<String> s) throws CommandlineSyntaxException {
if(s.size() == 0 && !_isOptional) {
throw new CommandlineSyntaxException("The " + _argName + " argument is required.");
@@ -57,23 +57,23 @@ public class MultiArgument implements Co
throw new CommandlineSyntaxException("The flag " + _values[i] +
" was found where an argument <" + _argName + "> was expected.");
}
- }
+ }
}
return Collections.emptyList();
}
public boolean isOptional() {
return _isOptional;
- }
-
+ }
+
public boolean isSet() {
return _values != null;
}
-
+
public String[] getValues() {
return _values;
}
-
+
public String getUsage() {
return "<" + _argName + "_1> ... <" + _argName + "_n>";
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/XorGroup.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/XorGroup.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/XorGroup.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/cli/XorGroup.java Thu May 27 18:09:53 2010
@@ -29,32 +29,32 @@ public class XorGroup implements Command
private CommandlineFragment _matched;
private boolean _isOptional;
private String _description;
-
+
public XorGroup(String description, boolean optional) {
_frags = new ArrayList<CommandlineFragment>();
_description = description;
_isOptional = optional;
}
-
+
public void reset() {
_matched = null;
for (Iterator<CommandlineFragment> it = _frags.iterator(); it.hasNext();) {
it.next().reset();
}
}
-
+
public void addFragment(CommandlineFragment frag) {
_frags.add(frag);
}
-
+
public boolean didMatch() {
return _matched != null;
}
-
+
public CommandlineFragment getMatched() {
return _matched;
}
-
+
public List<String> consume(List<String> s) throws CommandlineSyntaxException {
List<String> l = null;
for (Iterator<CommandlineFragment> it = _frags.iterator(); it.hasNext();) {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java Thu May 27 18:09:53 2010
@@ -38,7 +38,7 @@ public class FileUtils {
* Test if the given path is absolute or not.
* @param path
* @return true is absolute
- * @see java.io.File#isAbsolute()
+ * @see java.io.File#isAbsolute()
*/
public static boolean isAbsolute(String path){
return new File(path).isAbsolute();
@@ -48,7 +48,7 @@ public class FileUtils {
* Test if the given path is relative or absolute.
* @param path
* @return true is relative
- * @see java.io.File#isAbsolute()
+ * @see java.io.File#isAbsolute()
*/
public static boolean isRelative(String path){
return !isAbsolute(path);
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java Thu May 27 18:09:53 2010
@@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFac
* Convenience class for managing temporary files and cleanup on JVM exit.
*/
public class TempFileManager {
-
+
private static final Log __log = LogFactory.getLog(TempFileManager.class);
private static TempFileManager __singleton;
@@ -90,7 +90,7 @@ public class TempFileManager {
throw new IllegalStateException("The security configuration is preventing the creation of a "
+ "temporary working directory.", se);
}
-
+
}
/**
@@ -129,14 +129,14 @@ public class TempFileManager {
throw new IllegalStateException(msg);
}
}
-
+
/**
* <p>
* Get a temporary file, if possible, and register it for cleanup later. In the
* event that a temporary file cannot be created, the method will attempt to
* create a file in the current working directory instead.
* </p>
- *
+ *
* @param handle a prefix to use in naming the file; probably only useful for
* debugging.
* @return the temporary file.
@@ -164,7 +164,7 @@ public class TempFileManager {
tmp = File.createTempFile(handle + Long.toHexString(System.currentTimeMillis()), ".tmp", parent);
} catch (IOException ioe) {
__log.error("Unable to create temporary file in working directory " +
- (parent == null ? "<null>; " : (parent.getPath() + "; ")) +
+ (parent == null ? "<null>; " : (parent.getPath() + "; ")) +
"falling back to current working directory.", ioe);
tmp = new File(handle + new GUID().toString());
}
@@ -172,12 +172,12 @@ public class TempFileManager {
registerTemporaryFile(tmp);
return tmp;
}
-
+
/**
* <p>
* Get a temporary working directory.
* </p>
- *
+ *
* @param handle a prefix to use in naming the directory.
* @return the temp directory.
* @see #getTemporaryFile(String)
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/jmx/JMXConstants.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/jmx/JMXConstants.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/jmx/JMXConstants.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/jmx/JMXConstants.java Thu May 27 18:09:53 2010
@@ -62,7 +62,7 @@ public final class JMXConstants {
* Create a JMX name query to find ODE domain MBeans.
* @return {@link ObjectName} pattern
* @throws MalformedObjectNameException
- */
+ */
public static ObjectName createDomainObjectQuery() throws MalformedObjectNameException {
return new ObjectName(JMX_DOMAIN + ":type=" + TYPE_DOMAINMBEAN + ",*");
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/msg/MessageBundle.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/msg/MessageBundle.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/msg/MessageBundle.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/msg/MessageBundle.java Thu May 27 18:09:53 2010
@@ -49,7 +49,7 @@ public abstract class MessageBundle exte
ex.fillInStackTrace();
return ex.getStackTrace()[1].getMethodName() + ": NO MESSAGE (TODO)";
}
-
+
protected Object handleGetObject(String key) {
throw new UnsupportedOperationException();
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/FailOnErrorErrorHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/FailOnErrorErrorHandler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/FailOnErrorErrorHandler.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/FailOnErrorErrorHandler.java Thu May 27 18:09:53 2010
@@ -23,32 +23,32 @@ import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class FailOnErrorErrorHandler implements ErrorHandler {
-
+
private ErrorHandler _child;
-
+
public FailOnErrorErrorHandler() {
this(new IgnoreAllErrorHandler());
}
-
+
public FailOnErrorErrorHandler(ErrorHandler eh) {
_child = eh;
}
-
+
/**
* @see ErrorHandler#error(org.xml.sax.SAXParseException)
- */
+ */
public void error(SAXParseException exception) throws SAXException {
throw exception;
}
/**
* @see ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
+ */
public void fatalError(SAXParseException exception) throws SAXException {
throw exception;
}
/**
* @see ErrorHandler#warning(org.xml.sax.SAXParseException)
- */
+ */
public void warning(SAXParseException exception) throws SAXException {
_child.warning(exception);
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/IgnoreAllErrorHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/IgnoreAllErrorHandler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/IgnoreAllErrorHandler.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/IgnoreAllErrorHandler.java Thu May 27 18:09:53 2010
@@ -41,7 +41,7 @@ public class IgnoreAllErrorHandler imple
public IgnoreAllErrorHandler() {
// do nothing.
}
-
+
/**
* @see ErrorHandler#error(org.xml.sax.SAXParseException)
*/
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java Thu May 27 18:09:53 2010
@@ -55,7 +55,7 @@ public class LoggingErrorHandler impleme
/**
* Construct a new instance that dumps messages onto a specific logging
* channel.
- *
+ *
* @param log
* the <code>Log</code> on which to dump messages.
*/
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/PrintErrorHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/PrintErrorHandler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/PrintErrorHandler.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/sax/PrintErrorHandler.java Thu May 27 18:09:53 2010
@@ -28,12 +28,12 @@ public class PrintErrorHandler implement
private ErrorHandler _child;
private PrintStream _out;
-
+
public PrintErrorHandler(ErrorHandler eh,PrintStream ps) {
_child = eh;
_out = ps;
}
-
+
public PrintErrorHandler(PrintStream pw) {
this(new IgnoreAllErrorHandler(),pw);
}
@@ -61,7 +61,7 @@ public class PrintErrorHandler implement
_out.println(formatMessage(exception));
_child.fatalError(exception);
}
-
+
private String formatMessage(SAXParseException spe) {
StringBuffer sb = new StringBuffer();
sb.append('[');
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CollectionsX.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CollectionsX.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CollectionsX.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CollectionsX.java Thu May 27 18:09:53 2010
@@ -63,12 +63,12 @@ public class CollectionsX {
* given in the form of a unary function which returns a non-<code>false</code>
* value when the condition is satisfied. The first object in the collection
* matching the condition is returned.
- *
+ *
* @param coll
* the collection to search through
* @param f
* the test to apply to the collection elements
- *
+ *
* @return the first object in the collection (coll) which, satisfies the
* condition (f)
*/
@@ -78,15 +78,15 @@ public class CollectionsX {
/**
* Find an element in a collection satisfying a condition.
- *
+ *
* @param i
* the iterator to iterate with
* @param f
* the test to apply to the elements
- *
+ *
* @return the first object enumerated by the iterator (i) which satisfies
* the condition (f)
- *
+ *
* @see #find_if(java.util.Collection,
* org.apache.ode.utils.stl.MemberOfFunction)
*/
@@ -126,12 +126,12 @@ public class CollectionsX {
* </code>
* returns <code>true</code>. So: <em>coll' = { x : x el-of coll
* AND f(x) == false }</em>
- *
+ *
* @param coll
* the collection from which to remove elements
* @param f
* the function to apply
- *
+ *
* @return coll, for convenience
*/
public static <T> Collection<T> remove_if(Collection<T> coll, MemberOfFunction<T> f) {
@@ -149,14 +149,14 @@ public class CollectionsX {
/**
* Transform a collection with a unary function. Roughly speaking dest = {
* f(a) : a el-of src }
- *
+ *
* @param dest
* the empty (mutable) collection to transform into
* @param src
* the collection to transform from
* @param f
* the unary function to apply
- *
+ *
* @return dest, for convenience
*/
public static <C extends Collection<T>, T, V extends T, E> C transform(C dest, Collection<E> src,
@@ -221,7 +221,7 @@ public class CollectionsX {
/**
* Filter a collection by member class.
- *
+ *
* @param src
* source collection
* @param aClass
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CompositeUnaryFunction.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CompositeUnaryFunction.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CompositeUnaryFunction.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/CompositeUnaryFunction.java Thu May 27 18:09:53 2010
@@ -25,7 +25,7 @@ public class CompositeUnaryFunction<E,V,
public CompositeUnaryFunction(UnaryFunction<T,V> f, UnaryFunction<E,T> g) {
_f = f;
- _g = g;
+ _g = g;
}
public V apply(E x) {
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/EqualsUnaryFunction.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/EqualsUnaryFunction.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/EqualsUnaryFunction.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/EqualsUnaryFunction.java Thu May 27 18:09:53 2010
@@ -20,7 +20,7 @@ package org.apache.ode.utils.stl;
/**
* Equality comparison unary function, compares against a constant value.
- *
+ *
* <p>
* Created on Feb 4, 2004 at 5:15:38 PM.
* </p>
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/FilterIterator.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/FilterIterator.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/FilterIterator.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/FilterIterator.java Thu May 27 18:09:53 2010
@@ -24,7 +24,7 @@ import java.util.NoSuchElementException;
/**
* Filtering {@link Iterator} implementation.
- *
+ *
* <p>
* Created on Feb 4, 2004 at 4:48:14 PM.
* </p>
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/MemberOfFunction.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/MemberOfFunction.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/MemberOfFunction.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/MemberOfFunction.java Thu May 27 18:09:53 2010
@@ -21,18 +21,18 @@ package org.apache.ode.utils.stl;
/**
* Interface used for defining object filters/selectors, classes that are used
* to determine whether a given object belong in a set.
- *
+ *
* <p>
* Created on Feb 4, 2004 at 4:48:55 PM.
* </p>
- *
+ *
* @author Maciej Szefler <a href="mailto:mbs@fivesight.com">mbs</a>
*/
public abstract class MemberOfFunction<E> implements UnaryFunction<E, Boolean> {
/**
* A unary function that tests whether an element is the member of a set.
- *
+ *
* @param o
* element to test
* @return <code>true</code> if element is a member
@@ -42,7 +42,7 @@ public abstract class MemberOfFunction<E
/**
* Implementation of {@link UnaryFunction} method defering to
* {@link #isMember(E)}.
- *
+ *
* @param x
* element to test
* @return {@link Boolean.TRUE} if isMemeber returns <code>true</code>,
@@ -51,8 +51,8 @@ public abstract class MemberOfFunction<E
public final Boolean apply(E x) {
return isMember(x) ? Boolean.TRUE : Boolean.FALSE;
}
-
-
+
+
public static class InstanceOf extends MemberOfFunction {
private Class _cls;
public InstanceOf(Class cls) { _cls = cls; }
@@ -63,5 +63,5 @@ public abstract class MemberOfFunction<E
}
}
-
+
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/TransformIterator.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/TransformIterator.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/TransformIterator.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/TransformIterator.java Thu May 27 18:09:53 2010
@@ -24,7 +24,7 @@ import java.util.Iterator;
/**
* Transforming {@link Iterator} implementation; these iterators apply a unary
* function to each object before it is returned.
- *
+ *
* <p>
* Created on Feb 4, 2004 at 4:48:14 PM.
* </p>
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/UnaryFunction.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/UnaryFunction.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/UnaryFunction.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/stl/UnaryFunction.java Thu May 27 18:09:53 2010
@@ -19,5 +19,5 @@
package org.apache.ode.utils.stl;
public interface UnaryFunction<E,V> extends UnaryFunctionEx<E,V> {
- V apply(E x);
+ V apply(E x);
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java Thu May 27 18:09:53 2010
@@ -26,11 +26,11 @@ import org.apache.commons.logging.Log;
public class LogErrorListener implements ErrorListener {
private Log _log;
-
+
public LogErrorListener(Log log) {
_log = log;
}
-
+
public void warning(TransformerException exception)
throws TransformerException {
_log.warn(exception.getMessageAndLocation(),exception);
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/uuid/UUID.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/uuid/UUID.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/uuid/UUID.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/uuid/UUID.java Thu May 27 18:09:53 2010
@@ -60,7 +60,7 @@ public class UUID implements Serializabl
/**
* String form of a uuid.
- *
+ *
* @param uuid
* convert the <code>uuid</code> to a string
* @return string representation
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java Thu May 27 18:09:53 2010
@@ -82,7 +82,7 @@ public class WsdlUtils {
ExtensibilityElement element = getBindingExtension(binding);
// with a fully wsdl-compliant document, this element cannot be null.
// but ODE extends the HTTP binding and supports the HTTP verb at the operation level.
- // A port using this extension may have no HTTPBinding at the port level.
+ // A port using this extension may have no HTTPBinding at the port level.
if (element == null) {
// in this case, we check the binding information of one operation
final BindingOperation anOperation = (BindingOperation) binding.getBindingOperations().get(0);
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java Thu May 27 18:09:53 2010
@@ -28,14 +28,14 @@ import org.xml.sax.SAXException;
*/
public class XmlSchemaTracker extends Tracker {
private static final Log __log = LogFactory.getLog(XmlSchemaTracker.class);
-
+
private static final String NS="http://www.w3.org/2001/XMLSchema" ;
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
if (uri != null && uri.equals(NS) && (localName.equals("import") || localName.equals("include"))) {
String loc = atts.getValue("schemaLocation");
__log.debug("found reference element " + uri + "@" + localName + "-->" +loc);
-
+
if (loc != null) addReference(loc);
}
}
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java Thu May 27 18:09:53 2010
@@ -71,12 +71,12 @@ public class CapturingXMLEntityResolver
XMLInputSource src = _resolver.resolveEntity(resourceIdentifier);
InputStream is = src.getByteStream();
-
+
if (is == null) {
__log.debug("resolveEntity: stream not available for: " + src);
throw new IOException("Unable to locate resource for namespace " + resourceIdentifier.getNamespace());
}
-
+
byte[] data;
try {
data = StreamUtils.read(is);
@@ -95,7 +95,7 @@ public class CapturingXMLEntityResolver
__log.error("Invalid URI: " + resourceIdentifier.getLiteralSystemId());
throw new XNIException(use);
}
-
+
// re-create the InputSource since reading exhausted the XML stream
return _resolver.resolveEntity(resourceIdentifier);
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/Duration.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/Duration.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/Duration.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/Duration.java Thu May 27 18:09:53 2010
@@ -25,29 +25,29 @@ import java.util.regex.Pattern;
/**
* Support for xml schema duration.
- *
+ *
* Does NOT support negative duration, only positive!!
*/
public class Duration {
- static final Pattern PATTERN =
+ static final Pattern PATTERN =
Pattern.compile("P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?((\\d+\\.?\\d*|\\.\\d+)S)?)?");
-
+
static final int YEAR_MG = 1;
static final int MONTH_MG = 2;
static final int DAY_MG = 3;
static final int HOUR_MG = 5;
static final int MIN_MG = 6;
static final int SEC_MG = 8;
-
+
private int _years;
private int _months;
private int _days;
private int _hours;
private int _minutes;
private BigDecimal _seconds;
-
+
/**
- *
+ *
*/
public Duration(String duration) {
Matcher m = PATTERN.matcher(duration);
@@ -58,19 +58,19 @@ public class Duration {
_hours = parseInt(m.group(HOUR_MG));
_minutes = parseInt(m.group(MIN_MG));
_seconds = m.group(SEC_MG) == null
- ? null : new BigDecimal(m.group(SEC_MG));
+ ? null : new BigDecimal(m.group(SEC_MG));
}
else{
throw new IllegalArgumentException("Bad duration: " + duration);
}
}
-
+
/**
* Adds current duration to a calendar object.
* @param calendar
*/
public void addTo(Calendar calendar){
-
+
calendar.add( Calendar.YEAR, _years );
calendar.add( Calendar.MONTH, _months );
calendar.add( Calendar.DAY_OF_MONTH, _days );
@@ -78,14 +78,14 @@ public class Duration {
calendar.add( Calendar.MINUTE, _minutes );
calendar.add( Calendar.SECOND, (_seconds == null)
? 0 : _seconds.intValue());
-
+
if(_seconds!=null) {
BigDecimal fraction = _seconds.subtract(_seconds.setScale(0,BigDecimal.ROUND_DOWN));
int millisec = fraction.movePointRight(3).intValue();
calendar.add( Calendar.MILLISECOND, millisec );
}
}
-
+
private static int parseInt(String value){
if(value == null)
return 0;
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java Thu May 27 18:09:53 2010
@@ -40,7 +40,7 @@ public class LoggingXmlErrorHandler impl
/**
* Create a new instance that will output to the specified {@link Log}
* instance.
- *
+ *
* @param log
* the target log, which much be non-<code>null</code>
*/
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModel.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModel.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModel.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModel.java Thu May 27 18:09:53 2010
@@ -25,7 +25,7 @@ public interface SchemaModel {
* <p>
* Determines if two types are compatible using the following logic:
* </p>
- *
+ *
* <ul>
* <li>
* if type a is Element, and type b is Element, they must be identical
@@ -36,7 +36,7 @@ public interface SchemaModel {
* they are compatible if one is derived from the other
* </li>
* </ul>
- *
+ *
*
* @return
*/
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java Thu May 27 18:09:53 2010
@@ -183,7 +183,7 @@ public class SchemaModelImpl implements
public void put(URI uri, byte[] bytes) {
_schemas.put(uri.toASCIIString(), bytes);
}
-
+
public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) throws XNIException, IOException {
XMLInputSource src = new XMLInputSource(resourceIdentifier);
String location = "";
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/XsdMessages.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/XsdMessages.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/XsdMessages.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/XsdMessages.java Thu May 27 18:09:53 2010
@@ -46,7 +46,7 @@ public class XsdMessages extends Message
/**
* Format a log message about an XSD-related warning or error.
- *
+ *
* @param type
* the type of occurrence (e.g., warning, error, fatal)
* @param msg
@@ -58,7 +58,7 @@ public class XsdMessages extends Message
* @param col
* the column number where the event occurred, or -1
* @return the formatted message
- *
+ *
* {0}: [{2} @ L{3}:C{4}]: {1}
*/
public String msgXsdMessage(String type, String msg, String systemId, int line, int col) {
@@ -67,11 +67,11 @@ public class XsdMessages extends Message
/**
* Format a debug message about processing an XML Schema document.
- *
+ *
* @param systemId
* the System ID of the schema being processed
* @return the formatted message
- *
+ *
* Processing schema with URI {0}.
*/
public String msgProcessingSchema(String systemId) {
@@ -81,7 +81,7 @@ public class XsdMessages extends Message
/**
* Format a message about an exception that occurred while processing an XML
* Schema.
- *
+ *
* @param message
* the detailed message about the exception
* @param systemId
@@ -91,7 +91,7 @@ public class XsdMessages extends Message
* @param columnNumber
* the column number where the exception occurred, or -1
* @return the formatted message
- *
+ *
* Unable to process XML Schema from {1} [@L{2}:C{3}]: {0}
*/
public String msgXsdExceptionMessage(String message, String systemId, int lineNumber,
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java Thu May 27 18:09:53 2010
@@ -171,7 +171,7 @@ public class XslTransformHandler {
public void setErrorListener(ErrorListener l) {
_transformerFactory.setErrorListener(l);
}
-
+
public void clearXSLSheets(QName processQName) {
synchronized (_templateCache) {
_templateCache.removeAll(processQName);
Modified: ode/trunk/utils/src/main/resources/org/apache/ode/utils/wsdl.xsd
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/resources/org/apache/ode/utils/wsdl.xsd?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/main/resources/org/apache/ode/utils/wsdl.xsd (original)
+++ ode/trunk/utils/src/main/resources/org/apache/ode/utils/wsdl.xsd Thu May 27 18:09:53 2010
@@ -21,7 +21,7 @@
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://schemas.xmlsoap.org/wsdl/"
elementFormDefault="qualified" >
-
+
<xs:complexType mixed="true" name="tDocumentation" >
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
@@ -38,7 +38,7 @@
<xs:element name="documentation" type="wsdl:tDocumentation" minOccurs="0" />
</xs:sequence>
</xs:complexType>
-
+
<xs:complexType name="tExtensibleAttributesDocumented" abstract="true" >
<xs:complexContent>
<xs:extension base="wsdl:tDocumented" >
@@ -47,7 +47,7 @@
This type is extended by component types to allow attributes from other namespaces to be added.
</xs:documentation>
</xs:annotation>
- <xs:anyAttribute namespace="##other" processContents="lax" />
+ <xs:anyAttribute namespace="##other" processContents="lax" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -98,7 +98,7 @@
</xs:annotation>
<xs:choice>
<xs:element name="import" type="wsdl:tImport" />
- <xs:element name="types" type="wsdl:tTypes" />
+ <xs:element name="types" type="wsdl:tTypes" />
<xs:element name="message" type="wsdl:tMessage" >
<xs:unique name="part" >
<xs:selector xpath="wsdl:part" />
@@ -125,7 +125,7 @@
<xs:extension base="wsdl:tExtensibleDocumented" >
<xs:sequence>
<xs:group ref="wsdl:anyTopLevelOptionalElement" minOccurs="0" maxOccurs="unbounded" />
- <xs:any namespace="##other" processContents="lax" minOccurs="0"
+ <xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="targetNamespace" type="xs:anyURI" use="optional" />
@@ -133,7 +133,7 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tImport" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleAttributesDocumented" >
@@ -142,47 +142,47 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tTypes" >
- <xs:complexContent>
+ <xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" />
- </xs:complexContent>
+ </xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tMessage" >
- <xs:complexContent>
+ <xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
<xs:sequence>
<xs:element name="part" type="wsdl:tPart" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:NCName" use="required" />
</xs:extension>
- </xs:complexContent>
+ </xs:complexContent>
</xs:complexType>
<xs:complexType name="tPart" >
- <xs:complexContent>
+ <xs:complexContent>
<xs:extension base="wsdl:tExtensibleAttributesDocumented" >
<xs:attribute name="name" type="xs:NCName" use="required" />
<xs:attribute name="element" type="xs:QName" use="optional" />
- <xs:attribute name="type" type="xs:QName" use="optional" />
+ <xs:attribute name="type" type="xs:QName" use="optional" />
</xs:extension>
- </xs:complexContent>
+ </xs:complexContent>
</xs:complexType>
<xs:complexType name="tPortType" >
- <xs:complexContent>
+ <xs:complexContent>
<xs:extension base="wsdl:tExtensibleAttributesDocumented" >
<xs:sequence>
<xs:element name="operation" type="wsdl:tOperation" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:NCName" use="required" />
</xs:extension>
- </xs:complexContent>
+ </xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tOperation" >
- <xs:complexContent>
+ <xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
<xs:sequence>
<xs:choice>
@@ -193,9 +193,9 @@ maxOccurs="unbounded"/>
<xs:attribute name="name" type="xs:NCName" use="required" />
<xs:attribute name="parameterOrder" type="xs:NMTOKENS" use="optional" />
</xs:extension>
- </xs:complexContent>
+ </xs:complexContent>
</xs:complexType>
-
+
<xs:group name="request-response-or-one-way-operation" >
<xs:sequence>
<xs:element name="input" type="wsdl:tParam" />
@@ -215,7 +215,7 @@ maxOccurs="unbounded"/>
</xs:sequence>
</xs:sequence>
</xs:group>
-
+
<xs:complexType name="tParam" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleAttributesDocumented" >
@@ -233,7 +233,7 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tBinding" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
@@ -245,7 +245,7 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tBindingOperationMessage" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
@@ -253,7 +253,7 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tBindingOperationFault" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
@@ -274,7 +274,7 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tService" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
@@ -285,7 +285,7 @@ maxOccurs="unbounded"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="tPort" >
<xs:complexContent>
<xs:extension base="wsdl:tExtensibleDocumented" >
Modified: ode/trunk/utils/src/test/java/org/apache/ode/utils/NamespaceContextImplTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/test/java/org/apache/ode/utils/NamespaceContextImplTest.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/test/java/org/apache/ode/utils/NamespaceContextImplTest.java (original)
+++ ode/trunk/utils/src/test/java/org/apache/ode/utils/NamespaceContextImplTest.java Thu May 27 18:09:53 2010
@@ -30,7 +30,7 @@ import junit.framework.TestCase;
/**
* Test of {@link NamespaceContextImpl}
- *
+ *
* <p>
* Created on Feb 4, 2004 at 6:08:26 PM.
* </p>
Modified: ode/trunk/utils/src/test/java/org/apache/ode/utils/XMLParserUtilsTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/test/java/org/apache/ode/utils/XMLParserUtilsTest.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/test/java/org/apache/ode/utils/XMLParserUtilsTest.java (original)
+++ ode/trunk/utils/src/test/java/org/apache/ode/utils/XMLParserUtilsTest.java Thu May 27 18:09:53 2010
@@ -29,11 +29,11 @@ import org.xml.sax.XMLReader;
import java.net.URL;
public class XMLParserUtilsTest extends TestCase {
-
+
public void testXMLReaderConfigurationGoodValidation() throws Exception {
doParse(TestResources.getRetailerWSDL(),DOMUtils.WSDL_NS,TestResources.getWsdlSchema(),true);
}
-
+
public void testMultiSchemaGoodValidation() throws Exception {
doParse(TestResources.getBpelExampleWsdl1(),
new String[] {DOMUtils.WSDL_NS,
@@ -45,7 +45,7 @@ public class XMLParserUtilsTest extends
TestResources.getBpelPropertySchema()},
true);
}
-
+
public void testMultiSchemaBadValidation() throws Exception {
doParse(TestResources.getBpelExampleWsdl1BadPLink(),
new String[] {DOMUtils.WSDL_NS,
@@ -56,27 +56,27 @@ public class XMLParserUtilsTest extends
TestResources.getBpelPartnerLinkSchema(),
TestResources.getBpelPropertySchema()},
false); }
-
+
public void testXMLReaderConfigurationBadValidation() throws Exception {
doParse(TestResources.getInvalidButWellFormedWsdl(),DOMUtils.WSDL_NS,TestResources.getWsdlSchema(),
false);
}
-
+
public void testXMLReaderConfigurationWrongDocumentType() throws Exception {
doParse(TestResources.getWsdlSchema(),DOMUtils.WSDL_NS,TestResources.getWsdlSchema(),false);
}
-
+
public void testXMLReaderConfigurationNoNamespaceWrongDocumentType()
throws Exception
{
doParse(TestResources.getPlainOldXmlDocument(),DOMUtils.WSDL_NS,TestResources.getWsdlSchema(),
false);
}
-
+
private void doParse(URL doc, String ns, URL schema, boolean succeed) throws Exception {
doParse(doc, new String[] {ns}, new URL[] {schema}, succeed);
}
-
+
private void doParse(URL doc, String[] ns, URL[] schema, boolean succeed) throws Exception {
XMLReader xr = XMLParserUtils.getXMLReader();
DOMParser dp = XMLParserUtils.getDOMParser();
@@ -115,6 +115,6 @@ public class XMLParserUtilsTest extends
fail("DOM validation of " + doc.toExternalForm() + " should have failed.");
}
}
-
-
+
+
}
Modified: ode/trunk/utils/src/test/java/org/apache/ode/utils/cli/CommandlineTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/test/java/org/apache/ode/utils/cli/CommandlineTest.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/test/java/org/apache/ode/utils/cli/CommandlineTest.java (original)
+++ ode/trunk/utils/src/test/java/org/apache/ode/utils/cli/CommandlineTest.java Thu May 27 18:09:53 2010
@@ -34,7 +34,7 @@ public class CommandlineTest extends Tes
public CommandlineTest(String arg0) {
super(arg0);
}
-
+
public void testUserOrder() {
LastArgument last = new LastArgument("foo", "bar", false);
Argument first = new Argument("baz", "qux", false);
@@ -56,7 +56,7 @@ public class CommandlineTest extends Tes
assertTrue(cf[2].getDescription(),cf[2] == secondtolast);
assertTrue(cf[3].getDescription(),cf[3] == last);
}
-
+
public void testLastArgument() {
String[] args = new String[] {"a", "b", "c", "d"};
LastArgument la = new LastArgument("should be d", "", false);
@@ -70,9 +70,9 @@ public class CommandlineTest extends Tes
assertTrue(mav.length == 3);
assertTrue(mav[0].equals("a"));
assertTrue(mav[1].equals("b"));
- assertTrue(mav[2].equals("c"));
+ assertTrue(mav[2].equals("c"));
}
-
+
public void testXorGroup() {
XorGroup xog = BaseCommandlineTool.LOGGING;
Fragments logging = new Fragments(new CommandlineFragment[] {xog});
@@ -80,8 +80,8 @@ public class CommandlineTest extends Tes
assertTrue(xog.didMatch());
assertTrue(xog.getMatched() == BaseCommandlineTool.VERBOSE_F);
}
-
- private void doFlag(Flag f, List<List<String>> tests, boolean[] good, boolean[] set,
+
+ private void doFlag(Flag f, List<List<String>> tests, boolean[] good, boolean[] set,
List<List<String>> post)
{
for (int i=0; i < tests.size(); ++i) {
@@ -109,9 +109,9 @@ public class CommandlineTest extends Tes
}
f.reset();
assertFalse(i + " should not have been set after reset.",f.isSet());
- }
+ }
}
-
+
private void doFlagWithArgument(FlagWithArgument f, List<List<String>> tests, List<String> values,
boolean[] good, boolean[] set, List<List<String>> post)
{
@@ -141,9 +141,9 @@ public class CommandlineTest extends Tes
}
f.reset();
assertFalse(i + " should not have been set after reset.",f.isSet());
- }
- }
-
+ }
+ }
+
public void testOptionalArgument() {
Argument f = new Argument("x", "foo", true);
@@ -167,9 +167,9 @@ public class CommandlineTest extends Tes
Arrays.asList(new String[]{}),
Arrays.asList(new String[]{}));
- doArgument(f,tests,values,good,set,post);
+ doArgument(f,tests,values,good,set,post);
}
-
+
public void testRequiredArgument() {
Argument f = new Argument("x", "foo", false);
@@ -193,9 +193,9 @@ public class CommandlineTest extends Tes
Arrays.asList(EMPTY_STRING_ARRAY),
null);
- doArgument(f, tests, values, good, set, post);
- }
-
+ doArgument(f, tests, values, good, set, post);
+ }
+
public void testOptionalMultiArgument() {
MultiArgument f = new MultiArgument("x", "foo", true);
@@ -214,20 +214,20 @@ public class CommandlineTest extends Tes
boolean[] good = new boolean[] {
true,true,true
};
-
+
boolean[] set = new boolean[] {
true,true,false
};
-
+
List<List<String>> post = Arrays.asList(
Arrays.asList(EMPTY_STRING_ARRAY),
Arrays.asList(EMPTY_STRING_ARRAY),
Arrays.asList(EMPTY_STRING_ARRAY)
);
- doMultiArgument(f, tests, values, good, set, post);
- }
-
+ doMultiArgument(f, tests, values, good, set, post);
+ }
+
public void testRequiredMultiArgument() {
MultiArgument f = new MultiArgument("x", "foo", false);
@@ -257,9 +257,9 @@ public class CommandlineTest extends Tes
Arrays.asList(EMPTY_STRING_ARRAY)
);
- doMultiArgument(f, tests, values, good, set, post);
- }
-
+ doMultiArgument(f, tests, values, good, set, post);
+ }
+
private void doArgument(Argument f, List<List<String>> tests, String[] values,
boolean[] good, boolean[] set, List<List<String>> post)
{
@@ -289,9 +289,9 @@ public class CommandlineTest extends Tes
}
f.reset();
assertFalse(i + " should not have been set after reset.",f.isSet());
- }
- }
-
+ }
+ }
+
private void doMultiArgument(MultiArgument f, List<List<String>> tests, List<List<String>> values,
boolean[] good, boolean[] set, List<List<String>> post)
{
@@ -322,9 +322,9 @@ public class CommandlineTest extends Tes
}
f.reset();
assertFalse(i + " should not have been set after reset.",f.isSet());
- }
- }
-
+ }
+ }
+
public void testOptionalFlagWithArgument() {
FlagWithArgument f = new FlagWithArgument("x", "foo", "", true);
@@ -363,8 +363,8 @@ public class CommandlineTest extends Tes
);
doFlagWithArgument(f, tests, values, good, set, post);
- }
-
+ }
+
public void testRequiredFlagWithArgument() {
FlagWithArgument f = new FlagWithArgument("x", "foo", "", false);
List<List<String>> tests = Arrays.asList(
@@ -398,8 +398,8 @@ public class CommandlineTest extends Tes
);
doFlagWithArgument(f, tests, values, good, set, post);
- }
-
+ }
+
public void testOptionalFlag() {
Flag f = new Flag("x", "", true);
@@ -433,7 +433,7 @@ public class CommandlineTest extends Tes
doFlag(f, tests, good, set, post);
}
-
+
public void testRequiredFlag() {
Flag f = new Flag("x", "", false);
@@ -465,9 +465,9 @@ public class CommandlineTest extends Tes
null
);
- doFlag(f, tests, good, set, post);
+ doFlag(f, tests, good, set, post);
}
-
+
public void testExtraStuff() {
Fragments f = new Fragments(new CommandlineFragment[] {});
String[] args = new String[] {"a", "b"};
Modified: ode/trunk/utils/src/test/java/org/apache/ode/utils/msg/MessageBundleTestMessages_de.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/test/java/org/apache/ode/utils/msg/MessageBundleTestMessages_de.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/test/java/org/apache/ode/utils/msg/MessageBundleTestMessages_de.java (original)
+++ ode/trunk/utils/src/test/java/org/apache/ode/utils/msg/MessageBundleTestMessages_de.java Thu May 27 18:09:53 2010
@@ -26,4 +26,3 @@ public class MessageBundleTestMessages_d
}
}
-
\ No newline at end of file
Modified: ode/trunk/utils/src/test/java/org/apache/ode/utils/xsd/DurationTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/test/java/org/apache/ode/utils/xsd/DurationTest.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/utils/src/test/java/org/apache/ode/utils/xsd/DurationTest.java (original)
+++ ode/trunk/utils/src/test/java/org/apache/ode/utils/xsd/DurationTest.java Thu May 27 18:09:53 2010
@@ -34,17 +34,17 @@ public class DurationTest extends TestCa
public DurationTest(String arg0) {
super(arg0);
}
-
+
public void testDuration1() {
String TEST ="P10Y10M10DT10H10M10.1S";
Duration d = new Duration(TEST);
long time = System.currentTimeMillis();
-
+
Calendar c1 = Calendar.getInstance();
c1.setTimeInMillis(time);
Calendar c2 = Calendar.getInstance();
c2.setTimeInMillis(time);
-
+
d.addTo(c1);
c2.add(Calendar.YEAR, 10);
c2.add(Calendar.MONTH, 10);
@@ -53,59 +53,59 @@ public class DurationTest extends TestCa
c2.add(Calendar.MINUTE, 10);
c2.add(Calendar.SECOND, 10);
c2.add(Calendar.MILLISECOND, 100);
-
+
assertEquals(c2.getTimeInMillis(), c1.getTimeInMillis());
}
-
+
public void testDuration2() {
String TEST ="P10Y10M10D";
Duration d = new Duration(TEST);
long time = System.currentTimeMillis();
-
+
Calendar c1 = Calendar.getInstance();
c1.setTimeInMillis(time);
Calendar c2 = Calendar.getInstance();
c2.setTimeInMillis(time);
-
+
d.addTo(c1);
c2.add(Calendar.YEAR, 10);
c2.add(Calendar.MONTH, 10);
c2.add(Calendar.DAY_OF_MONTH, 10);
-
+
assertEquals(c2.getTimeInMillis(), c1.getTimeInMillis());
}
-
+
public void testDuration3() {
String TEST ="P10M";
Duration d = new Duration(TEST);
long time = System.currentTimeMillis();
-
+
Calendar c1 = Calendar.getInstance();
c1.setTimeInMillis(time);
Calendar c2 = Calendar.getInstance();
c2.setTimeInMillis(time);
-
+
d.addTo(c1);
c2.add(Calendar.MONTH, 10);
-
+
assertEquals(c2.getTimeInMillis(), c1.getTimeInMillis());
}
-
+
public void testDuration4() {
String TEST ="P10YT90S";
Duration d = new Duration(TEST);
long time = System.currentTimeMillis();
-
+
Calendar c1 = Calendar.getInstance();
c1.setTimeInMillis(time);
Calendar c2 = Calendar.getInstance();
c2.setTimeInMillis(time);
-
+
d.addTo(c1);
c2.add(Calendar.YEAR, 10);
c2.add(Calendar.SECOND, 90);
-
+
assertEquals(c2.getTimeInMillis(), c1.getTimeInMillis());
}
-
+
}