Examples of readValueAs()


Examples of com.fasterxml.jackson.core.JsonParser.readValueAs()

            // pass in our objectCodec so that the subJsonParser knows about our configured Modules and Annotations
            JsonParser subJsonParser = root.traverse( jp.getCodec() );

            // Determine the "type" of filter we are dealing with Real or Logical and specify type
            if ( "OR".equals( value ) || "AND".equals( value ) ) {
                return subJsonParser.readValueAs( LogicalFilter1.class );
            }
            else {
                return subJsonParser.readValueAs( RealFilter.class );
            }
        }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonParser.readValueAs()

            // Determine the "type" of filter we are dealing with Real or Logical and specify type
            if ( "OR".equals( value ) || "AND".equals( value ) ) {
                return subJsonParser.readValueAs( LogicalFilter1.class );
            }
            else {
                return subJsonParser.readValueAs( RealFilter.class );
            }
        }
    }

    @Test
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonParser.readValueAs()

                throw new RuntimeException( "Invalid format of LogicalFilter encountered." );
            }

            // pass in our objectCodec so that the subJsonParser knows about our configured Modules and Annotations
            JsonParser subJsonParser = arrayNode.traverse( objectCodec );
            List<QueryFilter4> childrenQueryFilters = subJsonParser.readValueAs( new TypeReference<List<QueryFilter4>>() {} );

            return new LogicalFilter4( QueryParam.valueOf( key ), childrenQueryFilters );
        }
    }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonParser.readValueAs()

            JsonParser subJsonParser = root.traverse( jp.getCodec() );

            // Check if it is a "RealFilter"
            JsonNode queryParam = root.get("queryParam");
            if ( queryParam != null && queryParam.isValueNode() ) {
                return subJsonParser.readValueAs( RealFilter.class );
            }
            else {
                return subJsonParser.readValueAs( LogicalFilter3.class );
            }
        }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonParser.readValueAs()

            JsonNode queryParam = root.get("queryParam");
            if ( queryParam != null && queryParam.isValueNode() ) {
                return subJsonParser.readValueAs( RealFilter.class );
            }
            else {
                return subJsonParser.readValueAs( LogicalFilter3.class );
            }
        }
    }

    @Test
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonParser.readValueAs()

                throw new RuntimeException( "Invalid format of LogicalFilter encountered." );
            }

            // pass in our objectCodec so that the subJsonParser knows about our configured Modules and Annotations
            JsonParser subJsonParser = arrayNode.traverse( objectCodec );
            List<QueryFilter> childrenQueryFilters = subJsonParser.readValueAs( new TypeReference<List<QueryFilter>>() {} );

            return new LogicalFilter3( QueryParam.valueOf( key ), childrenQueryFilters );
        }
    }
View Full Code Here

Examples of org.apache.hadoop.util.CoronaSerializer.readValueAs()

    // Expecting the START_OBJECT token for ClusterManager
    coronaSerializer.readStartObjectToken("ClusterManager");

    coronaSerializer.readField("startTime");
    startTime = coronaSerializer.readValueAs(Long.class);

    coronaSerializer.readField("nodeManager");
    nodeManager = new NodeManager(this, hostsReader, coronaSerializer);
    nodeManager.setConf(conf);
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAs()

                    if (columnFamily.getColumnFamilyType() == ColumnFamilyType.Super)
                    {
                        throw new RuntimeException("Can't write Standard columns to the Super Column Family.");
                    }

                    List<?> columns = parser.readValueAs(new TypeReference<List<?>>() {});
                    addToStandardCF(columns, columnFamily);
                }
                else if (tokenName.equals("START_OBJECT"))
                {
                    if (columnFamily.getColumnFamilyType() == ColumnFamilyType.Standard)
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAs()

                    if (columnFamily.getColumnFamilyType() == ColumnFamilyType.Standard)
                    {
                        throw new RuntimeException("Can't write Super columns to the Standard Column Family.");
                    }

                    Map<?, ?> columns = parser.readValueAs(new TypeReference<Map<?, ?>>() {});
                    addToSuperCF(columns, columnFamily);
                }
                else
                {
                    throw new UnsupportedOperationException("Only Array or Hash allowed as row content.");
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.readValueAs()

                    if (columnFamily.getType() == ColumnFamilyType.Super)
                    {
                        throw new RuntimeException("Can't write Standard columns to the Super Column Family.");
                    }

                    List<?> columns = parser.readValueAs(new TypeReference<List<?>>() {});
                    addToStandardCF(columns, columnFamily);
                }
                else if (tokenName.equals("START_OBJECT"))
                {
                    if (columnFamily.getType() == ColumnFamilyType.Standard)
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.