|
|
|
|
|
|
|
envelope(self,
tree,
stylesheet_path,
**args)
Wraps XML contents into an XML envelope like: |
source code
|
|
|
tree(self,
elements,
root=None,
domain=None,
url=None,
start=None,
limit=None,
results=None,
maxbounds=False)
Builds a S3XML tree from a list of elements |
source code
|
|
|
|
|
|
|
|
|
rmap(self,
table,
record,
fields)
Generates a reference map for a record |
source code
|
|
|
|
|
|
|
gis_encode(self,
resource,
record,
element,
location_data=None)
GIS-encodes the master resource so that it can be transformed into a
mappable format. |
source code
|
|
|
resource(self,
parent,
table,
record,
alias=None,
fields=None,
url=None,
lazy=None,
llrepr=None,
postprocess=None)
Creates a <resource> element from a record |
source code
|
|
|
get_options(self,
table,
fields=None,
show_uids=False,
hierarchy=False)
Get options of option fields in a table as <select>s |
source code
|
|
|
get_fields(self,
prefix,
name,
parent=None,
meta=False,
options=False,
references=False,
labels=False)
Get fields in a table as <fields> element |
source code
|
|
|
get_struct(self,
prefix,
name,
alias=None,
parent=None,
meta=False,
options=True,
references=False)
Get the table structure as XML tree |
source code
|
|
Inherited from s3codec.S3Codec :
decode ,
encode
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
|
|
|
|
record(cls,
table,
element,
original=None,
files=None,
skip=None,
postprocess=None)
Creates a record (Storage) from a <resource> element and
validates it |
source code
|
|
|
|
|
|
|
tree2json(cls,
tree,
pretty_print=False,
native=False,
as_dict=False)
Converts an element tree into JSON |
source code
|
|
|
xls2tree(cls,
source,
resourcename=None,
extra_data=None,
hashtags=None,
sheet=None,
rows=None,
cols=None,
fields=None,
header_row=True)
Convert a table in an XLS (MS Excel) sheet into an ElementTree,
consisting of <table name="format">, <row> and
<col field="fieldname"> elements (see: csv2tree). |
source code
|
|
|
csv2tree(cls,
source,
resourcename=None,
extra_data=None,
hashtags=None,
delimiter=",",
quotechar='"')
Convert a table-form CSV source into an element tree, consisting of
<table name="format">, <row> and <col
field="fieldname"> elements. |
source code
|
|
Inherited from s3codec.S3Codec :
get_codec ,
xml_decode ,
xml_encode
|
|
namespace = "sahana"
|
|
CACHE_TTL = 20
|
|
UID = "uuid"
|
|
MCI = "mci"
|
|
DELETED = "deleted"
|
|
REPLACEDBY = "deleted_rb"
|
|
APPROVED = "approved"
|
|
CTIME = "created_on"
|
|
CUSER = "created_by"
|
|
MTIME = "modified_on"
|
|
MUSER = "modified_by"
|
|
OGROUP = "owned_by_group"
|
|
OUSER = "owned_by_user"
|
|
Lat = "lat"
|
|
Lon = "lon"
|
|
IGNORE_FIELDS = ["id", "deleted_fk", "approved_by", "realm_ent...
|
|
FIELDS_TO_ATTRIBUTES = ["id", "admin", CUSER, MUSER, OGROUP, O...
|
|
ATTRIBUTES_TO_FIELDS = ["admin", CUSER, MUSER, OGROUP, OUSER, ...
|
|
TAG = Storage(col= "col", contents= "contents", data= "data", ...
|
|
ATTRIBUTE = Storage(alias= "alias", attributes= "attributes", ...
|
|
ACTION = Storage(create= "create", read= "read", update= "upda...
|
|
PREFIX = Storage(attribute= "@", options= "$o", reference= "$k...
|
Inherited from s3codec.S3Codec :
CODECS ,
PY2XML ,
XML2PY ,
indices
|