lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [01/37] lucenenet git commit: Lucene.Net.Codecs: member accessibility
Date Sun, 29 Jan 2017 13:27:23 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work 286040300 -> 96d47cec6


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index 1df924f..140afea 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -238,7 +238,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextDocsEnum : DocsEnum
+        private class SimpleTextDocsEnum : DocsEnum
         {
             private readonly IndexInput _inStart;
             private readonly IndexInput _in;
@@ -256,12 +256,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 _in = (IndexInput) _inStart.Clone();
             }
 
-            public bool CanReuse(IndexInput @in)
+            public virtual bool CanReuse(IndexInput @in)
             {
                 return @in == _inStart;
             }
 
-            public SimpleTextDocsEnum Reset(long fp, IBits liveDocs, bool omitTf, int docFreq)
+            public virtual SimpleTextDocsEnum Reset(long fp, IBits liveDocs, bool omitTf,
int docFreq)
             {
                 _liveDocs = liveDocs;
                 _in.Seek(fp);
@@ -364,7 +364,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextDocsAndPositionsEnum : DocsAndPositionsEnum
+        private class SimpleTextDocsAndPositionsEnum : DocsAndPositionsEnum
         {
             private readonly IndexInput _inStart;
             private readonly IndexInput _in;
@@ -389,12 +389,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 _in = (IndexInput) _inStart.Clone();
             }
 
-            public bool CanReuse(IndexInput @in)
+            public virtual bool CanReuse(IndexInput @in)
             {
                 return @in == _inStart;
             }
 
-            public SimpleTextDocsAndPositionsEnum Reset(long fp, IBits liveDocs, IndexOptions
indexOptions, int docFreq)
+            public virtual SimpleTextDocsAndPositionsEnum Reset(long fp, IBits liveDocs,
IndexOptions indexOptions, int docFreq)
             {
                 _liveDocs = liveDocs;
                 _nextDocStart = fp;
@@ -574,7 +574,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextTerms : Terms
+        private class SimpleTextTerms : Terms
         {
             private readonly SimpleTextFieldsReader _outerInstance;
 
@@ -672,14 +672,16 @@ namespace Lucene.Net.Codecs.SimpleText
             }
 
             /// <summary>Returns approximate RAM bytes used</summary>
-            public long RamBytesUsed()
+            public virtual long RamBytesUsed()
             {
                 return (_fst != null) ? _fst.SizeInBytes() : 0;
             }
 
             public override TermsEnum GetIterator(TermsEnum reuse)
             {
-                return (_fst != null && _fieldInfo.IndexOptions.HasValue) ? new SimpleTextTermsEnum(_outerInstance,
_fst, _fieldInfo.IndexOptions.Value) : TermsEnum.EMPTY;
+                return (_fst != null && _fieldInfo.IndexOptions.HasValue) 
+                    ? new SimpleTextTermsEnum(_outerInstance, _fst, _fieldInfo.IndexOptions.Value)

+                    : TermsEnum.EMPTY;
             }
 
             public override IComparer<BytesRef> Comparer
@@ -709,20 +711,20 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override bool HasFreqs
             {
-                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS)
>= 0; }
+                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS)
>= 0; } // LUCENENET TODO: Possible exception when IndexOptions is null
             }
 
             public override bool HasOffsets
             {
                 get
                 {
-                    return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)
>= 0;
+                    return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)
>= 0; // LUCENENET TODO: Possible exception when IndexOptions is null
                 }
             }
 
             public override bool HasPositions
             {
-                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
>= 0; }
+                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
>= 0; } // LUCENENET TODO: Possible exception when IndexOptions is null
             }
 
             public override bool HasPayloads
@@ -777,5 +779,4 @@ namespace Lucene.Net.Codecs.SimpleText
         {
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
index 914b29b..3edeeac 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
@@ -30,7 +30,6 @@ namespace Lucene.Net.Codecs.SimpleText
 
     internal class SimpleTextFieldsWriter : FieldsConsumer
     {
-
         private IndexOutput _output;
         private readonly BytesRef _scratch = new BytesRef(10);
 
@@ -73,23 +72,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return new SimpleTextTermsWriter(this, field);
         }
 
-        public override void Dispose()
-        {
-            if (_output == null) return;
-
-            try
-            {
-                Write(END);
-                Newline();
-                SimpleTextUtil.WriteChecksum(_output, _scratch);
-            }
-            finally
-            {
-                _output.Dispose();
-                _output = null;
-            }
-        }
-
         private class SimpleTextTermsWriter : TermsConsumer
         {
             private readonly SimpleTextFieldsWriter _outerInstance;
@@ -120,7 +102,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextPostingsWriter : PostingsConsumer
+        private class SimpleTextPostingsWriter : PostingsConsumer
         {
             private readonly SimpleTextFieldsWriter _outerInstance;
 
@@ -165,7 +147,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 _lastStartOffset = 0;
             }
 
-            public PostingsConsumer Reset(BytesRef term)
+            public virtual PostingsConsumer Reset(BytesRef term)
             {
                 _term = term;
                 _wroteTerm = false;
@@ -209,6 +191,22 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-    }
 
+        public override void Dispose()
+        {
+            if (_output == null) return;
+
+            try
+            {
+                Write(END);
+                Newline();
+                SimpleTextUtil.WriteChecksum(_output, _scratch);
+            }
+            finally
+            {
+                _output.Dispose();
+                _output = null;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
index 2cdbd90..9e3b829 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
@@ -49,7 +49,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextLiveDocsFormat : LiveDocsFormat
     {
-
         internal const string LIVEDOCS_EXTENSION = "liv";
 
         internal static readonly BytesRef SIZE = new BytesRef("size ");
@@ -64,7 +63,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override IMutableBits NewLiveDocs(IBits existing)
         {
             var bits = (SimpleTextBits) existing;
-            return new SimpleTextMutableBits(new BitArray(bits.BITS), bits.SIZE);
+            return new SimpleTextMutableBits(new BitArray(bits.BITS), bits.Length);
         }
 
         public override IBits ReadLiveDocs(Directory dir, SegmentCommitInfo info, IOContext
context)
@@ -114,7 +113,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private static int ParseIntAt(BytesRef bytes, int offset, CharsRef scratch)
+        private int ParseIntAt(BytesRef bytes, int offset, CharsRef scratch) // LUCENENET
TODO: Rename ParseInt32At ?
         {
             UnicodeUtil.UTF8toUTF16(bytes.Bytes, bytes.Offset + offset, bytes.Length - offset,
scratch);
             return ArrayUtil.ParseInt(scratch.Chars, 0, scratch.Length);
@@ -173,8 +172,8 @@ namespace Lucene.Net.Codecs.SimpleText
         // read-only
         internal class SimpleTextBits : IBits
         {
-            internal readonly BitArray BITS;
-            internal readonly int SIZE;
+            internal readonly BitArray BITS; // LUCENENET TODO: Rename camelCase
+            private readonly int SIZE; // LUCENENET TODO: Rename camelCase
 
             internal SimpleTextBits(BitArray bits, int size)
             {
@@ -182,12 +181,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 SIZE = size;
             }
 
-            public bool Get(int index)
+            public virtual bool Get(int index)
             {
                 return BITS.SafeGet(index);
             }
 
-            public int Length
+            public virtual int Length
             {
                 get { return SIZE; }
             }
@@ -197,20 +196,21 @@ namespace Lucene.Net.Codecs.SimpleText
         internal class SimpleTextMutableBits : SimpleTextBits, IMutableBits
         {
 
-            internal SimpleTextMutableBits(int size) : this(new BitArray(size), size)
+            internal SimpleTextMutableBits(int size) 
+                : this(new BitArray(size), size)
             {
                 BITS.Set(0, size);
             }
 
-            internal SimpleTextMutableBits(BitArray bits, int size) : base(bits, size)
+            internal SimpleTextMutableBits(BitArray bits, int size) 
+                : base(bits, size)
             {
             }
 
-            public void Clear(int bit)
+            public virtual void Clear(int bit)
             {
                 BITS.SafeSet(bit, false);
             }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
index 75a0ccc..f2aff9a 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
@@ -53,7 +53,8 @@ namespace Lucene.Net.Codecs.SimpleText
         /// </summary>
         public class SimpleTextNormsProducer : SimpleTextDocValuesReader
         {
-            public SimpleTextNormsProducer(SegmentReadState state) : base(state, NORMS_SEG_EXTENSION)
+            public SimpleTextNormsProducer(SegmentReadState state) 
+                : base(state, NORMS_SEG_EXTENSION)
             {
                 // All we do is change the extension from .dat -> .len;
                 // otherwise this is a normal simple doc values file:
@@ -70,7 +71,8 @@ namespace Lucene.Net.Codecs.SimpleText
         /// </summary>
         public class SimpleTextNormsConsumer : SimpleTextDocValuesWriter
         {
-            public SimpleTextNormsConsumer(SegmentWriteState state) : base(state, NORMS_SEG_EXTENSION)
+            public SimpleTextNormsConsumer(SegmentWriteState state) 
+                : base(state, NORMS_SEG_EXTENSION)
             {
                 // All we do is change the extension from .dat -> .len;
                 // otherwise this is a normal simple doc values file:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
index 0027065..6660efc 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
@@ -35,12 +35,8 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public sealed class SimpleTextPostingsFormat : PostingsFormat
     {
-
-        /// <summary>
-        /// Extension of freq postings file </summary>
-        internal const string POSTINGS_EXTENSION = "pst";
-
-        public SimpleTextPostingsFormat() : base("SimpleText")
+        public SimpleTextPostingsFormat() 
+            : base("SimpleText")
         {
         }
 
@@ -54,10 +50,13 @@ namespace Lucene.Net.Codecs.SimpleText
             return new SimpleTextFieldsReader(state);
         }
 
+        /// <summary>
+        /// Extension of freq postings file </summary>
+        internal const string POSTINGS_EXTENSION = "pst";
+
         internal static string GetPostingsFileName(string segment, string segmentSuffix)
         {
             return IndexFileNames.SegmentFileName(segment, segmentSuffix, POSTINGS_EXTENSION);
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
index 11c4940..f24a1e3 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
@@ -18,30 +18,28 @@
 namespace Lucene.Net.Codecs.SimpleText
 {
 
-	/// <summary>
-	/// plain text segments file format.
-	/// <para>
-	/// <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
-	/// @lucene.experimental
-	/// </para>
-	/// </summary>
-	public class SimpleTextSegmentInfoFormat : SegmentInfoFormat
-	{
-	  private readonly SegmentInfoReader _reader = new SimpleTextSegmentInfoReader();
-	  private readonly SegmentInfoWriter _writer = new SimpleTextSegmentInfoWriter();
+    /// <summary>
+    /// plain text segments file format.
+    /// <para>
+    /// <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
+    /// @lucene.experimental
+    /// </para>
+    /// </summary>
+    public class SimpleTextSegmentInfoFormat : SegmentInfoFormat
+    {
+        private readonly SegmentInfoReader _reader = new SimpleTextSegmentInfoReader();
+        private readonly SegmentInfoWriter _writer = new SimpleTextSegmentInfoWriter();
 
-	  public const string SI_EXTENSION = "si";
+        public const string SI_EXTENSION = "si";
 
-	  public override SegmentInfoReader SegmentInfoReader
-	  {
-	      get { return _reader; }
-	  }
-
-	  public override SegmentInfoWriter SegmentInfoWriter
-	  {
-	      get { return _writer; }
-	  }
-
-	}
+        public override SegmentInfoReader SegmentInfoReader
+        {
+            get { return _reader; }
+        }
 
+        public override SegmentInfoWriter SegmentInfoWriter
+        {
+            get { return _writer; }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
index 35e8c1f..e42cacc 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
@@ -43,7 +43,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextSegmentInfoReader : SegmentInfoReader
     {
-
         public override SegmentInfo Read(Directory directory, string segmentName, IOContext
context)
         {
             var scratch = new BytesRef();
@@ -116,7 +115,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private static string ReadString(int offset, BytesRef scratch)
+        private string ReadString(int offset, BytesRef scratch)
         {
             return Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + offset, scratch.Length
- offset);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
index ca64e80..c9464a9 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
@@ -38,7 +38,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextSegmentInfoWriter : SegmentInfoWriter
     {
-
         internal static readonly BytesRef SI_VERSION = new BytesRef("    version ");
         internal static readonly BytesRef SI_DOCCOUNT = new BytesRef("    number of documents
");
         internal static readonly BytesRef SI_USECOMPOUND = new BytesRef("    uses compound
file ");
@@ -50,7 +49,6 @@ namespace Lucene.Net.Codecs.SimpleText
 
         public override void Write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext
ioContext)
         {
-
             var segFileName = IndexFileNames.SegmentFileName(si.Name, "", SimpleTextSegmentInfoFormat.SI_EXTENSION);
             si.AddFile(segFileName);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
index ffe698f..ffb9752 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
@@ -32,7 +32,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextStoredFieldsFormat : StoredFieldsFormat
     {
-
         public override StoredFieldsReader FieldsReader(Directory directory, SegmentInfo
si, FieldInfos fn,
             IOContext context)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
index f884058..0b82c9f 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
@@ -251,7 +251,7 @@ namespace Lucene.Net.Codecs.SimpleText
             SimpleTextUtil.ReadLine(_input, _scratch);
         }
 
-        private int ParseIntAt(int offset)
+        private int ParseIntAt(int offset) // LUCENENET TODO: Rename ParseInt32At
         {
             UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + offset, _scratch.Length
- offset, _scratchUtf16);
             return ArrayUtil.ParseInt(_scratchUtf16.Chars, 0, _scratchUtf16.Length);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index 84217e9..1ac0b12 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -184,7 +184,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        public override sealed void Abort()
+        public override void Abort()
 	    {
 	        try
 	        {
@@ -238,5 +238,4 @@ namespace Lucene.Net.Codecs.SimpleText
             SimpleTextUtil.WriteNewline(_output);
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
index d9829ab..8de14c1 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
@@ -37,7 +37,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return new SimpleTextTermVectorsReader(directory, segmentInfo, context);
         }
 
-
         public override TermVectorsWriter VectorsWriter(Directory directory, SegmentInfo
segmentInfo, IOContext context)
         {
             return new SimpleTextTermVectorsWriter(directory, segmentInfo.Name, context);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
index e65d971..1f901cd 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
@@ -259,7 +259,7 @@ namespace Lucene.Net.Codecs.SimpleText
             SimpleTextUtil.ReadLine(_input, _scratch);
         }
 
-        private int ParseIntAt(int offset)
+        private int ParseIntAt(int offset) // LUCENENET TODO: Rename ParseInt32At ?
         {
             UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + offset, _scratch.Length
- offset, _scratchUtf16);
             return ArrayUtil.ParseInt(_scratchUtf16.Chars, 0, _scratchUtf16.Length);
@@ -271,16 +271,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return _scratchUtf16.ToString();
         }
 
-        public override long RamBytesUsed()
-        {
-            return 0;
-        }
-
-        public override void CheckIntegrity()
-        {
-        }
-
-
         private class SimpleTVFields : Fields
         {
             private readonly SimpleTextTermVectorsReader _outerInstance;
@@ -310,7 +300,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private class SimpleTVTerms : Terms
         {
-            internal readonly SortedDictionary<BytesRef, SimpleTVPostings> TERMS;
+            internal readonly SortedDictionary<BytesRef, SimpleTVPostings> TERMS; //
LUCENENET TODO: Rename camelCase
             private readonly bool _hasOffsetsRenamed;
             private readonly bool _hasPositionsRenamed;
             private readonly bool _hasPayloadsRenamed;
@@ -377,11 +367,11 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private class SimpleTVPostings
         {
-            internal int FREQ;
-            internal int[] POSITIONS;
-            internal int[] START_OFFSETS;
-            internal int[] END_OFFSETS;
-            internal BytesRef[] PAYLOADS;
+            internal int FREQ; // LUCENENET TODO: Rename camelCase
+            internal int[] POSITIONS; // LUCENENET TODO: Rename camelCase
+            internal int[] START_OFFSETS; // LUCENENET TODO: Rename camelCase
+            internal int[] END_OFFSETS; // LUCENENET TODO: Rename camelCase
+            internal BytesRef[] PAYLOADS; // LUCENENET TODO: Rename camelCase
         }
 
         private class SimpleTVTermsEnum : TermsEnum
@@ -481,7 +471,7 @@ namespace Lucene.Net.Codecs.SimpleText
         }
 
         // note: these two enum classes are exactly like the Default impl...
-        private sealed class SimpleTVDocsEnum : DocsEnum
+        private class SimpleTVDocsEnum : DocsEnum
         {
             private bool _didNext;
             private int _doc = -1;
@@ -514,7 +504,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 return SlowAdvance(target);
             }
 
-            public void Reset(IBits liveDocs, int freq)
+            public virtual void Reset(IBits liveDocs, int freq)
             {
                 _liveDocs = liveDocs;
                 _freqRenamed = freq;
@@ -528,7 +518,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTVDocsAndPositionsEnum : DocsAndPositionsEnum
+        private class SimpleTVDocsAndPositionsEnum : DocsAndPositionsEnum
         {
             private bool _didNext;
             private int _doc = -1;
@@ -574,7 +564,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 return SlowAdvance(target);
             }
 
-            public void Reset(IBits liveDocs, int[] positions, int[] startOffsets, int[]
endOffsets,
+            public virtual void Reset(IBits liveDocs, int[] positions, int[] startOffsets,
int[] endOffsets,
                 BytesRef[] payloads)
             {
                 _liveDocs = liveDocs;
@@ -640,5 +630,14 @@ namespace Lucene.Net.Codecs.SimpleText
                 return 1;
             }
         }
+
+        public override long RamBytesUsed()
+        {
+            return 0;
+        }
+
+        public override void CheckIntegrity()
+        {
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
index 3a61877..7b6376f 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
@@ -40,7 +40,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextTermVectorsWriter : TermVectorsWriter
     {
-
         internal static readonly BytesRef END = new BytesRef("END");
         internal static readonly BytesRef DOC = new BytesRef("doc ");
         internal static readonly BytesRef NUMFIELDS = new BytesRef("  numfields ");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
index f497156..898cce6 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
@@ -31,8 +31,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
     internal class SimpleTextUtil
     {
-        public const byte NEWLINE = 10;
-        public const byte ESCAPE = 92;
+        public static readonly byte NEWLINE = 10; // LUCENENET TODO: Should this be Environment.Newline?
+        public static readonly byte ESCAPE = 92;
         internal static readonly BytesRef CHECKSUM = new BytesRef("checksum ");
 
         public static void Write(DataOutput output, string s, BytesRef scratch)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/StringHelperClass.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/StringHelperClass.cs b/src/Lucene.Net.Codecs/StringHelperClass.cs
index 0e333f3..67505f3 100644
--- a/src/Lucene.Net.Codecs/StringHelperClass.cs
+++ b/src/Lucene.Net.Codecs/StringHelperClass.cs
@@ -27,6 +27,8 @@ using System.Runtime.InteropServices;
 namespace Lucene.Net.Codecs
 {
 
+
+    // LUCENENET TODO: Remove this class
     internal static class StringHelperClass
     {
         //----------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs b/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
index 663c4c5..5f89448 100644
--- a/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
+++ b/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
@@ -72,6 +72,6 @@ namespace Lucene.Net.Index
         ///  (neither members of the returned BytesRef nor bytes
         ///  in the byte[]).
         /// </summary>
-        public abstract BytesRef Payload { get; }
+        public abstract BytesRef Payload { get; } // LUCENENET TODO: Change to GetPayload()
?
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Core/Index/Fields.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/Fields.cs b/src/Lucene.Net.Core/Index/Fields.cs
index 4d8de5d..f98fd98 100644
--- a/src/Lucene.Net.Core/Index/Fields.cs
+++ b/src/Lucene.Net.Core/Index/Fields.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Index
         /// Get the <seealso cref="Terms"/> for this field.  this will return
         ///  null if the field does not exist.
         /// </summary>
-        public abstract Terms Terms(string field);
+        public abstract Terms Terms(string field); // LUCENENET TODO: Rename GetTerms() ?
 
         /// <summary>
         /// Gets the number of fields or -1 if the number of


Mime
View raw message