lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1087914 - in /lucene/dev/branches/branch_3x/solr: ./ src/java/org/apache/solr/schema/FieldProperties.java src/java/org/apache/solr/schema/FieldType.java
Date Fri, 01 Apr 2011 22:08:05 GMT
Author: ryan
Date: Fri Apr  1 22:08:05 2011
New Revision: 1087914

URL: http://svn.apache.org/viewvc?rev=1087914&view=rev
Log:
SOLR-2433 -- Make FieldProperties bit masks protected

Modified:
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldProperties.java
    lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldType.java

Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldProperties.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldProperties.java?rev=1087914&r1=1087913&r2=1087914&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldProperties.java
(original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldProperties.java
Fri Apr  1 22:08:05 2011
@@ -22,29 +22,31 @@ import java.util.HashMap;
 
 /**
  * @version $Id$
+ * 
+ * @lucene.internal
  */
-abstract class FieldProperties {
+public abstract class FieldProperties {
 
   // use a bitfield instead of many different boolean variables since
   // many of the variables are independent or semi-independent.
 
   // bit values for boolean field properties.
-  final static int INDEXED             = 0x00000001;
-  final static int TOKENIZED           = 0x00000002;
-  final static int STORED              = 0x00000004;
-  final static int BINARY              = 0x00000008;
-  final static int OMIT_NORMS          = 0x00000010;
-  final static int OMIT_TF_POSITIONS   = 0x00000020;
-  final static int STORE_TERMVECTORS   = 0x00000040;
-  final static int STORE_TERMPOSITIONS = 0x00000080;
-  final static int STORE_TERMOFFSETS   = 0x00000100;
+  protected final static int INDEXED             = 0x00000001;
+  protected final static int TOKENIZED           = 0x00000002;
+  protected final static int STORED              = 0x00000004;
+  protected final static int BINARY              = 0x00000008;
+  protected final static int OMIT_NORMS          = 0x00000010;
+  protected final static int OMIT_TF_POSITIONS   = 0x00000020;
+  protected final static int STORE_TERMVECTORS   = 0x00000040;
+  protected final static int STORE_TERMPOSITIONS = 0x00000080;
+  protected final static int STORE_TERMOFFSETS   = 0x00000100;
 
 
-  final static int MULTIVALUED         = 0x00000200;
-  final static int SORT_MISSING_FIRST  = 0x00000400;
-  final static int SORT_MISSING_LAST   = 0x00000800;
+  protected final static int MULTIVALUED         = 0x00000200;
+  protected final static int SORT_MISSING_FIRST  = 0x00000400;
+  protected final static int SORT_MISSING_LAST   = 0x00000800;
   
-  final static int REQUIRED            = 0x00001000;
+  protected final static int REQUIRED            = 0x00001000;
   
   static final String[] propertyNames = {
           "indexed", "tokenized", "stored",

Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldType.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldType.java?rev=1087914&r1=1087913&r2=1087914&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldType.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/schema/FieldType.java Fri
Apr  1 22:08:05 2011
@@ -80,6 +80,11 @@ public abstract class FieldType extends 
   public boolean isMultiValued() {
     return (properties & MULTIVALUED) != 0;
   }
+  
+  /** Check if a property is set */
+  protected boolean hasProperty( int p ) {
+    return (properties & p) != 0;
+  }
 
   /**
    * A "polyField" is a FieldType that can produce more than one Fieldable instance for a
single value, via the {@link #createFields(org.apache.solr.schema.SchemaField, String, float)}
method.  This is useful



Mime
View raw message