Author: thorsten Date: Fri Sep 26 04:29:11 2008 New Revision: 699280 URL: http://svn.apache.org/viewvc?rev=699280&view=rev Log: white noise - formating changes
Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/helper/AXIOMXPathPatched.java forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.advanced.structurer.xml forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.contract.xml Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java?rev=699280&r1=699279&r2=699280&view=diff ============================================================================== --- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java (original) +++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java Fri Sep 26 04:29:11 2008 @@ -122,7 +122,7 @@ root.getFirstElement().serialize(out); // debug hook // next line will get the whole result document - //root.serialize(out); + // root.serialize(out); } catch (XMLStreamException e) { throw new DispatcherException(e); } catch (JaxenException e) { @@ -269,13 +269,13 @@ StAXOMBuilder builder = new StAXOMBuilder(contractResultReader); OMElement content = builder.getDocumentElement(); /* - * For full blown ns support we need to get all ns from the - * result. This will be passed later to the XPath processor. + * For full blown ns support we need to get all ns from the result. This + * will be passed later to the XPath processor. */ Iterator<OMNamespace> ns = content.getAllDeclaredNamespaces(); HashSet<OMNamespace> spaces = new HashSet<OMNamespace>(); while (ns.hasNext()) { - OMNamespace space = ns.next(); + OMNamespace space = ns.next(); spaces.add(space); } Iterator<OMElement> parts = content.getChildrenWithName(new QName( @@ -293,9 +293,10 @@ xpath = PATH_PREFIX + xpath; // we need to feed the xpathSelector with the ns we may have AXIOMXPathPatched xpathSelector = new AXIOMXPathPatched(xpath); - + for (OMNamespace space : spaces) { - xpathSelector.addNamespace(space.getPrefix(), space.getNamespaceURI()); + xpathSelector + .addNamespace(space.getPrefix(), space.getNamespaceURI()); } OMElement injectionPoint = (OMElement) xpathSelector.selectSingleNode( root, true); Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/helper/AXIOMXPathPatched.java URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/helper/AXIOMXPathPatched.java?rev=699280&r1=699279&r2=699280&view=diff ============================================================================== --- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/helper/AXIOMXPathPatched.java (original) +++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/helper/AXIOMXPathPatched.java Fri Sep 26 04:29:11 2008 @@ -29,16 +29,17 @@ /** * Issue: WSCOMMONS-389 * - * As soon the above issue is fixed we need to drop this implementation - * since it will be in the AXIOMXPath. + * As soon the above issue is fixed we need to drop this implementation since it + * will be in the AXIOMXPath. * - * The process should be + * The process should be * <ol> - * <li> stripping this class that it is only extending super and mark this class as deprecated - * <li> remove it the next release. - * + * <li>stripping this class that it is only extending super and mark this class + * as deprecated + * <li>remove it the next release. + * * @version 1.0 - * + * */ public class AXIOMXPathPatched extends AXIOMXPath { @@ -123,10 +124,10 @@ */ private void calculateNsElements(LinkedHashSet<OMElement> pathNodes, String pathPart) { - + /* - * FIXME: Need to test xpath expression such as [EMAIL PROTECTED]'example'] - * I think their are NOT generated correctly! + * FIXME: Need to test xpath expression such as [EMAIL PROTECTED]'example'] I think + * their are NOT generated correctly! */ OMElement element = null; OMNamespaceImpl localSpace = null; Modified: forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java?rev=699280&r1=699279&r2=699280&view=diff ============================================================================== --- forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java (original) +++ forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java Fri Sep 26 04:29:11 2008 @@ -12,32 +12,37 @@ public class TestStructurer extends TestCase { private static final String STRUCTURER_XML = "master.structurer.xml"; - public void testStructurer() throws DispatcherException{ + + public void testStructurer() throws DispatcherException { String format = "html"; Structurer structurer = prepareStructurer(false); - structurer.execute(getStream(),format); + structurer.execute(getStream(), format); } - public void testStructurerWithXmlProperties() throws DispatcherException{ + + public void testStructurerWithXmlProperties() throws DispatcherException { String format = "html"; Structurer structurer = prepareStructurer(true); - structurer.execute(getStream(),format); + structurer.execute(getStream(), format); } - public void testStructurerXmlFormat() throws DispatcherException{ + + public void testStructurerXmlFormat() throws DispatcherException { String format = "xml"; Structurer structurer = prepareStructurer(false); structurer.execute(getStream(), format); } + private Structurer prepareStructurer(boolean allowXml) { DispatcherBean config = new DispatcherBean(); config.setAllowXmlProperties(allowXml); config.setResolver(new ClassPathResolver()); config.setContractUriPrefix("/org/apache/forrest/dispatcher/"); - Structurer structurer = new XMLStructurer(config); + Structurer structurer = new XMLStructurer(config); return structurer; } - - private InputStream getStream(){ - InputStream dataStream=this.getClass().getResourceAsStream(STRUCTURER_XML); + + private InputStream getStream() { + InputStream dataStream = this.getClass() + .getResourceAsStream(STRUCTURER_XML); return dataStream; } } Modified: forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.advanced.structurer.xml URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.advanced.structurer.xml?rev=699280&r1=699279&r2=699280&view=diff ============================================================================== --- forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.advanced.structurer.xml (original) +++ forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.advanced.structurer.xml Fri Sep 26 04:29:11 2008 @@ -26,14 +26,14 @@ <hook id="level2"> <contract name="master"> <property name="test-inline" value="position:hook/hook/contract" /> - <property name="injectPointBody" value="/html/body/hook/hook/hook"/> + <property name="injectPointBody" value="/html/body/hook/hook/hook" /> </contract> </hook> </hook> <hook id="second"> - <contract name="m2" dataURI=""> - <property name="test-inline" value="xxx" /> - </contract> + <contract name="m2" dataURI=""> + <property name="test-inline" value="xxx" /> + </contract> </hook> </structure> <structure type="xml" hooksXpath="/"> Modified: forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.contract.xml URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.contract.xml?rev=699280&r1=699279&r2=699280&view=diff ============================================================================== --- forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.contract.xml (original) +++ forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.contract.xml Fri Sep 26 04:29:11 2008 @@ -28,8 +28,8 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="test-inline" select="'No parameter has been passed'" /> <xsl:param name="test-inline-xml" select="'No xml parameter has been passed'" /> - <xsl:param name="injectPointHead" select="'/html/head'"/> - <xsl:param name="injectPointBody" select="'/html/body/forrest:hook/forrest:hook'"/> + <xsl:param name="injectPointHead" select="'/html/head'" /> + <xsl:param name="injectPointBody" select="'/html/body/forrest:hook/forrest:hook'" /> <xsl:template match="/"> <forrest:content xmlns:forrest="http://apache.org/forrest/templates/2.0"> <forrest:part xpath="{$injectPointHead}"> @@ -46,7 +46,9 @@ <xsl:copy-of select="$test-inline-xml" /> </forrest:part> <forrest:part xpath="{$injectPointBody}"> - <p><xsl:value-of select="$injectPointBody"/></p> + <p> + <xsl:value-of select="$injectPointBody" /> + </p> </forrest:part> </forrest:content> </xsl:template>