All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.intermine.model.bio.StrainShadow Maven / Gradle / Ivy
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 StrainShadow implements Strain, ShadowClass
{
public static final Class shadowOf = Strain.class;
// Attr: org.intermine.model.bio.Strain.annotationVersion
protected java.lang.String annotationVersion;
public java.lang.String getAnnotationVersion() { return annotationVersion; }
public void setAnnotationVersion(final java.lang.String annotationVersion) { this.annotationVersion = annotationVersion; }
// Attr: org.intermine.model.bio.Strain.assemblyVersion
protected java.lang.String assemblyVersion;
public java.lang.String getAssemblyVersion() { return assemblyVersion; }
public void setAssemblyVersion(final java.lang.String assemblyVersion) { this.assemblyVersion = assemblyVersion; }
// Col: org.intermine.model.bio.Strain.features
protected java.util.Set features = new java.util.HashSet();
public java.util.Set getFeatures() { return features; }
public void setFeatures(final java.util.Set features) { this.features = features; }
public void addFeatures(final org.intermine.model.bio.SequenceFeature arg) { features.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 Strain && id != null) ? id.equals(((Strain)o).getId()) : this == o; }
@Override public int hashCode() { return (id != null) ? id.hashCode() : super.hashCode(); }
@Override public String toString() { return "Strain [annotationVersion=" + (annotationVersion == null ? "null" : "\"" + annotationVersion + "\"") + ", assemblyVersion=" + (assemblyVersion == null ? "null" : "\"" + assemblyVersion + "\"") + ", id=" + id + ", name=" + (name == null ? "null" : "\"" + name + "\"") + ", organism=" + (organism == null ? "null" : (organism.getId() == null ? "no id" : organism.getId().toString())) + ", primaryIdentifier=" + (primaryIdentifier == null ? "null" : "\"" + primaryIdentifier + "\"") + ", secondaryIdentifier=" + (secondaryIdentifier == null ? "null" : "\"" + secondaryIdentifier + "\"") + ", symbol=" + (symbol == null ? "null" : "\"" + symbol + "\"") + "]"; }
public Object getFieldValue(final String fieldName) throws IllegalAccessException {
if ("annotationVersion".equals(fieldName)) {
return annotationVersion;
}
if ("assemblyVersion".equals(fieldName)) {
return assemblyVersion;
}
if ("features".equals(fieldName)) {
return features;
}
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.Strain.class.equals(getClass())) {
return TypeUtil.getFieldValue(this, fieldName);
}
throw new IllegalArgumentException("Unknown field " + fieldName);
}
public Object getFieldProxy(final String fieldName) throws IllegalAccessException {
if ("annotationVersion".equals(fieldName)) {
return annotationVersion;
}
if ("assemblyVersion".equals(fieldName)) {
return assemblyVersion;
}
if ("features".equals(fieldName)) {
return features;
}
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.Strain.class.equals(getClass())) {
return TypeUtil.getFieldProxy(this, fieldName);
}
throw new IllegalArgumentException("Unknown field " + fieldName);
}
public void setFieldValue(final String fieldName, final Object value) {
if ("annotationVersion".equals(fieldName)) {
annotationVersion = (java.lang.String) value;
} else if ("assemblyVersion".equals(fieldName)) {
assemblyVersion = (java.lang.String) value;
} else if ("features".equals(fieldName)) {
features = (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.Strain.class.equals(getClass())) {
DynamicUtil.setFieldValue(this, fieldName, value);
return;
}
throw new IllegalArgumentException("Unknown field " + fieldName);
}
}
public Class> getFieldType(final String fieldName) {
if ("annotationVersion".equals(fieldName)) {
return java.lang.String.class;
}
if ("assemblyVersion".equals(fieldName)) {
return java.lang.String.class;
}
if ("features".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.Strain.class.equals(getClass())) {
return TypeUtil.getFieldType(org.intermine.model.bio.Strain.class, fieldName);
}
throw new IllegalArgumentException("Unknown field " + fieldName);
}
public StringConstructor getoBJECT() {
if (!org.intermine.model.bio.StrainShadow.class.equals(getClass())) {
return NotXmlRenderer.render(this);
}
StringConstructor sb = new StringConstructor();
sb.append("$_^org.intermine.model.bio.Strain");
if (annotationVersion != null) {
sb.append("$_^aannotationVersion$_^");
String string = annotationVersion;
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 (assemblyVersion != null) {
sb.append("$_^aassemblyVersion$_^");
String string = assemblyVersion;
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 (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.StrainShadow.class.equals(getClass())) {
throw new IllegalStateException("Class " + getClass().getName() + " does not match code (org.intermine.model.bio.Strain)");
}
for (int i = 2; i < notXml.length;) {
int startI = i;
if ((i < notXml.length) && "aannotationVersion".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));
}
annotationVersion = string == null ? notXml[i] : string.toString();
i++;
}
if ((i < notXml.length) && "aassemblyVersion".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));
}
assemblyVersion = string == null ? notXml[i] : string.toString();
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]);
}
}
features = new ProxyCollection(os, this, "features", 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 ("features".equals(fieldName)) {
features.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.Strain.class.equals(getClass())) {
TypeUtil.addCollectionElement(this, fieldName, element);
return;
}
throw new IllegalArgumentException("Unknown collection " + fieldName);
}
}
public Class> getElementType(final String fieldName) {
if ("features".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.Strain.class.equals(getClass())) {
return TypeUtil.getElementType(org.intermine.model.bio.Strain.class, fieldName);
}
throw new IllegalArgumentException("Unknown field " + fieldName);
}
}