Class: MyModel

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

Overview

On subclass

Re-implement this functions:

Instance Method Summary

Constructor Details

# (void) constructor(name)

This constructor also creates the uri associated to each primitive using the default ontology URI

Parameters:

  • name ( String )

Instance Method Details

# (?) get_joint(factory = null, csstheme = null)

Return the joint model. Create it if it is null and a factory is provided.

Parameters:

  • factory ( Factory subclass ) Concrete Factory like UMLFactory or ERDFactory instance.

Returns:

# (Array<JointJS::Cells>) create_joint(factory, csstheme = null)

Note: Please redefine this method in the subclass.

Create a JointJS view class and assign it to @joint variable.

Caution

The first element is used for get_classid, representing it as the JointJS visual element of this instance. If this instance has more than one JointJS cells, the first one is the most important.

Parameters:

  • factory ( Factory subclass ) A concrete Factory for creating the view instance.

Returns:

  • ( Array<JointJS::Cells> ) — An array of Cells elements.

# (void) update_view(paper)

Update the view if the @joint is already created and associated to this class.

# (boolean) has_classid(classid)

Returns:

  • ( boolean ) — true if this Joint Model has the given classid string.

# (boolean) has_attrid(attrid)

Returns:

  • ( boolean ) — true if this Joint Model has the given attrid string.

# (boolean) has_isaid(isaid)

Returns:

  • ( boolean ) — true if this Joint Model has the given isaid string.

# (boolean) has_relid(isaid)

Returns:

  • ( boolean ) — true if this Joint Model has the given relid string.

# (string) get_classid()

Return the classid value of the associated JointJS View object. Use MyModel#create_joint for creating a JointJS object.

Returns:

  • ( string ) — A string for the JointJS object or false if it wasn't initialized.

# (void) get_attributeid()

# (void) get_isaid()

# (void) get_relid()

# (void) update_URI(name)

Update name, uri and prefix (if any) of the current primitive @param name. A String with the name, fullname or name and prefix of a primitive

# (void) update_URI_all(name, prefix, url)

# (void) update_URI_fullname(name, url)

# (void) update_URI_prefixedname(name, prefix)

# (void) get_uri()

# (void) get_name_uri()

# (void) get_prefix_uri()

# (void) get_url_uri()

# (void) get_fullname()

# (void) to_json()

Note: Redefine this method in the subclass.

Return a JSON object representation with only the information.

# (void) update_position()

Simply update the coordinates of this object to its proper position. Useful when the object has other dependants, that should move accordingly to one or another.

Consider it could be called when the user change the position of the JointJS Object or any associated MyModel/Joint object to update the position of this object accordingly to them. So, this is also an event handler .

Redefine this function if necessary.

# (void) same_elts(other)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: