You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2003/05/20 22:56:43 UTC
cvs commit: avalon-excalibur/sourceresolve/src/test/org/apache/excalibur/source/test SourceUtilTestCase.java
bloritsch 2003/05/20 13:56:43
Modified: sourceresolve build.xml
sourceresolve/src/java/org/apache/excalibur/source
ModifiableSource.java SourceUtil.java
TraversableSource.java
sourceresolve/src/java/org/apache/excalibur/source/impl
AbstractSource.java FileSourceFactory.java
ResourceSourceFactory.java SourceResolverImpl.java
URLSourceFactory.java
sourceresolve/src/java/org/apache/excalibur/source/impl/validity
AbstractAggregatedValidity.java
sourceresolve/src/test/org/apache/excalibur/source/test
SourceUtilTestCase.java
Log:
add meta-info attributes
Revision Changes Path
1.37 +11 -0 avalon-excalibur/sourceresolve/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/build.xml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- build.xml 19 May 2003 16:53:03 -0000 1.36
+++ build.xml 20 May 2003 20:56:42 -0000 1.37
@@ -372,4 +372,15 @@
<delete dir="${dist.base}" />
</target>
+ <!-- ===================================================================== -->
+ <!-- Fix Whitespace problems in source code -->
+ <!-- ===================================================================== -->
+ <target name="fixCRLF">
+ <fixcrlf srcdir="."
+ includes="**/*.java,**/*.xml,*.xml,*.properties,**/*.properties"
+ eol="lf"
+ tab="remove"
+ tablength="4"
+ eof="remove"/>
+ </target>
</project>
1.6 +11 -11 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/ModifiableSource.java
Index: ModifiableSource.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/ModifiableSource.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ModifiableSource.java 9 Apr 2003 21:14:40 -0000 1.5
+++ ModifiableSource.java 20 May 2003 20:56:43 -0000 1.6
@@ -75,16 +75,16 @@
public interface ModifiableSource
extends Source
{
- /**
- * Return an {@link OutputStream} to write to.
- */
- OutputStream getOutputStream() throws IOException;
-
- /**
- * Delete the source
- * @return true if the source could be deleted
- */
- void delete() throws SourceException;
+ /**
+ * Return an {@link OutputStream} to write to.
+ */
+ OutputStream getOutputStream() throws IOException;
+
+ /**
+ * Delete the source
+ * @return true if the source could be deleted
+ */
+ void delete() throws SourceException;
/**
* Can the data sent to an <code>OutputStream</code> returned by
@@ -101,5 +101,5 @@
* After cancel, the stream should no more be used.
*/
void cancel(OutputStream stream) throws IOException;
-
+
}
1.7 +3 -3 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceUtil.java
Index: SourceUtil.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceUtil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SourceUtil.java 4 Apr 2003 16:36:51 -0000 1.6
+++ SourceUtil.java 20 May 2003 20:56:43 -0000 1.7
@@ -374,8 +374,8 @@
{
// absoluteURI = scheme ":" ( hier_part | opaque_part )
//
- // scheme = alpha *( alpha | digit | "+" | "-" | "." )
- //
+ // scheme = alpha *( alpha | digit | "+" | "-" | "." )
+ //
// alpha = lowalpha | upalpha
//
// lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" |
1.5 +9 -9 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/TraversableSource.java
Index: TraversableSource.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/TraversableSource.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TraversableSource.java 4 Apr 2003 16:36:51 -0000 1.4
+++ TraversableSource.java 20 May 2003 20:56:43 -0000 1.5
@@ -67,14 +67,14 @@
*/
public interface TraversableSource extends Source {
- /**
- * Is this source a collection, i.e. it possibly has children ?
- * For a filesystem-based implementation, this would typically mean that
- * this source represents a directory and not a file.
+ /**
+ * Is this source a collection, i.e. it possibly has children ?
+ * For a filesystem-based implementation, this would typically mean that
+ * this source represents a directory and not a file.
*
* @return true if the source exists and is traversable.
- */
- boolean isCollection();
+ */
+ boolean isCollection();
/**
* Get the children of this source if this source is traversable.
@@ -102,8 +102,8 @@
/**
* Return the name of this source relative to its parent.
- *
- * @return the name
+ *
+ * @return the name
*/
String getName();
1.11 +3 -3 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/AbstractSource.java
Index: AbstractSource.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/AbstractSource.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AbstractSource.java 29 Mar 2003 18:53:26 -0000 1.10
+++ AbstractSource.java 20 May 2003 20:56:43 -0000 1.11
@@ -76,7 +76,7 @@
private long m_contentLength;
private String m_systemId;
- private String m_scheme;
+ private String m_scheme;
/**
* Get the last modification date and content length of the source.
@@ -124,7 +124,7 @@
*/
public String getScheme()
{
- return this.m_scheme;
+ return this.m_scheme;
}
/**
1.2 +6 -1 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/FileSourceFactory.java
Index: FileSourceFactory.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/FileSourceFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FileSourceFactory.java 4 Apr 2003 16:36:51 -0000 1.1
+++ FileSourceFactory.java 20 May 2003 20:56:43 -0000 1.2
@@ -65,6 +65,11 @@
/**
* A factory for filesystem-based sources (see {@link FileSource}).
*
+ * @avalon.component
+ * @avalon.service type=SourceFactory
+ * @x-avalon.info name=file-source
+ * @x-avalon.lifestyle type=singleton
+ *
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
* @version $Id$
*/
1.10 +7 -2 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSourceFactory.java
Index: ResourceSourceFactory.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSourceFactory.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ResourceSourceFactory.java 29 Jan 2003 16:46:18 -0000 1.9
+++ ResourceSourceFactory.java 20 May 2003 20:56:43 -0000 1.10
@@ -66,6 +66,11 @@
/**
* A factory for the Resource protocol
+ *
+ * @avalon.component
+ * @avalon.service type=SourceFactory
+ * @x-avalon.info name=resource-source
+ * @x-avalon.lifestyle type=singleton
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
* @version $Id$
@@ -105,7 +110,7 @@
final String message = "Releasing source object for " + source.getURI();
getLogger().debug( message );
}
- // do nothing here
+ // do nothing here
}
}
1.31 +7 -2 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/SourceResolverImpl.java
Index: SourceResolverImpl.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/SourceResolverImpl.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- SourceResolverImpl.java 4 Apr 2003 16:36:51 -0000 1.30
+++ SourceResolverImpl.java 20 May 2003 20:56:43 -0000 1.31
@@ -89,6 +89,11 @@
* as the base URI instead.
*
* @see org.apache.excalibur.source.SourceResolver
+ *
+ * @avalon.component
+ * @avalon.service type=SourceResolver
+ * @x-avalon.info name=resolver
+ * @x-avalon.lifestyle type=singleton
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
@@ -347,4 +352,4 @@
m_factorySelector.release( factory );
}
}
-}
\ No newline at end of file
+}
1.5 +6 -1 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSourceFactory.java
Index: URLSourceFactory.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSourceFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- URLSourceFactory.java 4 Apr 2003 16:36:52 -0000 1.4
+++ URLSourceFactory.java 20 May 2003 20:56:43 -0000 1.5
@@ -66,6 +66,11 @@
/**
* A factory for a {@link URL} wrapper
+ *
+ * @avalon.component
+ * @avalon.service type=SourceFactory
+ * @x-avalon.info name=url-source
+ * @x-avalon.lifestyle type=singleton
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
1.2 +2 -2 avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/validity/AbstractAggregatedValidity.java
Index: AbstractAggregatedValidity.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/validity/AbstractAggregatedValidity.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractAggregatedValidity.java 10 Jan 2003 12:54:37 -0000 1.1
+++ AbstractAggregatedValidity.java 20 May 2003 20:56:43 -0000 1.2
@@ -91,4 +91,4 @@
return (SourceValidity) m_list.get(index);
}
-}
\ No newline at end of file
+}
1.2 +43 -43 avalon-excalibur/sourceresolve/src/test/org/apache/excalibur/source/test/SourceUtilTestCase.java
Index: SourceUtilTestCase.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/sourceresolve/src/test/org/apache/excalibur/source/test/SourceUtilTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SourceUtilTestCase.java 4 Apr 2003 16:36:52 -0000 1.1
+++ SourceUtilTestCase.java 20 May 2003 20:56:43 -0000 1.2
@@ -76,44 +76,44 @@
super(name);
}
- public void testNominalScheme() throws Exception
- {
- String uri = "http://foo";
- assertEquals(4, SourceUtil.indexOfSchemeColon(uri));
- assertEquals("http", SourceUtil.getScheme(uri));
- assertEquals("//foo", SourceUtil.getSpecificPart(uri));
- }
-
- public void testDoubleColon() throws Exception
- {
- assertEquals(4, SourceUtil.indexOfSchemeColon("file:foo:bar"));
- }
-
- public void testSpecialScheme() throws Exception
- {
- String uri = "a-+.:foo"; // Strange, but valid !
- assertEquals(4, SourceUtil.indexOfSchemeColon(uri));
- assertEquals("a-+.", SourceUtil.getScheme(uri));
- assertEquals("foo", SourceUtil.getSpecificPart(uri));
- }
-
- public void testSpecialPart() throws Exception
- {
- String uri = "bar:";
- assertEquals(3, SourceUtil.indexOfSchemeColon(uri));
- assertEquals("bar", SourceUtil.getScheme(uri));
- assertEquals("", SourceUtil.getSpecificPart(uri));
- }
-
- public void testInvalidScheme() throws Exception
- {
- String uri = "2foo:bar";
- assertEquals(-1, SourceUtil.indexOfSchemeColon(uri));
- assertEquals(null, SourceUtil.getScheme(uri));
- assertEquals(null, SourceUtil.getSpecificPart(uri));
-
- // Invalid character before any of the allowed ones
- assertEquals(-1, SourceUtil.indexOfSchemeColon("h ttp:foo"));
+ public void testNominalScheme() throws Exception
+ {
+ String uri = "http://foo";
+ assertEquals(4, SourceUtil.indexOfSchemeColon(uri));
+ assertEquals("http", SourceUtil.getScheme(uri));
+ assertEquals("//foo", SourceUtil.getSpecificPart(uri));
+ }
+
+ public void testDoubleColon() throws Exception
+ {
+ assertEquals(4, SourceUtil.indexOfSchemeColon("file:foo:bar"));
+ }
+
+ public void testSpecialScheme() throws Exception
+ {
+ String uri = "a-+.:foo"; // Strange, but valid !
+ assertEquals(4, SourceUtil.indexOfSchemeColon(uri));
+ assertEquals("a-+.", SourceUtil.getScheme(uri));
+ assertEquals("foo", SourceUtil.getSpecificPart(uri));
+ }
+
+ public void testSpecialPart() throws Exception
+ {
+ String uri = "bar:";
+ assertEquals(3, SourceUtil.indexOfSchemeColon(uri));
+ assertEquals("bar", SourceUtil.getScheme(uri));
+ assertEquals("", SourceUtil.getSpecificPart(uri));
+ }
+
+ public void testInvalidScheme() throws Exception
+ {
+ String uri = "2foo:bar";
+ assertEquals(-1, SourceUtil.indexOfSchemeColon(uri));
+ assertEquals(null, SourceUtil.getScheme(uri));
+ assertEquals(null, SourceUtil.getSpecificPart(uri));
+
+ // Invalid character before any of the allowed ones
+ assertEquals(-1, SourceUtil.indexOfSchemeColon("h ttp:foo"));
assertEquals(-1, SourceUtil.indexOfSchemeColon(" http:foo"));
assertEquals(-1, SourceUtil.indexOfSchemeColon("http :foo"));
@@ -127,8 +127,8 @@
assertEquals(-1, SourceUtil.indexOfSchemeColon("~http:foo"));
assertEquals(-1, SourceUtil.indexOfSchemeColon("http~:foo"));
- assertEquals(-1, SourceUtil.indexOfSchemeColon("/file/with:colon"));
- assertEquals(-1, SourceUtil.indexOfSchemeColon(".foo:bar"));
- assertEquals(-1, SourceUtil.indexOfSchemeColon("no-colon"));
- }
+ assertEquals(-1, SourceUtil.indexOfSchemeColon("/file/with:colon"));
+ assertEquals(-1, SourceUtil.indexOfSchemeColon(".foo:bar"));
+ assertEquals(-1, SourceUtil.indexOfSchemeColon("no-colon"));
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org