RomEntity | R Documentation |
Object for storing a single entity with attribute and timeseries related
Has standard methods for managing data and meta data
reference class of type openmi.om.base.
an updated config if necessary or FALSE if it fails
loads the varid
the variable definition object for this entity
A property object for this entity derived from the local or remote DB OR populated by user inputs if property does not exist
the property object for this entity
the data from the remote connection
name
what is it called
base_entity_type
kind of entity
datasource
RomDataSource
pk_name
the name of this entity's pk column
entity_id
unique ID of entity
sql_select_from
syntax to use to select via an odbc or other SQL based datasource
base_only
- how to export to list in case of complex multi table entity and ODBC
has_vardef
is pluggable?
varid
(optional) integer field for pluggable entities
vardef
(optional) full RomVariableDefinition
plugin
(optional) instance of dHVariablePlugin class
matrix_revision_id
Populated by any use of this object's save_field() method to indicate the revision ID of this change to the field table. Used to match Drupal 7's now deprecated revision system.
get_id()
RomEntity$get_id()
get_id the unique id of this entity alias to remote pkid, subclassed as function
propvalues()
RomEntity$propvalues(propname = NULL, varid = NULL, propcode = NULL)
propname
optional name to filter
varid
option variable to filter
propcode
optional code to filter
propvalues unique properties of this entity
tsvalues()
RomEntity$tsvalues(varkey = NULL, tstime = NULL, tsendtime = NULL)
varkey
option variable to filter
tstime
timespan begin
tsendtime
timespan end
tsvalues unique timeseries records for this entity
new()
RomEntity$new(datasource = NULL, config = list(), load_remote = FALSE)
datasource
RESTful repository (optional)
config
list of attributes to set, see also: to_list() for format
load_remote
automatically query REST data source for matches?
object instance
handle_config()
RomEntity$handle_config(config)
config
insure_varid()
RomEntity$insure_varid(config)
config
get_vardef()
RomEntity$get_vardef(config = FALSE, refresh = FALSE)
config
list of attributes to set, see also: to_list() for format
refresh
automatically refresh var info?
get_prop()
Get a 1st order property from this entity (assuming this entities
entity_type
. This method will search for a user propname,
varkey, or propcode from dh_properties using this entity's id
(derived from RomEntity$get_id()
as the featureid. If the
property is not set locally (if remote = FALSE) or in the DB (if
remote = TRUE), then it will return an instance of RomProperty with
the specified user inputs and this entity's ID.
RomEntity$get_prop( propname = NULL, varkey = NULL, propcode = NULL, remote = TRUE )
propname
Propname of the first order property
varkey
varkey of the first order property (usually used in case of new prop creation)
propcode
propcode of the first order property (usually used in case of new prop creation)
remote
look at remote datasource for properties?
set_prop()
RomEntity$set_prop( propname, propcode = NULL, propvalue = NULL, varkey = NULL, data_matrix = NULL, remote = TRUE )
propname
name or property
propcode
if alpha property use this
propvalue
if numeric property use this
varkey
which varkey? defaults to guess Constant and AlphanumericConstant
data_matrix
dataframe contained rows/cols
remote
look at remote datasource?
from_list()
RomEntity$from_list(config)
config
list of attributes to set, see also: to_list() for format
NULL
load_data()
RomEntity$load_data(config, load_remote)
config
load_remote
automatically query remote data source for matches?
load_plugin()
RomEntity$load_plugin()
nothing, but loads the objects plugin
to_list()
RomEntity$to_list(base_only = FALSE)
base_only
whether to only use base columns (TRUE) or add fields (FALSE)
list of object attributes suitable for input to new() and from_list() methods
save()
RomEntity$save(push_remote = FALSE)
push_remote
update locally only or push to remote database
NULL
delete()
RomEntity$delete(delete_remote = FALSE)
delete_remote
update locally only or push to remote database
NULL
save_field()
RomEntity$save_field( class_field_name, field_table, value_pairs, pkeys = c("entity_type", "entity_id") )
class_field_name
what is this field called on this object (deprecated)
field_table
table to insert into
value_pairs
attriutes to add to insert above the basic entity info (field value here)
pkeys
whether to automatically propagate changes to remote data source
NULL
clone()
The objects of this class are cloneable with this method.
RomEntity$clone(deep = FALSE)
deep
Whether to make a deep clone.
NA
NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.