stalker.models.link.Link¶
-
class
stalker.models.link.Link(full_path=”, original_filename=”, **kwargs)[source]¶ Bases:
stalker.models.entity.EntityHolds data about external links.
Links are all about giving some external information to the current entity (external to the database, so it can be something on the
Repositoryor in the Web or anywhere that the server can reach). The type of the link (general, file, folder, web page, image, image sequence, video, movie, sound, text etc.) can be defined by aTypeinstance (you can also use multipleTaginstances to add more information, and to filter them back). Again it is defined by the needs of the studio.For sequences of files the file name should be in “%h%p%t %R” format in PySeq formatting rules.
There are three secondary attributes (properties to be more precise)
path,filenameandextension. These attributes are derived from thefull_pathattribute and they modify it.- Path
- It is the path part of the full_path
- Filename
- It is the filename part of the full_path, also includes the extension, so changing the filename also changes the extension part.
- Extension
- It is the extension part of the full_path. It also includes the extension separator (‘.’ for most of the file systems).
Parameters: full_path – The full path to the link, it can be a path to a folder or a file in the file system, or a web page. For file sequences use “%h%p%t %R” format, for more information see PySeq Documentation. It can be set to empty string (or None which will be converted to an empty string automatically). -
__init__(full_path=”, original_filename=”, **kwargs)¶
Methods
__init__([full_path, original_filename])Attributes
created_byThe Userwho has created this object.created_by_idThe id of the Userwho has created this entity.date_createdA datetime.datetimeinstance showing the creation date and time of this object.date_updatedA datetime.datetimeinstance showing the update date and time of this object.descriptionDescription of this object. entity_groupsentity_identity_typeextensionthe extension property filenamethe filename property full_pathThe full path of the url to the link. generic_dataThis attribute can hold any kind of data which exists in SOM. generic_textThis attribute can hold any text. html_classhtml_styleidlink_idmetadatanameName of this object nice_nameNice name of this object. notesAll the Notess attached to this entity.original_filenamepaththe path property plural_class_namethe plural name of this class querytagsA list of tags attached to this object. thumbnailthumbnail_idtjp_idreturns TaskJuggler compatible id to_tjprenders a TaskJuggler compliant string used for TaskJuggler typeThe type of the object. type_idThe id of the Typeof this entity.updated_byThe Userwho has updated this object.updated_by_idThe id of the Userwho has updated this entity.-
full_path¶ The full path of the url to the link.
-
path¶ the path property
-
date_created¶ A
datetime.datetimeinstance showing the creation date and time of this object.
-
date_updated¶ A
datetime.datetimeinstance showing the update date and time of this object.
-
description¶ Description of this object.
-
filename¶ the filename property
-
generic_data¶ This attribute can hold any kind of data which exists in SOM.
-
generic_text¶ This attribute can hold any text.
-
name¶ Name of this object
-
nice_name¶ Nice name of this object.
It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.
-
notes¶ All the
Notess attached to this entity.It is a list of
Noteinstances or an empty list, setting it to None will raise a TypeError.
-
plural_class_name¶ the plural name of this class
A list of tags attached to this object.
It is a list of
Taginstances which shows the tags of this object
-
tjp_id¶ returns TaskJuggler compatible id
-
to_tjp¶ renders a TaskJuggler compliant string used for TaskJuggler integration. Needs to be overridden in inherited classes.
-
type¶ The type of the object.
It is a
Typeinstance with a properType.target_entity_type.
-
type_id¶ The id of the
Typeof this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.
-
extension¶ the extension property