Examples of toObject()


Examples of org.apache.solr.schema.FieldType.toObject()

        FieldType groupFieldType = groupField.getType();
        for (GroupDocs<String> group : topGroups.groups) {
          SimpleOrderedMap<Object> groupResult = new SimpleOrderedMap<Object>();
          if (group.groupValue != null) {
            groupResult.add(
                "groupValue", groupFieldType.toObject(groupField.createField(group.groupValue, 0.0f))
            );
          } else {
            groupResult.add("groupValue", null);
          }
          SolrDocumentList docList = new SolrDocumentList();
View Full Code Here

Examples of org.apache.solr.schema.FieldType.toObject()

          Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup();
          SchemaField field = sortWithinGroup.getSort()[j].getField() != null ? rb.req.getSearcher().getSchema().getFieldOrNull(sortWithinGroup.getSort()[j].getField()) : null;
          if (field != null) {
            FieldType fieldType = field.getType();
            if (sortValue instanceof String) {
              sortValue = fieldType.toObject(field.createField(fieldType.indexedToReadable((String) sortValue), 0.0f));
            }
          }
          convertedSortValues[j] = sortValue;
        }
        //System.out.println("######### serializeTopGroups:"+convertedSortValues.length);
View Full Code Here

Examples of org.apache.solr.schema.FieldType.toObject()

        Sort groupSort = rb.getGroupingSpec().getGroupSort();
        SchemaField field = groupSort.getSort()[j].getField() != null ? rb.req.getSearcher().getSchema().getFieldOrNull(groupSort.getSort()[j].getField()) : null;
        if (field != null) {
          FieldType fieldType = field.getType();
          if (sortValue instanceof String) {
            sortValue = fieldType.toObject(field.createField(fieldType.indexedToReadable((String) sortValue), 0.0f));
          }
        }
        convertedSortValues[j] = sortValue;
      }
      //System.out.println("######### serializeTopDocs:"+convertedSortValues.length);
View Full Code Here

Examples of org.apache.solr.schema.FieldType.toObject()

        else
          val = f.stringValue();
      } else {
        try {
          if (BinaryResponseWriter.KNOWN_TYPES.contains(ft.getClass())) {
            val = ft.toObject(f);
          } else {
            val = ft.toExternal(f);
          }
        } catch (Exception e) {
          // There is a chance of the underlying field not really matching the
View Full Code Here

Examples of org.apache.solr.schema.FieldType.toObject()

        Comparable sortValue = (Comparable) searchGroup.sortValues[i];
        SchemaField field = groupSort.getSort()[i].getField() != null ? searcher.getSchema().getFieldOrNull(groupSort.getSort()[i].getField()) : null;
        if (field != null) {
          FieldType fieldType = field.getType();
          if (sortValue instanceof String) {
            sortValue = (Comparable) fieldType.toObject(field.createField(fieldType.indexedToReadable((String) sortValue), 0.0f));
          }
        }
        convertedSortValues[i] = sortValue;
      }
      String groupValue = searchGroup.groupValue != null ? searchGroup.groupValue : null;
View Full Code Here

Examples of org.apache.struts2.rest.handler.ContentTypeHandler.toObject()

        }
       
        if (request.getContentLength() > 0) {
            InputStream is = request.getInputStream();
            InputStreamReader reader = new InputStreamReader(is);
            handler.toObject(reader, target);
        }
        return invocation.invoke();
    }

}
View Full Code Here

Examples of org.auto.json.JsonDeserializer.toObject()

    array.add(new JsonObject());

    String jsonString = jsonSerializer.toJsonString(person);

    JsonDeserializer deserializer = new JsonDeserializer();
    Person dperson = (Person) deserializer.toObject(jsonString,
        Person.class);

    System.out.println(jsonString);
    System.out.println(jsonSerializer.toJsonString(dperson));
  }
View Full Code Here

Examples of org.datanucleus.store.types.ObjectLongConverter.toObject()

        }
        else if (longConv != null)
        {
            // Persisted as a Long, so convert back
            Long longValue = (Long)value;
            returnValue = longConv.toObject(longValue);
        }

        if (sm != null)
        {
            // Wrap if SCO
View Full Code Here

Examples of org.datanucleus.store.types.ObjectStringConverter.toObject()

        Object returnValue = value;
        if (strConv != null)
        {
            // Persisted as a String, so convert back
            String strValue = (String)value;
            returnValue = strConv.toObject(strValue);
        }
        else if (longConv != null)
        {
            // Persisted as a Long, so convert back
            Long longValue = (Long)value;
View Full Code Here

Examples of org.geoserver.rest.format.DataFormat.toObject()

     * @see #handleObjectPost(Object)
     */
    @Override
    public final void handlePost() {
        DataFormat format = getFormatPostOrPut();
        Object object = format.toObject( getRequest().getEntity() );
        String location = null;
        try {
            location = handleObjectPost(object);
        }
        catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.