Lucene.Net.Spatial.StrategyTestCase.newDoc C# (CSharp) Метод

newDoc() защищенный Метод

protected newDoc ( String id, IShape shape ) : Lucene.Net.Documents.Document
id String
shape IShape
Результат Lucene.Net.Documents.Document
        protected virtual Document newDoc(String id, IShape shape)
        {
            Document doc = new Document();
            doc.Add(new StringField("id", id, Field.Store.YES));
            if (shape != null)
            {
                foreach (Field f in strategy.CreateIndexableFields(shape))
                {
                    doc.Add(f);
                }
                if (storeShape)
                    doc.Add(new StoredField(strategy.FieldName, shape.toString()));//not to be parsed; just for debug
            }
            return doc;
        }