View

View of the Model View Controller external link

Contains the class for the

  • SchemaView
class view.schema_view.SchemaView

SchemaView class handles all output creating valid HTML

static ajax_properties(schema, web_hierarchy)

Class method: creates a section of HTML with the properties of the schema

Parameters:
  • schema – SchemaClass
  • web_hierarchy – the id of the hierarchy
Returns:

html <li></li>

generate_schema_output(schema_name, ctx)

Generate the valid Schema. This can be validated on Google Developers Structured Data Testing Tool external link

The properties with data get placed in their respective divs

Parameters:ctx – Context with the Query_string arguments
get_index(hierarchy)
Class method: Gets the html for the full hierarchy
Calls the recursive private function _traverse_hierarchy
Parameters:hierarchy – The list of lists that’s the full hierarchy
Returns:index.html
static get_saved_output()

Class method for UX experience. Shows the schema has effectively been stored in LocalStorage

Returns:str
show_schema_properties(schema)

Class method: Creates top level output for a schema

Parameters:schema – SchemaClass
Return type:str - html