You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by dk...@apache.org on 2011/07/11 18:04:53 UTC
svn commit: r1145219 - in /webservices/commons/trunk/modules/neethi: ./
src/main/appended-resources/META-INF/ src/main/assembly/
src/main/java/org/apache/neethi/ src/main/java/org/apache/neethi/builders/
src/main/java/org/apache/neethi/builders/convert...
Author: dkulp
Date: Mon Jul 11 16:04:51 2011
New Revision: 1145219
URL: http://svn.apache.org/viewvc?rev=1145219&view=rev
Log:
Set a bunch of svn properties to make sure eol style is consistent, mime type set, etc...
Modified:
webservices/commons/trunk/modules/neethi/README.txt (props changed)
webservices/commons/trunk/modules/neethi/RELEASE-NOTE.txt (props changed)
webservices/commons/trunk/modules/neethi/pom.xml (props changed)
webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE (contents, props changed)
webservices/commons/trunk/modules/neethi/src/main/assembly/bin.xml (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AbstractPolicyOperator.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/All.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/Assertion.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/Constants.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/ExactlyOne.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/Policy.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyBuilder.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyComponent.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyOperator.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyRegistry.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyRegistryImpl.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/AssertionBuilder.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/Converter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/DOMToDOMConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/DOMToStaxConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/OMToDOMConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/OMToOMConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/OMToStaxConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/StaxToOMConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/StaxToStaxConverter.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/xml/XMLPrimitiveAssertionBuilder.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/PolicyComparator.java (props changed)
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/Service.java (contents, props changed)
webservices/commons/trunk/modules/neethi/src/site/resources/images/project-logo.jpg (props changed)
webservices/commons/trunk/modules/neethi/src/site/site.xml (contents, props changed)
webservices/commons/trunk/modules/neethi/src/site/xdoc/download.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/Normalize2Test.java (props changed)
webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/NormalizeTest.java (props changed)
webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/PolicyTestCase.java (contents, props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test1.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test10.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test11.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test12.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test13.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test14.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test15.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test16.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test17.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test18.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test19.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test2.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test20.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test21.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test22.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test23.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test24.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test25.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test3.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test4.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test5.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test6.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test7.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test8.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test9.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test1.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test10.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test11.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test12.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test13.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test14.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test15.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test16.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test17.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test18.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test19.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test2.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test20.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test21.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test22.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test23.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test24.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test25.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test3.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test4.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test5.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test6.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test7.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test8.xml (props changed)
webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test9.xml (props changed)
Propchange: webservices/commons/trunk/modules/neethi/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/README.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: webservices/commons/trunk/modules/neethi/RELEASE-NOTE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/RELEASE-NOTE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: webservices/commons/trunk/modules/neethi/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE?rev=1145219&r1=1145218&r2=1145219&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE (original)
+++ webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE Mon Jul 11 16:04:51 2011
@@ -1,3 +1,3 @@
-This product is tested with testcases developed at W3C under the license:
-http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-The source distribution of this product includes those testcases.
+This product is tested with testcases developed at W3C under the license:
+http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
+The source distribution of this product includes those testcases.
Propchange: webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/appended-resources/META-INF/NOTICE
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: webservices/commons/trunk/modules/neethi/src/main/assembly/bin.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AbstractPolicyOperator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/All.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/Assertion.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/Constants.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/ExactlyOne.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/Policy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyOperator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyReference.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyRegistry.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyRegistryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/AssertionBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/Converter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/DOMToDOMConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/DOMToStaxConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/OMToDOMConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/OMToOMConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/OMToStaxConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/StaxToOMConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/StaxToStaxConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/xml/XMLPrimitiveAssertionBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/PolicyComparator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/Service.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/Service.java?rev=1145219&r1=1145218&r2=1145219&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/Service.java (original)
+++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/Service.java Mon Jul 11 16:04:51 2011
@@ -1,163 +1,163 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-
-package org.apache.neethi.util;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * This class handles looking up service providers on the class path.
- * It implements the system described in:
- *
- * <a href='http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider'>JAR
- * File Specification Under Service Provider</a>. Note that this
- * interface is very similar to the one they describe which seems to
- * be missing in the JDK.
- *
- * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id$
- */
-public final class Service {
-
- // Remember providers we have looked up before.
- static Map<String, List<?>> instanceMap = new HashMap<String, List<?>>();
-
- private Service() {
- //not constructed
- }
-
- @SuppressWarnings("unchecked")
- private static <T> List<T> cast(List<?> p) {
- return (List<T>)p;
- }
-
- /**
- * Returns an iterator where each element should implement the
- * interface (or subclass the baseclass) described by cls. The
- * Classes are found by searching the classpath for service files
- * named: 'META-INF/services/<fully qualified classname> that list
- * fully qualified classnames of classes that implement the
- * service files classes interface. These classes must have
- * default constructors.
- *
- * @param cls The class/interface to search for providers of.
- */
- public static synchronized <T> List<? extends T> providers(Class<T> cls) {
-
- String serviceFile = "META-INF/services/" + cls.getName();
-
- List<T> l = cast(instanceMap.get(serviceFile));
- if (l != null) {
- return l;
- }
-
- l = new ArrayList<T>();
- instanceMap.put(serviceFile, l);
-
- ClassLoader cl = null;
- try {
- cl = cls.getClassLoader();
- } catch (SecurityException se) {
- // Ooops! can't get his class loader.
- }
- // Can always request your own class loader. But it might be 'null'.
- if (cl == null) {
- cl = Service.class.getClassLoader();
- }
- if (cl == null) {
- cl = ClassLoader.getSystemClassLoader();
- }
-
- // No class loader so we can't find 'serviceFile'.
- if (cl == null) {
- return l;
- }
-
- Enumeration<URL> e;
- try {
- e = cl.getResources(serviceFile);
- } catch (IOException ioe) {
- return l;
- }
-
- while (e.hasMoreElements()) {
- InputStream is = null;
- try {
- URL u = e.nextElement();
-
- is = u.openStream();
-
- Reader r = new InputStreamReader(is, "UTF-8");
- BufferedReader br = new BufferedReader(r);
-
- String line = br.readLine();
- while (line != null) {
- try {
- // First strip any comment...
- int idx = line.indexOf('#');
- if (idx != -1) {
- line = line.substring(0, idx);
- }
-
- // Trim whitespace.
- line = line.trim();
-
- // If nothing left then loop around...
- if (line.length() == 0) {
- line = br.readLine();
- continue;
- }
-
- // Try and load the class
- Object obj = cl.loadClass(line).newInstance();
- // stick it into our vector...
- l.add(cls.cast(obj));
- } catch (Exception ex) {
- // Just try the next line
- }
- line = br.readLine();
- }
- } catch (Exception ex) {
- // Just try the next file...
- } catch (LinkageError le) {
- // Just try the next file...
- } finally {
- try {
- if (is != null) {
- is.close();
- }
- } catch (IOException ex) {
- //ignore
- }
- }
- }
- return l;
- }
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.neethi.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class handles looking up service providers on the class path.
+ * It implements the system described in:
+ *
+ * <a href='http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service Provider'>JAR
+ * File Specification Under Service Provider</a>. Note that this
+ * interface is very similar to the one they describe which seems to
+ * be missing in the JDK.
+ *
+ * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
+ * @version $Id$
+ */
+public final class Service {
+
+ // Remember providers we have looked up before.
+ static Map<String, List<?>> instanceMap = new HashMap<String, List<?>>();
+
+ private Service() {
+ //not constructed
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T> List<T> cast(List<?> p) {
+ return (List<T>)p;
+ }
+
+ /**
+ * Returns an iterator where each element should implement the
+ * interface (or subclass the baseclass) described by cls. The
+ * Classes are found by searching the classpath for service files
+ * named: 'META-INF/services/<fully qualified classname> that list
+ * fully qualified classnames of classes that implement the
+ * service files classes interface. These classes must have
+ * default constructors.
+ *
+ * @param cls The class/interface to search for providers of.
+ */
+ public static synchronized <T> List<? extends T> providers(Class<T> cls) {
+
+ String serviceFile = "META-INF/services/" + cls.getName();
+
+ List<T> l = cast(instanceMap.get(serviceFile));
+ if (l != null) {
+ return l;
+ }
+
+ l = new ArrayList<T>();
+ instanceMap.put(serviceFile, l);
+
+ ClassLoader cl = null;
+ try {
+ cl = cls.getClassLoader();
+ } catch (SecurityException se) {
+ // Ooops! can't get his class loader.
+ }
+ // Can always request your own class loader. But it might be 'null'.
+ if (cl == null) {
+ cl = Service.class.getClassLoader();
+ }
+ if (cl == null) {
+ cl = ClassLoader.getSystemClassLoader();
+ }
+
+ // No class loader so we can't find 'serviceFile'.
+ if (cl == null) {
+ return l;
+ }
+
+ Enumeration<URL> e;
+ try {
+ e = cl.getResources(serviceFile);
+ } catch (IOException ioe) {
+ return l;
+ }
+
+ while (e.hasMoreElements()) {
+ InputStream is = null;
+ try {
+ URL u = e.nextElement();
+
+ is = u.openStream();
+
+ Reader r = new InputStreamReader(is, "UTF-8");
+ BufferedReader br = new BufferedReader(r);
+
+ String line = br.readLine();
+ while (line != null) {
+ try {
+ // First strip any comment...
+ int idx = line.indexOf('#');
+ if (idx != -1) {
+ line = line.substring(0, idx);
+ }
+
+ // Trim whitespace.
+ line = line.trim();
+
+ // If nothing left then loop around...
+ if (line.length() == 0) {
+ line = br.readLine();
+ continue;
+ }
+
+ // Try and load the class
+ Object obj = cl.loadClass(line).newInstance();
+ // stick it into our vector...
+ l.add(cls.cast(obj));
+ } catch (Exception ex) {
+ // Just try the next line
+ }
+ line = br.readLine();
+ }
+ } catch (Exception ex) {
+ // Just try the next file...
+ } catch (LinkageError le) {
+ // Just try the next file...
+ } finally {
+ try {
+ if (is != null) {
+ is.close();
+ }
+ } catch (IOException ex) {
+ //ignore
+ }
+ }
+ }
+ return l;
+ }
+
}
\ No newline at end of file
Propchange: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/util/Service.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/site/resources/images/project-logo.jpg
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Mon Jul 11 16:04:51 2011
@@ -1 +1 @@
-application/octet-stream
+image/jpeg
Modified: webservices/commons/trunk/modules/neethi/src/site/site.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/site/site.xml?rev=1145219&r1=1145218&r2=1145219&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/site/site.xml (original)
+++ webservices/commons/trunk/modules/neethi/src/site/site.xml Mon Jul 11 16:04:51 2011
@@ -16,7 +16,6 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
<project name="Neethi">
<bannerLeft>
<name>Apache Neethi</name>
@@ -51,3 +50,4 @@
</menu>
</body>
</project>
+
Propchange: webservices/commons/trunk/modules/neethi/src/site/site.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/site/xdoc/download.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/Normalize2Test.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/NormalizeTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/PolicyTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/PolicyTestCase.java?rev=1145219&r1=1145218&r2=1145219&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/PolicyTestCase.java (original)
+++ webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/PolicyTestCase.java Mon Jul 11 16:04:51 2011
@@ -1,114 +1,114 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-
-package org.apache.neethi;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.stream.FactoryConfigurationError;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.w3c.dom.Element;
-
-import org.xml.sax.SAXException;
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMXMLBuilderFactory;
-
-import org.junit.Assert;
-
-public abstract class PolicyTestCase extends Assert {
-
- protected String baseDir = System.getProperty("basedir");
- protected String testResourceDir = "src" + File.separator + "test" + File.separator + "test-resources";
- protected PolicyBuilder policyEngine = new PolicyBuilder();
- protected PolicyRegistry registry = new PolicyRegistryImpl();
-
- public PolicyTestCase() {
- if (baseDir == null) {
- baseDir = (String) new File(".").getAbsolutePath();
- }
- policyEngine.setPolicyRegistry(registry);
- }
-
- public Policy getPolicy(String name) throws Exception {
- return getPolicy(name, 0);
- }
- public Policy getPolicy(String name, int type) throws Exception {
- switch (type) {
- case 0:
- return policyEngine.getPolicy(getResource(name));
- case 1:
- return policyEngine.getPolicy(getResourceAsDOM(name));
- case 2:
- return policyEngine.getPolicy(getResourceAsStax(name));
- default:
- return policyEngine.getPolicy(getResourceAsElement(name));
- }
- }
-
- public InputStream getResource(String name) throws FileNotFoundException {
- String filePath = new File(testResourceDir, name).getAbsolutePath();
- return new FileInputStream(filePath);
- }
- public Element getResourceAsDOM(String name)
- throws ParserConfigurationException, SAXException, IOException {
- InputStream in = getResource(name);
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-
- dbf.setValidating(false);
- dbf.setIgnoringComments(false);
- dbf.setIgnoringElementContentWhitespace(true);
- dbf.setNamespaceAware(true);
- // dbf.setCoalescing(true);
- // dbf.setExpandEntityReferences(true);
-
- DocumentBuilder db = null;
- db = dbf.newDocumentBuilder();
-
- // db.setErrorHandler( new MyErrorHandler());
-
- return db.parse(in).getDocumentElement();
- }
-
- public XMLStreamReader getResourceAsStax(String name)
- throws XMLStreamException, FactoryConfigurationError, FileNotFoundException {
- InputStream in = getResource(name);
- return XMLInputFactory.newInstance().createXMLStreamReader(in);
- }
- public OMElement getResourceAsElement(String name)
- throws XMLStreamException, FactoryConfigurationError, FileNotFoundException {
- InputStream in = getResource(name);
- OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(
- OMAbstractFactory.getOMFactory(),
- XMLInputFactory.newInstance().createXMLStreamReader(in)).getDocumentElement();
- return element;
- }
-}
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.neethi;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.w3c.dom.Element;
+
+import org.xml.sax.SAXException;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+
+import org.junit.Assert;
+
+public abstract class PolicyTestCase extends Assert {
+
+ protected String baseDir = System.getProperty("basedir");
+ protected String testResourceDir = "src" + File.separator + "test" + File.separator + "test-resources";
+ protected PolicyBuilder policyEngine = new PolicyBuilder();
+ protected PolicyRegistry registry = new PolicyRegistryImpl();
+
+ public PolicyTestCase() {
+ if (baseDir == null) {
+ baseDir = (String) new File(".").getAbsolutePath();
+ }
+ policyEngine.setPolicyRegistry(registry);
+ }
+
+ public Policy getPolicy(String name) throws Exception {
+ return getPolicy(name, 0);
+ }
+ public Policy getPolicy(String name, int type) throws Exception {
+ switch (type) {
+ case 0:
+ return policyEngine.getPolicy(getResource(name));
+ case 1:
+ return policyEngine.getPolicy(getResourceAsDOM(name));
+ case 2:
+ return policyEngine.getPolicy(getResourceAsStax(name));
+ default:
+ return policyEngine.getPolicy(getResourceAsElement(name));
+ }
+ }
+
+ public InputStream getResource(String name) throws FileNotFoundException {
+ String filePath = new File(testResourceDir, name).getAbsolutePath();
+ return new FileInputStream(filePath);
+ }
+ public Element getResourceAsDOM(String name)
+ throws ParserConfigurationException, SAXException, IOException {
+ InputStream in = getResource(name);
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+
+ dbf.setValidating(false);
+ dbf.setIgnoringComments(false);
+ dbf.setIgnoringElementContentWhitespace(true);
+ dbf.setNamespaceAware(true);
+ // dbf.setCoalescing(true);
+ // dbf.setExpandEntityReferences(true);
+
+ DocumentBuilder db = null;
+ db = dbf.newDocumentBuilder();
+
+ // db.setErrorHandler( new MyErrorHandler());
+
+ return db.parse(in).getDocumentElement();
+ }
+
+ public XMLStreamReader getResourceAsStax(String name)
+ throws XMLStreamException, FactoryConfigurationError, FileNotFoundException {
+ InputStream in = getResource(name);
+ return XMLInputFactory.newInstance().createXMLStreamReader(in);
+ }
+ public OMElement getResourceAsElement(String name)
+ throws XMLStreamException, FactoryConfigurationError, FileNotFoundException {
+ InputStream in = getResource(name);
+ OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(
+ OMAbstractFactory.getOMFactory(),
+ XMLInputFactory.newInstance().createXMLStreamReader(in)).getDocumentElement();
+ return element;
+ }
+}
+
Propchange: webservices/commons/trunk/modules/neethi/src/test/java/org/apache/neethi/PolicyTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test1.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test10.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test11.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test12.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test13.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test14.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test15.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test16.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test17.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test18.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test19.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test2.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test20.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test21.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test22.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test23.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test24.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test25.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test3.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test4.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test5.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test6.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test7.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test8.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/normalized/test9.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test1.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test10.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test11.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test12.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test13.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test14.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test15.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test16.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test17.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test18.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test19.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test2.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test20.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test21.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test22.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test23.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test24.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test25.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test3.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test4.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test5.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test6.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test7.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test8.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: webservices/commons/trunk/modules/neethi/src/test/test-resources/samples/test9.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml