// Path: src/main/java/com/codefork/refine/resources/VIAFNameType.java
// public class VIAFNameType {
// 
//     private String id;
//     private String name;
// 
//     public VIAFNameType(String id, String name) {
//         this.id = id;
//         this.name = name;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if(obj instanceof VIAFNameType) {
//             VIAFNameType obj2 = (VIAFNameType) obj;
//             return obj2.getId().equals(getId())
//                     && obj2.getName().equals(getName());
//         }
//         return false;
//     }
// }


import com.codefork.refine.resources.VIAFNameType;

package com.codefork.refine;


/**
 * Different types of names. Note that this is for the application's internal
 * use; see VIAFNameType (and the asVIAFNameType() method in this enum) for a
 * class used to format data sent to VIAF.
 */
public enum NameType {
    Person("/people/person", "Person", "Personal", "local.personalNames all \"%s\""),
    Organization("/organization/organization", "Corporate Name", "Corporate", "local.corporateNames all \"%s\""),
    Location("/location/location", "Geographic Name", "Geographic", "local.geographicNames all \"%s\""),
    // can't find better freebase ids for these two
    Book("/book/book", "Work", "UniformTitleWork", "local.uniformTitleWorks all \"%s\""),
    Edition("/book/book edition", "Expression", "UniformTitleExpression", "local.uniformTitleExpressions all \"%s\"");

    // ids are from freebase identifier ns
    private final String id;
    private final String displayName;
    private final String viafCode;
    private final String cqlString;

    NameType(String id, String displayName, String viafCode, String cqlString) {
       this.id = id;
       this.displayName = displayName;
       this.viafCode = viafCode;
       this.cqlString = cqlString;
    }

    public String getId() {
        return id;
    }

    public String getDisplayName() {
        return displayName;
    }

    public String getViafCode() {
        return viafCode;
    }

    public String getCqlString() {
        return cqlString;
    }

// Path: src/main/java/com/codefork/refine/resources/VIAFNameType.java
// public class VIAFNameType {
// 
//     private String id;
//     private String name;
// 
//     public VIAFNameType(String id, String name) {
//         this.id = id;
//         this.name = name;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if(obj instanceof VIAFNameType) {
//             VIAFNameType obj2 = (VIAFNameType) obj;
//             return obj2.getId().equals(getId())
//                     && obj2.getName().equals(getName());
//         }
//         return false;
//     }
// }


// Path: src/main/java/com/codefork/refine/NameType.java
import com.codefork.refine.resources.VIAFNameType;


package com.codefork.refine;


/**
 * Different types of names. Note that this is for the application's internal
 * use; see VIAFNameType (and the asVIAFNameType() method in this enum) for a
 * class used to format data sent to VIAF.
 */
public enum NameType {
    Person("/people/person", "Person", "Personal", "local.personalNames all \"%s\""),
    Organization("/organization/organization", "Corporate Name", "Corporate", "local.corporateNames all \"%s\""),
    Location("/location/location", "Geographic Name", "Geographic", "local.geographicNames all \"%s\""),
    // can't find better freebase ids for these two
    Book("/book/book", "Work", "UniformTitleWork", "local.uniformTitleWorks all \"%s\""),
    Edition("/book/book edition", "Expression", "UniformTitleExpression", "local.uniformTitleExpressions all \"%s\"");

    // ids are from freebase identifier ns
    private final String id;
    private final String displayName;
    private final String viafCode;
    private final String cqlString;

    NameType(String id, String displayName, String viafCode, String cqlString) {
       this.id = id;
       this.displayName = displayName;
       this.viafCode = viafCode;
       this.cqlString = cqlString;
    }

    public String getId() {
        return id;
    }

    public String getDisplayName() {
        return displayName;
    }

    public String getViafCode() {
        return viafCode;
    }

    public String getCqlString() {
        return cqlString;
    }

    public VIAFNameType asVIAFNameType() {