agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/search/MetadataValidation.java
/**
     * Parse response from uuid validation to {@link AssociatedReference}
     *
     * @param validationResponse JSON String response
     * @return {@link AssociatedReference} with valid uuid and links
     * @throws MetadataException if unable to create valid {@link AssociatedReference}
     */
Parse response from uuid validation to  AssociatedReference
@param validationResponse JSON String response
@return  AssociatedReference with valid uuid and links
@throws MetadataException if unable to create valid  AssociatedReference
Parse response from uuid validation to AssociatedReference @param validationResponse JSON String response @return AssociatedReference with valid uuid and links @throws MetadataException if unable to create valid AssociatedReference
public AssociatedReference parseValidationResponse(String validationResponse) throws MetadataException {
        try {
            JSONObject jsonObject = new JSONObject(validationResponse);
            AgaveUUID uuid = new AgaveUUID(jsonObject.getString("uuid"));
            String title = jsonObject.getString("type");
            String links = jsonObject.getJSONObject("_links")
                    .getJSONObject("self")
                    .getString("href");
            return new AssociatedReference(uuid, links);
        } catch (JSONException e) {
            throw new MetadataException("Invalid Json response ", e);
        } catch (UUIDException e) {
            throw new MetadataException("Invalid uuid value ", e);
        }
    }
public AssociatedReference parseValidationResponse ( String validationResponse ) throws MetadataException { try { JSONObject jsonObject = new JSONObject ( validationResponse ) ; AgaveUUID uuid = new AgaveUUID ( jsonObject . getString ( "uuid" ) ) ; String title = jsonObject . getString ( "type" ) ; String links = jsonObject . getJSONObject ( "_links" ) . getJSONObject ( "self" ) . getString ( "href" ) ; return new AssociatedReference ( uuid , links ) ; } catch ( JSONException e ) { throw new MetadataException ( "Invalid Json response " , e ) ; } catch ( UUIDException e ) { throw new MetadataException ( "Invalid uuid value " , e ) ; } }
Parse response from uuid validation to {@link AssociatedReference}
 @param validationResponse JSON String response
 @return {@link AssociatedReference} with valid uuid and links
 @throws MetadataException if unable to create valid {@link AssociatedReference}
Parse response from uuid validation to { @link AssociatedReference } @param validationResponse JSON String response @return { @link AssociatedReference } with valid uuid and links @throws MetadataException if unable to create valid { @link AssociatedReference }