Class: DiagAdapter

Defined in: web-src/coffee/gui/diagadapter.coffee

Overview

Adapter for providing proper parameters to the diagram Model and its interaction with the interface.

Direct Known Subclasses

ORMAdapter

Instance Method Summary

Constructor Details

# (void) constructor(diag, paper)

Instance Method Details

# (void) set_paper(paper)

# (void) add_attribute(hash_data)

Add an attribute

# (void) add_object_type(hash_data)

# (void) add_relationship(class_a_id, class_b_id, name = null, mult = null, roles = null)

# (void) add_relationship_aux(class_a_id, name = null, mult = null, roles = null, with_class = null)

# (void) add_relationship_attr(class_id, attribute_id, name = null)

# (void) add_subsumption(class_id, isa_id, name)

# (void) edit_class_name(class_id, name)

Change a class name identified by its classid.

Examples:

Getting a classid

< graph.getCells()[0].id
> "5777cd89-45b6-407e-9994-5d681c0717c1"

Parameters:

  • class_id ( string )
  • name ( string )

# (void) delete_class(class_id)

Delete a class from the diagram.

Parameters:

  • class_id ( string ) a String with the class Id.

# (void) show_class_info(class_id)

# (void) show_gen_info(gen_id)

# (void) show_assoc_info(assoc_id)

# (void) import_jsonstr(jsonstr)

Import a JSON string.

This will not reset the current diagram, just add more elements.

GUIIMPL Subclasses

This messages does not need to be reimplemented in GUIIMPL subclasses

#diag_to_json().

Parameters:

  • jsonstr ( String ) a JSON string, like the one returned by

See also:

# (void) import_json(json_obj)

Import a JSON object.

This will not reset the current diagram, just add more elements.

Same as import_jsonstr, but it accept a JSON object as parameter.

Parameters:

  • json_obj ( JSON object ) A JSON object.

# (void) reset_all()

Reset all the diagram and the input forms.

Reset the diagram and the "OWLlink Insert" input field.

# (string) diag_to_json()

Generate a JSON string representation of the current diagram.

Returns:

  • ( string ) — A JSON string.

# (void) set_unsatisfiable(classes_list)

Show these classes as unsatisifable.

Parameters:

  • classes_list ( Array<String> ) a list of classes names.

# (void) set_satisfiable(classes_list)

Show these classes as satisifable.

Parameters:

  • classes_list ( Array<String> ) a list of classes names.

# (void) set_inferredSubs(isubs_list)

# (void) set_inferredCards(icards_list)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: