Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to create the a new base Java backend class to render the page for taxonomies related to RNA seqence runs. #71

Open
computate opened this issue Oct 21, 2021 · 0 comments

Comments

@computate
Copy link
Member

computate commented Oct 21, 2021

Mission to create the a new base Java backend class to render the page for taxonomies related to RNA seqence runs.

Mission

Your mission, should you choose to accept it, is to create the a new base Java backend class to render the page for taxonomies related to RNA seqence runs. .

The day of the operation is October 26th, 2021

You will have 4 hours to complete your mission.

An open science project to uncover the planetary virome, freely and openly

You will be joining a team of the boldest

of all Red Hatters for this mission, who will be at your service developing the code and automating the deployment to OpenShift.

  • Should you, or any of your force be taken or compromised that day, you must report back as many changes as you have made, and any knowledge of your actions, by pull request or comments on the issue on the board.

How to get started:

Follow the instructions here to setup the project: https://github.com/team19hackathon2021/serratus-api/

The details of your mission:

  • The Java package name will be: io.serratus.api.enus.model.taxonomy
  • The Java class name will be: TaxonomyGenPageGen
  • The path to the Java class will be: /usr/local/src/serratus-api/src/main/java/io/serratus/api/enus/model/taxonomy/TaxonomyGenPageGen.java
  • The Java class will extend: BaseModelPage
package io.serratus.api.enus.model.taxonomy;

import io.serratus.api.enus.request.SiteRequestEnUS;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
import io.serratus.api.enus.java.LocalDateSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import io.serratus.api.enus.model.taxonomy.Taxonomy;
import org.apache.commons.lang3.StringUtils;
import java.lang.Integer;
import java.text.NumberFormat;
import java.util.ArrayList;
import io.serratus.api.enus.config.ConfigKeys;
import org.apache.commons.collections.CollectionUtils;
import java.lang.Long;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.serratus.api.enus.request.api.ApiRequest;
import io.serratus.api.enus.search.SearchList;
import java.lang.String;
import io.serratus.api.enus.java.ZonedDateTimeDeserializer;
import java.math.RoundingMode;
import org.slf4j.Logger;
import io.serratus.api.enus.writer.AllWriter;
import java.math.MathContext;
import io.vertx.core.Promise;
import org.apache.commons.text.StringEscapeUtils;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.serratus.api.enus.base.BaseModelPage;
import io.vertx.core.Future;
import java.util.Objects;
import io.vertx.core.json.JsonArray;
import io.serratus.api.enus.base.BaseModel;
import io.serratus.api.enus.java.ZonedDateTimeSerializer;
import org.apache.commons.lang3.math.NumberUtils;
import io.serratus.api.enus.wrap.Wrap;
import java.util.Optional;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/**
 **/

public abstract class TaxonomyGenPageGen<DEV> extends BaseModelPage {
}

Create the LOG field inside the TaxonomyGenPageGen class

	protected static final Logger LOG = LoggerFactory.getLogger(TaxonomyGenPage.class);

Create the searchListTaxonomy_ field inside the TaxonomyGenPageGen class

	protected SearchList<Taxonomy> searchListTaxonomy_;

Create the searchListTaxonomy method inside the TaxonomyGenPageGen class

	protected abstract void _searchListTaxonomy_(Wrap<SearchList<Taxonomy>> w) {}

Create the getSearchListTaxonomy_ method inside the TaxonomyGenPageGen class

	public SearchList<Taxonomy> getSearchListTaxonomy_() {
		return searchListTaxonomy_;
	}

Create the setSearchListTaxonomy_ method inside the TaxonomyGenPageGen class

	public void setSearchListTaxonomy_(SearchList<Taxonomy> searchListTaxonomy_) {
		this.searchListTaxonomy_ = searchListTaxonomy_;
	}

Create the staticSetSearchListTaxonomy_ method inside the TaxonomyGenPageGen class

	public static SearchList<Taxonomy> staticSetSearchListTaxonomy_(SiteRequestEnUS siteRequest_, String o) {
		return null;
	}

Create the searchListTaxonomy_Init method inside the TaxonomyGenPageGen class

	protected TaxonomyGenPage searchListTaxonomy_Init() {
		Wrap<SearchList<Taxonomy>> searchListTaxonomy_Wrap = new Wrap<SearchList<Taxonomy>>().var("searchListTaxonomy_");
		if(searchListTaxonomy_ == null) {
			_searchListTaxonomy_(searchListTaxonomy_Wrap);
			setSearchListTaxonomy_(searchListTaxonomy_Wrap.o);
		}
		return (TaxonomyGenPage)this;
	}

Create the listTaxonomy field inside the TaxonomyGenPageGen class

	protected JsonArray listTaxonomy = new JsonArray();

Create the _listTaxonomy method inside the TaxonomyGenPageGen class

	protected abstract void _listTaxonomy(JsonArray l) {}

Create the getListTaxonomy method inside the TaxonomyGenPageGen class

	public JsonArray getListTaxonomy() {
		return listTaxonomy;
	}

Create the setListTaxonomy method inside the TaxonomyGenPageGen class

	public void setListTaxonomy(JsonArray listTaxonomy) {
		this.listTaxonomy = listTaxonomy;
	}

Create the staticSetListTaxonomy method inside the TaxonomyGenPageGen class

	public static JsonArray staticSetListTaxonomy(SiteRequestEnUS siteRequest_, String o) {
		return null;
	}

Create the listTaxonomyInit method inside the TaxonomyGenPageGen class

	protected TaxonomyGenPage listTaxonomyInit() {
		_listTaxonomy(listTaxonomy);
		return (TaxonomyGenPage)this;
	}

Create the taxonomyCount field inside the TaxonomyGenPageGen class

	protected Integer taxonomyCount;

Create the _taxonomyCount method inside the TaxonomyGenPageGen class

	protected abstract void _taxonomyCount(Wrap<Integer> w) {}

Create the getTaxonomyCount method inside the TaxonomyGenPageGen class

	public Integer getTaxonomyCount() {
		return taxonomyCount;
	}

Create the setTaxonomyCount method inside the TaxonomyGenPageGen class

	public void setTaxonomyCount(Integer taxonomyCount) {
		this.taxonomyCount = taxonomyCount;
	}

Create the setTaxonomyCount method inside the TaxonomyGenPageGen class

	public void setTaxonomyCount(String o) {
		this.taxonomyCount = TaxonomyGenPage.staticSetTaxonomyCount(siteRequest_, o);
	}

Create the staticSetTaxonomyCount method inside the TaxonomyGenPageGen class

	public static Integer staticSetTaxonomyCount(SiteRequestEnUS siteRequest_, String o) {
		if(NumberUtils.isParsable(o))
			return Integer.parseInt(o);
		return null;
	}

Create the taxonomyCountInit method inside the TaxonomyGenPageGen class

	protected TaxonomyGenPage taxonomyCountInit() {
		Wrap<Integer> taxonomyCountWrap = new Wrap<Integer>().var("taxonomyCount");
		if(taxonomyCount == null) {
			_taxonomyCount(taxonomyCountWrap);
			setTaxonomyCount(taxonomyCountWrap.o);
		}
		return (TaxonomyGenPage)this;
	}

Create the staticSolrTaxonomyCount method inside the TaxonomyGenPageGen class

	public static Integer staticSolrTaxonomyCount(SiteRequestEnUS siteRequest_, Integer o) {
		return o;
	}

Create the staticSolrStrTaxonomyCount method inside the TaxonomyGenPageGen class

	public static String staticSolrStrTaxonomyCount(SiteRequestEnUS siteRequest_, Integer o) {
		return o == null ? null : o.toString();
	}

Create the staticSolrFqTaxonomyCount method inside the TaxonomyGenPageGen class

	public static String staticSolrFqTaxonomyCount(SiteRequestEnUS siteRequest_, String o) {
		return TaxonomyGenPage.staticSolrStrTaxonomyCount(siteRequest_, TaxonomyGenPage.staticSolrTaxonomyCount(siteRequest_, TaxonomyGenPage.staticSetTaxonomyCount(siteRequest_, o)));
	}

Create the taxonomy_ field inside the TaxonomyGenPageGen class

	protected Taxonomy taxonomy_;

Create the taxonomy method inside the TaxonomyGenPageGen class

	protected abstract void _taxonomy_(Wrap<Taxonomy> w) {}

Create the getTaxonomy_ method inside the TaxonomyGenPageGen class

	public Taxonomy getTaxonomy_() {
		return taxonomy_;
	}

Create the setTaxonomy_ method inside the TaxonomyGenPageGen class

	public void setTaxonomy_(Taxonomy taxonomy_) {
		this.taxonomy_ = taxonomy_;
	}

Create the staticSetTaxonomy_ method inside the TaxonomyGenPageGen class

	public static Taxonomy staticSetTaxonomy_(SiteRequestEnUS siteRequest_, String o) {
		return null;
	}

Create the taxonomy_Init method inside the TaxonomyGenPageGen class

	protected TaxonomyGenPage taxonomy_Init() {
		Wrap<Taxonomy> taxonomy_Wrap = new Wrap<Taxonomy>().var("taxonomy_");
		if(taxonomy_ == null) {
			_taxonomy_(taxonomy_Wrap);
			setTaxonomy_(taxonomy_Wrap.o);
		}
		return (TaxonomyGenPage)this;
	}

Create the pk field inside the TaxonomyGenPageGen class

	protected Long pk;

Create the _pk method inside the TaxonomyGenPageGen class

	protected abstract void _pk(Wrap<Long> w) {}

Create the getPk method inside the TaxonomyGenPageGen class

	public Long getPk() {
		return pk;
	}

Create the setPk method inside the TaxonomyGenPageGen class

	public void setPk(Long pk) {
		this.pk = pk;
	}

Create the setPk method inside the TaxonomyGenPageGen class

	public void setPk(String o) {
		this.pk = TaxonomyGenPage.staticSetPk(siteRequest_, o);
	}

Create the staticSetPk method inside the TaxonomyGenPageGen class

	public static Long staticSetPk(SiteRequestEnUS siteRequest_, String o) {
		if(NumberUtils.isParsable(o))
			return Long.parseLong(o);
		return null;
	}

Create the pkInit method inside the TaxonomyGenPageGen class

	protected TaxonomyGenPage pkInit() {
		Wrap<Long> pkWrap = new Wrap<Long>().var("pk");
		if(pk == null) {
			_pk(pkWrap);
			setPk(pkWrap.o);
		}
		return (TaxonomyGenPage)this;
	}

Create the staticSolrPk method inside the TaxonomyGenPageGen class

	public static Long staticSolrPk(SiteRequestEnUS siteRequest_, Long o) {
		return o;
	}

Create the staticSolrStrPk method inside the TaxonomyGenPageGen class

	public static String staticSolrStrPk(SiteRequestEnUS siteRequest_, Long o) {
		return o == null ? null : o.toString();
	}

Create the staticSolrFqPk method inside the TaxonomyGenPageGen class

	public static String staticSolrFqPk(SiteRequestEnUS siteRequest_, String o) {
		return TaxonomyGenPage.staticSolrStrPk(siteRequest_, TaxonomyGenPage.staticSolrPk(siteRequest_, TaxonomyGenPage.staticSetPk(siteRequest_, o)));
	}

Create the promiseDeepTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public Future<Void> promiseDeepTaxonomyGenPage(SiteRequestEnUS siteRequest_) {
		setSiteRequest_(siteRequest_);
		return promiseDeepTaxonomyGenPage();
	}

Create the promiseDeepTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public Future<Void> promiseDeepTaxonomyGenPage() {
		Promise<Void> promise = Promise.promise();
		Promise<Void> promise2 = Promise.promise();
		promiseTaxonomyGenPage(promise2);
		promise2.future().onSuccess(a -> {
			super.promiseDeepBaseModelPage(siteRequest_).onSuccess(b -> {
				promise.complete();
			}).onFailure(ex -> {
				promise.fail(ex);
			});
		}).onFailure(ex -> {
			promise.fail(ex);
		});
		return promise.future();
	}

Create the promiseTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public Future<Void> promiseTaxonomyGenPage(Promise<Void> promise) {
		Future.future(a -> a.complete()).compose(a -> {
			Promise<Void> promise2 = Promise.promise();
			try {
				searchListTaxonomy_Init();
				listTaxonomyInit();
				taxonomyCountInit();
				taxonomy_Init();
				pkInit();
				promise2.complete();
			} catch(Exception ex) {
				promise2.fail(ex);
			}
			return promise2.future();
		}).onSuccess(a -> {
			promise.complete();
		}).onFailure(ex -> {
			promise.fail(ex);
		});
		return promise.future();
	}

Create the promiseDeepForClass method inside the TaxonomyGenPageGen class

	public Future<Void> promiseDeepForClass(SiteRequestEnUS siteRequest_) {
		return promiseDeepTaxonomyGenPage(siteRequest_);
	}

Create the siteRequestTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public void siteRequestTaxonomyGenPage(SiteRequestEnUS siteRequest_) {
			super.siteRequestBaseModelPage(siteRequest_);
	}

Create the siteRequestForClass method inside the TaxonomyGenPageGen class

	public void siteRequestForClass(SiteRequestEnUS siteRequest_) {
		siteRequestTaxonomyGenPage(siteRequest_);
	}

Create the obtainForClass method inside the TaxonomyGenPageGen class

	public Object obtainForClass(String var) {
		String[] vars = StringUtils.split(var, ".");
		Object o = null;
		for(String v : vars) {
			if(o == null)
				o = obtainTaxonomyGenPage(v);
			else if(o instanceof BaseModel) {
				BaseModel baseModel = (BaseModel)o;
				o = baseModel.obtainForClass(v);
			}
			else if(o instanceof Map) {
				Map<?, ?> map = (Map<?, ?>)o;
				o = map.get(v);
			}
		}
		return o;
	}

Create the obtainTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public Object obtainTaxonomyGenPage(String var) {
		TaxonomyGenPage oTaxonomyGenPage = (TaxonomyGenPage)this;
		switch(var) {
			case "searchListTaxonomy_":
				return oTaxonomyGenPage.searchListTaxonomy_;
			case "listTaxonomy":
				return oTaxonomyGenPage.listTaxonomy;
			case "taxonomyCount":
				return oTaxonomyGenPage.taxonomyCount;
			case "taxonomy_":
				return oTaxonomyGenPage.taxonomy_;
			case "pk":
				return oTaxonomyGenPage.pk;
			default:
				return super.obtainBaseModelPage(var);
		}
	}

Create the relateForClass method inside the TaxonomyGenPageGen class

	public boolean relateForClass(String var, Object val) {
		String[] vars = StringUtils.split(var, ".");
		Object o = null;
		for(String v : vars) {
			if(o == null)
				o = relateTaxonomyGenPage(v, val);
			else if(o instanceof BaseModel) {
				BaseModel baseModel = (BaseModel)o;
				o = baseModel.relateForClass(v, val);
			}
		}
		return o != null;
	}

Create the relateTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public Object relateTaxonomyGenPage(String var, Object val) {
		TaxonomyGenPage oTaxonomyGenPage = (TaxonomyGenPage)this;
		switch(var) {
			default:
				return super.relateBaseModelPage(var, val);
		}
	}

Create the staticSetForClass method inside the TaxonomyGenPageGen class

	public static Object staticSetForClass(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		return staticSetTaxonomyGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSetTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public static Object staticSetTaxonomyGenPage(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		switch(entityVar) {
		case "taxonomyCount":
			return TaxonomyGenPage.staticSetTaxonomyCount(siteRequest_, o);
		case "pk":
			return TaxonomyGenPage.staticSetPk(siteRequest_, o);
			default:
				return BaseModelPage.staticSetBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the staticSolrForClass method inside the TaxonomyGenPageGen class

	public static Object staticSolrForClass(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		return staticSolrTaxonomyGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSolrTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public static Object staticSolrTaxonomyGenPage(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		switch(entityVar) {
		case "taxonomyCount":
			return TaxonomyGenPage.staticSolrTaxonomyCount(siteRequest_, (Integer)o);
		case "pk":
			return TaxonomyGenPage.staticSolrPk(siteRequest_, (Long)o);
			default:
				return BaseModelPage.staticSolrBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the staticSolrStrForClass method inside the TaxonomyGenPageGen class

	public static String staticSolrStrForClass(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		return staticSolrStrTaxonomyGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSolrStrTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public static String staticSolrStrTaxonomyGenPage(String entityVar, SiteRequestEnUS siteRequest_, Object o) {
		switch(entityVar) {
		case "taxonomyCount":
			return TaxonomyGenPage.staticSolrStrTaxonomyCount(siteRequest_, (Integer)o);
		case "pk":
			return TaxonomyGenPage.staticSolrStrPk(siteRequest_, (Long)o);
			default:
				return BaseModelPage.staticSolrStrBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the staticSolrFqForClass method inside the TaxonomyGenPageGen class

	public static String staticSolrFqForClass(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		return staticSolrFqTaxonomyGenPage(entityVar,  siteRequest_, o);
	}

Create the staticSolrFqTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public static String staticSolrFqTaxonomyGenPage(String entityVar, SiteRequestEnUS siteRequest_, String o) {
		switch(entityVar) {
		case "taxonomyCount":
			return TaxonomyGenPage.staticSolrFqTaxonomyCount(siteRequest_, o);
		case "pk":
			return TaxonomyGenPage.staticSolrFqPk(siteRequest_, o);
			default:
				return BaseModelPage.staticSolrFqBaseModelPage(entityVar,  siteRequest_, o);
		}
	}

Create the defineForClass method inside the TaxonomyGenPageGen class

	public boolean defineForClass(String var, Object val) {
		String[] vars = StringUtils.split(var, ".");
		Object o = null;
		if(val != null) {
			for(String v : vars) {
				if(o == null)
					o = defineTaxonomyGenPage(v, val);
				else if(o instanceof BaseModel) {
					BaseModel oBaseModel = (BaseModel)o;
					o = oBaseModel.defineForClass(v, val);
				}
			}
		}
		return o != null;
	}

Create the defineTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public Object defineTaxonomyGenPage(String var, Object val) {
		switch(var.toLowerCase()) {
			default:
				return super.defineBaseModelPage(var, val);
		}
	}

Create the apiRequestTaxonomyGenPage method inside the TaxonomyGenPageGen class

	public void apiRequestTaxonomyGenPage() {
		ApiRequest apiRequest = Optional.ofNullable(siteRequest_).map(SiteRequestEnUS::getApiRequest_).orElse(null);
		Object o = Optional.ofNullable(apiRequest).map(ApiRequest::getOriginal).orElse(null);
		if(o != null && o instanceof TaxonomyGenPage) {
			TaxonomyGenPage original = (TaxonomyGenPage)o;
			super.apiRequestBaseModelPage();
		}
	}

Create the toString method inside the TaxonomyGenPageGen class

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(super.toString());
		return sb.toString();
	}

Create the VAR_searchListTaxonomy_ field inside the TaxonomyGenPageGen class

	public static final String VAR_searchListTaxonomy_ = "searchListTaxonomy_";

Create the VAR_listTaxonomy field inside the TaxonomyGenPageGen class

	public static final String VAR_listTaxonomy = "listTaxonomy";

Create the VAR_taxonomyCount field inside the TaxonomyGenPageGen class

	public static final String VAR_taxonomyCount = "taxonomyCount";

Create the VAR_taxonomy_ field inside the TaxonomyGenPageGen class

	public static final String VAR_taxonomy_ = "taxonomy_";

Create the VAR_pk field inside the TaxonomyGenPageGen class

	public static final String VAR_pk = "pk";

This message will not self-destruct.

This message will not self destruct, because this project is open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant