lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r833874 [1/3] - in /incubator/lucene.net/trunk/C#/src: Lucene.Net/Analysis/ Lucene.Net/Analysis/Tokenattributes/ Lucene.Net/Util/ Test/Analysis/ Test/Analysis/Tokenattributes/
Date Sun, 08 Nov 2009 13:36:43 GMT
Author: digy
Date: Sun Nov  8 13:36:42 2009
New Revision: 833874

URL: http://svn.apache.org/viewvc?rev=833874&view=rev
Log:
LUCENENET-204, LUCENENET-205, LUCENENET-206 (2.9.0)

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharArraySet.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/FlagsAttributeImpl.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/OffsetAttributeImpl.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PayloadAttributeImpl.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/TypeAttributeImpl.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AttributeImpl.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestASCIIFoldingFilter.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestISOLatin1AccentFilter.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestStopAnalyzer.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTeeSinkTokenFilter.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestTeeTokenFilter.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/TestToken.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/Tokenattributes/TestSimpleAttributeImpls.cs
    incubator/lucene.net/trunk/C#/src/Test/Analysis/Tokenattributes/TestTermAttributeImpl.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharArraySet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/CharArraySet.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharArraySet.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharArraySet.cs Sun Nov  8 13:36:42
2009
@@ -287,6 +287,16 @@
 			{
 				return Add((char[]) o);
 			}
+
+            if (o is System.Collections.Hashtable)
+            {
+                foreach (string word in ((System.Collections.Hashtable)o).Keys)
+                {
+                    Add(word);
+                }
+                return true;
+            }
+
 			return Add(o.ToString());
 		}
 		

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/CharReader.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/CharReader.cs Sun Nov  8 13:36:42
2009
@@ -38,7 +38,7 @@
             else
             {
                 // {{Aroush-2.9}} isn't there a better (faster) way to do this?
-                System.IO.MemoryStream theString = new System.IO.MemoryStream(System.Text.Encoding.ASCII.GetBytes(input.ReadToEnd()));
+                System.IO.MemoryStream theString = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(input.ReadToEnd()));
                 return new CharReader(new System.IO.StreamReader(theString));
             }
 			//return input is CharStream?(CharStream) input:new CharReader(input);

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/FlagsAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/Tokenattributes/FlagsAttributeImpl.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/FlagsAttributeImpl.cs
(original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/FlagsAttributeImpl.cs
Sun Nov  8 13:36:42 2009
@@ -85,8 +85,9 @@
 		
 		override public System.Object Clone()
 		{
-            System.Diagnostics.Debug.Fail("Port issue:", "Let see if we need this FlagsAttributeImpl.Clone()");
// {{Aroush-2.9}}
-			return null;
+            FlagsAttributeImpl impl = new FlagsAttributeImpl();
+            impl.flags = this.flags;
+            return impl;
 		}
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/OffsetAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/Tokenattributes/OffsetAttributeImpl.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/OffsetAttributeImpl.cs
(original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/OffsetAttributeImpl.cs
Sun Nov  8 13:36:42 2009
@@ -98,8 +98,10 @@
 		
 		override public System.Object Clone()
 		{
-            System.Diagnostics.Debug.Fail("Port issue:", "Let see if we need this OffsetAttributeImpl.Clone()");
// {{Aroush-2.9}}
-			return null;
+            OffsetAttributeImpl impl = new OffsetAttributeImpl();
+            impl.endOffset = endOffset;
+            impl.startOffset = startOffset;
+            return impl;
 		}
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PayloadAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/Tokenattributes/PayloadAttributeImpl.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PayloadAttributeImpl.cs
(original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PayloadAttributeImpl.cs
Sun Nov  8 13:36:42 2009
@@ -59,12 +59,9 @@
 		
 		public override System.Object Clone()
 		{
-			PayloadAttributeImpl clone = (PayloadAttributeImpl) base.Clone();
-			if (payload != null)
-			{
-				clone.payload = (Payload) payload.Clone();
-			}
-			return clone;
+            PayloadAttributeImpl impl = new PayloadAttributeImpl();
+            impl.payload = new Payload(this.payload.data, this.payload.offset, this.payload.length);
+            return impl;
 		}
 		
 		public  override bool Equals(System.Object other)

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs
(original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs
Sun Nov  8 13:36:42 2009
@@ -105,8 +105,9 @@
 		
 		override public System.Object Clone()
 		{
-            System.Diagnostics.Debug.Fail("Port issue:", "Let see if we need this PositionIncrementAttributeImpl.Clone()");
// {{Aroush-2.9}}
-			return null;
+            PositionIncrementAttributeImpl impl = new PositionIncrementAttributeImpl();
+            impl.positionIncrement = positionIncrement;
+            return impl;
 		}
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/TypeAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Analysis/Tokenattributes/TypeAttributeImpl.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/TypeAttributeImpl.cs
(original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Analysis/Tokenattributes/TypeAttributeImpl.cs
Sun Nov  8 13:36:42 2009
@@ -85,8 +85,9 @@
 		
 		override public System.Object Clone()
 		{
-            System.Diagnostics.Debug.Fail("Port issue:", "Let see if we need this TypeAttributeImpl.Clone()");
 // {{Aroush-2.9}}
-			return null;
+            TypeAttributeImpl impl = new TypeAttributeImpl();
+            impl.type = type;
+            return impl;
 		}
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Util/AttributeImpl.cs?rev=833874&r1=833873&r2=833874&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AttributeImpl.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/AttributeImpl.cs Sun Nov  8 13:36:42
2009
@@ -58,8 +58,7 @@
 					System.Reflection.FieldInfo f = fields[i];
 					if (f.IsStatic)
 						continue;
-                    // f.setAccessible(true);   // {{Aroush-2.9}} java.lang.reflect.AccessibleObject.setAccessible
-                    System.Diagnostics.Debug.Fail("Port issue:", "java.lang.reflect.AccessibleObject.setAccessible()");
// {{Aroush-2.9}}
+                    //f.setAccessible(true);   // {{Aroush-2.9}} java.lang.reflect.AccessibleObject.setAccessible
 					System.Object value_Renamed = f.GetValue(this);
 					if (buffer.Length > 0)
 					{



Mime
View raw message