You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/04/02 18:38:45 UTC
svn commit: r524831 - in /incubator/tuscany/java/sca/scdl4j: idl-wsdl-xml/
idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/
idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/ idl-wsdl/
idl-wsdl/src/main/java/org/apache/tuscany/idl/ ...
Author: rfeng
Date: Mon Apr 2 09:38:42 2007
New Revision: 524831
URL: http://svn.apache.org/viewvc?view=rev&rev=524831
Log:
Format the code based on the tuscany template for eclipse code formatter and do some cleanups
Added:
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.checkstyle
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.pmd
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.ruleset
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceHandler.java
- copied, changed from r524628, incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLHandler.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceLoader.java
- copied, changed from r524628, incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLReader.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl/.checkstyle
incubator/tuscany/java/sca/scdl4j/idl-wsdl/.pmd
incubator/tuscany/java/sca/scdl4j/idl-wsdl/.ruleset
Removed:
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLHandler.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLReader.java
Modified:
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLConstants.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/ReadTestCase.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/SAXReadTestCase.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java
incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java
Added: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.checkstyle
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.checkstyle?view=auto&rev=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.checkstyle (added)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.checkstyle Mon Apr 2 09:38:42 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="Tuscany Checks" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
Added: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.pmd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.pmd?view=auto&rev=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.pmd (added)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.pmd Mon Apr 2 09:38:42 2007
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/><includeDerivedFiles>false</includeDerivedFiles></pmd>
\ No newline at end of file
Added: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.ruleset
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.ruleset?view=auto&rev=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.ruleset (added)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/.ruleset Mon Apr 2 09:38:42 2007
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<ruleset name="pmd-eclipse">
+ <description>PMD Plugin preferences rule set</description>
+
+
+ <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
+ <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
+ <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/>
+<!--<rule ref="rulesets/basic.xml/EmptyCatchBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyIfStmt"/>-->
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/>
+<!--<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyTryBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>-->
+ <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/>
+ <rule ref="rulesets/basic.xml/JumbledIncrementer"/>
+<!--<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>-->
+ <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
+ <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
+<!--<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>-->
+
+<!--<rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>-->
+
+<!--<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>-->
+<!--<rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>-->
+<!--<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>-->
+
+<!--<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>-->
+<!--<rule ref="rulesets/codesize.xml/TooManyFields"/>-->
+
+<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
+<!--<rule ref="rulesets/controversial.xml/AtLeastOneConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/CallSuperInConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/DontImportSun"/>-->
+<!--<rule ref="rulesets/controversial.xml/NullAssignment"/>-->
+<!--<rule ref="rulesets/controversial.xml/OnlyOneReturn"/>-->
+<!--<rule ref="rulesets/controversial.xml/SingularField"/>-->
+<!--<rule ref="rulesets/controversial.xml/SuspiciousOctalEscape"/>-->
+<!--<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>-->
+<rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
+<!--<rule ref="rulesets/controversial.xml/UnusedModifier"/>-->
+
+<!--<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>-->
+<!--<rule ref="rulesets/coupling.xml/ExcessiveImports"/>-->
+<!--<rule ref="rulesets/coupling.xml/LooseCoupling"/>-->
+
+<!--<rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>-->
+<!--<rule ref="rulesets/design.xml/AccessorClassGeneration"/>-->
+<!--<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>-->
+<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
+<!--<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
+<!--<rule ref="rulesets/design.xml/BadComparison"/>-->
+<!--<rule ref="rulesets/design.xml/CloseConnection"/>-->
+<!--<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>-->
+<!--<rule ref="rulesets/design.xml/ConfusingTernary"/>-->
+<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
+<!--<rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>-->
+<!--<rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>-->
+<rule ref="rulesets/design.xml/IdempotentOperations"/>
+<!--<rule ref="rulesets/design.xml/ImmutableField"/>-->
+<!--<rule ref="rulesets/design.xml/InstantiationToGetClass"/>-->
+<!--<rule ref="rulesets/design.xml/MissingBreakInSwitch"/>-->
+<!--<rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>-->
+<!--<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>-->
+<!--<rule ref="rulesets/design.xml/NonStaticInitializer"/>-->
+<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
+<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
+<rule ref="rulesets/design.xml/SimplifyConditional"/>
+<!--<rule ref="rulesets/design.xml/SwitchDensity"/>-->
+<!--<rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>-->
+<!--<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>-->
+<!--<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>-->
+<!--<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>-->
+<!--<rule ref="rulesets/design.xml/UseSingleton"/>-->
+
+<!--<rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/>-->
+<!--<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>-->
+
+<!--<rule ref="rulesets/imports.xml/DuplicateImports"/>-->
+<!--<rule ref="rulesets/imports.xml/DontImportJavaLang"/>-->
+<!--<rule ref="rulesets/imports.xml/UnusedImports"/>-->
+<!--<rule ref="rulesets/imports.xml/ImportFromSamePackage"/>-->
+
+<!--<rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/>-->
+<!--<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>-->
+
+<!--<rule ref="rulesets/junit.xml/JUnitStaticSuite"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitSpelling"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitAssertionsShouldIncludeMessage"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/>-->
+<!--<rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/>-->
+<!--<rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>-->
+
+ <!--<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LogBlockWithoutIf"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/SystemPrintln"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/ProperLogger"/>-->
+
+ <!--<rule ref="rulesets/naming.xml/ShortVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/LongVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/ShortMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/VariableNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/ClassNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/AbstractNaming"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidDollarSigns"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>-->
+ <!--<rule ref="rulesets/naming.xml/NoPackage"/>-->
+ <!--<rule ref="rulesets/naming.xml/PackageCase"/>-->
+
+ <!--<rule ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>-->
+
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>-->
+
+ <!--<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringInstantiation"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringToString"/>-->
+ <!--<rule ref="rulesets/strings.xml/AvoidConcatenatingNonLiteralsInStringBuffer"/>-->
+ <!--<rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>-->
+
+ <!--<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>-->
+ <!--<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>-->
+
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
+ <!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>-->
+
+</ruleset>
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLConstants.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLConstants.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLConstants.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLConstants.java Mon Apr 2 09:38:42 2007
@@ -23,9 +23,9 @@
import org.apache.tuscany.scdl.Constants;
public interface WSDLConstants {
-
- public final String INTERFACE_WSDL = "interface.wsdl";
- public final QName INTERFACE_WSDL_QNAME = new QName(Constants.SCA10_NS, "interface.wsdl");
- public final String INTERFACE = "interface";
+
+ String INTERFACE_WSDL = "interface.wsdl";
+ QName INTERFACE_WSDL_QNAME = new QName(Constants.SCA10_NS, "interface.wsdl");
+ String INTERFACE = "interface";
}
Copied: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceHandler.java (from r524628, incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLHandler.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceHandler.java?view=diff&rev=524831&p1=incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLHandler.java&r1=524628&p2=incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceHandler.java&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLHandler.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceHandler.java Mon Apr 2 09:38:42 2007
@@ -30,40 +30,40 @@
import org.xml.sax.helpers.DefaultHandler;
/**
- * A content handler for Java interfaces and implementations.
- *
- * @version $Rev$ $Date$
+ * A content handler for Java interfaces and implementations.
+ *
+ * @version $Rev$ $Date$
*/
-public class WSDLHandler extends DefaultHandler implements InterfaceHandler {
-
- private WSDLFactory wsdlFactory;
- private WSDLInterface wsdlInterface;
-
- public WSDLHandler(WSDLFactory wsdlFactory) {
- this.wsdlFactory = wsdlFactory;
- }
-
- public void startDocument() throws SAXException {
- wsdlInterface = null;
- }
-
- public void startElement(String uri, String name, String qname, Attributes attr) throws SAXException {
-
- if (Constants.SCA10_NS.equals(uri)) {
-
- if (WSDLConstants.INTERFACE_WSDL.equals(name)) {
-
- // Parse a WSDL interface
- wsdlInterface = wsdlFactory.createWSDLInterface();
- wsdlInterface.setUnresolved(true);
- //TODO handle qname
- wsdlInterface.setName(new QName("", attr.getValue(WSDLConstants.INTERFACE)));
- }
- }
- }
-
- public Interface getInterface() {
- return wsdlInterface;
- }
-
+public class WSDLInterfaceHandler extends DefaultHandler implements InterfaceHandler {
+
+ private WSDLFactory wsdlFactory;
+ private WSDLInterface wsdlInterface;
+
+ public WSDLInterfaceHandler(WSDLFactory wsdlFactory) {
+ this.wsdlFactory = wsdlFactory;
+ }
+
+ public void startDocument() throws SAXException {
+ wsdlInterface = null;
+ }
+
+ public void startElement(String uri, String name, String qname, Attributes attr) throws SAXException {
+
+ if (Constants.SCA10_NS.equals(uri)) {
+
+ if (WSDLConstants.INTERFACE_WSDL.equals(name)) {
+
+ // Parse a WSDL interface
+ wsdlInterface = wsdlFactory.createWSDLInterface();
+ wsdlInterface.setUnresolved(true);
+ // TODO handle qname
+ wsdlInterface.setName(new QName("", attr.getValue(WSDLConstants.INTERFACE)));
+ }
+ }
+ }
+
+ public Interface getInterface() {
+ return wsdlInterface;
+ }
+
}
Copied: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceLoader.java (from r524628, incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLReader.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceLoader.java?view=diff&rev=524831&p1=incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLReader.java&r1=524628&p2=incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceLoader.java&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLReader.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/main/java/org/apache/tuscany/idl/wsdl/xml/WSDLInterfaceLoader.java Mon Apr 2 09:38:42 2007
@@ -29,26 +29,27 @@
import org.apache.tuscany.idl.WSDLInterface;
import org.apache.tuscany.scdl.stax.Loader;
-public class WSDLReader implements Loader<WSDLInterface>, WSDLConstants {
+public class WSDLInterfaceLoader implements Loader<WSDLInterface>, WSDLConstants {
private WSDLFactory wsdlFactory;
-
- public WSDLReader(WSDLFactory javaFactory) {
- this.wsdlFactory = javaFactory;
+
+ public WSDLInterfaceLoader(WSDLFactory javaFactory) {
+ this.wsdlFactory = javaFactory;
}
-
+
public WSDLInterface load(XMLStreamReader reader) throws XMLStreamException {
// Read an <interface.java>
WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface();
wsdlInterface.setUnresolved(true);
- //TODO handle qname
+ // TODO handle qname
wsdlInterface.setName(new QName("", reader.getAttributeValue(null, INTERFACE)));
-
+
// Skip to end element
while (reader.hasNext()) {
- if (reader.next() == END_ELEMENT && INTERFACE_WSDL_QNAME.equals(reader.getName()))
+ if (reader.next() == END_ELEMENT && INTERFACE_WSDL_QNAME.equals(reader.getName())) {
break;
+ }
}
return wsdlInterface;
}
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/ReadTestCase.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/ReadTestCase.java Mon Apr 2 09:38:42 2007
@@ -53,14 +53,14 @@
AssemblyFactory assemblyFactory;
PolicyFactory policyFactory;
LoaderRegistry loaderRegistry;
-
+
public void setUp() throws Exception {
inputFactory = XMLInputFactory.newInstance();
assemblyFactory = new DefaultAssemblyFactory();
policyFactory = new DefaultPolicyFactory();
loaderRegistry = new LoaderRegistryImpl();
- WSDLReader wsdlReader = new WSDLReader(new DefaultWSDLFactory());
+ WSDLInterfaceLoader wsdlReader = new WSDLInterfaceLoader(new DefaultWSDLFactory());
loaderRegistry.addLoader(WSDLConstants.INTERFACE_WSDL_QNAME, wsdlReader);
}
@@ -72,17 +72,19 @@
}
public void testReadComponentType() throws Exception {
- ComponentTypeLoader componentTypeReader = new ComponentTypeLoader(assemblyFactory, policyFactory, loaderRegistry);
+ ComponentTypeLoader componentTypeReader = new ComponentTypeLoader(assemblyFactory, policyFactory,
+ loaderRegistry);
InputStream is = getClass().getClassLoader().getResourceAsStream("CalculatorImpl.componentType");
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
ComponentType componentType = componentTypeReader.load(reader);
assertNotNull(componentType);
-
+
new PrintUtil(System.out).print(componentType);
}
public void testReadConstrainingType() throws Exception {
- ConstrainingTypeLoader constrainingTypeReader = new ConstrainingTypeLoader(assemblyFactory, policyFactory, loaderRegistry);
+ ConstrainingTypeLoader constrainingTypeReader = new ConstrainingTypeLoader(assemblyFactory, policyFactory,
+ loaderRegistry);
InputStream is = getClass().getClassLoader().getResourceAsStream("CalculatorComponent.constrainingType");
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
ConstrainingType constrainingType = constrainingTypeReader.load(reader);
@@ -90,7 +92,7 @@
new PrintUtil(System.out).print(constrainingType);
}
-
+
public void testReadComposite() throws Exception {
CompositeLoader compositeReader = new CompositeLoader(assemblyFactory, policyFactory, loaderRegistry);
InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.composite");
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/SAXReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/SAXReadTestCase.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/SAXReadTestCase.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl-xml/src/test/java/org/apache/tuscany/idl/wsdl/xml/SAXReadTestCase.java Mon Apr 2 09:38:42 2007
@@ -52,15 +52,15 @@
XMLReader reader;
InterfaceHandlerRegistry interfaceHandlers;
ImplementationHandlerRegistry implementationHandlers;
-
+
public void setUp() throws Exception {
reader = XMLReaderFactory.createXMLReader();
-
+
assemblyFactory = new DefaultAssemblyFactory();
policyFactory = new DefaultPolicyFactory();
- WSDLHandler wsdlHandler = new WSDLHandler(new DefaultWSDLFactory());
+ WSDLInterfaceHandler wsdlHandler = new WSDLInterfaceHandler(new DefaultWSDLFactory());
interfaceHandlers = new InterfaceHandlerRegistry();
interfaceHandlers.addHandler(Constants.SCA10_NS, WSDLConstants.INTERFACE_WSDL, wsdlHandler);
}
@@ -76,7 +76,7 @@
reader.setContentHandler(handler);
reader.parse(new InputSource(is));
assertNotNull(handler.getComponentType());
-
+
new PrintUtil(System.out).print(handler.getComponentType());
}
@@ -89,10 +89,11 @@
new PrintUtil(System.out).print(handler.getConstrainingType());
}
-
+
public void testReadComposite() throws Exception {
InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.composite");
- CompositeHandler handler = new CompositeHandler(assemblyFactory, policyFactory, interfaceHandlers, implementationHandlers, null);
+ CompositeHandler handler = new CompositeHandler(assemblyFactory, policyFactory, interfaceHandlers,
+ implementationHandlers, null);
reader.setContentHandler(handler);
reader.parse(new InputSource(is));
assertNotNull(handler.getComposite());
Added: incubator/tuscany/java/sca/scdl4j/idl-wsdl/.checkstyle
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/.checkstyle?view=auto&rev=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/.checkstyle (added)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/.checkstyle Mon Apr 2 09:38:42 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="Tuscany Checks" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
Added: incubator/tuscany/java/sca/scdl4j/idl-wsdl/.pmd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/.pmd?view=auto&rev=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/.pmd (added)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/.pmd Mon Apr 2 09:38:42 2007
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/><includeDerivedFiles>false</includeDerivedFiles></pmd>
\ No newline at end of file
Added: incubator/tuscany/java/sca/scdl4j/idl-wsdl/.ruleset
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/.ruleset?view=auto&rev=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/.ruleset (added)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/.ruleset Mon Apr 2 09:38:42 2007
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<ruleset name="pmd-eclipse">
+ <description>PMD Plugin preferences rule set</description>
+
+
+ <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
+ <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
+ <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/>
+<!--<rule ref="rulesets/basic.xml/EmptyCatchBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyIfStmt"/>-->
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/>
+<!--<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyTryBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>-->
+ <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/>
+ <rule ref="rulesets/basic.xml/JumbledIncrementer"/>
+<!--<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>-->
+ <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
+ <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
+<!--<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>-->
+
+<!--<rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>-->
+
+<!--<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>-->
+<!--<rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>-->
+<!--<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>-->
+
+<!--<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>-->
+<!--<rule ref="rulesets/codesize.xml/TooManyFields"/>-->
+
+<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
+<!--<rule ref="rulesets/controversial.xml/AtLeastOneConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/CallSuperInConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/DontImportSun"/>-->
+<!--<rule ref="rulesets/controversial.xml/NullAssignment"/>-->
+<!--<rule ref="rulesets/controversial.xml/OnlyOneReturn"/>-->
+<!--<rule ref="rulesets/controversial.xml/SingularField"/>-->
+<!--<rule ref="rulesets/controversial.xml/SuspiciousOctalEscape"/>-->
+<!--<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>-->
+<rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
+<!--<rule ref="rulesets/controversial.xml/UnusedModifier"/>-->
+
+<!--<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>-->
+<!--<rule ref="rulesets/coupling.xml/ExcessiveImports"/>-->
+<!--<rule ref="rulesets/coupling.xml/LooseCoupling"/>-->
+
+<!--<rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>-->
+<!--<rule ref="rulesets/design.xml/AccessorClassGeneration"/>-->
+<!--<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>-->
+<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
+<!--<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
+<!--<rule ref="rulesets/design.xml/BadComparison"/>-->
+<!--<rule ref="rulesets/design.xml/CloseConnection"/>-->
+<!--<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>-->
+<!--<rule ref="rulesets/design.xml/ConfusingTernary"/>-->
+<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
+<!--<rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>-->
+<!--<rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>-->
+<rule ref="rulesets/design.xml/IdempotentOperations"/>
+<!--<rule ref="rulesets/design.xml/ImmutableField"/>-->
+<!--<rule ref="rulesets/design.xml/InstantiationToGetClass"/>-->
+<!--<rule ref="rulesets/design.xml/MissingBreakInSwitch"/>-->
+<!--<rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>-->
+<!--<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>-->
+<!--<rule ref="rulesets/design.xml/NonStaticInitializer"/>-->
+<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
+<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
+<rule ref="rulesets/design.xml/SimplifyConditional"/>
+<!--<rule ref="rulesets/design.xml/SwitchDensity"/>-->
+<!--<rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>-->
+<!--<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>-->
+<!--<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>-->
+<!--<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>-->
+<!--<rule ref="rulesets/design.xml/UseSingleton"/>-->
+
+<!--<rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/>-->
+<!--<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>-->
+
+<!--<rule ref="rulesets/imports.xml/DuplicateImports"/>-->
+<!--<rule ref="rulesets/imports.xml/DontImportJavaLang"/>-->
+<!--<rule ref="rulesets/imports.xml/UnusedImports"/>-->
+<!--<rule ref="rulesets/imports.xml/ImportFromSamePackage"/>-->
+
+<!--<rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/>-->
+<!--<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>-->
+
+<!--<rule ref="rulesets/junit.xml/JUnitStaticSuite"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitSpelling"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitAssertionsShouldIncludeMessage"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/>-->
+<!--<rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/>-->
+<!--<rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>-->
+
+ <!--<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LogBlockWithoutIf"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/SystemPrintln"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/ProperLogger"/>-->
+
+ <!--<rule ref="rulesets/naming.xml/ShortVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/LongVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/ShortMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/VariableNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/ClassNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/AbstractNaming"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidDollarSigns"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>-->
+ <!--<rule ref="rulesets/naming.xml/NoPackage"/>-->
+ <!--<rule ref="rulesets/naming.xml/PackageCase"/>-->
+
+ <!--<rule ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>-->
+
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>-->
+
+ <!--<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringInstantiation"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringToString"/>-->
+ <!--<rule ref="rulesets/strings.xml/AvoidConcatenatingNonLiteralsInStringBuffer"/>-->
+ <!--<rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>-->
+
+ <!--<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>-->
+ <!--<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>-->
+
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
+ <!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>-->
+
+</ruleset>
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLFactory.java Mon Apr 2 09:38:42 2007
@@ -20,15 +20,16 @@
/**
* Factory for the WSDL model.
- *
- * @version $Rev$ $Date$
+ *
+ * @version $Rev$ $Date$
*/
public interface WSDLFactory {
-
- /**
- * Creates a new WSDL interface.
- * @return a new WSDL interface
- */
- WSDLInterface createWSDLInterface();
+
+ /**
+ * Creates a new WSDL interface.
+ *
+ * @return a new WSDL interface
+ */
+ WSDLInterface createWSDLInterface();
}
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/WSDLInterface.java Mon Apr 2 09:38:42 2007
@@ -25,33 +25,37 @@
/**
* Represents a WSDL interface.
- *
- * @version $Rev$ $Date$
+ *
+ * @version $Rev$ $Date$
*/
public interface WSDLInterface extends Interface {
-
- /**
- * Returns the name of the WSDL interface.
- * @return the name of the WSDL interface
- */
- QName getName();
-
- /**
- * Sets the name of the WSDL interface.
- * @param className the name of the WSDL interface
- */
- void setName(QName interfaceName);
-
- /**
- * Returns the WSDL interface portType.
- * @return the WSDL interface portType
- */
- PortType getPortType();
-
- /**
- * Sets the WSDL interface portType
- * @param portType the WSDL interface portType
- */
- void setPortType(PortType portType);
-
+
+ /**
+ * Returns the name of the WSDL interface.
+ *
+ * @return the name of the WSDL interface
+ */
+ QName getName();
+
+ /**
+ * Sets the name of the WSDL interface.
+ *
+ * @param className the name of the WSDL interface
+ */
+ void setName(QName interfaceName);
+
+ /**
+ * Returns the WSDL interface portType.
+ *
+ * @return the WSDL interface portType
+ */
+ PortType getPortType();
+
+ /**
+ * Sets the WSDL interface portType
+ *
+ * @param portType the WSDL interface portType
+ */
+ void setPortType(PortType portType);
+
}
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/DefaultWSDLFactory.java Mon Apr 2 09:38:42 2007
@@ -23,13 +23,13 @@
/**
* A factory for the WSDL model.
- *
- * @version $Rev$ $Date$
+ *
+ * @version $Rev$ $Date$
*/
public class DefaultWSDLFactory implements WSDLFactory {
-
- public WSDLInterface createWSDLInterface() {
- return new WSDLInterfaceImpl();
- }
+
+ public WSDLInterface createWSDLInterface() {
+ return new WSDLInterfaceImpl();
+ }
}
Modified: incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java?view=diff&rev=524831&r1=524830&r2=524831
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java (original)
+++ incubator/tuscany/java/sca/scdl4j/idl-wsdl/src/main/java/org/apache/tuscany/idl/wsdl/impl/WSDLInterfaceImpl.java Mon Apr 2 09:38:42 2007
@@ -26,37 +26,39 @@
/**
* Represents a WSDL interface.
- *
- * @version $Rev$ $Date$
+ *
+ * @version $Rev$ $Date$
*/
public class WSDLInterfaceImpl extends InterfaceImpl implements WSDLInterface {
-
- private QName interfaceName;
- private PortType portType;
-
- public WSDLInterfaceImpl() {
- setRemotable(true);
- }
-
- public QName getName() {
- if (isUnresolved())
- return interfaceName;
- else
- return portType.getQName();
- }
-
- public void setName(QName interfaceName) {
- if (!isUnresolved())
- throw new IllegalStateException();
- this.interfaceName = interfaceName;
- }
-
- public PortType getPortType() {
- return portType;
- }
-
- public void setPortType(PortType portType) {
- this.portType = portType;
- }
-
+
+ private QName interfaceName;
+ private PortType portType;
+
+ public WSDLInterfaceImpl() {
+ setRemotable(true);
+ }
+
+ public QName getName() {
+ if (isUnresolved()) {
+ return interfaceName;
+ } else {
+ return portType.getQName();
+ }
+ }
+
+ public void setName(QName interfaceName) {
+ if (!isUnresolved()) {
+ throw new IllegalStateException();
+ }
+ this.interfaceName = interfaceName;
+ }
+
+ public PortType getPortType() {
+ return portType;
+ }
+
+ public void setPortType(PortType portType) {
+ this.portType = portType;
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org