lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1325831 [3/4] - in /incubator/lucene.net/trunk: src/contrib/Analyzers/AR/ src/contrib/Analyzers/BR/ src/contrib/Analyzers/CJK/ src/contrib/Analyzers/Cn/ src/contrib/Analyzers/Compound/ src/contrib/Analyzers/De/ src/contrib/Analyzers/El/ sr...
Date Fri, 13 Apr 2012 16:33:38 GMT
Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Fr/TestElision.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Fr/TestElision.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Fr/TestElision.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Fr/TestElision.cs Fri Apr 13 16:33:33 2012
@@ -58,7 +58,7 @@ namespace Lucene.Net.Analyzers.Fr
         private List<string> Filtre(TokenFilter filter)
         {
             List<string> tas = new List<string>();
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
             while (filter.IncrementToken())
             {
                 tas.Add(termAtt.Term());

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestSingleTokenTokenFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestSingleTokenTokenFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestSingleTokenTokenFilter.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Miscellaneous/TestSingleTokenTokenFilter.cs Fri Apr 13 16:33:33 2012
@@ -27,6 +27,7 @@ using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Util;
 using NUnit.Framework;
+using Attribute = Lucene.Net.Util.Attribute;
 
 namespace Lucene.Net.Analyzers.Miscellaneous
 {
@@ -38,7 +39,7 @@ namespace Lucene.Net.Analyzers.Miscellan
         {
             Token token = new Token();
             SingleTokenTokenStream ts = new SingleTokenTokenStream(token);
-            AttributeImpl tokenAtt = (AttributeImpl)ts.AddAttribute<TermAttribute>();
+            Attribute tokenAtt = (Attribute)ts.AddAttribute<ITermAttribute>();
             Assert.True(tokenAtt is Token);
             ts.Reset();
 

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/DelimitedPayloadTokenFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/DelimitedPayloadTokenFilterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/DelimitedPayloadTokenFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/DelimitedPayloadTokenFilterTest.cs Fri Apr 13 16:33:33 2012
@@ -41,8 +41,8 @@ namespace Lucene.Net.Analyzers.Payloads
             var encoding = Encoding.UTF8;
             String test = "The quick|JJ red|JJ fox|NN jumped|VB over the lazy|JJ brown|JJ dogs|NN";
             DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new WhitespaceTokenizer(new StringReader(test)));
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
-            PayloadAttribute payAtt = filter.GetAttribute<PayloadAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
+            IPayloadAttribute payAtt = filter.GetAttribute<IPayloadAttribute>();
             AssertTermEquals("The", filter, termAtt, payAtt, null);
             AssertTermEquals("quick", filter, termAtt, payAtt, encoding.GetBytes("JJ"));
             AssertTermEquals("red", filter, termAtt, payAtt, encoding.GetBytes("JJ"));
@@ -81,8 +81,8 @@ namespace Lucene.Net.Analyzers.Payloads
         {
             String test = "The quick|1.0 red|2.0 fox|3.5 jumped|0.5 over the lazy|5 brown|99.3 dogs|83.7";
             DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new WhitespaceTokenizer(new StringReader(test)), '|', new FloatEncoder());
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
-            PayloadAttribute payAtt = filter.GetAttribute<PayloadAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
+            IPayloadAttribute payAtt = filter.GetAttribute<IPayloadAttribute>();
             AssertTermEquals("The", filter, termAtt, payAtt, null);
             AssertTermEquals("quick", filter, termAtt, payAtt, PayloadHelper.EncodeFloat(1.0f));
             AssertTermEquals("red", filter, termAtt, payAtt, PayloadHelper.EncodeFloat(2.0f));
@@ -101,8 +101,8 @@ namespace Lucene.Net.Analyzers.Payloads
         {
             String test = "The quick|1 red|2 fox|3 jumped over the lazy|5 brown|99 dogs|83";
             DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new WhitespaceTokenizer(new StringReader(test)), '|', new IntegerEncoder());
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
-            PayloadAttribute payAtt = filter.GetAttribute<PayloadAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
+            IPayloadAttribute payAtt = filter.GetAttribute<IPayloadAttribute>();
             AssertTermEquals("The", filter, termAtt, payAtt, null);
             AssertTermEquals("quick", filter, termAtt, payAtt, PayloadHelper.EncodeInt(1));
             AssertTermEquals("red", filter, termAtt, payAtt, PayloadHelper.EncodeInt(2));
@@ -118,8 +118,8 @@ namespace Lucene.Net.Analyzers.Payloads
 
         void AssertTermEquals(String expected, TokenStream stream, byte[] expectPay)
         {
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
-            PayloadAttribute payloadAtt = stream.GetAttribute<PayloadAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
+            IPayloadAttribute payloadAtt = stream.GetAttribute<IPayloadAttribute>();
             Assert.True(stream.IncrementToken());
             Assert.AreEqual(expected, termAtt.Term());
             Payload payload = payloadAtt.Payload;
@@ -138,7 +138,7 @@ namespace Lucene.Net.Analyzers.Payloads
             }
         }
 
-        void AssertTermEquals(String expected, TokenStream stream, TermAttribute termAtt, PayloadAttribute payAtt, byte[] expectPay)
+        void AssertTermEquals(String expected, TokenStream stream, ITermAttribute termAtt, IPayloadAttribute payAtt, byte[] expectPay)
         {
             Assert.True(stream.IncrementToken());
             Assert.AreEqual(expected, termAtt.Term());

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/NumericPayloadTokenFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/NumericPayloadTokenFilterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/NumericPayloadTokenFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/NumericPayloadTokenFilterTest.cs Fri Apr 13 16:33:33 2012
@@ -41,9 +41,9 @@ namespace Lucene.Net.Analyzers.Payloads
 
             NumericPayloadTokenFilter nptf = new NumericPayloadTokenFilter(new WordTokenFilter(new WhitespaceTokenizer(new StringReader(test))), 3, "D");
             bool seenDogs = false;
-            TermAttribute termAtt = nptf.GetAttribute<TermAttribute>();
-            TypeAttribute typeAtt = nptf.GetAttribute<TypeAttribute>();
-            PayloadAttribute payloadAtt = nptf.GetAttribute<PayloadAttribute>();
+            ITermAttribute termAtt = nptf.GetAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = nptf.GetAttribute<ITypeAttribute>();
+            IPayloadAttribute payloadAtt = nptf.GetAttribute<IPayloadAttribute>();
             while (nptf.IncrementToken())
             {
                 if (termAtt.Term().Equals("dogs"))
@@ -67,14 +67,14 @@ namespace Lucene.Net.Analyzers.Payloads
 
         internal sealed class WordTokenFilter : TokenFilter
         {
-            private TermAttribute termAtt;
-            private TypeAttribute typeAtt;
+            private ITermAttribute termAtt;
+            private ITypeAttribute typeAtt;
 
             internal WordTokenFilter(TokenStream input)
                 : base(input)
             {
-                termAtt = AddAttribute<TermAttribute>();
-                typeAtt = AddAttribute<TypeAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                typeAtt = AddAttribute<ITypeAttribute>();
             }
 
             public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TokenOffsetPayloadTokenFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TokenOffsetPayloadTokenFilterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TokenOffsetPayloadTokenFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TokenOffsetPayloadTokenFilterTest.cs Fri Apr 13 16:33:33 2012
@@ -42,8 +42,8 @@ namespace Lucene.Net.Analyzers.Payloads
 
             TokenOffsetPayloadTokenFilter nptf = new TokenOffsetPayloadTokenFilter(new WhitespaceTokenizer(new StringReader(test)));
             int count = 0;
-            PayloadAttribute payloadAtt = nptf.GetAttribute<PayloadAttribute>();
-            OffsetAttribute offsetAtt = nptf.GetAttribute<OffsetAttribute>();
+            IPayloadAttribute payloadAtt = nptf.GetAttribute<IPayloadAttribute>();
+            IOffsetAttribute offsetAtt = nptf.GetAttribute<IOffsetAttribute>();
 
             while (nptf.IncrementToken())
             {

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TypeAsPayloadTokenFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TypeAsPayloadTokenFilterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TypeAsPayloadTokenFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Payloads/TypeAsPayloadTokenFilterTest.cs Fri Apr 13 16:33:33 2012
@@ -41,9 +41,9 @@ namespace Lucene.Net.Analyzers.Payloads
 
             TypeAsPayloadTokenFilter nptf = new TypeAsPayloadTokenFilter(new WordTokenFilter(new WhitespaceTokenizer(new StringReader(test))));
             int count = 0;
-            TermAttribute termAtt = nptf.GetAttribute<TermAttribute>();
-            TypeAttribute typeAtt = nptf.GetAttribute<TypeAttribute>();
-            PayloadAttribute payloadAtt = nptf.GetAttribute<PayloadAttribute>();
+            ITermAttribute termAtt = nptf.GetAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = nptf.GetAttribute<ITypeAttribute>();
+            IPayloadAttribute payloadAtt = nptf.GetAttribute<IPayloadAttribute>();
 
             while (nptf.IncrementToken())
             {
@@ -60,14 +60,14 @@ namespace Lucene.Net.Analyzers.Payloads
 
         private sealed class WordTokenFilter : TokenFilter
         {
-            private TermAttribute termAtt;
-            private TypeAttribute typeAtt;
+            private ITermAttribute termAtt;
+            private ITypeAttribute typeAtt;
 
             internal WordTokenFilter(TokenStream input)
                 : base(input)
             {
-                termAtt = AddAttribute<TermAttribute>();
-                typeAtt = AddAttribute<TypeAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                typeAtt = AddAttribute<ITypeAttribute>();
             }
 
             public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Position/PositionFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Position/PositionFilterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Position/PositionFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Position/PositionFilterTest.cs Fri Apr 13 16:33:33 2012
@@ -39,12 +39,12 @@ namespace Lucene.Net.Analyzers.Position
         {
             protected int index = 0;
             protected String[] testToken;
-            protected TermAttribute termAtt;
+            protected ITermAttribute termAtt;
 
             public TestTokenStream(String[] testToken)
             {
                 this.testToken = testToken;
-                termAtt = AddAttribute<TermAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
             }
 
             public sealed override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Query/QueryAutoStopWordAnalyzerTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Query/QueryAutoStopWordAnalyzerTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Query/QueryAutoStopWordAnalyzerTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Query/QueryAutoStopWordAnalyzerTest.cs Fri Apr 13 16:33:33 2012
@@ -224,7 +224,7 @@ namespace Lucene.Net.Analyzers.Query
             QueryAutoStopWordAnalyzer a = new QueryAutoStopWordAnalyzer(Version.LUCENE_CURRENT, new WhitespaceAnalyzer());
             a.AddStopWords(reader, 10);
             TokenStream ts = a.TokenStream("repetitiveField", new StringReader("this boring"));
-            TermAttribute termAtt = ts.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = ts.GetAttribute<ITermAttribute>();
             Assert.True(ts.IncrementToken());
             Assert.AreEqual("this", termAtt.Term());
             Assert.False(ts.IncrementToken());

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Reverse/TestReverseStringFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Reverse/TestReverseStringFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Reverse/TestReverseStringFilter.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Reverse/TestReverseStringFilter.cs Fri Apr 13 16:33:33 2012
@@ -41,7 +41,7 @@ namespace Lucene.Net.Analyzers.Reverse
             TokenStream stream = new WhitespaceTokenizer(
                 new StringReader("Do have a nice day"));     // 1-4 length string
             ReverseStringFilter filter = new ReverseStringFilter(stream);
-            TermAttribute text = filter.GetAttribute<TermAttribute>();
+            ITermAttribute text = filter.GetAttribute<ITermAttribute>();
             Assert.True(filter.IncrementToken());
             Assert.AreEqual("oD", text.Term());
             Assert.True(filter.IncrementToken());
@@ -61,7 +61,7 @@ namespace Lucene.Net.Analyzers.Reverse
             TokenStream stream = new WhitespaceTokenizer(new StringReader(
                 "Do have a nice day")); // 1-4 length string
             ReverseStringFilter filter = new ReverseStringFilter(stream, '\u0001');
-            TermAttribute text = filter.GetAttribute<TermAttribute>();
+            ITermAttribute text = filter.GetAttribute<ITermAttribute>();
             Assert.True(filter.IncrementToken());
             Assert.AreEqual("\u0001oD", text.Term());
             Assert.True(filter.IncrementToken());

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Ru/TestRussianAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Ru/TestRussianAnalyzer.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Ru/TestRussianAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Ru/TestRussianAnalyzer.cs Fri Apr 13 16:33:33 2012
@@ -62,8 +62,8 @@ namespace Lucene.Net.Analyzers.Ru
                     new RussianLetterTokenizer(
                         sampleUnicode);
 
-                TermAttribute text = _in.GetAttribute<TermAttribute>();
-                TermAttribute sampleText = sample.GetAttribute<TermAttribute>();
+                ITermAttribute text = _in.GetAttribute<ITermAttribute>();
+                ITermAttribute sampleText = sample.GetAttribute<ITermAttribute>();
 
                 for (; ; )
                 {
@@ -83,7 +83,7 @@ namespace Lucene.Net.Analyzers.Ru
             RussianAnalyzer ra = new RussianAnalyzer(Version.LUCENE_CURRENT);
             TokenStream stream = ra.TokenStream("", reader);
 
-            TermAttribute termText = stream.GetAttribute<TermAttribute>();
+            ITermAttribute termText = stream.GetAttribute<ITermAttribute>();
             try
             {
                 Assert.True(stream.IncrementToken());

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleAnalyzerWrapperTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleAnalyzerWrapperTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleAnalyzerWrapperTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleAnalyzerWrapperTest.cs Fri Apr 13 16:33:33 2012
@@ -149,8 +149,8 @@ namespace Lucene.Net.Analyzers.Shingle
             var ts = analyzer.TokenStream("content", new StringReader("this sentence"));
             var j = -1;
 
-            var posIncrAtt = ts.AddAttribute<PositionIncrementAttribute>();
-            var termAtt = ts.AddAttribute<TermAttribute>();
+            var posIncrAtt = ts.AddAttribute<IPositionIncrementAttribute>();
+            var termAtt = ts.AddAttribute<ITermAttribute>();
 
             while (ts.IncrementToken())
             {
@@ -179,7 +179,7 @@ namespace Lucene.Net.Analyzers.Shingle
 
             var ts = analyzer.TokenStream("content", new StringReader("test sentence"));
 
-            var termAtt = ts.AddAttribute<TermAttribute>();
+            var termAtt = ts.AddAttribute<ITermAttribute>();
 
             while (ts.IncrementToken())
             {

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleFilterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/ShingleFilterTest.cs Fri Apr 13 16:33:33 2012
@@ -424,9 +424,9 @@ namespace Lucene.Net.Analyzers.Shingle
                                       new[] {0, 0, 7, 7, 14, 14, 19}, new[] {6, 13, 13, 18, 18, 27, 27},
                                       new[]
                                           {
-                                              TypeAttributeImpl.DEFAULT_TYPE, "shingle", TypeAttributeImpl.DEFAULT_TYPE,
-                                              "shingle", TypeAttributeImpl.DEFAULT_TYPE, "shingle",
-                                              TypeAttributeImpl.DEFAULT_TYPE
+                                              TypeAttribute.DEFAULT_TYPE, "shingle", TypeAttribute.DEFAULT_TYPE,
+                                              "shingle", TypeAttribute.DEFAULT_TYPE, "shingle",
+                                              TypeAttribute.DEFAULT_TYPE
                                           },
                                       new[] {1, 0, 1, 0, 1, 0, 1}
                 );
@@ -443,9 +443,9 @@ namespace Lucene.Net.Analyzers.Shingle
                                       new[] {0, 0, 7, 7, 14, 14, 19}, new[] {6, 13, 13, 18, 18, 27, 27},
                                       new[]
                                           {
-                                              TypeAttributeImpl.DEFAULT_TYPE, "shingle", TypeAttributeImpl.DEFAULT_TYPE,
-                                              "shingle", TypeAttributeImpl.DEFAULT_TYPE, "shingle",
-                                              TypeAttributeImpl.DEFAULT_TYPE
+                                              TypeAttribute.DEFAULT_TYPE, "shingle", TypeAttribute.DEFAULT_TYPE,
+                                              "shingle", TypeAttribute.DEFAULT_TYPE, "shingle",
+                                              TypeAttribute.DEFAULT_TYPE
                                           },
                                       new[] {1, 0, 1, 0, 1, 0, 1}
                 );
@@ -457,10 +457,10 @@ namespace Lucene.Net.Analyzers.Shingle
             var filter = new ShingleFilter(new TestTokenStream(tokensToShingle), maxSize);
             filter.SetOutputUnigrams(outputUnigrams);
 
-            var termAtt = filter.AddAttribute<TermAttribute>();
-            var offsetAtt = filter.AddAttribute<OffsetAttribute>();
-            var posIncrAtt = filter.AddAttribute<PositionIncrementAttribute>();
-            var typeAtt = filter.AddAttribute<TypeAttribute>();
+            var termAtt = filter.AddAttribute<ITermAttribute>();
+            var offsetAtt = filter.AddAttribute<IOffsetAttribute>();
+            var posIncrAtt = filter.AddAttribute<IPositionIncrementAttribute>();
+            var typeAtt = filter.AddAttribute<ITypeAttribute>();
 
             int i = 0;
             while (filter.IncrementToken())
@@ -491,21 +491,21 @@ namespace Lucene.Net.Analyzers.Shingle
 
         public sealed class TestTokenStream : TokenStream
         {
-            private readonly OffsetAttribute _offsetAtt;
-            private readonly PositionIncrementAttribute _posIncrAtt;
-            private readonly TermAttribute _termAtt;
+            private readonly IOffsetAttribute _offsetAtt;
+            private readonly IPositionIncrementAttribute _posIncrAtt;
+            private readonly ITermAttribute _termAtt;
             private readonly Token[] _testToken;
-            private readonly TypeAttribute _typeAtt;
+            private readonly ITypeAttribute _typeAtt;
             private int _index;
 
             public TestTokenStream(Token[] testToken)
             {
                 _testToken = testToken;
 
-                _termAtt = AddAttribute<TermAttribute>();
-                _offsetAtt = AddAttribute<OffsetAttribute>();
-                _posIncrAtt = AddAttribute<PositionIncrementAttribute>();
-                _typeAtt = AddAttribute<TypeAttribute>();
+                _termAtt = AddAttribute<ITermAttribute>();
+                _offsetAtt = AddAttribute<IOffsetAttribute>();
+                _posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
+                _typeAtt = AddAttribute<ITypeAttribute>();
             }
 
             public override bool IncrementToken()
@@ -520,7 +520,7 @@ namespace Lucene.Net.Analyzers.Shingle
                 _termAtt.SetTermBuffer(t.TermBuffer(), 0, t.TermLength());
                 _offsetAtt.SetOffset(t.StartOffset, t.EndOffset);
                 _posIncrAtt.PositionIncrement = t.PositionIncrement;
-                _typeAtt.Type = TypeAttributeImpl.DEFAULT_TYPE;
+                _typeAtt.Type = TypeAttribute.DEFAULT_TYPE;
 
                 return true;
             }

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/TestShingleMatrixFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/TestShingleMatrixFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/TestShingleMatrixFilter.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Shingle/TestShingleMatrixFilter.cs Fri Apr 13 16:33:33 2012
@@ -27,7 +27,6 @@ using Lucene.Net.Analyzers.Miscellaneous
 using Lucene.Net.Analyzers.Payloads;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
-using FlagsAttribute = Lucene.Net.Analysis.Tokenattributes.FlagsAttribute;
 
 namespace Lucene.Net.Analyzers.Shingle
 {
@@ -479,7 +478,7 @@ namespace Lucene.Net.Analyzers.Shingle
 
         private static void AssertNext(TokenStream ts, String text)
         {
-            var termAtt = ts.AddAttribute<TermAttribute>();
+            var termAtt = ts.AddAttribute<ITermAttribute>();
 
             Assert.IsTrue(ts.IncrementToken());
             Assert.AreEqual(text, termAtt.Term());
@@ -488,10 +487,10 @@ namespace Lucene.Net.Analyzers.Shingle
         private static void AssertNext(TokenStream ts, String text, int positionIncrement, float boost, int startOffset,
                                        int endOffset)
         {
-            var termAtt = ts.AddAttribute<TermAttribute>();
-            var posIncrAtt = ts.AddAttribute<PositionIncrementAttribute>();
-            var payloadAtt = ts.AddAttribute<PayloadAttribute>();
-            var offsetAtt = ts.AddAttribute<OffsetAttribute>();
+            var termAtt = ts.AddAttribute<ITermAttribute>();
+            var posIncrAtt = ts.AddAttribute<IPositionIncrementAttribute>();
+            var payloadAtt = ts.AddAttribute<IPayloadAttribute>();
+            var offsetAtt = ts.AddAttribute<IOffsetAttribute>();
 
             Assert.IsTrue(ts.IncrementToken());
             Assert.AreEqual(text, termAtt.Term());
@@ -506,8 +505,8 @@ namespace Lucene.Net.Analyzers.Shingle
 
         private static void AssertNext(TokenStream ts, String text, int startOffset, int endOffset)
         {
-            var termAtt = ts.AddAttribute<TermAttribute>();
-            var offsetAtt = ts.AddAttribute<OffsetAttribute>();
+            var termAtt = ts.AddAttribute<ITermAttribute>();
+            var offsetAtt = ts.AddAttribute<IOffsetAttribute>();
 
             Assert.IsTrue(ts.IncrementToken());
             Assert.AreEqual(text, termAtt.Term());
@@ -526,25 +525,25 @@ namespace Lucene.Net.Analyzers.Shingle
 
         public sealed class TokenListStream : TokenStream
         {
-            private readonly FlagsAttribute _flagsAtt;
-            private readonly OffsetAttribute _offsetAtt;
-            private readonly PayloadAttribute _payloadAtt;
-            private readonly PositionIncrementAttribute _posIncrAtt;
-            private readonly TermAttribute _termAtt;
+            private readonly IFlagsAttribute _flagsAtt;
+            private readonly IOffsetAttribute _offsetAtt;
+            private readonly IPayloadAttribute _payloadAtt;
+            private readonly IPositionIncrementAttribute _posIncrAtt;
+            private readonly ITermAttribute _termAtt;
             private readonly ICollection<Token> _tokens;
-            private readonly TypeAttribute _typeAtt;
+            private readonly ITypeAttribute _typeAtt;
 
             private IEnumerator<Token> _iterator;
 
             public TokenListStream(ICollection<Token> tokens)
             {
                 _tokens = tokens;
-                _termAtt = AddAttribute<TermAttribute>();
-                _posIncrAtt = AddAttribute<PositionIncrementAttribute>();
-                _payloadAtt = AddAttribute<PayloadAttribute>();
-                _offsetAtt = AddAttribute<OffsetAttribute>();
-                _typeAtt = AddAttribute<TypeAttribute>();
-                _flagsAtt = AddAttribute<FlagsAttribute>();
+                _termAtt = AddAttribute<ITermAttribute>();
+                _posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
+                _payloadAtt = AddAttribute<IPayloadAttribute>();
+                _offsetAtt = AddAttribute<IOffsetAttribute>();
+                _typeAtt = AddAttribute<ITypeAttribute>();
+                _flagsAtt = AddAttribute<IFlagsAttribute>();
             }
 
             public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/contrib/Analyzers/Sinks/TokenTypeSinkTokenizerTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Analyzers/Sinks/TokenTypeSinkTokenizerTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Analyzers/Sinks/TokenTypeSinkTokenizerTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Analyzers/Sinks/TokenTypeSinkTokenizerTest.cs Fri Apr 13 16:33:33 2012
@@ -46,8 +46,8 @@ namespace Lucene.Net.Analyzers.Sinks
 
             bool seenDogs = false;
 
-            TermAttribute termAtt = ttf.AddAttribute<TermAttribute>();
-            TypeAttribute typeAtt = ttf.AddAttribute<TypeAttribute>();
+            ITermAttribute termAtt = ttf.AddAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = ttf.AddAttribute<ITypeAttribute>();
             ttf.Reset();
             while (ttf.IncrementToken())
             {
@@ -75,14 +75,14 @@ namespace Lucene.Net.Analyzers.Sinks
 
         internal class WordTokenFilter : TokenFilter
         {
-            private TermAttribute termAtt;
-            private TypeAttribute typeAtt;
+            private ITermAttribute termAtt;
+            private ITypeAttribute typeAtt;
 
             internal WordTokenFilter(TokenStream input)
                 : base(input)
             {
-                termAtt = AddAttribute<TermAttribute>();
-                typeAtt = AddAttribute<TypeAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                typeAtt = AddAttribute<ITypeAttribute>();
             }
 
             public sealed override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs Fri Apr 13 16:33:33 2012
@@ -152,7 +152,7 @@ namespace Lucene.Net.Analysis.Ext
             TokenStream ts = analyzer.TokenStream("", new System.IO.StringReader(text));
             
             int i = 0;
-            TermAttribute termAttribute = ts.GetAttribute<TermAttribute>();
+            ITermAttribute termAttribute = ts.GetAttribute<ITermAttribute>();
             while (ts.IncrementToken())
             {
                 Assert.AreEqual(expectedTokens[i++], termAttribute.Term());

Modified: incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/AbstractTestCase.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/AbstractTestCase.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/AbstractTestCase.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/AbstractTestCase.cs Fri Apr 13 16:33:33 2012
@@ -238,12 +238,12 @@ namespace Lucene.Net.Search.Vectorhighli
 
             void Init()
             {
-                termAtt = AddAttribute<TermAttribute>();
-                offsetAtt = AddAttribute<OffsetAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                offsetAtt = AddAttribute<IOffsetAttribute>();
             }
 
-            TermAttribute termAtt = null;
-            OffsetAttribute offsetAtt = null;
+            ITermAttribute termAtt = null;
+            IOffsetAttribute offsetAtt = null;
 
             public override bool IncrementToken()
             {

Modified: incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs Fri Apr 13 16:33:33 2012
@@ -29,6 +29,7 @@ using Lucene.Net.Index;
 using Lucene.Net.Util;
 
 using NUnit.Framework;
+using Attribute = Lucene.Net.Util.Attribute;
 
 namespace Lucene.Net.Search.Vectorhighlight
 {
@@ -351,14 +352,14 @@ namespace Lucene.Net.Search.Vectorhighli
 
             class AnonymousTokenStream : TokenStream
             {
-                private AttributeImpl reusableToken;
+                private Attribute reusableToken;
                 TokenArrayAnalyzer parent = null;
 
                 public AnonymousTokenStream(TokenArrayAnalyzer parent)
                     : base(Token.TOKEN_ATTRIBUTE_FACTORY)
                 {
                     this.parent = parent;
-                    this.reusableToken = (AttributeImpl)AddAttribute<TermAttribute>();
+                    this.reusableToken = (Attribute)AddAttribute<ITermAttribute>();
                 }
 
                 int p = 0;

Modified: incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs Fri Apr 13 16:33:33 2012
@@ -1508,9 +1508,9 @@ namespace Lucene.Net.Search.Highlight.Te
             public Func<bool> IncrementTokenAction { get; set; }
 
             public IEnumerator<Token> iter;
-            public TermAttribute termAtt;
-            public PositionIncrementAttribute posIncrAtt;
-            public OffsetAttribute offsetAtt;
+            public ITermAttribute termAtt;
+            public IPositionIncrementAttribute posIncrAtt;
+            public IOffsetAttribute offsetAtt;
 
 
             public void RunSetup()
@@ -1535,9 +1535,9 @@ namespace Lucene.Net.Search.Highlight.Te
 
             ts.SetupAction = () =>
                                  {
-                                     ts.termAtt = ts.AddAttribute<TermAttribute>();
-                                     ts.posIncrAtt = ts.AddAttribute<PositionIncrementAttribute>();
-                                     ts.offsetAtt = ts.AddAttribute<OffsetAttribute>();
+                                     ts.termAtt = ts.AddAttribute<ITermAttribute>();
+                                     ts.posIncrAtt = ts.AddAttribute<IPositionIncrementAttribute>();
+                                     ts.offsetAtt = ts.AddAttribute<IOffsetAttribute>();
                                      var lst = new List<Token>();
                                      Token t = CreateToken("hi", 0, 2);
                                      t.PositionIncrement = 1;
@@ -1580,9 +1580,9 @@ namespace Lucene.Net.Search.Highlight.Te
 
             ts.SetupAction = () =>
                                  {
-                                     ts.termAtt = ts.AddAttribute<TermAttribute>();
-                                     ts.posIncrAtt = ts.AddAttribute<PositionIncrementAttribute>();
-                                     ts.offsetAtt = ts.AddAttribute<OffsetAttribute>();
+                                     ts.termAtt = ts.AddAttribute<ITermAttribute>();
+                                     ts.posIncrAtt = ts.AddAttribute<IPositionIncrementAttribute>();
+                                     ts.offsetAtt = ts.AddAttribute<IOffsetAttribute>();
                                      var lst = new List<Token>();
                                      Token t = CreateToken("hispeed", 0, 8);
                                      t.PositionIncrement = 1;
@@ -1943,9 +1943,9 @@ public void testBigramAnalyzer() {
         public override TokenStream TokenStream(String arg0, System.IO.TextReader arg1)
         {
             LowerCaseTokenizer stream = new LowerCaseTokenizer(arg1);
-            stream.AddAttribute<TermAttribute>();
-            stream.AddAttribute<PositionIncrementAttribute>();
-            stream.AddAttribute<OffsetAttribute>();
+            stream.AddAttribute<ITermAttribute>();
+            stream.AddAttribute<IPositionIncrementAttribute>();
+            stream.AddAttribute<IOffsetAttribute>();
             return new SynonymTokenizer(stream, synonyms);
         }
     }
@@ -1962,24 +1962,24 @@ public void testBigramAnalyzer() {
         private Token cRealToken = null;
         private IDictionary<string, string> synonyms;
         private Tokenizer st = null;
-        private TermAttribute realTermAtt;
-        private PositionIncrementAttribute realPosIncrAtt;
-        private OffsetAttribute realOffsetAtt;
-        private TermAttribute termAtt;
-        private PositionIncrementAttribute posIncrAtt;
-        private OffsetAttribute offsetAtt;
+        private ITermAttribute realTermAtt;
+        private IPositionIncrementAttribute realPosIncrAtt;
+        private IOffsetAttribute realOffsetAtt;
+        private ITermAttribute termAtt;
+        private IPositionIncrementAttribute posIncrAtt;
+        private IOffsetAttribute offsetAtt;
 
         public SynonymTokenizer(TokenStream realStream, IDictionary<string, string> synonyms)
         {
             this.realStream = realStream;
             this.synonyms = synonyms;
-            realTermAtt = realStream.AddAttribute<TermAttribute>();
-            realPosIncrAtt = realStream.AddAttribute<PositionIncrementAttribute>();
-            realOffsetAtt = realStream.AddAttribute<OffsetAttribute>();
-
-            termAtt = AddAttribute<TermAttribute>();
-            posIncrAtt = AddAttribute<PositionIncrementAttribute>();
-            offsetAtt = AddAttribute<OffsetAttribute>();
+            realTermAtt = realStream.AddAttribute<ITermAttribute>();
+            realPosIncrAtt = realStream.AddAttribute<IPositionIncrementAttribute>();
+            realOffsetAtt = realStream.AddAttribute<IOffsetAttribute>();
+
+            termAtt = AddAttribute<ITermAttribute>();
+            posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
+            offsetAtt = AddAttribute<IOffsetAttribute>();
         }
 
         public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs Fri Apr 13 16:33:33 2012
@@ -27,7 +27,6 @@ using Lucene.Net.Index;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 using Lucene.Net.Analysis;
-using FlagsAttribute = Lucene.Net.Analysis.Tokenattributes.FlagsAttribute;
 using Version = Lucene.Net.Util.Version;
 
 namespace Lucene.Net.Analysis.Snowball
@@ -91,12 +90,12 @@ namespace Lucene.Net.Analysis.Snowball
         public void TestFilterTokens()
         {
             SnowballFilter filter = new SnowballFilter(new TestTokenStream(), "English");
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
-            OffsetAttribute offsetAtt = filter.GetAttribute<OffsetAttribute>();
-            TypeAttribute typeAtt = filter.GetAttribute<TypeAttribute>();
-            PayloadAttribute payloadAtt = filter.GetAttribute<PayloadAttribute>();
-            PositionIncrementAttribute posIncAtt = filter.GetAttribute<PositionIncrementAttribute>();
-            FlagsAttribute flagsAtt = filter.GetAttribute<FlagsAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
+            IOffsetAttribute offsetAtt = filter.GetAttribute<IOffsetAttribute>();
+            ITypeAttribute typeAtt = filter.GetAttribute<ITypeAttribute>();
+            IPayloadAttribute payloadAtt = filter.GetAttribute<IPayloadAttribute>();
+            IPositionIncrementAttribute posIncAtt = filter.GetAttribute<IPositionIncrementAttribute>();
+            IFlagsAttribute flagsAtt = filter.GetAttribute<IFlagsAttribute>();
 
             filter.IncrementToken();
 
@@ -115,28 +114,28 @@ namespace Lucene.Net.Analysis.Snowball
             var analyzer = new SnowballAnalyzer(Lucene.Net.Util.Version.LUCENE_CURRENT, "Finnish");
             var input = new StringReader("terve");
             var tokenStream = analyzer.TokenStream("fieldName", input);
-            var termAttr = tokenStream.AddAttribute<TermAttribute>();
+            var termAttr = tokenStream.AddAttribute<ITermAttribute>();
             Assert.That(tokenStream.IncrementToken(), Is.True);
             Assert.That(termAttr.Term(), Is.EqualTo("terv"));
         }
 
         private sealed class TestTokenStream : TokenStream
         {
-            private TermAttribute termAtt;
-            private OffsetAttribute offsetAtt;
-            private TypeAttribute typeAtt;
-            private PayloadAttribute payloadAtt;
-            private PositionIncrementAttribute posIncAtt;
-            private FlagsAttribute flagsAtt;
+            private ITermAttribute termAtt;
+            private IOffsetAttribute offsetAtt;
+            private ITypeAttribute typeAtt;
+            private IPayloadAttribute payloadAtt;
+            private IPositionIncrementAttribute posIncAtt;
+            private IFlagsAttribute flagsAtt;
 
             internal TestTokenStream()
             {
-                termAtt = AddAttribute<TermAttribute>();
-                offsetAtt = AddAttribute<OffsetAttribute>();
-                typeAtt = AddAttribute<TypeAttribute>();
-                payloadAtt = AddAttribute<PayloadAttribute>();
-                posIncAtt = AddAttribute<PositionIncrementAttribute>();
-                flagsAtt = AddAttribute<FlagsAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                offsetAtt = AddAttribute<IOffsetAttribute>();
+                typeAtt = AddAttribute<ITypeAttribute>();
+                payloadAtt = AddAttribute<IPayloadAttribute>();
+                posIncAtt = AddAttribute<IPositionIncrementAttribute>();
+                flagsAtt = AddAttribute<IFlagsAttribute>();
             }
 
             public override bool IncrementToken()

Modified: incubator/lucene.net/trunk/test/core/Analysis/BaseTokenStreamTestCase.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/BaseTokenStreamTestCase.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/BaseTokenStreamTestCase.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/BaseTokenStreamTestCase.cs Fri Apr 13 16:33:33 2012
@@ -34,12 +34,12 @@ namespace Lucene.Net.Test.Analysis
 		{ }
 		
 		// some helpers to test Analyzers and TokenStreams:
-        public interface CheckClearAttributesAttribute : Lucene.Net.Util.Attribute
+        public interface ICheckClearAttributesAttribute : Lucene.Net.Util.IAttribute
         {
                bool GetAndResetClearCalled();
         }
 
-        public class CheckClearAttributesAttributeImpl : Lucene.Net.Util.AttributeImpl ,CheckClearAttributesAttribute 
+        public class CheckClearAttributesAttribute : Lucene.Net.Util.Attribute, ICheckClearAttributesAttribute 
         {
             private bool clearCalled = false;
 
@@ -63,8 +63,8 @@ namespace Lucene.Net.Test.Analysis
             public  override bool Equals(Object other) 
             {
                 return (
-                other is CheckClearAttributesAttributeImpl &&
-                ((CheckClearAttributesAttributeImpl) other).clearCalled == this.clearCalled
+                other is CheckClearAttributesAttribute &&
+                ((CheckClearAttributesAttribute) other).clearCalled == this.clearCalled
                 );
             }
 
@@ -74,39 +74,39 @@ namespace Lucene.Net.Test.Analysis
                 return 76137213 ^ clearCalled.GetHashCode();
             }
 
-            public override void CopyTo(Lucene.Net.Util.AttributeImpl target)
+            public override void CopyTo(Lucene.Net.Util.Attribute target)
             {
-                ((CheckClearAttributesAttributeImpl)target).Clear();
+                target.Clear();
             }
         }
 
         public static void AssertTokenStreamContents(TokenStream ts, System.String[] output, int[] startOffsets, int[] endOffsets, System.String[] types, int[] posIncrements, int? finalOffset)
         {
             Assert.IsNotNull(output);
-            CheckClearAttributesAttribute checkClearAtt = ts.AddAttribute<CheckClearAttributesAttribute>();
+            ICheckClearAttributesAttribute checkClearAtt = ts.AddAttribute<ICheckClearAttributesAttribute>();
 
-            Assert.IsTrue(ts.HasAttribute<TermAttribute>(), "has no TermAttribute");
-            TermAttribute termAtt = ts.GetAttribute<TermAttribute>();
+            Assert.IsTrue(ts.HasAttribute<ITermAttribute>(), "has no TermAttribute");
+            ITermAttribute termAtt = ts.GetAttribute<ITermAttribute>();
 
-            OffsetAttribute offsetAtt = null;
+            IOffsetAttribute offsetAtt = null;
             if (startOffsets != null || endOffsets != null || finalOffset != null)
             {
-                Assert.IsTrue(ts.HasAttribute<OffsetAttribute>(), "has no OffsetAttribute");
-                offsetAtt = ts.GetAttribute<OffsetAttribute>();
+                Assert.IsTrue(ts.HasAttribute<IOffsetAttribute>(), "has no OffsetAttribute");
+                offsetAtt = ts.GetAttribute<IOffsetAttribute>();
             }
     
-            TypeAttribute typeAtt = null;
+            ITypeAttribute typeAtt = null;
             if (types != null)
             {
-                Assert.IsTrue(ts.HasAttribute<TypeAttribute>(), "has no TypeAttribute");
-                typeAtt = ts.GetAttribute<TypeAttribute>();
+                Assert.IsTrue(ts.HasAttribute<ITypeAttribute>(), "has no TypeAttribute");
+                typeAtt = ts.GetAttribute<ITypeAttribute>();
             }
             
-            PositionIncrementAttribute posIncrAtt = null;
+            IPositionIncrementAttribute posIncrAtt = null;
             if (posIncrements != null)
             {
-                Assert.IsTrue(ts.HasAttribute<PositionIncrementAttribute>(), "has no PositionIncrementAttribute");
-                posIncrAtt = ts.GetAttribute<PositionIncrementAttribute>();
+                Assert.IsTrue(ts.HasAttribute<IPositionIncrementAttribute>(), "has no PositionIncrementAttribute");
+                posIncrAtt = ts.GetAttribute<IPositionIncrementAttribute>();
             }
 
             ts.Reset();

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestASCIIFoldingFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestASCIIFoldingFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestASCIIFoldingFilter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestASCIIFoldingFilter.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,10 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-
 namespace Lucene.Net.Analysis
 {
 	
@@ -39,7 +38,7 @@ namespace Lucene.Net.Analysis
                 );
 			ASCIIFoldingFilter filter = new ASCIIFoldingFilter(stream);
 
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
 			
 			AssertTermEquals("Des", filter, termAtt);
 			AssertTermEquals("mot", filter, termAtt);
@@ -1902,7 +1901,7 @@ namespace Lucene.Net.Analysis
 			
 			TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader(inputText.ToString()));
 			ASCIIFoldingFilter filter = new ASCIIFoldingFilter(stream);
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
 			System.Collections.IEnumerator expectedIter = expectedOutputTokens.GetEnumerator();
 			while (expectedIter.MoveNext())
 			{
@@ -1912,7 +1911,7 @@ namespace Lucene.Net.Analysis
 			Assert.IsFalse(filter.IncrementToken());
 		}
 		
-		internal virtual void  AssertTermEquals(System.String expected, TokenStream stream, TermAttribute termAtt)
+		internal virtual void  AssertTermEquals(System.String expected, TokenStream stream, ITermAttribute termAtt)
 		{
 			Assert.IsTrue(stream.IncrementToken());
 			Assert.AreEqual(expected, termAtt.Term());

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestAnalyzers.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestAnalyzers.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestAnalyzers.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestAnalyzers.cs Fri Apr 13 16:33:33 2012
@@ -16,13 +16,12 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
 using StandardAnalyzer = Lucene.Net.Analysis.Standard.StandardAnalyzer;
 using StandardTokenizer = Lucene.Net.Analysis.Standard.StandardTokenizer;
-using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Payload = Lucene.Net.Index.Payload;
 using Version = Lucene.Net.Util.Version;
 
@@ -74,7 +73,7 @@ namespace Lucene.Net.Analysis
 		
 		internal virtual void  VerifyPayload(TokenStream ts)
 		{
-            PayloadAttribute payloadAtt = ts.GetAttribute<PayloadAttribute>();
+            IPayloadAttribute payloadAtt = ts.GetAttribute<IPayloadAttribute>();
 			for (byte b = 1; ; b++)
 			{
 				bool hasNext = ts.IncrementToken();
@@ -166,11 +165,11 @@ namespace Lucene.Net.Analysis
 		{
 			p = new Payload(data, 0, 1);
 		}
-		internal PayloadAttribute payloadAtt;
+		internal IPayloadAttribute payloadAtt;
 		public PayloadSetter(TokenStream input):base(input)
 		{
 			InitBlock();
-            payloadAtt = AddAttribute<PayloadAttribute>();
+            payloadAtt = AddAttribute<IPayloadAttribute>();
 		}
 		
 		internal byte[] data = new byte[1];

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestCachingTokenFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestCachingTokenFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestCachingTokenFilter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestCachingTokenFilter.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,9 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
-
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using TermVector = Lucene.Net.Documents.Field.TermVector;
@@ -46,8 +44,8 @@ namespace Lucene.Net.Analysis
 			private void  InitBlock(TestCachingTokenFilter enclosingInstance)
 			{
 				this.enclosingInstance = enclosingInstance;
-                termAtt = AddAttribute<TermAttribute>();
-                offsetAtt = AddAttribute<OffsetAttribute>();
+                termAtt = AddAttribute<ITermAttribute>();
+                offsetAtt = AddAttribute<IOffsetAttribute>();
 			}
 			private TestCachingTokenFilter enclosingInstance;
 			public TestCachingTokenFilter Enclosing_Instance
@@ -59,8 +57,8 @@ namespace Lucene.Net.Analysis
 				
 			}
 			private int index = 0;
-			private TermAttribute termAtt;
-			private OffsetAttribute offsetAtt;
+			private ITermAttribute termAtt;
+			private IOffsetAttribute offsetAtt;
 			
 			public override bool IncrementToken()
 			{
@@ -133,7 +131,7 @@ namespace Lucene.Net.Analysis
 		{
 			int count = 0;
 
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
 			Assert.IsNotNull(termAtt);
 			while (stream.IncrementToken())
 			{

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestISOLatin1AccentFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestISOLatin1AccentFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestISOLatin1AccentFilter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestISOLatin1AccentFilter.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,10 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-
 namespace Lucene.Net.Analysis
 {
 	
@@ -32,7 +31,7 @@ namespace Lucene.Net.Analysis
 		{
 			TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader("Des mot clés À LA CHAÎNE À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï IJ Ð Ñ Ò Ó Ô Õ Ö Ø Œ Þ Ù Ú Û Ü Ý Ÿ à á â ã ä å æ ç è é ê ë ì í î ï ij ð ñ ò ó ô õ ö ø œ ß þ ù ú û ü ý ÿ fi fl"));
 			ISOLatin1AccentFilter filter = new ISOLatin1AccentFilter(stream);
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
 			AssertTermEquals("Des", filter, termAtt);
 			AssertTermEquals("mot", filter, termAtt);
 			AssertTermEquals("cles", filter, termAtt);
@@ -111,7 +110,7 @@ namespace Lucene.Net.Analysis
 			Assert.IsFalse(filter.IncrementToken());
 		}
 		
-		internal virtual void  AssertTermEquals(System.String expected, TokenStream stream, TermAttribute termAtt)
+		internal virtual void  AssertTermEquals(System.String expected, TokenStream stream, ITermAttribute termAtt)
 		{
 			Assert.IsTrue(stream.IncrementToken());
 			Assert.AreEqual(expected, termAtt.Term());

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestKeywordAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestKeywordAnalyzer.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestKeywordAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestKeywordAnalyzer.cs Fri Apr 13 16:33:33 2012
@@ -16,10 +16,9 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
-
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
 using Document = Lucene.Net.Documents.Document;
 using Field = Lucene.Net.Documents.Field;
 using IndexReader = Lucene.Net.Index.IndexReader;
@@ -99,7 +98,7 @@ namespace Lucene.Net.Analysis
 		public virtual void  TestOffsets()
 		{
 			TokenStream stream = new KeywordAnalyzer().TokenStream("field", new System.IO.StringReader("abcd"));
-            OffsetAttribute offsetAtt = stream.AddAttribute<OffsetAttribute>();
+            IOffsetAttribute offsetAtt = stream.AddAttribute<IOffsetAttribute>();
 			Assert.IsTrue(stream.IncrementToken());
 			Assert.AreEqual(0, offsetAtt.StartOffset);
 			Assert.AreEqual(4, offsetAtt.EndOffset);

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestLengthFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestLengthFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestLengthFilter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestLengthFilter.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,10 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-
 namespace Lucene.Net.Analysis
 {
 	
@@ -33,7 +32,7 @@ namespace Lucene.Net.Analysis
 		{
 			TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader("short toolong evenmuchlongertext a ab toolong foo"));
 			LengthFilter filter = new LengthFilter(stream, 2, 6);
-            TermAttribute termAtt = filter.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = filter.GetAttribute<ITermAttribute>();
 			
 			Assert.IsTrue(filter.IncrementToken());
 			Assert.AreEqual("short", termAtt.Term());

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestNumericTokenStream.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestNumericTokenStream.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestNumericTokenStream.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestNumericTokenStream.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,9 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
-
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-using TypeAttribute = Lucene.Net.Analysis.Tokenattributes.TypeAttribute;
 using NumericUtils = Lucene.Net.Util.NumericUtils;
 
 namespace Lucene.Net.Analysis
@@ -38,8 +36,8 @@ namespace Lucene.Net.Analysis
 		{
 			NumericTokenStream stream = new NumericTokenStream().SetLongValue(lvalue);
 			// use getAttribute to test if attributes really exist, if not an IAE will be throwed
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
-            TypeAttribute typeAtt = stream.GetAttribute<TypeAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = stream.GetAttribute<ITypeAttribute>();
 			for (int shift = 0; shift < 64; shift += NumericUtils.PRECISION_STEP_DEFAULT)
 			{
 				Assert.IsTrue(stream.IncrementToken(), "New token is available");
@@ -54,8 +52,8 @@ namespace Lucene.Net.Analysis
 		{
 			NumericTokenStream stream = new NumericTokenStream().SetIntValue(ivalue);
 			// use getAttribute to test if attributes really exist, if not an IAE will be throwed
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
-            TypeAttribute typeAtt = stream.GetAttribute<TypeAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
+            ITypeAttribute typeAtt = stream.GetAttribute<ITypeAttribute>();
 			for (int shift = 0; shift < 32; shift += NumericUtils.PRECISION_STEP_DEFAULT)
 			{
 				Assert.IsTrue(stream.IncrementToken(), "New token is available");

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestPerFieldAnalzyerWrapper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestPerFieldAnalzyerWrapper.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestPerFieldAnalzyerWrapper.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestPerFieldAnalzyerWrapper.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,10 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-
 namespace Lucene.Net.Analysis
 {
 
@@ -35,13 +34,13 @@ namespace Lucene.Net.Analysis
 			analyzer.AddAnalyzer("special", new SimpleAnalyzer());
 			
 			TokenStream tokenStream = analyzer.TokenStream("field", new System.IO.StringReader(text));
-            TermAttribute termAtt = tokenStream.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = tokenStream.GetAttribute<ITermAttribute>();
 			
 			Assert.IsTrue(tokenStream.IncrementToken());
 			Assert.AreEqual("Qwerty", termAtt.Term(), "WhitespaceAnalyzer does not lowercase");
 			
 			tokenStream = analyzer.TokenStream("special", new System.IO.StringReader(text));
-            termAtt = tokenStream.GetAttribute<TermAttribute>();
+            termAtt = tokenStream.GetAttribute<ITermAttribute>();
 			Assert.IsTrue(tokenStream.IncrementToken());
 			Assert.AreEqual("qwerty", termAtt.Term(), "SimpleAnalyzer lowercases");
 		}

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestStandardAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestStandardAnalyzer.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestStandardAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestStandardAnalyzer.cs Fri Apr 13 16:33:33 2012
@@ -20,10 +20,6 @@ using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
 using StandardAnalyzer = Lucene.Net.Analysis.Standard.StandardAnalyzer;
-using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
-using TypeAttribute = Lucene.Net.Analysis.Tokenattributes.TypeAttribute;
 using Version = Lucene.Net.Util.Version;
 
 namespace Lucene.Net.Analysis

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestStopAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestStopAnalyzer.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestStopAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestStopAnalyzer.cs Fri Apr 13 16:33:33 2012
@@ -17,11 +17,9 @@
 
 using System;
 using System.Collections.Generic;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
-
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using Version = Lucene.Net.Util.Version;
 
 namespace Lucene.Net.Analysis
@@ -56,7 +54,7 @@ namespace Lucene.Net.Analysis
 			System.IO.StringReader reader = new System.IO.StringReader("This is a test of the english stop analyzer");
 			TokenStream stream = stop.TokenStream("test", reader);
 			Assert.IsTrue(stream != null);
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
 			
 			while (stream.IncrementToken())
 			{
@@ -75,8 +73,8 @@ namespace Lucene.Net.Analysis
 			System.IO.StringReader reader = new System.IO.StringReader("This is a good test of the english stop analyzer");
 			TokenStream stream = newStop.TokenStream("test", reader);
 			Assert.IsNotNull(stream);
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
-            PositionIncrementAttribute posIncrAtt = stream.AddAttribute<PositionIncrementAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
+            IPositionIncrementAttribute posIncrAtt = stream.AddAttribute<IPositionIncrementAttribute>();
 			
 			while (stream.IncrementToken())
 			{
@@ -99,8 +97,8 @@ namespace Lucene.Net.Analysis
             TokenStream stream = newStop.TokenStream("test", reader);
             Assert.NotNull(stream);
             int i = 0;
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
-            PositionIncrementAttribute posIncrAtt = stream.AddAttribute<PositionIncrementAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
+            IPositionIncrementAttribute posIncrAtt = stream.AddAttribute<IPositionIncrementAttribute>();
 
             while (stream.IncrementToken())
             {

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestStopFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestStopFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestStopFilter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestStopFilter.cs Fri Apr 13 16:33:33 2012
@@ -16,11 +16,9 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
-
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using English = Lucene.Net.Util.English;
 
 namespace Lucene.Net.Analysis
@@ -41,7 +39,7 @@ namespace Lucene.Net.Analysis
 			System.IO.StringReader reader = new System.IO.StringReader("Now is The Time");
 			var stopWords = new System.Collections.Generic.HashSet<string> {"is", "the", "Time"};
 			TokenStream stream = new StopFilter(false, new WhitespaceTokenizer(reader), stopWords, false);
-            TermAttribute termAtt = (TermAttribute)stream.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = (ITermAttribute)stream.GetAttribute<ITermAttribute>();
 			Assert.IsTrue(stream.IncrementToken());
 			Assert.AreEqual("Now", termAtt.Term());
 			Assert.IsTrue(stream.IncrementToken());
@@ -55,7 +53,7 @@ namespace Lucene.Net.Analysis
 			System.IO.StringReader reader = new System.IO.StringReader("Now is The Time");
             var stopWords = new System.Collections.Generic.HashSet<string> { "is", "the", "Time" };
 			TokenStream stream = new StopFilter(false, new WhitespaceTokenizer(reader), stopWords, true);
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
 			Assert.IsTrue(stream.IncrementToken());
 			Assert.AreEqual("Now", termAtt.Term());
 			Assert.IsFalse(stream.IncrementToken());
@@ -68,7 +66,7 @@ namespace Lucene.Net.Analysis
 			System.String[] stopWords = new System.String[]{"is", "the", "Time"};
 			var stopSet = StopFilter.MakeStopSet(stopWords);
 			TokenStream stream = new StopFilter(false, new WhitespaceTokenizer(reader), stopSet);
-            TermAttribute termAtt = stream.GetAttribute<TermAttribute>();
+            ITermAttribute termAtt = stream.GetAttribute<ITermAttribute>();
 			Assert.IsTrue(stream.IncrementToken());
 			Assert.AreEqual("Now", termAtt.Term());
 			Assert.IsTrue(stream.IncrementToken());
@@ -135,8 +133,8 @@ namespace Lucene.Net.Analysis
 		{
 			Log("---> test with enable-increments-" + (enableIcrements?"enabled":"disabled"));
 			stpf.EnablePositionIncrements = enableIcrements;
-            TermAttribute termAtt = stpf.GetAttribute<TermAttribute>();
-            PositionIncrementAttribute posIncrAtt = stpf.GetAttribute<PositionIncrementAttribute>();
+            ITermAttribute termAtt = stpf.GetAttribute<ITermAttribute>();
+            IPositionIncrementAttribute posIncrAtt = stpf.GetAttribute<IPositionIncrementAttribute>();
 			for (int i = 0; i < 20; i += 3)
 			{
 				Assert.IsTrue(stpf.IncrementToken());

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestTeeSinkTokenFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestTeeSinkTokenFilter.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestTeeSinkTokenFilter.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestTeeSinkTokenFilter.cs Fri Apr 13 16:33:33 2012
@@ -16,13 +16,12 @@
  */
 
 using System;
+using Lucene.Net.Analysis.Tokenattributes;
 using Lucene.Net.Test.Analysis;
 using NUnit.Framework;
 
 using StandardFilter = Lucene.Net.Analysis.Standard.StandardFilter;
 using StandardTokenizer = Lucene.Net.Analysis.Standard.StandardTokenizer;
-using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
-using TermAttribute = Lucene.Net.Analysis.Tokenattributes.TermAttribute;
 using AttributeSource = Lucene.Net.Util.AttributeSource;
 using English = Lucene.Net.Util.English;
 using Version = Lucene.Net.Util.Version;
@@ -38,7 +37,7 @@ namespace Lucene.Net.Analysis
         {
             public override bool Accept(AttributeSource a)
             {
-                TermAttribute termAtt = a.GetAttribute<TermAttribute>();
+                ITermAttribute termAtt = a.GetAttribute<ITermAttribute>();
                 return termAtt.Term().ToUpper().Equals("The".ToUpper());
             }
         }
@@ -46,7 +45,7 @@ namespace Lucene.Net.Analysis
         {
             public override bool Accept(AttributeSource a)
             {
-                TermAttribute termAtt = a.GetAttribute<TermAttribute>();
+                ITermAttribute termAtt = a.GetAttribute<ITermAttribute>();
                 return termAtt.Term().ToUpper().Equals("Dogs".ToUpper());
             }
         }
@@ -96,9 +95,9 @@ namespace Lucene.Net.Analysis
             TokenStream sink1 = source.NewSinkTokenStream();
             TokenStream sink2 = source.NewSinkTokenStream(theFilter);
 
-            source.AddAttribute<CheckClearAttributesAttribute>();
-            sink1.AddAttribute<CheckClearAttributesAttribute>();
-            sink2.AddAttribute<CheckClearAttributesAttribute>();
+            source.AddAttribute<ICheckClearAttributesAttribute>();
+            sink1.AddAttribute<ICheckClearAttributesAttribute>();
+            sink2.AddAttribute<ICheckClearAttributesAttribute>();
 
             AssertTokenStreamContents(source, tokens1);
             AssertTokenStreamContents(sink1, tokens1);
@@ -113,9 +112,9 @@ namespace Lucene.Net.Analysis
             TokenStream source1 = new CachingTokenFilter(tee1);
 
 
-            tee1.AddAttribute<CheckClearAttributesAttribute>();
-            dogDetector.AddAttribute<CheckClearAttributesAttribute>();
-            theDetector.AddAttribute<CheckClearAttributesAttribute>();
+            tee1.AddAttribute<ICheckClearAttributesAttribute>();
+            dogDetector.AddAttribute<ICheckClearAttributesAttribute>();
+            theDetector.AddAttribute<ICheckClearAttributesAttribute>();
 
 
             TeeSinkTokenFilter tee2 = new TeeSinkTokenFilter(new WhitespaceTokenizer(new System.IO.StringReader(buffer2.ToString())));
@@ -157,8 +156,8 @@ namespace Lucene.Net.Analysis
                 TokenStream sink = teeStream.NewSinkTokenStream(new ModuloSinkFilter(this, 100));
                 teeStream.ConsumeAllTokens();
                 TokenStream stream = new ModuloTokenFilter(this, new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new System.IO.StringReader(buffer.ToString()))), 100);
-                TermAttribute tfTok = stream.AddAttribute<TermAttribute>();
-                TermAttribute sinkTok = sink.AddAttribute<TermAttribute>();
+                ITermAttribute tfTok = stream.AddAttribute<ITermAttribute>();
+                ITermAttribute sinkTok = sink.AddAttribute<ITermAttribute>();
                 for (int i = 0; stream.IncrementToken(); i++)
                 {
                     Assert.IsTrue(sink.IncrementToken());
@@ -173,13 +172,13 @@ namespace Lucene.Net.Analysis
                     for (int i = 0; i < 20; i++)
                     {
                         stream = new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new System.IO.StringReader(buffer.ToString())));
-                        PositionIncrementAttribute posIncrAtt = stream.GetAttribute<PositionIncrementAttribute>();
+                        IPositionIncrementAttribute posIncrAtt = stream.GetAttribute<IPositionIncrementAttribute>();
                         while (stream.IncrementToken())
                         {
                             tfPos += posIncrAtt.PositionIncrement;
                         }
                         stream = new ModuloTokenFilter(this, new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new System.IO.StringReader(buffer.ToString()))), modCounts[j]);
-                        posIncrAtt = stream.GetAttribute<PositionIncrementAttribute>();
+                        posIncrAtt = stream.GetAttribute<IPositionIncrementAttribute>();
                         while (stream.IncrementToken())
                         {
                             tfPos += posIncrAtt.PositionIncrement;
@@ -194,13 +193,13 @@ namespace Lucene.Net.Analysis
                     {
                         teeStream = new TeeSinkTokenFilter(new StandardFilter(new StandardTokenizer(Version.LUCENE_CURRENT, new System.IO.StringReader(buffer.ToString()))));
                         sink = teeStream.NewSinkTokenStream(new ModuloSinkFilter(this, modCounts[j]));
-                        PositionIncrementAttribute posIncrAtt = teeStream.GetAttribute<PositionIncrementAttribute>();
+                        IPositionIncrementAttribute posIncrAtt = teeStream.GetAttribute<IPositionIncrementAttribute>();
                         while (teeStream.IncrementToken())
                         {
                             sinkPos += posIncrAtt.PositionIncrement;
                         }
                         //System.out.println("Modulo--------");
-                        posIncrAtt = sink.GetAttribute<PositionIncrementAttribute>();
+                        posIncrAtt = sink.GetAttribute<IPositionIncrementAttribute>();
                         while (sink.IncrementToken())
                         {
                             sinkPos += posIncrAtt.PositionIncrement;

Modified: incubator/lucene.net/trunk/test/core/Analysis/TestToken.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/TestToken.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/TestToken.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/TestToken.cs Fri Apr 13 16:33:33 2012
@@ -21,7 +21,6 @@ using Lucene.Net.Analysis.Tokenattribute
 using Lucene.Net.Util;
 using NUnit.Framework;
 using Attribute = Lucene.Net.Util.Attribute;
-using FlagsAttribute = Lucene.Net.Analysis.Tokenattributes.FlagsAttribute;
 using Payload = Lucene.Net.Index.Payload;
 using TestSimpleAttributeImpls = Lucene.Net.Analysis.Tokenattributes.TestSimpleAttributeImpls;
 using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
@@ -246,11 +245,11 @@ namespace Lucene.Net.Analysis
             Assert.AreNotSame(pl, copy.Payload);
 		}
 
-        public interface SenselessAttribute : Attribute {}
+        public interface ISenselessAttribute : IAttribute {}
 
-        public class SenselessAttributeImpl : AttributeImpl, SenselessAttribute
+        public class SenselessAttribute : Attribute, ISenselessAttribute
         {
-            public override void CopyTo(AttributeImpl target) 
+            public override void CopyTo(Attribute target) 
             { }
 
             public override void Clear() 
@@ -258,7 +257,7 @@ namespace Lucene.Net.Analysis
 
             public override bool Equals(object other)
             {
-                return other is SenselessAttributeImpl;
+                return other is SenselessAttribute;
             }
 
             public override int GetHashCode()
@@ -272,15 +271,15 @@ namespace Lucene.Net.Analysis
         {
             TokenStream ts = new WhitespaceTokenizer(Token.TOKEN_ATTRIBUTE_FACTORY, new StringReader("foo, bar"));
 
-            Assert.IsTrue(ts.AddAttribute<SenselessAttribute>() is SenselessAttributeImpl,
+            Assert.IsTrue(ts.AddAttribute<ISenselessAttribute>() is SenselessAttribute,
                           "TypeAttribute is not implemented by SenselessAttributeImpl");
 
-            Assert.IsTrue(ts.AddAttribute<TermAttribute>() is Token, "TermAttribute is not implemented by Token");
-            Assert.IsTrue(ts.AddAttribute<OffsetAttribute>() is Token, "OffsetAttribute is not implemented by Token");
-            Assert.IsTrue(ts.AddAttribute<FlagsAttribute>() is Token, "FlagsAttribute is not implemented by Token");
-            Assert.IsTrue(ts.AddAttribute<PayloadAttribute>() is Token, "PayloadAttribute is not implemented by Token");
-            Assert.IsTrue(ts.AddAttribute<PositionIncrementAttribute>() is Token, "PositionIncrementAttribute is not implemented by Token");
-            Assert.IsTrue(ts.AddAttribute<TypeAttribute>() is Token, "TypeAttribute is not implemented by Token");
+            Assert.IsTrue(ts.AddAttribute<ITermAttribute>() is Token, "TermAttribute is not implemented by Token");
+            Assert.IsTrue(ts.AddAttribute<IOffsetAttribute>() is Token, "OffsetAttribute is not implemented by Token");
+            Assert.IsTrue(ts.AddAttribute<IFlagsAttribute>() is Token, "FlagsAttribute is not implemented by Token");
+            Assert.IsTrue(ts.AddAttribute<IPayloadAttribute>() is Token, "PayloadAttribute is not implemented by Token");
+            Assert.IsTrue(ts.AddAttribute<IPositionIncrementAttribute>() is Token, "PositionIncrementAttribute is not implemented by Token");
+            Assert.IsTrue(ts.AddAttribute<ITypeAttribute>() is Token, "TypeAttribute is not implemented by Token");
         }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestSimpleAttributeImpls.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestSimpleAttributeImpls.cs?rev=1325831&r1=1325830&r2=1325831&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestSimpleAttributeImpls.cs (original)
+++ incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestSimpleAttributeImpls.cs Fri Apr 13 16:33:33 2012
@@ -18,9 +18,8 @@
 using System;
 
 using NUnit.Framework;
-
+using Attribute = Lucene.Net.Util.Attribute;
 using Payload = Lucene.Net.Index.Payload;
-using AttributeImpl = Lucene.Net.Util.AttributeImpl;
 using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
 
 namespace Lucene.Net.Analysis.Tokenattributes
@@ -37,16 +36,16 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestFlagsAttribute()
 		{
-			FlagsAttributeImpl att = new FlagsAttributeImpl();
+			FlagsAttribute att = new FlagsAttribute();
 			Assert.AreEqual(0, att.Flags);
 			
 			att.Flags = 1234;
 			Assert.AreEqual("flags=1234", att.ToString());
 			
-			FlagsAttributeImpl att2 = (FlagsAttributeImpl) AssertCloneIsEqual(att);
+			FlagsAttribute att2 = (FlagsAttribute) AssertCloneIsEqual(att);
 			Assert.AreEqual(1234, att2.Flags);
 			
-			att2 = (FlagsAttributeImpl) AssertCopyIsEqual(att);
+			att2 = (FlagsAttribute) AssertCopyIsEqual(att);
 			Assert.AreEqual(1234, att2.Flags);
 			
 			att.Clear();
@@ -56,16 +55,16 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestPositionIncrementAttribute()
 		{
-			PositionIncrementAttributeImpl att = new PositionIncrementAttributeImpl();
+			PositionIncrementAttribute att = new PositionIncrementAttribute();
 			Assert.AreEqual(1, att.PositionIncrement);
 			
 			att.PositionIncrement = 1234;
 			Assert.AreEqual("positionIncrement=1234", att.ToString());
 			
-			PositionIncrementAttributeImpl att2 = (PositionIncrementAttributeImpl) AssertCloneIsEqual(att);
+			PositionIncrementAttribute att2 = (PositionIncrementAttribute) AssertCloneIsEqual(att);
 			Assert.AreEqual(1234, att2.PositionIncrement);
 			
-			att2 = (PositionIncrementAttributeImpl) AssertCopyIsEqual(att);
+			att2 = (PositionIncrementAttribute) AssertCopyIsEqual(att);
 			Assert.AreEqual(1234, att2.PositionIncrement);
 			
 			att.Clear();
@@ -75,36 +74,36 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestTypeAttribute()
 		{
-			TypeAttributeImpl att = new TypeAttributeImpl();
-			Assert.AreEqual(TypeAttributeImpl.DEFAULT_TYPE, att.Type);
+			TypeAttribute att = new TypeAttribute();
+			Assert.AreEqual(TypeAttribute.DEFAULT_TYPE, att.Type);
 			
 			att.Type = "hallo";
 			Assert.AreEqual("type=hallo", att.ToString());
 			
-			TypeAttributeImpl att2 = (TypeAttributeImpl) AssertCloneIsEqual(att);
+			TypeAttribute att2 = (TypeAttribute) AssertCloneIsEqual(att);
 			Assert.AreEqual("hallo", att2.Type);
 			
-			att2 = (TypeAttributeImpl) AssertCopyIsEqual(att);
+			att2 = (TypeAttribute) AssertCopyIsEqual(att);
 			Assert.AreEqual("hallo", att2.Type);
 			
 			att.Clear();
-			Assert.AreEqual(TypeAttributeImpl.DEFAULT_TYPE, att.Type);
+			Assert.AreEqual(TypeAttribute.DEFAULT_TYPE, att.Type);
 		}
 		
         [Test]
 		public virtual void  TestPayloadAttribute()
 		{
-			PayloadAttributeImpl att = new PayloadAttributeImpl();
+			PayloadAttribute att = new PayloadAttribute();
 			Assert.IsNull(att.Payload);
 			
 			Payload pl = new Payload(new byte[]{1, 2, 3, 4});
 			att.Payload = pl;
 			
-			PayloadAttributeImpl att2 = (PayloadAttributeImpl) AssertCloneIsEqual(att);
+			PayloadAttribute att2 = (PayloadAttribute) AssertCloneIsEqual(att);
 			Assert.AreEqual(pl, att2.Payload);
 			Assert.AreNotSame(pl, att2.Payload);
 			
-			att2 = (PayloadAttributeImpl) AssertCopyIsEqual(att);
+			att2 = (PayloadAttribute) AssertCopyIsEqual(att);
 			Assert.AreEqual(pl, att2.Payload);
             Assert.AreNotSame(pl, att2.Payload);
 			
@@ -115,18 +114,18 @@ namespace Lucene.Net.Analysis.Tokenattri
         [Test]
 		public virtual void  TestOffsetAttribute()
 		{
-			OffsetAttributeImpl att = new OffsetAttributeImpl();
+			OffsetAttribute att = new OffsetAttribute();
 			Assert.AreEqual(0, att.StartOffset);
 			Assert.AreEqual(0, att.EndOffset);
 			
 			att.SetOffset(12, 34);
 			// no string test here, because order unknown
 			
-			OffsetAttributeImpl att2 = (OffsetAttributeImpl) AssertCloneIsEqual(att);
+			OffsetAttribute att2 = (OffsetAttribute) AssertCloneIsEqual(att);
 			Assert.AreEqual(12, att2.StartOffset);
 			Assert.AreEqual(34, att2.EndOffset);
 			
-			att2 = (OffsetAttributeImpl) AssertCopyIsEqual(att);
+			att2 = (OffsetAttribute) AssertCopyIsEqual(att);
 			Assert.AreEqual(12, att2.StartOffset);
 			Assert.AreEqual(34, att2.EndOffset);
 			
@@ -135,17 +134,17 @@ namespace Lucene.Net.Analysis.Tokenattri
 			Assert.AreEqual(0, att.EndOffset);
 		}
 		
-		public static AttributeImpl AssertCloneIsEqual(AttributeImpl att)
+		public static Attribute AssertCloneIsEqual(Attribute att)
 		{
-			AttributeImpl clone = (AttributeImpl) att.Clone();
+			Attribute clone = (Attribute) att.Clone();
 			Assert.AreEqual(att, clone, "Clone must be equal");
 			Assert.AreEqual(att.GetHashCode(), clone.GetHashCode(), "Clone's hashcode must be equal");
 			return clone;
 		}
 		
-		public static AttributeImpl AssertCopyIsEqual(AttributeImpl att)
+		public static Attribute AssertCopyIsEqual(Attribute att)
 		{
-			AttributeImpl copy = (AttributeImpl) System.Activator.CreateInstance(att.GetType());
+			Attribute copy = (Attribute) System.Activator.CreateInstance(att.GetType());
 			att.CopyTo(copy);
 			Assert.AreEqual(att, copy, "Copied instance must be equal");
 			Assert.AreEqual(att.GetHashCode(), copy.GetHashCode(), "Copied instance's hashcode must be equal");



Mime
View raw message