Class: MyModel
Defined in: | web-src/coffee/model/mymodel.coffee |
Overview
On subclass
Re-implement this functions:
- constructor
- create_joint
- others?
Instance Method Summary
- # (?) get_joint(factory = null, csstheme = null) Return the joint model.
- # (Array<JointJS::Cells>) create_joint(factory, csstheme = null) Create a JointJS view class and assign it to @joint variable.
- # (void) update_view(paper) Update the view if the @joint is already created and associated to this class.
- # (boolean) has_classid(classid)
- # (boolean) has_attrid(attrid)
- # (boolean) has_isaid(isaid)
- # (boolean) has_relid(isaid)
- # (string) get_classid() Return the classid value of the associated JointJS View object.
- # (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.
- # (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() Return a JSON object representation with only the information.
- # (void) update_position() Simply update the coordinates of this object to its proper position.
- # (void) same_elts(other)
Constructor Details
#
(void)
constructor(name)
This constructor also creates the uri associated to each primitive using the default ontology URI
Instance Method Details
#
(?)
get_joint(factory = null, csstheme = null)
Return the joint model. Create it if it is null and a factory is provided.
#
(Array<JointJS::Cells>)
create_joint(factory, csstheme = null)
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.
#
(void)
update_view(paper)
Update the view if the @joint is already created and associated to this class.
#
(boolean)
has_classid(classid)
#
(boolean)
has_attrid(attrid)
#
(boolean)
has_isaid(isaid)
#
(boolean)
has_relid(isaid)
#
(string)
get_classid()
Return the classid value of the associated JointJS View object. Use MyModel#create_joint for creating a JointJS object.
#
(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()
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)