rdfframework.api package

Submodules

rdfframework.api.rdfapifields module

rdfframework.api.rdfapifields.get_api_field(field, instance='', **kwargs)[source]

return an API field

rdfframework.api.rdfapifields.get_api_field_json(field, instructions, instance, user_info, item_permissions=None)[source]

This function will read through the RDF defined info and proccess the json to return the correct values for the instance, security and details

rdfframework.api.rdfapis module

class rdfframework.api.rdfapis.Api(*args, **kwargs)[source]

Bases: object

This class is used for a rdfframework API

add_props(prop_list)[source]

adds a new property/field to the form in all the correct locations

redirect_url(id_value=None, **kwargs)[source]

formats the redirect url for the form in its current state

remove_prop(prop)[source]

removes a prop completely from the form

reset_fields()[source]

fields are moved around during save process and if the validation fails this method will return the fields to their original locations

save()[source]

sends the form to the framework for saving

set_obj_data(**kwargs)[source]

sets the data for the current form paramters

**keyword arguments subject_uri: the URI for the subject class_uri: the rdf class of the subject

rdfframework.api.rdfapis.get_api_instructions_json(instructions, instance)[source]

This function will read through the RDF defined info and proccess the json to retrun the correct instructions for the specified form instance.

rdfframework.api.rdfapis.rdf_framework_api_factory(api_id, **kwargs)[source]
Generates a form class based on the form definitions in the
kds-app.ttl file
keyword Args:
class_uri: the classUri used for a form with loaded data
* has to be the class of the subject_uri for
the form data lookup

subject_uri: the uri of the object that you want to lookup is_subform: True or False. States whether the form is a subform

of another form

Module contents