Package org.exoplatform.services.jcr.core.value

Examples of org.exoplatform.services.jcr.core.value.ExtendedValue


                .getIdentifier())).getValues();

          if (data == null)
             log.warn("null value found at property " + prop.getQPath().getAsString());

          ExtendedValue val = null;
          InternalQName name = prop.getQPath().getName();

          for (ValueData value : data)
          {
             val = (ExtendedValue)vFactory.loadValue(((AbstractValueData)value).createTransientCopy(), propType);

             switch (propType)
             {
                case PropertyType.BOOLEAN :
                   if (isIndexed(name))
                   {
                      addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                   }
                   break;
                case PropertyType.DATE :
                   if (isIndexed(name))
                   {
                      addCalendarValue(doc, fieldName, val.getDate());
                   }
                   break;
                case PropertyType.DOUBLE :
                   if (isIndexed(name))
                   {
                      addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                   }
                   break;
                case PropertyType.LONG :
                   if (isIndexed(name))
                   {
                      addLongValue(doc, fieldName, new Long(val.getLong()));
                   }
                   break;
                case PropertyType.REFERENCE :
                   if (isIndexed(name))
                   {
                      addReferenceValue(doc, fieldName, val.getString());
                   }
                   break;
                case PropertyType.PATH :
                   if (isIndexed(name))
                   {
                      addPathValue(doc, fieldName, val.getString());
                   }
                   break;
                case PropertyType.STRING :
                   if (isIndexed(name))
                   {
                      // never fulltext index jcr:uuid String
                      if (name.equals(Constants.JCR_UUID))
                      {
                         addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                      }
                      else
                      {
                         addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                            getPropertyBoost(name),useInExcerpt(name));
                      }
                   }
                   break;
                case PropertyType.NAME :
                   // jcr:primaryType and jcr:mixinTypes are required for correct
                   // node type resolution in queries
                   if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                      || name.equals(Constants.JCR_MIXINTYPES))
                   {
                      addNameValue(doc, fieldName, val.getString());
                   }
                   break;
                case ExtendedPropertyType.PERMISSION :
                   break;
                default :
View Full Code Here


                  .getIdentifier())).getValues();

            if (data == null)
               log.warn("null value found at property " + prop.getQPath().getAsString());

            ExtendedValue val = null;
            InternalQName name = prop.getQPath().getName();

            for (ValueData value : data)
            {
               val = (ExtendedValue)vFactory.loadValue(value, propType);

               switch (propType)
               {
                  case PropertyType.BOOLEAN :
                     if (isIndexed(name))
                     {
                        addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                     }
                     break;
                  case PropertyType.DATE :
                     if (isIndexed(name))
                     {
                        addCalendarValue(doc, fieldName, val.getDate());
                     }
                     break;
                  case PropertyType.DOUBLE :
                     if (isIndexed(name))
                     {
                        addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                     }
                     break;
                  case PropertyType.LONG :
                     if (isIndexed(name))
                     {
                        addLongValue(doc, fieldName, new Long(val.getLong()));
                     }
                     break;
                  case PropertyType.REFERENCE :
                     if (isIndexed(name))
                     {
                        addReferenceValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.PATH :
                     if (isIndexed(name))
                     {
                        addPathValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.STRING :
                     if (isIndexed(name))
                     {
                        // never fulltext index jcr:uuid String
                        if (name.equals(Constants.JCR_UUID))
                        {
                           addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                        }
                        else
                        {
                           addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                              getPropertyBoost(name), useInExcerpt(name));
                        }
                     }
                     break;
                  case PropertyType.NAME :
                     // jcr:primaryType and jcr:mixinTypes are required for correct
                     // node type resolution in queries
                     if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                        || name.equals(Constants.JCR_MIXINTYPES))
                     {
                        addNameValue(doc, fieldName, val.getString());
                     }
                     break;
                  case ExtendedPropertyType.PERMISSION :
                     break;
                  default :
View Full Code Here

                  .getIdentifier())).getValues();

            if (data == null)
               log.warn("null value found at property " + prop.getQPath().getAsString());

            ExtendedValue val = null;
            InternalQName name = prop.getQPath().getName();

            for (ValueData value : data)
            {
               val = (ExtendedValue)vFactory.loadValue(value, propType);

               switch (propType)
               {
                  case PropertyType.BOOLEAN :
                     if (isIndexed(name))
                     {
                        addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                     }
                     break;
                  case PropertyType.DATE :
                     if (isIndexed(name))
                     {
                        addCalendarValue(doc, fieldName, val.getDate());
                     }
                     break;
                  case PropertyType.DOUBLE :
                     if (isIndexed(name))
                     {
                        addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                     }
                     break;
                  case PropertyType.LONG :
                     if (isIndexed(name))
                     {
                        addLongValue(doc, fieldName, new Long(val.getLong()));
                     }
                     break;
                  case PropertyType.REFERENCE :
                     if (isIndexed(name))
                     {
                        addReferenceValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.PATH :
                     if (isIndexed(name))
                     {
                        addPathValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.STRING :
                     if (isIndexed(name))
                     {
                        // never fulltext index jcr:uuid String
                        if (name.equals(Constants.JCR_UUID))
                        {
                           addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                        }
                        else
                        {
                           addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                              getPropertyBoost(name), useInExcerpt(name));
                        }
                     }
                     break;
                  case PropertyType.NAME :
                     // jcr:primaryType and jcr:mixinTypes are required for correct
                     // node type resolution in queries
                     if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                        || name.equals(Constants.JCR_MIXINTYPES))
                     {
                        addNameValue(doc, fieldName, val.getString());
                     }
                     break;
                  case ExtendedPropertyType.PERMISSION :
                     break;
                  default :
View Full Code Here

            if (data == null)
            {
               log.warn("null value found at property " + prop.getQPath().getAsString());
            }

            ExtendedValue val = null;
            InternalQName name = prop.getQPath().getName();

            for (ValueData value : data)
            {
               val = (ExtendedValue)vFactory.loadValue(value, propType);

               switch (propType)
               {
                  case PropertyType.BOOLEAN :
                     if (isIndexed(name))
                     {
                        addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                     }
                     break;
                  case PropertyType.DATE :
                     if (isIndexed(name))
                     {
                        addCalendarValue(doc, fieldName, val.getDate());
                     }
                     break;
                  case PropertyType.DOUBLE :
                     if (isIndexed(name))
                     {
                        addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                     }
                     break;
                  case PropertyType.LONG :
                     if (isIndexed(name))
                     {
                        addLongValue(doc, fieldName, new Long(val.getLong()));
                     }
                     break;
                  case PropertyType.REFERENCE :
                     if (isIndexed(name))
                     {
                        addReferenceValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.PATH :
                     if (isIndexed(name))
                     {
                        addPathValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.STRING :
                     if (isIndexed(name))
                     {
                        // never fulltext index jcr:uuid String
                        if (name.equals(Constants.JCR_UUID))
                        {
                           addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                        }
                        else
                        {
                           addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                              getPropertyBoost(name), useInExcerpt(name));
                        }
                     }
                     break;
                  case PropertyType.NAME :
                     // jcr:primaryType and jcr:mixinTypes are required for correct
                     // node type resolution in queries
                     if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                        || name.equals(Constants.JCR_MIXINTYPES))
                     {
                        addNameValue(doc, fieldName, val.getString());
                     }
                     break;
                  case ExtendedPropertyType.PERMISSION :
                     break;
                  default :
View Full Code Here

               prop.getValues().size() > 0 ? prop.getValues() : ((PropertyData)stateProvider.getItemData(prop.getIdentifier())).getValues();

            if (data == null)
               log.warn("null value found at property " + prop.getQPath().getAsString());

            ExtendedValue val = null;
            InternalQName name = prop.getQPath().getName();

            for (ValueData value : data)
            {
               val = (ExtendedValue)vFactory.loadValue(value, propType);

               switch (propType)
               {
                  case PropertyType.BOOLEAN :
                     if (isIndexed(name))
                     {
                        addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                     }
                     break;
                  case PropertyType.DATE :
                     if (isIndexed(name))
                     {
                        addCalendarValue(doc, fieldName, val.getDate());
                     }
                     break;
                  case PropertyType.DOUBLE :
                     if (isIndexed(name))
                     {
                        addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                     }
                     break;
                  case PropertyType.LONG :
                     if (isIndexed(name))
                     {
                        addLongValue(doc, fieldName, new Long(val.getLong()));
                     }
                     break;
                  case PropertyType.REFERENCE :
                     if (isIndexed(name))
                     {
                        addReferenceValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.PATH :
                     if (isIndexed(name))
                     {
                        addPathValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.STRING :
                     if (isIndexed(name))
                     {
                        // never fulltext index jcr:uuid String
                        if (name.equals(Constants.JCR_UUID))
                        {
                           addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                        }
                        else
                        {
                           addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                              getPropertyBoost(name), useInExcerpt(name));
                        }
                     }
                     break;
                  case PropertyType.NAME :
                     // jcr:primaryType and jcr:mixinTypes are required for correct
                     // node type resolution in queries
                     if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                        || name.equals(Constants.JCR_MIXINTYPES))
                     {
                        addNameValue(doc, fieldName, val.getString());
                     }
                     break;
                  case ExtendedPropertyType.PERMISSION :
                     break;
                  default :
View Full Code Here

            if (data == null)
            {
               log.warn("null value found at property " + prop.getQPath().getAsString());
            }

            ExtendedValue val = null;
            InternalQName name = prop.getQPath().getName();

            for (ValueData value : data)
            {
               val = (ExtendedValue)vFactory.loadValue(value, propType);

               switch (propType)
               {
                  case PropertyType.BOOLEAN :
                     if (isIndexed(name))
                     {
                        addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                     }
                     break;
                  case PropertyType.DATE :
                     if (isIndexed(name))
                     {
                        addCalendarValue(doc, fieldName, val.getDate());
                     }
                     break;
                  case PropertyType.DOUBLE :
                     if (isIndexed(name))
                     {
                        addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                     }
                     break;
                  case PropertyType.LONG :
                     if (isIndexed(name))
                     {
                        addLongValue(doc, fieldName, new Long(val.getLong()));
                     }
                     break;
                  case PropertyType.REFERENCE :
                     if (isIndexed(name))
                     {
                        addReferenceValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.PATH :
                     if (isIndexed(name))
                     {
                        addPathValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.STRING :
                     if (isIndexed(name))
                     {
                        // never fulltext index jcr:uuid String
                        if (name.equals(Constants.JCR_UUID))
                        {
                           addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                        }
                        else
                        {
                           addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                              getPropertyBoost(name), useInExcerpt(name));
                        }
                     }
                     break;
                  case PropertyType.NAME :
                     // jcr:primaryType and jcr:mixinTypes are required for correct
                     // node type resolution in queries
                     if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                        || name.equals(Constants.JCR_MIXINTYPES))
                     {
                        addNameValue(doc, fieldName, val.getString());
                     }
                     break;
                  case ExtendedPropertyType.PERMISSION :
                     break;
                  default :
View Full Code Here

                  .getIdentifier())).getValues();

            if (data == null)
               log.warn("null value found at property " + prop.getQPath().getAsString());

            ExtendedValue val = null;
            InternalQName name = prop.getQPath().getName();

            for (ValueData value : data)
            {
               val = (ExtendedValue)vFactory.loadValue(((AbstractValueData)value).createTransientCopy(), propType);

               switch (propType)
               {
                  case PropertyType.BOOLEAN :
                     if (isIndexed(name))
                     {
                        addBooleanValue(doc, fieldName, Boolean.valueOf(val.getBoolean()));
                     }
                     break;
                  case PropertyType.DATE :
                     if (isIndexed(name))
                     {
                        addCalendarValue(doc, fieldName, val.getDate());
                     }
                     break;
                  case PropertyType.DOUBLE :
                     if (isIndexed(name))
                     {
                        addDoubleValue(doc, fieldName, new Double(val.getDouble()));
                     }
                     break;
                  case PropertyType.LONG :
                     if (isIndexed(name))
                     {
                        addLongValue(doc, fieldName, new Long(val.getLong()));
                     }
                     break;
                  case PropertyType.REFERENCE :
                     if (isIndexed(name))
                     {
                        addReferenceValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.PATH :
                     if (isIndexed(name))
                     {
                        addPathValue(doc, fieldName, val.getString());
                     }
                     break;
                  case PropertyType.STRING :
                     if (isIndexed(name))
                     {
                        // never fulltext index jcr:uuid String
                        if (name.equals(Constants.JCR_UUID))
                        {
                           addStringValue(doc, fieldName, val.getString(), false, false, DEFAULT_BOOST);
                        }
                        else
                        {
                           addStringValue(doc, fieldName, val.getString(), true, isIncludedInNodeIndex(name),
                              getPropertyBoost(name), useInExcerpt(name));
                        }
                     }
                     break;
                  case PropertyType.NAME :
                     // jcr:primaryType and jcr:mixinTypes are required for correct
                     // node type resolution in queries
                     if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE)
                        || name.equals(Constants.JCR_MIXINTYPES))
                     {
                        addNameValue(doc, fieldName, val.getString());
                     }
                     break;
                  case ExtendedPropertyType.PERMISSION :
                     break;
                  default :
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.core.value.ExtendedValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.