/*
 */
package org.datadryad.rest.models;

import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.datadryad.rest.storage.StoragePath;

/**
 *
 * @author Dan Leehr <dan.leehr@nescent.org>
 */
@XmlRootElement
public class Organization {
    public static final String ORGANIZATION_CODE = "organizationCode";

    /**
     * Extracts the organizationCode from a StoragePath
     * @param path the StoragePath
     * @return the value of the path key for "organizationCode", or null if not found
     */
    public static String getOrganizationCode(StoragePath path) {
        int index = path.getKeyPath().indexOf(Organization.ORGANIZATION_CODE);
        if (index != -1) {
            return path.getValuePath().get(index);
        } else {
            return null;
        }
    }
    public Integer organizationId;
    public String organizationCode;
    public String organizationName;
    @JsonIgnore
    public Boolean isValid() {
        return (organizationCode != null && organizationCode.length() > 0);
    }
}

@@ -356,482 +356,8 @@
 de%22;
-%0A%0A    /**%0A     * Extracts the organizationCode from a StoragePath%0A     * @param path the StoragePath%0A     * @return the value of the path key for %22organizationCode%22, or null if not found%0A     */%0A    public static String getOrganizationCode(StoragePath path) %7B%0A        int index = path.getKeyPath().indexOf(Organization.ORGANIZATION_CODE);%0A        if (index != -1) %7B%0A            return path.getValuePath().get(index);%0A        %7D else %7B%0A            return null;%0A        %7D%0A    %7D
 %0A   

Remove unnecessary getOrganizationCode method