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

org.intermine.model.bio.GeneShadow Maven / Gradle / Ivy

The newest version!
package org.intermine.model.bio;

import org.intermine.objectstore.ObjectStore;
import org.intermine.objectstore.intermine.NotXmlParser;
import org.intermine.objectstore.intermine.NotXmlRenderer;
import org.intermine.objectstore.proxy.ProxyCollection;
import org.intermine.objectstore.proxy.ProxyReference;
import org.intermine.model.StringConstructor;
import org.intermine.metadata.TypeUtil;
import org.intermine.util.DynamicUtil;
import org.intermine.model.ShadowClass;

public class GeneShadow implements Gene, ShadowClass
{
    public static final Class shadowOf = Gene.class;
    // Attr: org.intermine.model.bio.Gene.briefDescription
    protected java.lang.String briefDescription;
    public java.lang.String getBriefDescription() { return briefDescription; }
    public void setBriefDescription(final java.lang.String briefDescription) { this.briefDescription = briefDescription; }

    // Attr: org.intermine.model.bio.Gene.description
    protected java.lang.String description;
    public java.lang.String getDescription() { return description; }
    public void setDescription(final java.lang.String description) { this.description = description; }

    // Ref: org.intermine.model.bio.Gene.upstreamIntergenicRegion
    protected org.intermine.model.InterMineObject upstreamIntergenicRegion;
    public org.intermine.model.bio.IntergenicRegion getUpstreamIntergenicRegion() { if (upstreamIntergenicRegion instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.IntergenicRegion) ((org.intermine.objectstore.proxy.ProxyReference) upstreamIntergenicRegion).getObject()); }; return (org.intermine.model.bio.IntergenicRegion) upstreamIntergenicRegion; }
    public void setUpstreamIntergenicRegion(final org.intermine.model.bio.IntergenicRegion upstreamIntergenicRegion) { this.upstreamIntergenicRegion = upstreamIntergenicRegion; }
    public void proxyUpstreamIntergenicRegion(final org.intermine.objectstore.proxy.ProxyReference upstreamIntergenicRegion) { this.upstreamIntergenicRegion = upstreamIntergenicRegion; }
    public org.intermine.model.InterMineObject proxGetUpstreamIntergenicRegion() { return upstreamIntergenicRegion; }

    // Ref: org.intermine.model.bio.Gene.downstreamIntergenicRegion
    protected org.intermine.model.InterMineObject downstreamIntergenicRegion;
    public org.intermine.model.bio.IntergenicRegion getDownstreamIntergenicRegion() { if (downstreamIntergenicRegion instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.IntergenicRegion) ((org.intermine.objectstore.proxy.ProxyReference) downstreamIntergenicRegion).getObject()); }; return (org.intermine.model.bio.IntergenicRegion) downstreamIntergenicRegion; }
    public void setDownstreamIntergenicRegion(final org.intermine.model.bio.IntergenicRegion downstreamIntergenicRegion) { this.downstreamIntergenicRegion = downstreamIntergenicRegion; }
    public void proxyDownstreamIntergenicRegion(final org.intermine.objectstore.proxy.ProxyReference downstreamIntergenicRegion) { this.downstreamIntergenicRegion = downstreamIntergenicRegion; }
    public org.intermine.model.InterMineObject proxGetDownstreamIntergenicRegion() { return downstreamIntergenicRegion; }

    // Col: org.intermine.model.bio.Gene.flankingRegions
    protected java.util.Set flankingRegions = new java.util.HashSet();
    public java.util.Set getFlankingRegions() { return flankingRegions; }
    public void setFlankingRegions(final java.util.Set flankingRegions) { this.flankingRegions = flankingRegions; }
    public void addFlankingRegions(final org.intermine.model.bio.GeneFlankingRegion arg) { flankingRegions.add(arg); }

    // Col: org.intermine.model.bio.Gene.introns
    protected java.util.Set introns = new java.util.HashSet();
    public java.util.Set getIntrons() { return introns; }
    public void setIntrons(final java.util.Set introns) { this.introns = introns; }
    public void addIntrons(final org.intermine.model.bio.Intron arg) { introns.add(arg); }

    // Col: org.intermine.model.bio.Gene.proteins
    protected java.util.Set proteins = new java.util.HashSet();
    public java.util.Set getProteins() { return proteins; }
    public void setProteins(final java.util.Set proteins) { this.proteins = proteins; }
    public void addProteins(final org.intermine.model.bio.Protein arg) { proteins.add(arg); }

    // Col: org.intermine.model.bio.Gene.CDSs
    protected java.util.Set CDSs = new java.util.HashSet();
    public java.util.Set getcDSs() { return CDSs; }
    public void setcDSs(final java.util.Set CDSs) { this.CDSs = CDSs; }
    public void addcDSs(final org.intermine.model.bio.CDS arg) { CDSs.add(arg); }

    // Col: org.intermine.model.bio.Gene.homologues
    protected java.util.Set homologues = new java.util.HashSet();
    public java.util.Set getHomologues() { return homologues; }
    public void setHomologues(final java.util.Set homologues) { this.homologues = homologues; }
    public void addHomologues(final org.intermine.model.bio.Homologue arg) { homologues.add(arg); }

    // Col: org.intermine.model.bio.Gene.exons
    protected java.util.Set exons = new java.util.HashSet();
    public java.util.Set getExons() { return exons; }
    public void setExons(final java.util.Set exons) { this.exons = exons; }
    public void addExons(final org.intermine.model.bio.Exon arg) { exons.add(arg); }

    // Col: org.intermine.model.bio.Gene.UTRs
    protected java.util.Set UTRs = new java.util.HashSet();
    public java.util.Set getuTRs() { return UTRs; }
    public void setuTRs(final java.util.Set UTRs) { this.UTRs = UTRs; }
    public void adduTRs(final org.intermine.model.bio.UTR arg) { UTRs.add(arg); }

    // Attr: org.intermine.model.bio.SequenceFeature.score
    protected java.lang.Double score;
    public java.lang.Double getScore() { return score; }
    public void setScore(final java.lang.Double score) { this.score = score; }

    // Attr: org.intermine.model.bio.SequenceFeature.scoreType
    protected java.lang.String scoreType;
    public java.lang.String getScoreType() { return scoreType; }
    public void setScoreType(final java.lang.String scoreType) { this.scoreType = scoreType; }

    // Attr: org.intermine.model.bio.SequenceFeature.length
    protected java.lang.Integer length;
    public java.lang.Integer getLength() { return length; }
    public void setLength(final java.lang.Integer length) { this.length = length; }

    // Ref: org.intermine.model.bio.SequenceFeature.strain
    protected org.intermine.model.InterMineObject strain;
    public org.intermine.model.bio.Strain getStrain() { if (strain instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Strain) ((org.intermine.objectstore.proxy.ProxyReference) strain).getObject()); }; return (org.intermine.model.bio.Strain) strain; }
    public void setStrain(final org.intermine.model.bio.Strain strain) { this.strain = strain; }
    public void proxyStrain(final org.intermine.objectstore.proxy.ProxyReference strain) { this.strain = strain; }
    public org.intermine.model.InterMineObject proxGetStrain() { return strain; }

    // Ref: org.intermine.model.bio.SequenceFeature.sequenceOntologyTerm
    protected org.intermine.model.InterMineObject sequenceOntologyTerm;
    public org.intermine.model.bio.SOTerm getSequenceOntologyTerm() { if (sequenceOntologyTerm instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.SOTerm) ((org.intermine.objectstore.proxy.ProxyReference) sequenceOntologyTerm).getObject()); }; return (org.intermine.model.bio.SOTerm) sequenceOntologyTerm; }
    public void setSequenceOntologyTerm(final org.intermine.model.bio.SOTerm sequenceOntologyTerm) { this.sequenceOntologyTerm = sequenceOntologyTerm; }
    public void proxySequenceOntologyTerm(final org.intermine.objectstore.proxy.ProxyReference sequenceOntologyTerm) { this.sequenceOntologyTerm = sequenceOntologyTerm; }
    public org.intermine.model.InterMineObject proxGetSequenceOntologyTerm() { return sequenceOntologyTerm; }

    // Ref: org.intermine.model.bio.SequenceFeature.chromosomeLocation
    protected org.intermine.model.InterMineObject chromosomeLocation;
    public org.intermine.model.bio.Location getChromosomeLocation() { if (chromosomeLocation instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Location) ((org.intermine.objectstore.proxy.ProxyReference) chromosomeLocation).getObject()); }; return (org.intermine.model.bio.Location) chromosomeLocation; }
    public void setChromosomeLocation(final org.intermine.model.bio.Location chromosomeLocation) { this.chromosomeLocation = chromosomeLocation; }
    public void proxyChromosomeLocation(final org.intermine.objectstore.proxy.ProxyReference chromosomeLocation) { this.chromosomeLocation = chromosomeLocation; }
    public org.intermine.model.InterMineObject proxGetChromosomeLocation() { return chromosomeLocation; }

    // Ref: org.intermine.model.bio.SequenceFeature.sequence
    protected org.intermine.model.InterMineObject sequence;
    public org.intermine.model.bio.Sequence getSequence() { if (sequence instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Sequence) ((org.intermine.objectstore.proxy.ProxyReference) sequence).getObject()); }; return (org.intermine.model.bio.Sequence) sequence; }
    public void setSequence(final org.intermine.model.bio.Sequence sequence) { this.sequence = sequence; }
    public void proxySequence(final org.intermine.objectstore.proxy.ProxyReference sequence) { this.sequence = sequence; }
    public org.intermine.model.InterMineObject proxGetSequence() { return sequence; }

    // Ref: org.intermine.model.bio.SequenceFeature.chromosome
    protected org.intermine.model.InterMineObject chromosome;
    public org.intermine.model.bio.Chromosome getChromosome() { if (chromosome instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Chromosome) ((org.intermine.objectstore.proxy.ProxyReference) chromosome).getObject()); }; return (org.intermine.model.bio.Chromosome) chromosome; }
    public void setChromosome(final org.intermine.model.bio.Chromosome chromosome) { this.chromosome = chromosome; }
    public void proxyChromosome(final org.intermine.objectstore.proxy.ProxyReference chromosome) { this.chromosome = chromosome; }
    public org.intermine.model.InterMineObject proxGetChromosome() { return chromosome; }

    // Col: org.intermine.model.bio.SequenceFeature.overlappingFeatures
    protected java.util.Set overlappingFeatures = new java.util.HashSet();
    public java.util.Set getOverlappingFeatures() { return overlappingFeatures; }
    public void setOverlappingFeatures(final java.util.Set overlappingFeatures) { this.overlappingFeatures = overlappingFeatures; }
    public void addOverlappingFeatures(final org.intermine.model.bio.SequenceFeature arg) { overlappingFeatures.add(arg); }

    // Col: org.intermine.model.bio.SequenceFeature.childFeatures
    protected java.util.Set childFeatures = new java.util.HashSet();
    public java.util.Set getChildFeatures() { return childFeatures; }
    public void setChildFeatures(final java.util.Set childFeatures) { this.childFeatures = childFeatures; }
    public void addChildFeatures(final org.intermine.model.bio.SequenceFeature arg) { childFeatures.add(arg); }

    // Attr: org.intermine.model.bio.BioEntity.symbol
    protected java.lang.String symbol;
    public java.lang.String getSymbol() { return symbol; }
    public void setSymbol(final java.lang.String symbol) { this.symbol = symbol; }

    // Attr: org.intermine.model.bio.BioEntity.name
    protected java.lang.String name;
    public java.lang.String getName() { return name; }
    public void setName(final java.lang.String name) { this.name = name; }

    // Attr: org.intermine.model.bio.BioEntity.secondaryIdentifier
    protected java.lang.String secondaryIdentifier;
    public java.lang.String getSecondaryIdentifier() { return secondaryIdentifier; }
    public void setSecondaryIdentifier(final java.lang.String secondaryIdentifier) { this.secondaryIdentifier = secondaryIdentifier; }

    // Ref: org.intermine.model.bio.BioEntity.organism
    protected org.intermine.model.InterMineObject organism;
    public org.intermine.model.bio.Organism getOrganism() { if (organism instanceof org.intermine.objectstore.proxy.ProxyReference) { return ((org.intermine.model.bio.Organism) ((org.intermine.objectstore.proxy.ProxyReference) organism).getObject()); }; return (org.intermine.model.bio.Organism) organism; }
    public void setOrganism(final org.intermine.model.bio.Organism organism) { this.organism = organism; }
    public void proxyOrganism(final org.intermine.objectstore.proxy.ProxyReference organism) { this.organism = organism; }
    public org.intermine.model.InterMineObject proxGetOrganism() { return organism; }

    // Col: org.intermine.model.bio.BioEntity.locatedFeatures
    protected java.util.Set locatedFeatures = new java.util.HashSet();
    public java.util.Set getLocatedFeatures() { return locatedFeatures; }
    public void setLocatedFeatures(final java.util.Set locatedFeatures) { this.locatedFeatures = locatedFeatures; }
    public void addLocatedFeatures(final org.intermine.model.bio.Location arg) { locatedFeatures.add(arg); }

    // Col: org.intermine.model.bio.BioEntity.locations
    protected java.util.Set locations = new java.util.HashSet();
    public java.util.Set getLocations() { return locations; }
    public void setLocations(final java.util.Set locations) { this.locations = locations; }
    public void addLocations(final org.intermine.model.bio.Location arg) { locations.add(arg); }

    // Col: org.intermine.model.bio.BioEntity.synonyms
    protected java.util.Set synonyms = new java.util.HashSet();
    public java.util.Set getSynonyms() { return synonyms; }
    public void setSynonyms(final java.util.Set synonyms) { this.synonyms = synonyms; }
    public void addSynonyms(final org.intermine.model.bio.Synonym arg) { synonyms.add(arg); }

    // Col: org.intermine.model.bio.BioEntity.dataSets
    protected java.util.Set dataSets = new java.util.HashSet();
    public java.util.Set getDataSets() { return dataSets; }
    public void setDataSets(final java.util.Set dataSets) { this.dataSets = dataSets; }
    public void addDataSets(final org.intermine.model.bio.DataSet arg) { dataSets.add(arg); }

    // Col: org.intermine.model.bio.BioEntity.crossReferences
    protected java.util.Set crossReferences = new java.util.HashSet();
    public java.util.Set getCrossReferences() { return crossReferences; }
    public void setCrossReferences(final java.util.Set crossReferences) { this.crossReferences = crossReferences; }
    public void addCrossReferences(final org.intermine.model.bio.CrossReference arg) { crossReferences.add(arg); }

    // Attr: org.intermine.model.bio.Annotatable.primaryIdentifier
    protected java.lang.String primaryIdentifier;
    public java.lang.String getPrimaryIdentifier() { return primaryIdentifier; }
    public void setPrimaryIdentifier(final java.lang.String primaryIdentifier) { this.primaryIdentifier = primaryIdentifier; }

    // Col: org.intermine.model.bio.Annotatable.ontologyAnnotations
    protected java.util.Set ontologyAnnotations = new java.util.HashSet();
    public java.util.Set getOntologyAnnotations() { return ontologyAnnotations; }
    public void setOntologyAnnotations(final java.util.Set ontologyAnnotations) { this.ontologyAnnotations = ontologyAnnotations; }
    public void addOntologyAnnotations(final org.intermine.model.bio.OntologyAnnotation arg) { ontologyAnnotations.add(arg); }

    // Col: org.intermine.model.bio.Annotatable.publications
    protected java.util.Set publications = new java.util.HashSet();
    public java.util.Set getPublications() { return publications; }
    public void setPublications(final java.util.Set publications) { this.publications = publications; }
    public void addPublications(final org.intermine.model.bio.Publication arg) { publications.add(arg); }

    // Attr: org.intermine.model.InterMineObject.id
    protected java.lang.Integer id;
    public java.lang.Integer getId() { return id; }
    public void setId(final java.lang.Integer id) { this.id = id; }

    @Override public boolean equals(Object o) { return (o instanceof Gene && id != null) ? id.equals(((Gene)o).getId()) : this == o; }
    @Override public int hashCode() { return (id != null) ? id.hashCode() : super.hashCode(); }
    @Override public String toString() { return "Gene [briefDescription=" + (briefDescription == null ? "null" : "\"" + briefDescription + "\"") + ", chromosome=" + (chromosome == null ? "null" : (chromosome.getId() == null ? "no id" : chromosome.getId().toString())) + ", chromosomeLocation=" + (chromosomeLocation == null ? "null" : (chromosomeLocation.getId() == null ? "no id" : chromosomeLocation.getId().toString())) + ", description=" + (description == null ? "null" : "\"" + description + "\"") + ", downstreamIntergenicRegion=" + (downstreamIntergenicRegion == null ? "null" : (downstreamIntergenicRegion.getId() == null ? "no id" : downstreamIntergenicRegion.getId().toString())) + ", id=" + id + ", length=" + length + ", name=" + (name == null ? "null" : "\"" + name + "\"") + ", organism=" + (organism == null ? "null" : (organism.getId() == null ? "no id" : organism.getId().toString())) + ", primaryIdentifier=" + (primaryIdentifier == null ? "null" : "\"" + primaryIdentifier + "\"") + ", score=" + score + ", scoreType=" + (scoreType == null ? "null" : "\"" + scoreType + "\"") + ", secondaryIdentifier=" + (secondaryIdentifier == null ? "null" : "\"" + secondaryIdentifier + "\"") + ", sequence=" + (sequence == null ? "null" : (sequence.getId() == null ? "no id" : sequence.getId().toString())) + ", sequenceOntologyTerm=" + (sequenceOntologyTerm == null ? "null" : (sequenceOntologyTerm.getId() == null ? "no id" : sequenceOntologyTerm.getId().toString())) + ", strain=" + (strain == null ? "null" : (strain.getId() == null ? "no id" : strain.getId().toString())) + ", symbol=" + (symbol == null ? "null" : "\"" + symbol + "\"") + ", upstreamIntergenicRegion=" + (upstreamIntergenicRegion == null ? "null" : (upstreamIntergenicRegion.getId() == null ? "no id" : upstreamIntergenicRegion.getId().toString())) + "]"; }
    public Object getFieldValue(final String fieldName) throws IllegalAccessException {
        if ("briefDescription".equals(fieldName)) {
            return briefDescription;
        }
        if ("description".equals(fieldName)) {
            return description;
        }
        if ("upstreamIntergenicRegion".equals(fieldName)) {
            if (upstreamIntergenicRegion instanceof ProxyReference) {
                return ((ProxyReference) upstreamIntergenicRegion).getObject();
            } else {
                return upstreamIntergenicRegion;
            }
        }
        if ("downstreamIntergenicRegion".equals(fieldName)) {
            if (downstreamIntergenicRegion instanceof ProxyReference) {
                return ((ProxyReference) downstreamIntergenicRegion).getObject();
            } else {
                return downstreamIntergenicRegion;
            }
        }
        if ("flankingRegions".equals(fieldName)) {
            return flankingRegions;
        }
        if ("introns".equals(fieldName)) {
            return introns;
        }
        if ("proteins".equals(fieldName)) {
            return proteins;
        }
        if ("CDSs".equals(fieldName)) {
            return CDSs;
        }
        if ("homologues".equals(fieldName)) {
            return homologues;
        }
        if ("exons".equals(fieldName)) {
            return exons;
        }
        if ("UTRs".equals(fieldName)) {
            return UTRs;
        }
        if ("score".equals(fieldName)) {
            return score;
        }
        if ("scoreType".equals(fieldName)) {
            return scoreType;
        }
        if ("length".equals(fieldName)) {
            return length;
        }
        if ("strain".equals(fieldName)) {
            if (strain instanceof ProxyReference) {
                return ((ProxyReference) strain).getObject();
            } else {
                return strain;
            }
        }
        if ("sequenceOntologyTerm".equals(fieldName)) {
            if (sequenceOntologyTerm instanceof ProxyReference) {
                return ((ProxyReference) sequenceOntologyTerm).getObject();
            } else {
                return sequenceOntologyTerm;
            }
        }
        if ("chromosomeLocation".equals(fieldName)) {
            if (chromosomeLocation instanceof ProxyReference) {
                return ((ProxyReference) chromosomeLocation).getObject();
            } else {
                return chromosomeLocation;
            }
        }
        if ("sequence".equals(fieldName)) {
            if (sequence instanceof ProxyReference) {
                return ((ProxyReference) sequence).getObject();
            } else {
                return sequence;
            }
        }
        if ("chromosome".equals(fieldName)) {
            if (chromosome instanceof ProxyReference) {
                return ((ProxyReference) chromosome).getObject();
            } else {
                return chromosome;
            }
        }
        if ("overlappingFeatures".equals(fieldName)) {
            return overlappingFeatures;
        }
        if ("childFeatures".equals(fieldName)) {
            return childFeatures;
        }
        if ("symbol".equals(fieldName)) {
            return symbol;
        }
        if ("name".equals(fieldName)) {
            return name;
        }
        if ("secondaryIdentifier".equals(fieldName)) {
            return secondaryIdentifier;
        }
        if ("organism".equals(fieldName)) {
            if (organism instanceof ProxyReference) {
                return ((ProxyReference) organism).getObject();
            } else {
                return organism;
            }
        }
        if ("locatedFeatures".equals(fieldName)) {
            return locatedFeatures;
        }
        if ("locations".equals(fieldName)) {
            return locations;
        }
        if ("synonyms".equals(fieldName)) {
            return synonyms;
        }
        if ("dataSets".equals(fieldName)) {
            return dataSets;
        }
        if ("crossReferences".equals(fieldName)) {
            return crossReferences;
        }
        if ("primaryIdentifier".equals(fieldName)) {
            return primaryIdentifier;
        }
        if ("ontologyAnnotations".equals(fieldName)) {
            return ontologyAnnotations;
        }
        if ("publications".equals(fieldName)) {
            return publications;
        }
        if ("id".equals(fieldName)) {
            return id;
        }
        if (!org.intermine.model.bio.Gene.class.equals(getClass())) {
            return TypeUtil.getFieldValue(this, fieldName);
        }
        throw new IllegalArgumentException("Unknown field " + fieldName);
    }
    public Object getFieldProxy(final String fieldName) throws IllegalAccessException {
        if ("briefDescription".equals(fieldName)) {
            return briefDescription;
        }
        if ("description".equals(fieldName)) {
            return description;
        }
        if ("upstreamIntergenicRegion".equals(fieldName)) {
            return upstreamIntergenicRegion;
        }
        if ("downstreamIntergenicRegion".equals(fieldName)) {
            return downstreamIntergenicRegion;
        }
        if ("flankingRegions".equals(fieldName)) {
            return flankingRegions;
        }
        if ("introns".equals(fieldName)) {
            return introns;
        }
        if ("proteins".equals(fieldName)) {
            return proteins;
        }
        if ("CDSs".equals(fieldName)) {
            return CDSs;
        }
        if ("homologues".equals(fieldName)) {
            return homologues;
        }
        if ("exons".equals(fieldName)) {
            return exons;
        }
        if ("UTRs".equals(fieldName)) {
            return UTRs;
        }
        if ("score".equals(fieldName)) {
            return score;
        }
        if ("scoreType".equals(fieldName)) {
            return scoreType;
        }
        if ("length".equals(fieldName)) {
            return length;
        }
        if ("strain".equals(fieldName)) {
            return strain;
        }
        if ("sequenceOntologyTerm".equals(fieldName)) {
            return sequenceOntologyTerm;
        }
        if ("chromosomeLocation".equals(fieldName)) {
            return chromosomeLocation;
        }
        if ("sequence".equals(fieldName)) {
            return sequence;
        }
        if ("chromosome".equals(fieldName)) {
            return chromosome;
        }
        if ("overlappingFeatures".equals(fieldName)) {
            return overlappingFeatures;
        }
        if ("childFeatures".equals(fieldName)) {
            return childFeatures;
        }
        if ("symbol".equals(fieldName)) {
            return symbol;
        }
        if ("name".equals(fieldName)) {
            return name;
        }
        if ("secondaryIdentifier".equals(fieldName)) {
            return secondaryIdentifier;
        }
        if ("organism".equals(fieldName)) {
            return organism;
        }
        if ("locatedFeatures".equals(fieldName)) {
            return locatedFeatures;
        }
        if ("locations".equals(fieldName)) {
            return locations;
        }
        if ("synonyms".equals(fieldName)) {
            return synonyms;
        }
        if ("dataSets".equals(fieldName)) {
            return dataSets;
        }
        if ("crossReferences".equals(fieldName)) {
            return crossReferences;
        }
        if ("primaryIdentifier".equals(fieldName)) {
            return primaryIdentifier;
        }
        if ("ontologyAnnotations".equals(fieldName)) {
            return ontologyAnnotations;
        }
        if ("publications".equals(fieldName)) {
            return publications;
        }
        if ("id".equals(fieldName)) {
            return id;
        }
        if (!org.intermine.model.bio.Gene.class.equals(getClass())) {
            return TypeUtil.getFieldProxy(this, fieldName);
        }
        throw new IllegalArgumentException("Unknown field " + fieldName);
    }
    public void setFieldValue(final String fieldName, final Object value) {
        if ("briefDescription".equals(fieldName)) {
            briefDescription = (java.lang.String) value;
        } else if ("description".equals(fieldName)) {
            description = (java.lang.String) value;
        } else if ("upstreamIntergenicRegion".equals(fieldName)) {
            upstreamIntergenicRegion = (org.intermine.model.InterMineObject) value;
        } else if ("downstreamIntergenicRegion".equals(fieldName)) {
            downstreamIntergenicRegion = (org.intermine.model.InterMineObject) value;
        } else if ("flankingRegions".equals(fieldName)) {
            flankingRegions = (java.util.Set) value;
        } else if ("introns".equals(fieldName)) {
            introns = (java.util.Set) value;
        } else if ("proteins".equals(fieldName)) {
            proteins = (java.util.Set) value;
        } else if ("CDSs".equals(fieldName)) {
            CDSs = (java.util.Set) value;
        } else if ("homologues".equals(fieldName)) {
            homologues = (java.util.Set) value;
        } else if ("exons".equals(fieldName)) {
            exons = (java.util.Set) value;
        } else if ("UTRs".equals(fieldName)) {
            UTRs = (java.util.Set) value;
        } else if ("score".equals(fieldName)) {
            score = (java.lang.Double) value;
        } else if ("scoreType".equals(fieldName)) {
            scoreType = (java.lang.String) value;
        } else if ("length".equals(fieldName)) {
            length = (java.lang.Integer) value;
        } else if ("strain".equals(fieldName)) {
            strain = (org.intermine.model.InterMineObject) value;
        } else if ("sequenceOntologyTerm".equals(fieldName)) {
            sequenceOntologyTerm = (org.intermine.model.InterMineObject) value;
        } else if ("chromosomeLocation".equals(fieldName)) {
            chromosomeLocation = (org.intermine.model.InterMineObject) value;
        } else if ("sequence".equals(fieldName)) {
            sequence = (org.intermine.model.InterMineObject) value;
        } else if ("chromosome".equals(fieldName)) {
            chromosome = (org.intermine.model.InterMineObject) value;
        } else if ("overlappingFeatures".equals(fieldName)) {
            overlappingFeatures = (java.util.Set) value;
        } else if ("childFeatures".equals(fieldName)) {
            childFeatures = (java.util.Set) value;
        } else if ("symbol".equals(fieldName)) {
            symbol = (java.lang.String) value;
        } else if ("name".equals(fieldName)) {
            name = (java.lang.String) value;
        } else if ("secondaryIdentifier".equals(fieldName)) {
            secondaryIdentifier = (java.lang.String) value;
        } else if ("organism".equals(fieldName)) {
            organism = (org.intermine.model.InterMineObject) value;
        } else if ("locatedFeatures".equals(fieldName)) {
            locatedFeatures = (java.util.Set) value;
        } else if ("locations".equals(fieldName)) {
            locations = (java.util.Set) value;
        } else if ("synonyms".equals(fieldName)) {
            synonyms = (java.util.Set) value;
        } else if ("dataSets".equals(fieldName)) {
            dataSets = (java.util.Set) value;
        } else if ("crossReferences".equals(fieldName)) {
            crossReferences = (java.util.Set) value;
        } else if ("primaryIdentifier".equals(fieldName)) {
            primaryIdentifier = (java.lang.String) value;
        } else if ("ontologyAnnotations".equals(fieldName)) {
            ontologyAnnotations = (java.util.Set) value;
        } else if ("publications".equals(fieldName)) {
            publications = (java.util.Set) value;
        } else if ("id".equals(fieldName)) {
            id = (java.lang.Integer) value;
        } else {
            if (!org.intermine.model.bio.Gene.class.equals(getClass())) {
                DynamicUtil.setFieldValue(this, fieldName, value);
                return;
            }
            throw new IllegalArgumentException("Unknown field " + fieldName);
        }
    }
    public Class getFieldType(final String fieldName) {
        if ("briefDescription".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("description".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("upstreamIntergenicRegion".equals(fieldName)) {
            return org.intermine.model.bio.IntergenicRegion.class;
        }
        if ("downstreamIntergenicRegion".equals(fieldName)) {
            return org.intermine.model.bio.IntergenicRegion.class;
        }
        if ("flankingRegions".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("introns".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("proteins".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("CDSs".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("homologues".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("exons".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("UTRs".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("score".equals(fieldName)) {
            return java.lang.Double.class;
        }
        if ("scoreType".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("length".equals(fieldName)) {
            return java.lang.Integer.class;
        }
        if ("strain".equals(fieldName)) {
            return org.intermine.model.bio.Strain.class;
        }
        if ("sequenceOntologyTerm".equals(fieldName)) {
            return org.intermine.model.bio.SOTerm.class;
        }
        if ("chromosomeLocation".equals(fieldName)) {
            return org.intermine.model.bio.Location.class;
        }
        if ("sequence".equals(fieldName)) {
            return org.intermine.model.bio.Sequence.class;
        }
        if ("chromosome".equals(fieldName)) {
            return org.intermine.model.bio.Chromosome.class;
        }
        if ("overlappingFeatures".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("childFeatures".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("symbol".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("name".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("secondaryIdentifier".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("organism".equals(fieldName)) {
            return org.intermine.model.bio.Organism.class;
        }
        if ("locatedFeatures".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("locations".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("synonyms".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("dataSets".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("crossReferences".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("primaryIdentifier".equals(fieldName)) {
            return java.lang.String.class;
        }
        if ("ontologyAnnotations".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("publications".equals(fieldName)) {
            return java.util.Set.class;
        }
        if ("id".equals(fieldName)) {
            return java.lang.Integer.class;
        }
        if (!org.intermine.model.bio.Gene.class.equals(getClass())) {
            return TypeUtil.getFieldType(org.intermine.model.bio.Gene.class, fieldName);
        }
        throw new IllegalArgumentException("Unknown field " + fieldName);
    }
    public StringConstructor getoBJECT() {
        if (!org.intermine.model.bio.GeneShadow.class.equals(getClass())) {
            return NotXmlRenderer.render(this);
        }
        StringConstructor sb = new StringConstructor();
        sb.append("$_^org.intermine.model.bio.Gene");
        if (briefDescription != null) {
            sb.append("$_^abriefDescription$_^");
            String string = briefDescription;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (description != null) {
            sb.append("$_^adescription$_^");
            String string = description;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (upstreamIntergenicRegion != null) {
            sb.append("$_^rupstreamIntergenicRegion$_^").append(upstreamIntergenicRegion.getId());
        }
        if (downstreamIntergenicRegion != null) {
            sb.append("$_^rdownstreamIntergenicRegion$_^").append(downstreamIntergenicRegion.getId());
        }
        if (score != null) {
            sb.append("$_^ascore$_^").append(score);
        }
        if (scoreType != null) {
            sb.append("$_^ascoreType$_^");
            String string = scoreType;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (length != null) {
            sb.append("$_^alength$_^").append(length);
        }
        if (strain != null) {
            sb.append("$_^rstrain$_^").append(strain.getId());
        }
        if (sequenceOntologyTerm != null) {
            sb.append("$_^rsequenceOntologyTerm$_^").append(sequenceOntologyTerm.getId());
        }
        if (chromosomeLocation != null) {
            sb.append("$_^rchromosomeLocation$_^").append(chromosomeLocation.getId());
        }
        if (sequence != null) {
            sb.append("$_^rsequence$_^").append(sequence.getId());
        }
        if (chromosome != null) {
            sb.append("$_^rchromosome$_^").append(chromosome.getId());
        }
        if (symbol != null) {
            sb.append("$_^asymbol$_^");
            String string = symbol;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (name != null) {
            sb.append("$_^aname$_^");
            String string = name;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (secondaryIdentifier != null) {
            sb.append("$_^asecondaryIdentifier$_^");
            String string = secondaryIdentifier;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (organism != null) {
            sb.append("$_^rorganism$_^").append(organism.getId());
        }
        if (primaryIdentifier != null) {
            sb.append("$_^aprimaryIdentifier$_^");
            String string = primaryIdentifier;
            while (string != null) {
                int delimPosition = string.indexOf("$_^");
                if (delimPosition == -1) {
                    sb.append(string);
                    string = null;
                } else {
                    sb.append(string.substring(0, delimPosition + 3));
                    sb.append("d");
                    string = string.substring(delimPosition + 3);
                }
            }
        }
        if (id != null) {
            sb.append("$_^aid$_^").append(id);
        }
        return sb;
    }
    public void setoBJECT(String notXml, ObjectStore os) {
        setoBJECT(NotXmlParser.SPLITTER.split(notXml), os);
    }
    public void setoBJECT(final String[] notXml, final ObjectStore os) {
        if (!org.intermine.model.bio.GeneShadow.class.equals(getClass())) {
            throw new IllegalStateException("Class " + getClass().getName() + " does not match code (org.intermine.model.bio.Gene)");
        }
        for (int i = 2; i < notXml.length;) {
            int startI = i;
            if ((i < notXml.length) && "abriefDescription".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                briefDescription = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) && "adescription".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                description = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) &&"rupstreamIntergenicRegion".equals(notXml[i])) {
                i++;
                upstreamIntergenicRegion = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.IntergenicRegion.class);
                i++;
            };
            if ((i < notXml.length) &&"rdownstreamIntergenicRegion".equals(notXml[i])) {
                i++;
                downstreamIntergenicRegion = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.IntergenicRegion.class);
                i++;
            };
            if ((i < notXml.length) && "ascore".equals(notXml[i])) {
                i++;
                score = Double.valueOf(notXml[i]);
                i++;
            }
            if ((i < notXml.length) && "ascoreType".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                scoreType = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) && "alength".equals(notXml[i])) {
                i++;
                length = Integer.valueOf(notXml[i]);
                i++;
            }
            if ((i < notXml.length) &&"rstrain".equals(notXml[i])) {
                i++;
                strain = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Strain.class);
                i++;
            };
            if ((i < notXml.length) &&"rsequenceOntologyTerm".equals(notXml[i])) {
                i++;
                sequenceOntologyTerm = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.SOTerm.class);
                i++;
            };
            if ((i < notXml.length) &&"rchromosomeLocation".equals(notXml[i])) {
                i++;
                chromosomeLocation = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Location.class);
                i++;
            };
            if ((i < notXml.length) &&"rsequence".equals(notXml[i])) {
                i++;
                sequence = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Sequence.class);
                i++;
            };
            if ((i < notXml.length) &&"rchromosome".equals(notXml[i])) {
                i++;
                chromosome = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Chromosome.class);
                i++;
            };
            if ((i < notXml.length) && "asymbol".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                symbol = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) && "aname".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                name = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) && "asecondaryIdentifier".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                secondaryIdentifier = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) &&"rorganism".equals(notXml[i])) {
                i++;
                organism = new ProxyReference(os, Integer.valueOf(notXml[i]), org.intermine.model.bio.Organism.class);
                i++;
            };
            if ((i < notXml.length) && "aprimaryIdentifier".equals(notXml[i])) {
                i++;
                StringBuilder string = null;
                while ((i + 1 < notXml.length) && (notXml[i + 1].charAt(0) == 'd')) {
                    if (string == null) string = new StringBuilder(notXml[i]);
                    i++;
                    string.append("$_^").append(notXml[i].substring(1));
                }
                primaryIdentifier = string == null ? notXml[i] : string.toString();
                i++;
            }
            if ((i < notXml.length) && "aid".equals(notXml[i])) {
                i++;
                id = Integer.valueOf(notXml[i]);
                i++;
            }
            if (startI == i) {
                throw new IllegalArgumentException("Unknown field " + notXml[i]);
            }
        }
        flankingRegions = new ProxyCollection(os, this, "flankingRegions", org.intermine.model.bio.GeneFlankingRegion.class);
        introns = new ProxyCollection(os, this, "introns", org.intermine.model.bio.Intron.class);
        proteins = new ProxyCollection(os, this, "proteins", org.intermine.model.bio.Protein.class);
        CDSs = new ProxyCollection(os, this, "CDSs", org.intermine.model.bio.CDS.class);
        homologues = new ProxyCollection(os, this, "homologues", org.intermine.model.bio.Homologue.class);
        exons = new ProxyCollection(os, this, "exons", org.intermine.model.bio.Exon.class);
        UTRs = new ProxyCollection(os, this, "UTRs", org.intermine.model.bio.UTR.class);
        overlappingFeatures = new ProxyCollection(os, this, "overlappingFeatures", org.intermine.model.bio.SequenceFeature.class);
        childFeatures = new ProxyCollection(os, this, "childFeatures", org.intermine.model.bio.SequenceFeature.class);
        locatedFeatures = new ProxyCollection(os, this, "locatedFeatures", org.intermine.model.bio.Location.class);
        locations = new ProxyCollection(os, this, "locations", org.intermine.model.bio.Location.class);
        synonyms = new ProxyCollection(os, this, "synonyms", org.intermine.model.bio.Synonym.class);
        dataSets = new ProxyCollection(os, this, "dataSets", org.intermine.model.bio.DataSet.class);
        crossReferences = new ProxyCollection(os, this, "crossReferences", org.intermine.model.bio.CrossReference.class);
        ontologyAnnotations = new ProxyCollection(os, this, "ontologyAnnotations", org.intermine.model.bio.OntologyAnnotation.class);
        publications = new ProxyCollection(os, this, "publications", org.intermine.model.bio.Publication.class);
    }
    public void addCollectionElement(final String fieldName, final org.intermine.model.InterMineObject element) {
        if ("flankingRegions".equals(fieldName)) {
            flankingRegions.add((org.intermine.model.bio.GeneFlankingRegion) element);
        } else if ("introns".equals(fieldName)) {
            introns.add((org.intermine.model.bio.Intron) element);
        } else if ("proteins".equals(fieldName)) {
            proteins.add((org.intermine.model.bio.Protein) element);
        } else if ("CDSs".equals(fieldName)) {
            CDSs.add((org.intermine.model.bio.CDS) element);
        } else if ("homologues".equals(fieldName)) {
            homologues.add((org.intermine.model.bio.Homologue) element);
        } else if ("exons".equals(fieldName)) {
            exons.add((org.intermine.model.bio.Exon) element);
        } else if ("UTRs".equals(fieldName)) {
            UTRs.add((org.intermine.model.bio.UTR) element);
        } else if ("overlappingFeatures".equals(fieldName)) {
            overlappingFeatures.add((org.intermine.model.bio.SequenceFeature) element);
        } else if ("childFeatures".equals(fieldName)) {
            childFeatures.add((org.intermine.model.bio.SequenceFeature) element);
        } else if ("locatedFeatures".equals(fieldName)) {
            locatedFeatures.add((org.intermine.model.bio.Location) element);
        } else if ("locations".equals(fieldName)) {
            locations.add((org.intermine.model.bio.Location) element);
        } else if ("synonyms".equals(fieldName)) {
            synonyms.add((org.intermine.model.bio.Synonym) element);
        } else if ("dataSets".equals(fieldName)) {
            dataSets.add((org.intermine.model.bio.DataSet) element);
        } else if ("crossReferences".equals(fieldName)) {
            crossReferences.add((org.intermine.model.bio.CrossReference) element);
        } else if ("ontologyAnnotations".equals(fieldName)) {
            ontologyAnnotations.add((org.intermine.model.bio.OntologyAnnotation) element);
        } else if ("publications".equals(fieldName)) {
            publications.add((org.intermine.model.bio.Publication) element);
        } else {
            if (!org.intermine.model.bio.Gene.class.equals(getClass())) {
                TypeUtil.addCollectionElement(this, fieldName, element);
                return;
            }
            throw new IllegalArgumentException("Unknown collection " + fieldName);
        }
    }
    public Class getElementType(final String fieldName) {
        if ("flankingRegions".equals(fieldName)) {
            return org.intermine.model.bio.GeneFlankingRegion.class;
        }
        if ("introns".equals(fieldName)) {
            return org.intermine.model.bio.Intron.class;
        }
        if ("proteins".equals(fieldName)) {
            return org.intermine.model.bio.Protein.class;
        }
        if ("CDSs".equals(fieldName)) {
            return org.intermine.model.bio.CDS.class;
        }
        if ("homologues".equals(fieldName)) {
            return org.intermine.model.bio.Homologue.class;
        }
        if ("exons".equals(fieldName)) {
            return org.intermine.model.bio.Exon.class;
        }
        if ("UTRs".equals(fieldName)) {
            return org.intermine.model.bio.UTR.class;
        }
        if ("overlappingFeatures".equals(fieldName)) {
            return org.intermine.model.bio.SequenceFeature.class;
        }
        if ("childFeatures".equals(fieldName)) {
            return org.intermine.model.bio.SequenceFeature.class;
        }
        if ("locatedFeatures".equals(fieldName)) {
            return org.intermine.model.bio.Location.class;
        }
        if ("locations".equals(fieldName)) {
            return org.intermine.model.bio.Location.class;
        }
        if ("synonyms".equals(fieldName)) {
            return org.intermine.model.bio.Synonym.class;
        }
        if ("dataSets".equals(fieldName)) {
            return org.intermine.model.bio.DataSet.class;
        }
        if ("crossReferences".equals(fieldName)) {
            return org.intermine.model.bio.CrossReference.class;
        }
        if ("ontologyAnnotations".equals(fieldName)) {
            return org.intermine.model.bio.OntologyAnnotation.class;
        }
        if ("publications".equals(fieldName)) {
            return org.intermine.model.bio.Publication.class;
        }
        if (!org.intermine.model.bio.Gene.class.equals(getClass())) {
            return TypeUtil.getElementType(org.intermine.model.bio.Gene.class, fieldName);
        }
        throw new IllegalArgumentException("Unknown field " + fieldName);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy