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

org.computate.smartvillage.enus.model.iotnode.IotNodePageGen Maven / Gradle / Ivy

Go to download

Red Hat Global Social Innovation Program is partnering with Boston University and Smarta Byar in order to collaborate on creating a global and open research platform allowing researchers to study what social sustainability means by using a digital twin of Veberöd, Sweden as the test village, supported by Smarta Byar. The goal of this collaboration is to build the open source technological infrastructure so that researchers can collaborate on this platform effectively to study mobility, public health, sustainability among other study areas to ultimately help define better the link between well being and eco-smart cities.

The newest version!
/*
 * Copyright (c) 2018-2022 Computate Limited Liability Company in Utah, USA,
 * and the Smarta Byar Smart Village FIWARE IHub. 
 *
 * This program and the accompanying materials are made available under the
 * terms of the GNU GENERAL PUBLIC LICENSE Version 3 which is available at
 * 
 * https://www.gnu.org/licenses/gpl-3.0.en.html
 * 
 * You may not propagate or modify a covered work except as expressly provided 
 * under this License. Any attempt otherwise to propagate or modify it is void, 
 * and will automatically terminate your rights under this License (including 
 * any patent licenses granted under the third paragraph of section 11).
 */
package org.computate.smartvillage.enus.model.iotnode;

import org.computate.smartvillage.enus.request.SiteRequestEnUS;
import org.computate.smartvillage.enus.model.iotnode.IotNodeGenPage;
import org.computate.smartvillage.enus.model.base.BaseModel;
import org.computate.vertx.api.ApiRequest;
import org.computate.smartvillage.enus.config.ConfigKeys;
import java.util.Optional;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.computate.search.serialize.ComputateLocalDateSerializer;
import org.computate.search.serialize.ComputateLocalDateDeserializer;
import org.computate.search.serialize.ComputateZonedDateTimeSerializer;
import org.computate.search.serialize.ComputateZonedDateTimeDeserializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.math.MathContext;
import org.apache.commons.lang3.math.NumberUtils;
import java.text.NumberFormat;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.HashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.RoundingMode;
import java.util.Map;
import org.computate.search.wrap.Wrap;
import io.vertx.core.Promise;
import io.vertx.core.Future;
import io.vertx.core.json.JsonArray;

/**
 * 

    Suggestions that can generate more code for you:

    *
*
  • You can add a class comment "Api: true" if you wish to GET, POST, PATCH or PUT these IotNodePage objects in a RESTful API. *
  • You can add a class comment "{@inheritDoc}" if you wish to inherit the helpful inherited class comments from class IotNodePageGen into the class IotNodePage. *
  • *

    About the IotNodePage class and it's generated class IotNodePageGen<IotNodeGenPage>:

    extends IotNodePageGen *

    * This Java class extends a generated Java class IotNodePageGen built by the https://github.com/computate-org/computate project. * Whenever this Java class is modified or touched, the watch service installed as described in the README, indexes all the information about this Java class in a local Apache Solr Search Engine. * If you are running the service, you can see the indexed data about this Java Class here: *

    *

    Find the class IotNodePage in Solr.

    *

    * The extended class ending with "Gen" did not exist at first, but was automatically created by the same watch service based on the data retrieved from the local Apache Server search engine. * The extended class contains many generated fields, getters, setters, initialization code, and helper methods to help build a website and API fast, reactive, and scalable. *

    * extends IotNodePageGen *

    This class IotNodePage extends IotNodePageGen<IotNodeGenPage>, which means it extends a newly generated IotNodePageGen. * The generated class IotNodePageGen extends IotNodeGenPage which means that IotNodePage extends IotNodePageGen which extends IotNodeGenPage. * This generated inheritance is a powerful feature that allows a lot of boiler plate code to be created for you automatically while still preserving inheritance through the power of Java Generic classes. *

    *

    Api: true

    *

    ApiTag.enUS: true

    *

    ApiUri.enUS: null

    *

    Color: null

    *

    IconGroup: null

    *

    IconName: null

    *

    Indexed: true

    *

    {@inheritDoc}

    *

    By adding a class comment "{@inheritDoc}", the IotNodePage class will inherit the helpful inherited class comments from the super class IotNodePageGen. *

    *

    Rows: null

    *

    Model: true

    *

    Page: true

    *

    SuperPage.enUS: null

    *

    Promise: true

    *

    * This class contains a comment "Promise: true" * Sometimes a Java class must be initialized asynchronously when it involves calling a blocking API. * This means that the IotNodePage Java class has promiseDeep methods which must be initialized asynchronously as a Vert.x Promise instead of initDeep methods which are a simple non-asynchronous method. *

    *

    * Adding protected void methods beginning with an underscore with a Promise as the only parameter will automatically set `Promise: true`. *

    *

    *

     *   
     *   	protected void _promiseBefore(Promise<Void> promise) {
     *   		promise.complete();
     *   	}
     *   
    *

    *

    * Java classes with the `Model: true` will automatically set `Promise: true`. *

    *

    * If a super class of this Java class with `Model: true`, then the child class will also inherit `Promise: true`. *

    *

    AName.enUS: null

    *

    * Delete the class IotNodePage in Solr: * curl -k 'https://solr-solr.apps-crc.testing/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '<add><delete><query>classeNomCanonique_enUS_indexed_string:org.computate.smartvillage.enus.model.iotnode.IotNodePage</query></delete></add>' *

    *

    * Delete the package org.computate.smartvillage.enus.model.iotnode in Solr: * curl -k 'https://solr-solr.apps-crc.testing/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '<add><delete><query>classeNomEnsemble_enUS_indexed_string:org.computate.smartvillage.enus.model.iotnode</query></delete></add>' *

    *

    * Delete the project smartabyar-smartvillage in Solr: * curl -k 'https://solr-solr.apps-crc.testing/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '<add><delete><query>siteNom_indexed_string:smartabyar\-smartvillage</query></delete></add>' *

    * Generated: true **/ public abstract class IotNodePageGen extends IotNodeGenPage { protected static final Logger LOG = LoggerFactory.getLogger(IotNodePage.class); ////////////// // initDeep // ////////////// public Future promiseDeepIotNodePage(SiteRequestEnUS siteRequest_) { setSiteRequest_(siteRequest_); return promiseDeepIotNodePage(); } public Future promiseDeepIotNodePage() { Promise promise = Promise.promise(); Promise promise2 = Promise.promise(); promiseIotNodePage(promise2); promise2.future().onSuccess(a -> { super.promiseDeepIotNodeGenPage(siteRequest_).onSuccess(b -> { promise.complete(); }).onFailure(ex -> { promise.fail(ex); }); }).onFailure(ex -> { promise.fail(ex); }); return promise.future(); } public Future promiseIotNodePage(Promise promise) { Future.future(a -> a.complete()).compose(a -> { Promise promise2 = Promise.promise(); try { promise2.complete(); } catch(Exception ex) { promise2.fail(ex); } return promise2.future(); }).onSuccess(a -> { promise.complete(); }).onFailure(ex -> { promise.fail(ex); }); return promise.future(); } @Override public Future promiseDeepForClass(SiteRequestEnUS siteRequest_) { return promiseDeepIotNodePage(siteRequest_); } ///////////////// // siteRequest // ///////////////// public void siteRequestIotNodePage(SiteRequestEnUS siteRequest_) { super.siteRequestIotNodeGenPage(siteRequest_); } public void siteRequestForClass(SiteRequestEnUS siteRequest_) { siteRequestIotNodePage(siteRequest_); } ///////////// // obtain // ///////////// @Override public Object obtainForClass(String var) { String[] vars = StringUtils.split(var, "."); Object o = null; for(String v : vars) { if(o == null) o = obtainIotNodePage(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; } public Object obtainIotNodePage(String var) { IotNodePage oIotNodePage = (IotNodePage)this; switch(var) { default: return super.obtainIotNodeGenPage(var); } } /////////////// // relate // /////////////// @Override public boolean relateForClass(String var, Object val) { String[] vars = StringUtils.split(var, "."); Object o = null; for(String v : vars) { if(o == null) o = relateIotNodePage(v, val); else if(o instanceof BaseModel) { BaseModel baseModel = (BaseModel)o; o = baseModel.relateForClass(v, val); } } return o != null; } public Object relateIotNodePage(String var, Object val) { IotNodePage oIotNodePage = (IotNodePage)this; switch(var) { default: return super.relateIotNodeGenPage(var, val); } } /////////////// // staticSet // /////////////// public static Object staticSetForClass(String entityVar, SiteRequestEnUS siteRequest_, String o) { return staticSetIotNodePage(entityVar, siteRequest_, o); } public static Object staticSetIotNodePage(String entityVar, SiteRequestEnUS siteRequest_, String o) { switch(entityVar) { default: return IotNodeGenPage.staticSetIotNodeGenPage(entityVar, siteRequest_, o); } } //////////////// // staticSearch // //////////////// public static Object staticSearchForClass(String entityVar, SiteRequestEnUS siteRequest_, Object o) { return staticSearchIotNodePage(entityVar, siteRequest_, o); } public static Object staticSearchIotNodePage(String entityVar, SiteRequestEnUS siteRequest_, Object o) { switch(entityVar) { default: return IotNodeGenPage.staticSearchIotNodeGenPage(entityVar, siteRequest_, o); } } /////////////////// // staticSearchStr // /////////////////// public static String staticSearchStrForClass(String entityVar, SiteRequestEnUS siteRequest_, Object o) { return staticSearchStrIotNodePage(entityVar, siteRequest_, o); } public static String staticSearchStrIotNodePage(String entityVar, SiteRequestEnUS siteRequest_, Object o) { switch(entityVar) { default: return IotNodeGenPage.staticSearchStrIotNodeGenPage(entityVar, siteRequest_, o); } } ////////////////// // staticSearchFq // ////////////////// public static String staticSearchFqForClass(String entityVar, SiteRequestEnUS siteRequest_, String o) { return staticSearchFqIotNodePage(entityVar, siteRequest_, o); } public static String staticSearchFqIotNodePage(String entityVar, SiteRequestEnUS siteRequest_, String o) { switch(entityVar) { default: return IotNodeGenPage.staticSearchFqIotNodeGenPage(entityVar, siteRequest_, o); } } ////////////// // toString // ////////////// @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(super.toString()); return sb.toString(); } public static final String CLASS_SIMPLE_NAME = "IotNodePage"; public static String displayNameForClass(String var) { return IotNodePage.displayNameIotNodePage(var); } public static String displayNameIotNodePage(String var) { switch(var) { default: return IotNodeGenPage.displayNameIotNodeGenPage(var); } } }




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy