// Path: src/main/java/com/codefork/refine/resources/Result.java
// public class Result {
//     
//     private String id;
//     private String name;
// 
//     /**
//      * It's weird that this is a list but that's what OpenRefine expects.
//      * A VIAF result only ever has one type, but maybe other reconciliation
//      * services return multiple types for a name?
//      */
//     private List<NameType> type;
//     private double score;
//     private boolean match;
// 
//     public Result() {
//     }
// 
//     public Result(String id, String name, NameType nameType, double score, boolean match) {
//         this.id = id;
//         this.name = name;
//         this.type = new ArrayList<>();
//         this.type.add(nameType);
//         this.score = score;
//         this.match = match;
//     }
// 
//     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;
//     }
// 
//     public List<NameType> getType() {
//         return type;
//     }
// 
//     public void setType(List<NameType> resultType) {
//         this.type = resultType;
//     }
// 
//     public double getScore() {
//         return score;
//     }
// 
//     public void setScore(double score) {
//         this.score = score;
//     }
// 
//     public boolean isMatch() {
//         return match;
//     }
// 
//     public void setMatch(boolean match) {
//         this.match = match;
//     }
// 
// }


import com.codefork.refine.resources.Result;
import java.util.List;
package com.codefork.refine;



/**
 */
public class SearchResult {

    public enum ErrorType {
        UNKNOWN, TOO_MANY_REQUESTS
    }

    private String key;
    private List<Result> results;
    private ErrorType errorType;

    public SearchResult(String key, List<Result> results) {
        this.key = key;
        this.results = results;
    }

    public SearchResult(String key, ErrorType errorType) {
        this.key = key;
        this.errorType = errorType;
    }

    public String getKey() {
        return key;
    }

    public List<Result> getResults() {
        return results;
    }

    public boolean isSuccessful() {
// Path: src/main/java/com/codefork/refine/resources/Result.java
// public class Result {
//     
//     private String id;
//     private String name;
// 
//     /**
//      * It's weird that this is a list but that's what OpenRefine expects.
//      * A VIAF result only ever has one type, but maybe other reconciliation
//      * services return multiple types for a name?
//      */
//     private List<NameType> type;
//     private double score;
//     private boolean match;
// 
//     public Result() {
//     }
// 
//     public Result(String id, String name, NameType nameType, double score, boolean match) {
//         this.id = id;
//         this.name = name;
//         this.type = new ArrayList<>();
//         this.type.add(nameType);
//         this.score = score;
//         this.match = match;
//     }
// 
//     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;
//     }
// 
//     public List<NameType> getType() {
//         return type;
//     }
// 
//     public void setType(List<NameType> resultType) {
//         this.type = resultType;
//     }
// 
//     public double getScore() {
//         return score;
//     }
// 
//     public void setScore(double score) {
//         this.score = score;
//     }
// 
//     public boolean isMatch() {
//         return match;
//     }
// 
//     public void setMatch(boolean match) {
//         this.match = match;
//     }
// 
// }


// Path: src/main/java/com/codefork/refine/SearchResult.java
import com.codefork.refine.resources.Result;
import java.util.List;

package com.codefork.refine;



/**
 */
public class SearchResult {

    public enum ErrorType {
        UNKNOWN, TOO_MANY_REQUESTS
    }

    private String key;
    private List<Result> results;
    private ErrorType errorType;

    public SearchResult(String key, List<Result> results) {
        this.key = key;
        this.results = results;
    }

    public SearchResult(String key, ErrorType errorType) {
        this.key = key;
        this.errorType = errorType;
    }

    public String getKey() {
        return key;
    }

    public List<Result> getResults() {
        return results;
    }

    public boolean isSuccessful() {
        return errorType == null;