Revision: 86 http://mvn-infix.svn.sourceforge.net/mvn-infix/?rev=86&view=rev Author: bindul Date: 2010-12-10 06:15:18 +0000 (Fri, 10 Dec 2010)
Log Message: ----------- Extracted logic for creating directory tree out Modified Paths: -------------- plugins/sfnet-mvnrepo-plugin/trunk/src/test/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SFTPParseTest.java shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/PlexusTestCase.java Added Paths: ----------- plugins/sfnet-mvnrepo-plugin/trunk/src/test/resources/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/T1DirTree.xml shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/ shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/ shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/DirectoryTree.java shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/ObjectFactory.java shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/package-info.java shared/infix-plugins-common/trunk/infix-test-utils/src/main/resources/dir-tree/ shared/infix-plugins-common/trunk/infix-test-utils/src/main/resources/dir-tree/DirectoryTree.xsd Modified: plugins/sfnet-mvnrepo-plugin/trunk/src/test/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SFTPParseTest.java =================================================================== --- plugins/sfnet-mvnrepo-plugin/trunk/src/test/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SFTPParseTest.java 2010-12-09 22:43:38 UTC (rev 85) +++ plugins/sfnet-mvnrepo-plugin/trunk/src/test/java/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/SFTPParseTest.java 2010-12-10 06:15:18 UTC (rev 86) @@ -23,12 +23,12 @@ import static org.junit.Assert.*; import java.io.File; -import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; +import java.net.URL; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLStreamException; @@ -45,6 +45,7 @@ import com.mindtree.techworks.infix.plugins.sfnetmvnrepo.model.repomap.io.stax.RepositoryMapStaxWriter; import com.mindtree.techworks.infix.pluginscommon.mojo.MojoInfo; import com.mindtree.techworks.infix.pluginscommon.test.PlexusTestCase; +import com.mindtree.techworks.infix.pluginscommon.test.dummydirtree.DirectoryTreeUtil; import com.mindtree.techworks.infix.pluginscommon.test.ssh.SSHServerResource; import com.mindtree.techworks.infix.pluginscommon.test.xml.XmlTestUtil; @@ -68,19 +69,11 @@ // Create the directory structure for the test File userHome = sshServer.getUserHome(); - File oneRoot = new File (userHome, "one"); - oneRoot.mkdir(); try { - File infixParentOne = new File(oneRoot.getAbsolutePath() + "/infix-parent/1.0"); - infixParentOne.mkdirs(); - File infixParent = infixParentOne.getParentFile(); - createAndTouchFile(infixParent, "maven-metadata.xml"); - createAndTouchFile(infixParent, "maven-metadata.xml.md5"); - createAndTouchFile(infixParent, "maven-metadata.xml.sha1"); - createAndTouchFile(infixParentOne, "infix-parent-1.0-M1.pom"); - createAndTouchFile(infixParentOne, "infix-parent-1.0-M1.pom.md5"); - createAndTouchFile(infixParentOne, "infix-parent-1.0-M1.pom.sha1"); + + URL dirTreeDesc = getClass().getResource(getPackageLocalLocation("T1DirTree.xml")); + DirectoryTreeUtil.generateDirectoryTree(userHome, dirTreeDesc); // Create the config SourceForgeFRSMapper mapper = new SourceForgeFRSMapper(); @@ -103,18 +96,14 @@ checkXmlEqual ("T1Expected.xml", repoMap); } catch (Exception e) { + getLog().warn("Exception in processing", e); fail(e.getMessage()); } } private void checkXmlEqual (String controlLoc, RepositoryMap repoMap) throws IOException, XMLStreamException, SAXException, ParserConfigurationException { - String packageName = getClass().getPackage().getName().replace('.', '/'); - String testFileLoc = packageName + "/" + controlLoc; - if (!testFileLoc.startsWith("/")) { - testFileLoc = "/" + testFileLoc; - } - Reader controlReader = new InputStreamReader(getClass().getResourceAsStream(testFileLoc)); + Reader controlReader = new InputStreamReader(getClass().getResourceAsStream(getPackageLocalLocation(controlLoc))); // Dump the repo map StringWriter writer = new StringWriter(); @@ -123,20 +112,21 @@ String repoMapContent = writer.toString(); // Log if enabled - if (log.isDebugEnabled()) { - log.debug(repoMapContent); + if (getLog().isDebugEnabled()) { + getLog().debug(repoMapContent); } // Assert Equals XMLAssert.assertXMLEqual(XmlTestUtil.getNormalizedDocument(controlReader), XmlTestUtil.getNormalizedDocument(new StringReader(repoMapContent))); } - - private void createAndTouchFile (File parent, String fileName) throws IOException { - File file = new File(parent, fileName); - FileWriter writer = new FileWriter(file); - writer.append("Test content"); - writer.flush(); - writer.close(); + + private String getPackageLocalLocation (String resource) { + String packageName = getClass().getPackage().getName().replace('.', '/'); + String resourceLoc = packageName + "/" + resource; + if (!resourceLoc.startsWith("/")) { + resourceLoc = "/" + resourceLoc; + } + return resourceLoc; } /* (non-Javadoc) @@ -146,6 +136,4 @@ protected MojoInfo createMojoInfo () { return new SfNetMvnMojoInfoTCImpl(); } - - } Added: plugins/sfnet-mvnrepo-plugin/trunk/src/test/resources/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/T1DirTree.xml =================================================================== --- plugins/sfnet-mvnrepo-plugin/trunk/src/test/resources/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/T1DirTree.xml (rev 0) +++ plugins/sfnet-mvnrepo-plugin/trunk/src/test/resources/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/T1DirTree.xml 2010-12-10 06:15:18 UTC (rev 86) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<DirectoryTree + xmlns="http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <Directory name="one"> + <Directory name="infix-parent"> + <Directory name="1.0"> + <File name="infix-parent-1.0-M1.pom"/> + <File name="infix-parent-1.0-M1.pom.md5"/> + <File name="infix-parent-1.0-M1.pom.sha1"/> + </Directory> + <File name="maven-metadata.xml"/> + <File name="maven-metadata.xml.md5"/> + <File name="maven-metadata.xml.sha1"/> + </Directory> + </Directory> +</DirectoryTree> Property changes on: plugins/sfnet-mvnrepo-plugin/trunk/src/test/resources/com/mindtree/techworks/infix/plugins/sfnetmvnrepo/mapper/sfnetsftp/T1DirTree.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/PlexusTestCase.java =================================================================== --- shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/PlexusTestCase.java 2010-12-09 22:43:38 UTC (rev 85) +++ shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/PlexusTestCase.java 2010-12-10 06:15:18 UTC (rev 86) @@ -31,8 +31,10 @@ import org.codehaus.plexus.DefaultPlexusContainer; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.PlexusContainerException; +import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.context.Context; import org.codehaus.plexus.context.DefaultContext; +import org.codehaus.plexus.logging.Logger; import com.mindtree.techworks.infix.pluginscommon.mojo.MojoInfo; @@ -63,7 +65,7 @@ /** * The log for the test cases */ - protected Log log = new SystemStreamLog (); + private Log log = new SystemStreamLog (); /** * The mojo information for our tests @@ -169,6 +171,102 @@ getContainer().release( component ); } + protected Logger getLog () { + try { + return getContainer().lookup( Logger.class ); + } catch (ComponentLookupException e) { + return new Logger() { + + @Override + public void warn (String message, Throwable throwable) { + log.warn(message, throwable); + } + @Override + public void warn (String message) { + log.warn(message); + } + @Override + public void setThreshold (int threshold) { + // DO nothing + } + @Override + public boolean isWarnEnabled () { + return log.isWarnEnabled(); + } + @Override + public boolean isInfoEnabled () { + return log.isInfoEnabled(); + } + @Override + public boolean isFatalErrorEnabled () { + return isErrorEnabled(); + } + @Override + public boolean isErrorEnabled () { + return log.isErrorEnabled(); + } + @Override + public boolean isDebugEnabled () { + return log.isDebugEnabled(); + } + @Override + public void info (String message, Throwable throwable) { + log.info(message, throwable); + } + @Override + public void info (String message) { + log.info(message); + } + @Override + public int getThreshold () { + if (isErrorEnabled()) { + return LEVEL_ERROR; + } else if (isWarnEnabled()) { + return LEVEL_WARN; + } else if (isInfoEnabled()) { + return LEVEL_INFO; + } else if (isDebugEnabled()){ + return LEVEL_DEBUG; + } + + return LEVEL_DISABLED; + } + @Override + public String getName () { + return ""; + } + @Override + public Logger getChildLogger (String name) { + return this; + } + @Override + public void fatalError (String message, Throwable throwable) { + log.error(message, throwable); + } + @Override + public void fatalError (String message) { + log.error(message); + } + @Override + public void error (String message, Throwable throwable) { + log.error(message, throwable); + } + @Override + public void error (String message) { + log.error(message); + } + @Override + public void debug (String message, Throwable throwable) { + log.debug(message, throwable); + } + @Override + public void debug (String message) { + log.debug(message); + } + }; + } + } + protected MojoInfo getMojoInfo () { if (null == mojoInfo) { this.mojoInfo = createMojoInfo(); Added: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/DirectoryTree.java =================================================================== --- shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/DirectoryTree.java (rev 0) +++ shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/DirectoryTree.java 2010-12-10 06:15:18 UTC (rev 86) @@ -0,0 +1,364 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Infix Maven Plugins + * + * Infix Maven Plugins is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * Infix Maven Plugins is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * Infix Maven Plugins. If not, see <http://www.gnu.org/licenses/>. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.12.09 at 10:02:31 PM MST +// + +package com.mindtree.techworks.infix.pluginscommon.test.dummydirtree.model; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + +/** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <sequence> + * <element name="Directory" type="{http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree}Directory" maxOccurs="unbounded"/> + * </sequence> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ +...@xmlaccessortype(XmlAccessType.FIELD) +...@xmltype(name = "", propOrder = { + "directory" +}) +...@xmlrootelement(name = "DirectoryTree") +public class DirectoryTree { + + @XmlElement(name = "Directory", required = true) + protected List<DirectoryTree.Directory> directory; + + /** + * Gets the value of the directory property. + * + * <p> + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a <CODE>set</CODE> method for the directory property. + * + * <p> + * For example, to add a new item, do as follows: + * <pre> + * getDirectory().add(newItem); + * </pre> + * + * + * <p> + * Objects of the following type(s) are allowed in the list + * {...@link DirectoryTree.Directory } + * + * + */ + public List<DirectoryTree.Directory> getDirectory() { + if (directory == null) { + directory = new ArrayList<DirectoryTree.Directory>(); + } + return this.directory; + } + + /** + * Describes a node + * + * <p>Java class for Node complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType name="Node"> + * <complexContent> + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> + * </restriction> + * </complexContent> + * </complexType> + * </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "Node") + @XmlSeeAlso({ + DirectoryTree.File.class, + DirectoryTree.Directory.class + }) + public static abstract class Node { + + @XmlAttribute(required = true) + protected String name; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {...@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {...@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + } + + /** + * The directory tree + * + * <p>Java class for Directory complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType name="Directory"> + * <complexContent> + * <extension base="{http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree}Node"> + * <sequence> + * <element name="Directory" type="{http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree}Directory" maxOccurs="unbounded" minOccurs="0"/> + * <element name="File" maxOccurs="unbounded" minOccurs="0"> + * <complexType> + * <complexContent> + * <extension base="{http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree}Node"> + * <attribute name="Size" type="{http://www.w3.org/2001/XMLSchema}decimal" /> + * <attribute name="SizeUnit" default="KB"> + * <simpleType> + * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"> + * <enumeration value="B"/> + * <enumeration value="KB"/> + * <enumeration value="MB"/> + * </restriction> + * </simpleType> + * </attribute> + * </extension> + * </complexContent> + * </complexType> + * </element> + * </sequence> + * </extension> + * </complexContent> + * </complexType> + * </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "Directory", propOrder = { + "directory", + "file" + }) + public static class Directory + extends DirectoryTree.Node + { + + @XmlElement(name = "Directory") + protected List<DirectoryTree.Directory> directory; + @XmlElement(name = "File") + protected List<DirectoryTree.File> file; + + /** + * Gets the value of the directory property. + * + * <p> + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a <CODE>set</CODE> method for the directory property. + * + * <p> + * For example, to add a new item, do as follows: + * <pre> + * getDirectory().add(newItem); + * </pre> + * + * + * <p> + * Objects of the following type(s) are allowed in the list + * {...@link Directory } + * + * + */ + public List<DirectoryTree.Directory> getDirectory() { + if (directory == null) { + directory = new ArrayList<DirectoryTree.Directory>(); + } + return this.directory; + } + + /** + * Gets the value of the file property. + * + * <p> + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a <CODE>set</CODE> method for the file property. + * + * <p> + * For example, to add a new item, do as follows: + * <pre> + * getFile().add(newItem); + * </pre> + * + * + * <p> + * Objects of the following type(s) are allowed in the list + * {...@link Directory.File } + * + * + */ + public List<DirectoryTree.File> getFile() { + if (file == null) { + file = new ArrayList<DirectoryTree.File>(); + } + return this.file; + } + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * <complexType> + * <complexContent> + * <extension base="{http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree}Node"> + * <attribute name="Size" type="{http://www.w3.org/2001/XMLSchema}decimal" /> + * <attribute name="SizeUnit" default="KB"> + * <simpleType> + * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"> + * <enumeration value="B"/> + * <enumeration value="KB"/> + * <enumeration value="MB"/> + * </restriction> + * </simpleType> + * </attribute> + * </extension> + * </complexContent> + * </complexType> + * </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class File + extends DirectoryTree.Node + { + + @XmlAttribute(name = "Size") + protected BigDecimal size; + @XmlAttribute(name = "SizeUnit") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + protected String sizeUnit; + + /** + * Gets the value of the size property. + * + * @return + * possible object is + * {...@link BigDecimal } + * + */ + public BigDecimal getSize() { + return size; + } + + /** + * Sets the value of the size property. + * + * @param value + * allowed object is + * {...@link BigDecimal } + * + */ + public void setSize(BigDecimal value) { + this.size = value; + } + + /** + * Gets the value of the sizeUnit property. + * + * @return + * possible object is + * {...@link String } + * + */ + public String getSizeUnit() { + if (sizeUnit == null) { + return "KB"; + } else { + return sizeUnit; + } + } + + /** + * Sets the value of the sizeUnit property. + * + * @param value + * allowed object is + * {...@link String } + * + */ + public void setSizeUnit(String value) { + this.sizeUnit = value; + } + + } + +} + Property changes on: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/DirectoryTree.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/ObjectFactory.java =================================================================== --- shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/ObjectFactory.java (rev 0) +++ shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/ObjectFactory.java 2010-12-10 06:15:18 UTC (rev 86) @@ -0,0 +1,84 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Infix Maven Plugins + * + * Infix Maven Plugins is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * Infix Maven Plugins is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * Infix Maven Plugins. If not, see <http://www.gnu.org/licenses/>. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.12.09 at 10:02:31 PM MST +// + +package com.mindtree.techworks.infix.pluginscommon.test.dummydirtree.model; + +import javax.xml.bind.annotation.XmlRegistry; + + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the net.sourceforge.mvn_infix.pluginscommon.test.dummydirtree package. + * <p>An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +...@xmlregistry +public class ObjectFactory { + + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: net.sourceforge.mvn_infix.pluginscommon.test.dummydirtree + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {...@link DirectoryTree } + * + */ + public DirectoryTree createDirectoryTree() { + return new DirectoryTree(); + } + + /** + * Create an instance of {...@link Directory } + * + */ + public DirectoryTree.Directory createDirectory() { + return new DirectoryTree.Directory(); + } + + /** + * Create an instance of {...@link Directory.File } + * + */ + public DirectoryTree.File createDirectoryFile() { + return new DirectoryTree.File(); + } + +} Property changes on: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/ObjectFactory.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/package-info.java =================================================================== --- shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/package-info.java (rev 0) +++ shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/package-info.java 2010-12-10 06:15:18 UTC (rev 86) @@ -0,0 +1,9 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.12.09 at 10:02:31 PM MST +// + +...@javax.xml.bind.annotation.xmlschema(namespace = "http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package com.mindtree.techworks.infix.pluginscommon.test.dummydirtree.model; Property changes on: shared/infix-plugins-common/trunk/infix-test-utils/src/main/java/com/mindtree/techworks/infix/pluginscommon/test/dummydirtree/model/package-info.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: shared/infix-plugins-common/trunk/infix-test-utils/src/main/resources/dir-tree/DirectoryTree.xsd =================================================================== --- shared/infix-plugins-common/trunk/infix-test-utils/src/main/resources/dir-tree/DirectoryTree.xsd (rev 0) +++ shared/infix-plugins-common/trunk/infix-test-utils/src/main/resources/dir-tree/DirectoryTree.xsd 2010-12-10 06:15:18 UTC (rev 86) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- edited with XMLSpy v2011 sp1 (x64) (http://www.altova.com) by Bindul Bhowmik (TRAVELPORT GDS) --> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree" targetNamespace="http://mvn-infix.sourceforge.net/pluginscommon/test/dummydirtree" elementFormDefault="qualified" attributeFormDefault="unqualified"> + <xs:element name="DirectoryTree"> + <xs:annotation> + <xs:documentation>Describes a directory tree</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element name="Directory" type="Directory" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="Node" abstract="true"> + <xs:annotation> + <xs:documentation>Describes a node</xs:documentation> + </xs:annotation> + <xs:attribute name="name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation>The name of the node</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + <xs:complexType name="Directory"> + <xs:annotation> + <xs:documentation>The directory tree</xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:extension base="Node"> + <xs:sequence> + <xs:element name="Directory" type="Directory" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="File" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="Node"> + <xs:attribute name="Size" type="xs:decimal"/> + <xs:attribute name="SizeUnit" default="KB"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="B"/> + <xs:enumeration value="KB"/> + <xs:enumeration value="MB"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> +</xs:schema> Property changes on: shared/infix-plugins-common/trunk/infix-test-utils/src/main/resources/dir-tree/DirectoryTree.xsd ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ mvn-Infix-commits mailing list mvn-Infix-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mvn-infix-commits