Examples of ProviderRef


Examples of com.assaydepot.result.ProviderRef

    }
    return rootNode;
  }
 
  private List<ProviderRef> doProviderRefs( JsonNode pRefNode ) {
    ProviderRef newRef = null;
    int numRefs = pRefNode.size();
    JsonNode node = null;
    List<ProviderRef> providerRefs = new ArrayList<ProviderRef>();
    for( int i=0; i < numRefs; i++ ) {
      node = pRefNode.get( i );
      newRef = new ProviderRef();
      newRef.setId( node.path("id").getTextValue() );
      newRef.setSlug( node.path("slug").getTextValue() );
      newRef.setName( node.path("name").getTextValue() );
      newRef.setSnippet( node.path("snippet").getTextValue() );
      newRef.setPermission( node.path("permission").getTextValue() );
      newRef.setScore( node.path("score").getDoubleValue() );
      newRef.setLocations( doLocations( node.path( "locations" )));
      newRef.setUrls( doStringMap( node.path( "urls" ) ));
     
      providerRefs.add( newRef );
    }
    return providerRefs;
  }
View Full Code Here

Examples of com.assaydepot.result.ProviderRef

   * @param results
   * @throws JsonParseException
   * @throws IOException
   */
  private void getProviderRefs( JsonParser jp, Results results ) throws JsonParseException, IOException  {
    ProviderRef pRef = null
    String fieldName = null;
    while (jp.nextToken() != JsonToken.END_ARRAY ) {
      pRef = new ProviderRef();
      pRef.setLocations( new ArrayList<Map<String,String>>() );
     
      while (jp.nextToken() != JsonToken.END_OBJECT ) {
        fieldName = jp.getCurrentName();
        if( "id".equals( fieldName )) {
          pRef.setId( jp.getText() );
        } else if( "slug".equals( fieldName )) {
          pRef.setSlug( jp.getText() );
        } else if( "name".equals( fieldName )) {
          pRef.setName( jp.getText() );
        } else if( "snippet".equals( fieldName )) {
          pRef.setSnippet( jp.getText() );
        } else if( "permission".equals( fieldName )) {
          pRef.setPermission( jp.getText() );
        } else if( "score".equals( fieldName )) {
//          pRef.setScore( jp.getFloatValue() );
        } else if( "locations".equals( fieldName )) {
          getLocations( jp, pRef );
        } else if( "urls".equals( fieldName )) {
View Full Code Here

Examples of com.assaydepot.result.ProviderRef

   * @param results
   * @throws JsonParseException
   * @throws IOException
   */
  private void parseProviderRefs( JsonParser jp, Results results ) throws JsonParseException, IOException  {
    ProviderRef pRef = null
    String fieldName = null;
    while (jp.nextToken() != JsonToken.END_ARRAY ) {
      pRef = new ProviderRef();
      pRef.setLocations( new ArrayList<Map<String,String>>() );
     
      while (jp.nextToken() != JsonToken.END_OBJECT ) {
        fieldName = jp.getCurrentName();
        if( "id".equals( fieldName )) {
          pRef.setId( jp.getText() );
        } else if( "slug".equals( fieldName )) {
          pRef.setSlug( jp.getText() );
        } else if( "name".equals( fieldName )) {
          pRef.setName( jp.getText() );
        } else if( "snippet".equals( fieldName )) {
          pRef.setSnippet( jp.getText() );
        } else if( "permission".equals( fieldName )) {
          pRef.setPermission( jp.getText() );
        } else if( "score".equals( fieldName )) {
//          pRef.setScore( jp.getFloatValue() );
        } else if( "locations".equals( fieldName )) {
          getLocations( jp, pRef );
        } else if( "urls".equals( fieldName )) {
View Full Code Here

Examples of com.assaydepot.result.ProviderRef

    }
    return rootNode;
  }
 
  private List<ProviderRef> doProviderRefs( JsonNode pRefNode ) {
    ProviderRef newRef = null;
    int numRefs = pRefNode.size();
    JsonNode node = null;
    List<ProviderRef> providerRefs = new ArrayList<ProviderRef>();
    for( int i=0; i < numRefs; i++ ) {
      node = pRefNode.get( i );
      newRef = new ProviderRef();
      newRef.setId( node.path("id").getTextValue() );
      newRef.setSlug( node.path("slug").getTextValue() );
      newRef.setName( node.path("name").getTextValue() );
      newRef.setSnippet( node.path("snippet").getTextValue() );
      newRef.setPermission( node.path("permission").getTextValue() );
      newRef.setScore( node.path("score").getDoubleValue() );
      newRef.setLocations( doLocations( node.path( "locations" )));
      newRef.setUrls( doStringMap( node.path( "urls" ) ));
     
      providerRefs.add( newRef );
    }
    return providerRefs;
  }
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.