class TopicMap - 5.1 Topic Map

Declared in module tm

Synopsis

class TopicMap:
    def X__get_objects(self)
    def X__get_scopes_dict(self, tm_object, transitive=0, scopes=None) # Get dictionary containing all scopes connected to the specified topic map object.
    def X__get_types_dict(self, tm_object, transitive=0, types=None) # Get dictionary containing all topic types connected to the specified topic map object.
    def __getitem__(self, sgml_id) # Get topic by sgml id.
    def __init__(self, name='', addthems=())
    def __str__(self)
    def add_added_themes(self, theme) # Set the added theme of the topic map.
    def add_association(self, association) # Add the association to this topic map.
    def add_facet(self, facet) # Add the facet to this topic map.
    def add_topic(self, topic) # Add the topic to this topic map.
    def finalize(self) # Finalize the TopicMap object and resolve any missing information.
    def get_added_themes(self) # Get the added themes of the topic map.
    def get_association_scopes(self, associations=None, transitive=0) # Get a list containing the scopes that the given associations exists in.
    def get_association_types(self, associations=None, transitive=0) # Get a list containing the topic types describing the given associations.
    def get_associations(self) # Get a list containing all associations.
    def get_associations_in_scope(self, scope, associations=None, transitive=0) # Get a list containing all associations that is of a given association type.
    def get_associations_of_type(self, type, associations=None, transitive=0) # Get a list containing all associations that is of a given association type.
    def get_facet_types(self, facets=None, transitive=0) # Get a list containing the topic types describing the given facets.
    def get_facets(self) # Get a list containing all facets.
    def get_facets_of_type(self, type, facets=None, transitive=0) # Get a list containing all facets that is of a given facet type.
    def get_id(self) # Get the internal TopicMap id.
    def get_name(self) # Get the name of the topic map.
    def get_object_scopes(self, tm_objects=None, transitive=0) # Get a list containing the scopes of the given topic map objects.
    def get_object_types(self, tm_objects=None, transitive=0) # Get a list containing the types describing the given topic map objects.
    def get_objects_in_scope(self, scope, tm_objects=None, transitive=0) # Get a list containing all topic map objects that is in the given scope.
    def get_objects_of_type(self, type, tm_objects=None, transitive=0) # Get a list containing all topic map objects that is of a given type.
    def get_related_associations(self, topic, associations=None) # Get a list of associations where the topic is involved.
    def get_scopes_list(self, tm_object, transitive=0) # Get a list containing all scopes connected to the specified topic map object.
    def get_topic_by_sgml_id(self, sgml_id) # Get topic by id. Returns a single topic.
    def get_topic_types(self, topics=None, transitive=0) # Get a list containing the topic types describing the given topics.
    def get_topics(self) # Get a list containing all topics.
    def get_topics_of_type(self, type, topics=None, transitive=0) # Get a list containing all topics that is of a given topic type.
    def get_types_hierarchy(self, tm_object, types=None) # Get nested list containing a hierarchy of types connected to this topic map object.
    def get_types_list(self, tm_object, transitive=0) # Get a list containing all topic types connected to the specified topic map object.
    def has_association(self, association) # Does the association exist in this topic map?
    def has_facet(self, facet) # Does the facet exist in this topic map?
    def has_topic(self, topic) # Does the topic exist in this topic map?
    def has_topic_by_sgml_id(self, sgml_id) # Does a topic with the specified sgml-id exist in this topic map?
    def is_type(self, tm_object, type, transitive=0) # Is the specified topic map object of this type?
    def remove_association(self, association) # Remove the association from this topic map.
    def remove_facet(self, topic) # Remove the facet from this topic map.
    def remove_topic(self, topic) # Remove the topic from this topic map.
    def set_added_themes(self, themes) # Set the added themes of the topic map.
    def set_name(self, name) # Set the name of the topic map.

X__get_objects(self)

None

Get a list of all topic map objects (topics, associations and facets) that belong to the topic map.

X__get_scopes_dict(self, tm_object, transitive=0, scopes=None)

Get dictionary containing all scopes connected to the specified topic map object.

The keys are the topics themselves, the values are None.

X__get_types_dict(self, tm_object, transitive=0, types=None)

Get dictionary containing all topic types connected to the specified topic map object.

The keys are the topics themselves, the values are None.

get_association_scopes(self, associations=None, transitive=0)

Get a list containing the scopes that the given associations exists in.

If associations is None, all associations in the topic map is evaluated.

get_association_types(self, associations=None, transitive=0)

Get a list containing the topic types describing the given associations.

If associations is None, all associations in the topic map is evaluated.

get_associations_in_scope(self, scope, associations=None, transitive=0)

Get a list containing all associations that is of a given association type.

If associations is None, all associations in the topic map is evaluated.

get_associations_of_type(self, type, associations=None, transitive=0)

Get a list containing all associations that is of a given association type.

If associations is None, all associations in the topic map is evaluated.

get_facet_types(self, facets=None, transitive=0)

Get a list containing the topic types describing the given facets.

If facets is None, all facets in the topic map is evaluated.

get_facets_of_type(self, type, facets=None, transitive=0)

Get a list containing all facets that is of a given facet type.

If facets is None, all facets in the topic map is evaluated.

get_object_scopes(self, tm_objects=None, transitive=0)

Get a list containing the scopes of the given topic map objects.

If tm_objects is None, all objects in the topic map is evaluated.

get_object_types(self, tm_objects=None, transitive=0)

Get a list containing the types describing the given topic map objects.

If tm_objects is None, all objects in the topic map is evaluated.

get_objects_in_scope(self, scope, tm_objects=None, transitive=0)

Get a list containing all topic map objects that is in the given scope.

If tm_objects is None, all objects in the topic map is evaluated.

get_objects_of_type(self, type, tm_objects=None, transitive=0)

Get a list containing all topic map objects that is of a given type.

If tm_objects is None, all objects in the topic map is evaluated.

transitive = 0 means that only direct types should be evaluated, transitive=1 means that all transitive types should be evaluated.

Get a list of associations where the topic is involved.

If associations is None, all associations in the topic map is evaluated.

get_topic_types(self, topics=None, transitive=0)

Get a list containing the topic types describing the given topics.

If topics is None, all topics in the topic map is evaluated.

get_topics_of_type(self, type, topics=None, transitive=0)

Get a list containing all topics that is of a given topic type.

If topics is None, all topics in the topic map is evaluated.

transitive = 0 means that only direct types should be evaluated, transitive=1 means that all transitive topic types should be evaluated.

get_types_hierarchy(self, tm_object, types=None)

Get nested list containing a hierarchy of types connected to this topic map object.

Note that this methods traverses the types tree recursively to collect all supertypes.

get_types_list(self, tm_object, transitive=0)

Get a list containing all topic types connected to the specified topic map object.

This is a flattened version of the get_types_hierarchy method or the keys of the dictionary returned by the get_types_dict method.

is_type(self, tm_object, type, transitive=0)

Is the specified topic map object of this type?

Note that if transitive in specified this methods traverses the types tree recursively to compare the specified type against all supertypes.