All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rapture.common.model.DocumentRepoConfig Maven / Gradle / Ivy

/**
 * The MIT License (MIT)
 *
 * Copyright (C) 2011-2016 Incapture Technologies LLC
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/**
 * This file is autogenerated and any changes will be overwritten.
 */

package rapture.common.model;

import rapture.common.*;
import rapture.object.Searchable;
import rapture.object.Storable;
import rapture.object.Debugable;
import rapture.common.version.ApiVersion;
import rapture.common.impl.jackson.JacksonUtil;
import java.util.HashSet;
import rapture.common.Scheme;
import rapture.object.Addressable;
import java.util.Set;
import rapture.common.model.IndexConfig;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* 
**/
@SuppressWarnings("all")
public class DocumentRepoConfig  implements RaptureTransferObject, Debugable ,Storable , Addressable, Searchable {
    /*
    *  Start of field 'description' (String) 
    */
    private String description;

    @JsonProperty("description")
    public String getDescription() {
       return description;
    }

    @JsonProperty("description")
    public void setDescription(String description) {
       this.description =  description ;
    }
    /*
    *  end of field 'description' (String) 
    */


    /*
    *  Start of field 'config' (String) 
    */
    private String config;

    @JsonProperty("config")
    public String getConfig() {
       return config;
    }

    @JsonProperty("config")
    public void setConfig(String config) {
       this.config =  config ;
    }
    /*
    *  end of field 'config' (String) 
    */


    /*
    *  Start of field 'authority' (String) 
    */
    private String authority;

    @JsonProperty("authority")
    public String getAuthority() {
       return authority;
    }

    @JsonProperty("authority")
    public void setAuthority(String authority) {
       this.authority =  authority ;
    }
    /*
    *  end of field 'authority' (String) 
    */


    /*
    *  Start of field 'idGenUri' (String) 
    */
    private String idGenUri;

    @JsonProperty("idGenUri")
    public String getIdGenUri() {
       return idGenUri;
    }

    @JsonProperty("idGenUri")
    public void setIdGenUri(String idGenUri) {
       this.idGenUri =  new RaptureURI(idGenUri, Scheme.IDGEN).toString() /* TODO remove toString */  ;
    }
    /*
    *  end of field 'idGenUri' (String) 
    */


    /*
    *  Start of field 'strictCheck' (Boolean) 
    */
    private Boolean strictCheck = true;

    @JsonProperty("strictCheck")
    public Boolean getStrictCheck() {
       return strictCheck;
    }

    @JsonProperty("strictCheck")
    public void setStrictCheck(Boolean strictCheck) {
       this.strictCheck =  strictCheck ;
    }
    /*
    *  end of field 'strictCheck' (Boolean) 
    */


    /*
    *  Start of field 'indexes' (Set) 
    */
    private Set indexes = new HashSet();

    @JsonProperty("indexes")
    public Set getIndexes() {
       return indexes;
    }

    @JsonProperty("indexes")
    public void setIndexes(Set indexes) {
       this.indexes =  indexes ;
    }
    /*
    *  end of field 'indexes' (Set) 
    */


    /*
    *  Start of field 'fullTextIndexes' (Set) 
    */
    private Set fullTextIndexes = new HashSet();

    @JsonProperty("fullTextIndexes")
    public Set getFullTextIndexes() {
       return fullTextIndexes;
    }

    @JsonProperty("fullTextIndexes")
    public void setFullTextIndexes(Set fullTextIndexes) {
       this.fullTextIndexes =  fullTextIndexes ;
    }
    /*
    *  end of field 'fullTextIndexes' (Set) 
    */


    /*
    *  Start of field 'updateQueue' (String) 
    */
    private String updateQueue;

    @JsonProperty("updateQueue")
    public String getUpdateQueue() {
       return updateQueue;
    }

    @JsonProperty("updateQueue")
    public void setUpdateQueue(String updateQueue) {
       this.updateQueue =  updateQueue ;
    }
    /*
    *  end of field 'updateQueue' (String) 
    */


    /*
    *  Start of field 'documentRepo' (RaptureDocConfig) 
    */
    private RaptureDocConfig documentRepo;

    @JsonProperty("documentRepo")
    public RaptureDocConfig getDocumentRepo() {
       return documentRepo;
    }

    @JsonProperty("documentRepo")
    public void setDocumentRepo(RaptureDocConfig documentRepo) {
       this.documentRepo =  documentRepo ;
    }
    /*
    *  end of field 'documentRepo' (RaptureDocConfig) 
    */


    /*
    *  Start of field 'deleted' (Boolean) 
    */
    private Boolean deleted = false;

    @JsonProperty("deleted")
    public Boolean getDeleted() {
       return deleted;
    }

    @JsonProperty("deleted")
    public void setDeleted(Boolean deleted) {
       this.deleted =  deleted ;
    }
    /*
    *  end of field 'deleted' (Boolean) 
    */


   
    //@Override
    public RaptureURI getAddressURI() {
        return new RaptureURI(getStoragePath(), Scheme.DOCUMENT);
    	// return new DOCUMENTURI(getStoragePath());
    	
    }

    public static final Scheme scheme = Scheme.DOCUMENT;
    //@Override
    public Scheme getScheme() {
    	return scheme;
    }	



    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((idGenUri == null) ? 0 : idGenUri.hashCode());
        result = prime * result + ((documentRepo == null) ? 0 : documentRepo.hashCode());
        result = prime * result + ((deleted == null) ? 0 : deleted.hashCode());
        result = prime * result + ((indexes == null) ? 0 : indexes.hashCode());
        result = prime * result + ((updateQueue == null) ? 0 : updateQueue.hashCode());
        result = prime * result + ((authority == null) ? 0 : authority.hashCode());
        result = prime * result + ((description == null) ? 0 : description.hashCode());
        result = prime * result + ((strictCheck == null) ? 0 : strictCheck.hashCode());
        result = prime * result + ((fullTextIndexes == null) ? 0 : fullTextIndexes.hashCode());
        result = prime * result + ((config == null) ? 0 : config.hashCode());
        return result;
    }


    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;
        if (getClass() != obj.getClass()) return false;
        
        DocumentRepoConfig other = (DocumentRepoConfig) obj;

        if (idGenUri == null) {
            if (other.idGenUri != null) {
                return false;
            }
        } else if (!idGenUri.equals(other.idGenUri)) {
            return false;
        }

        if (documentRepo == null) {
            if (other.documentRepo != null) {
                return false;
            }
        } else if (!documentRepo.equals(other.documentRepo)) {
            return false;
        }

        if (deleted == null) {
            if (other.deleted != null) {
                return false;
            }
        } else if (!deleted.equals(other.deleted)) {
            return false;
        }

        if (indexes == null) {
            if (other.indexes != null) {
                return false;
            }
        } else if (!indexes.equals(other.indexes)) {
            return false;
        }

        if (updateQueue == null) {
            if (other.updateQueue != null) {
                return false;
            }
        } else if (!updateQueue.equals(other.updateQueue)) {
            return false;
        }

        if (authority == null) {
            if (other.authority != null) {
                return false;
            }
        } else if (!authority.equals(other.authority)) {
            return false;
        }

        if (description == null) {
            if (other.description != null) {
                return false;
            }
        } else if (!description.equals(other.description)) {
            return false;
        }

        if (strictCheck == null) {
            if (other.strictCheck != null) {
                return false;
            }
        } else if (!strictCheck.equals(other.strictCheck)) {
            return false;
        }

        if (fullTextIndexes == null) {
            if (other.fullTextIndexes != null) {
                return false;
            }
        } else if (!fullTextIndexes.equals(other.fullTextIndexes)) {
            return false;
        }

        if (config == null) {
            if (other.config != null) {
                return false;
            }
        } else if (!config.equals(other.config)) {
            return false;
        }

           
        return true;
    }


    /**/
    public String debug() {
        StringBuilder sb = new StringBuilder();
            {
                sb.append(" idGenUri= ");
                Object o = idGenUri;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" documentRepo= ");
                Object o = documentRepo;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" deleted= ");
                Object o = deleted;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" indexes= ");
                Object o = indexes;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" updateQueue= ");
                Object o = updateQueue;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" authority= ");
                Object o = authority;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" description= ");
                Object o = description;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" strictCheck= ");
                Object o = strictCheck;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" fullTextIndexes= ");
                Object o = fullTextIndexes;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" config= ");
                Object o = config;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

        return sb.append("\n").toString();
    }


    @Override
    public String getStoragePath() {
     // Add key fields
      return new DocumentRepoConfigPathBuilder()
        .authority(getAuthority())
        .buildStoragePath();
    }
    
    @Override
    public RaptureURI getStorageLocation() {
       return new DocumentRepoConfigPathBuilder()
         .authority(getAuthority())
         .buildStorageLocation();
    }
    
    
    private Boolean ftsIndex = true;
    private String ftsIndexRepo;
    
    @Override
    public Boolean getFtsIndex() {
    	return ftsIndex;
    }
    
    @Override
    public void setFtsIndex(boolean ftsIndex) {
    	this.ftsIndex = ftsIndex;
   	}
    
    @Override
    public String getFtsIndexRepo() {
        return ftsIndexRepo;
    }
    
    @Override
    public void setFtsIndexRepo(String ftsIndexRepo) {
    	this.ftsIndexRepo = ftsIndexRepo;
    }
    


    @Override
    public String toString() {
        return JacksonUtil.jsonFromObject(this);
    }

    private ApiVersion _raptureVersion;

    @JsonProperty("_raptureVersion")
    public ApiVersion get_raptureVersion() {
        return _raptureVersion;
    }

    @JsonProperty("_raptureVersion")
    public void set_raptureVersion(ApiVersion _raptureVersion) {
        this._raptureVersion = _raptureVersion;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy