Class: Diagram

Defined in: web-src/coffee/model/diagram.coffee

Overview

Abastract class for diagrams.

Instance Method Summary

Constructor Details

# (void) constructor(graph = null, owllink = "")

Parameters:

  • graph ( joint.Graph )

Instance Method Details

# (void) reset()

Reset the current diagram to start over empty.

# (void) refresh_URIs_diag()

# (Factory) get_factory()

Get the factory used for creating the joint.dia elements.

Returns:

  • ( Factory ) — A factory subclass instance.

# (void) set_factory(factory)

Parameters:

  • factory ( Factory ) Used for creating the joint.dia elements.

# (void) show_class_info(class_id)

# (void) get_all_namespaces()

# (void) get_ontologyIRI()

# (void) get_defaultIRIs()

# (void) get_IRIs()

# (void) reset_ns()

# (void) add_default_ns(iri, prefix)

# (void) add_custom_ns(iri, prefix)

# (void) update_ontologyIRI(iri, prefix)

# (void) update_lnamespaces(arr_ns)

# (void) update_view(class_id, paper)

# (void) find_class_by_name(name)

# (void) find_class_by_classid(classid)

# (void) find_attr_by_attrid(attrid)

# (joint.graph) get_graph()

Returns:

  • joint.graph

# (void) get_namespaces()

# (void) check_names_for_IRIs(name)

# (void) set_graph(graph)

Parameters:

  • graph ( joint.graph )

# (void) actualizar_graph()

Update the joint.Graph instance with the new cells.

# (object) to_json()

Return a JSON representing the Diagram.

We want to send only some things not all the JSON the object has. So, we drop some things, like JointJS graph objects.

Use JSON.stringify(json_object) to translate a JSON object to string.

Returns:

  • ( object ) — A JSON object.

# (void) import_json(json)

Import the diagram in JSON format.

Parameters:

  • json ( object ) A JSON object.

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: