assembl.models.idea_content_link module¶

Links between assembl.models.idea.Idea and assembl.models.generic.Content.

class assembl.models.idea_content_link.AnnotationSelector(**kwargs)[source]¶

Bases: assembl.models.DiscussionBoundBase

classmethod get_discussion_conditions(discussion_id, alias_maker=None)[source]¶

Returns a list of SQLA expressions that constrain a query on this class to a given discussion.

get_discussion_id()[source]¶

Get the ID of an associated discussion object, if any.

class assembl.models.idea_content_link.Extract(**kwargs)[source]¶

Bases: assembl.models.DiscussionBoundBase, assembl.lib.history_mixin.OriginMixin

An extracted part of a Content. A quotation to be referenced by an Idea.

classmethod base_conditions(alias=None, alias_maker=None)[source]¶

Return a list of SQLA expressions that will filter out instances of this class

Mostly used to exclude archived versions; see assembl.lib.history_mixin The exclusion pattern is used by the traversal API, and by the RDF mapping.

classmethod get_discussion_conditions(discussion_id, alias_maker=None)[source]¶

Returns a list of SQLA expressions that constrain a query on this class to a given discussion.

get_discussion_id()[source]¶

Get the ID of an associated discussion object, if any.

populate_from_context(context)[source]¶

If object created in this context, populate some relations from that context.

This is the magic fallback, ideally define the relationships you want populated explicitly in subclasses of this.

classmethod restrict_to_owners_condition(query, user_id, alias=None, alias_maker=None)[source]¶

filter query according to object owners

send_to_changes(connection=None, operation=<CrudOperation.UPDATE: 0>, discussion_id=None, view_def='changes')[source]¶

invoke the modelWatcher on creation

classmethod special_quad_patterns(alias_maker, discussion_id)[source]¶

Returns a list of quad map patterns for RDF mapping, beyond those defined by introspection.

Important: If defined somewhere, override in subclasses to avoid inheritance.

class assembl.models.idea_content_link.FragmentSelector(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.AnnotationSelector

class assembl.models.idea_content_link.IdeaContentLink(**kwargs)[source]¶

Bases: assembl.models.DiscussionBoundBase, assembl.lib.history_mixin.OriginMixin

Abstract class representing a generic link between an idea and a Content (typically a Post)

classmethod base_conditions(alias=None, alias_maker=None)[source]¶

Return a list of SQLA expressions that will filter out instances of this class

Mostly used to exclude archived versions; see assembl.lib.history_mixin The exclusion pattern is used by the traversal API, and by the RDF mapping.

classmethod get_discussion_conditions(discussion_id, alias_maker=None)[source]¶

Returns a list of SQLA expressions that constrain a query on this class to a given discussion.

get_discussion_id()[source]¶

Get the ID of an associated discussion object, if any.

class assembl.models.idea_content_link.IdeaContentNegativeLink(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.IdeaContentLink

A negative link between an idea and a Content. Such links mean that a transitive context should be considered broken. Used for thread breaking

class assembl.models.idea_content_link.IdeaContentPositiveLink(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.IdeaContentLink

A normal link between an idea and a Content. Such links should be traversed.

classmethod special_quad_patterns(alias_maker, discussion_id)[source]¶

Returns a list of quad map patterns for RDF mapping, beyond those defined by introspection.

Important: If defined somewhere, override in subclasses to avoid inheritance.

class assembl.models.idea_content_link.IdeaContentWidgetLink(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.IdeaContentPositiveLink

A link between an idea and a Content limited to a widget view. Such links should be traversed.

class assembl.models.idea_content_link.IdeaExtractLink(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.IdeaRelatedPostLink

A post that is relevant, to an idea through a harvested extract

classmethod special_quad_patterns(alias_maker, discussion_id)[source]¶

Returns a list of quad map patterns for RDF mapping, beyond those defined by introspection.

Important: If defined somewhere, override in subclasses to avoid inheritance.

class assembl.models.idea_content_link.IdeaRelatedPostLink(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.IdeaContentPositiveLink

A post that is relevant, as a whole, to an idea, without having a specific extract harvested.

classmethod special_quad_patterns(alias_maker, discussion_id)[source]¶

Returns a list of quad map patterns for RDF mapping, beyond those defined by introspection.

Important: If defined somewhere, override in subclasses to avoid inheritance.

class assembl.models.idea_content_link.IdeaThreadContextBreakLink(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.IdeaContentNegativeLink

Used for a Post the inherits an Idea from an ancester in the thread. It indicates that from this point on in the thread, this idea is no longer discussed.

class assembl.models.idea_content_link.TextFragmentIdentifier(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.AnnotationSelector

classmethod special_quad_patterns(alias_maker, discussion_id)[source]¶

Returns a list of quad map patterns for RDF mapping, beyond those defined by introspection.

Important: If defined somewhere, override in subclasses to avoid inheritance.

class assembl.models.idea_content_link.TextPositionSelector(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.AnnotationSelector

class assembl.models.idea_content_link.TextQuoteSelector(**kwargs)[source]¶

Bases: assembl.models.idea_content_link.AnnotationSelector

assembl.models.idea_content_link.idea_content_link_idea_set_listener(target, value, oldvalue, initiator)[source]¶

When an extract changes ideas, send the ideas on the socket.

Idealoom

Navigation

  • Installing IdeaLoom
  • IdeaLoom Configuration files
  • Setting-up backups for an IdeaLoom server
  • Python Requirements
  • The IdeaLoom technology stack
  • Permissions and roles architecture
  • Group and panels architecture
  • Data interdependence in the frontend
  • How to perform common developper tasks
  • Writing documentation for IdeaLoom
  • Contributing to IdeaLoom translations
  • Building a docker image
  • Writing tests
  • Example debate fixture
  • Development: Creating a new model class tutorial
  • IdeaLoom’s routes and APIs
  • Piwik Reporting API
  • Analytics Events
  • assembl
    • assembl package
      • Subpackages
        • assembl.auth package
        • assembl.lib package
        • assembl.models package
        • assembl.nlp package
        • assembl.scripts package
        • assembl.semantic package
        • assembl.tasks package
        • assembl.tests package
        • assembl.tweens package
        • assembl.view_def package
        • assembl.views package
      • Submodules
      • Module contents
  • API

Related Topics

  • Documentation overview
    • assembl
      • assembl package
        • assembl.models package
          • Previous: assembl.models.idea module
          • Next: assembl.models.idea_graph_view module

Quick search

©2012-2020, Clouds Collective of skills inc., Bluenove Group inc., Imagination For People, Caravan Web Worker Cooperative inc., Technologies Coeus inc., Solutions Conversence inc.. | Powered by Sphinx 3.5.1 & Alabaster 0.7.12 | Page source