Python API Reference

Contents

Python API Reference#

This page provides the complete auto-generated API reference for the Lattix Python API.

Module: pyliblattix#

class pyliblattix.Iterator#

Bases: Generic

has_next()#
Return type:

bool

next()#
Return type:

T

class pyliblattix.Atom#

Bases: object

property module: DependModule#

Return the module that created this atom

property display_name: str#

Return the display name of the Atom. This may be the same as getName()

property kind: str#

Return the kind of this atom.

property name: str#

Return the name of the Atom. This should be unique

property name_space: str#

Return the name space of the atom

property short_display_name: str#
property module_id: str#

Return the module id in which to search for the target atom

class pyliblattix.BasicCollection#

Bases: object

property empty: bool#

Return true if the collection is empty

class pyliblattix.Partition#

Bases: object

property atom_partition: bool#
property leaf: bool#

Return true if this is a leaf partition

property reference: bool#

Returns true if this partition is a Partition Reference

references_atom(atom)#
Parameters:

atom (Atom) – an atom

Return type:

bool

property atom: Atom#

Return the Atom if this is an atom partition, else return null

property atom_set: AtomCollection#

Return a set of all the atoms directly contained in this partition

property container: Partition#
property partition_reference: Partition#

Return this Partition’s Reference Partition if any

property parent_rule_source: RuleSource#
property level: int#
property segment_map_index: int#
property clear_text_description: str#
property description: str#
property display_name: str#
property name: str#
property short_display_name: str#
property x_m_l_partition_type: str#
atom_iterator()#

Iterator through all the atoms directly contained in this partition

Return type:

Iterator[Atom]

property_name_iterator()#
Return type:

Iterator[str]

set_segment_map_index(index)#
Parameters:

index (int)

class pyliblattix.PartitionCollection#

Bases: object

contains(part)#
Parameters:

part (Partition)

Return type:

bool

property empty: bool#
size()#

Return the number of partitions in the collection

Return type:

int

iterator()#

Iterate over all the partitions in the collection

Return type:

Iterator[Partition]

class pyliblattix.PartitionCollectionCollection#

Bases: object

property empty: bool#

Return true if the collection is empty

iterator()#
Return type:

Iterator[PartitionCollection]

class pyliblattix.PartitionSet#

Bases: PartitionCollection

contains(e)#

Return true if the given element is in the collection

Parameters:

e (Partition)

Return type:

bool

property empty: bool#

Return true if the collection is empty

remove(part)#

Remove the given partition from the set

Parameters:

part (Partition) – The partition to remove

Return type:

bool

size()#

Return the number of partitions in the collection

Return type:

int

iterator()#

Returns an iterator over a collection of elements of type E.

Return type:

Iterator[Partition]

add(part)#

Add the given partition to the set

Parameters:

part (Partition) – the Partition to add

add_all(parts)#

Add all the partitions in the given collection to this set

Parameters:

parts (Iterable) – the Collection of partitions to add

class pyliblattix.PartitionRelation#

Bases: object

property source_partition: Partition#

Return the Source Partition

property target_partition: Partition#

Return the Target partition

property display_name: str#
class pyliblattix.PartitionRelationCollection#

Bases: object

contains(tag)#

Return true if the given PartitionRelation is in the collection

Parameters:

tag (PartitionRelation)

Return type:

bool

property empty: bool#

Return true if the collection is empty

iterator()#

Returns an iterator over the PartitionRelations

Return type:

Iterator[PartitionRelation]

class pyliblattix.AtomKind#

Bases: object

has_behavior(b)#

Return true if this AtomKind has the given behavior

Parameters:

b (AtomBehavior) – AtomBehavior

Return type:

bool

property member: bool#
supports_dependencies()#
Return type:

bool

supports_members()#
Return type:

bool

get_atom_property_definition(name)#
Parameters:

name (str)

Return type:

AtomPropertyDefinition

get_property_definition(name)#
Parameters:

name (str)

Return type:

AtomPropertyDefinition

property flags: int#
property image_name: str#
property module_id: str#

Return the module id that created this kind

property name: str#
property res_name: str#
behavior_iterator()#

Return an iterator of any behaviors this AtomKind has

Return type:

Iterator[AtomBehavior]

property_definition_iterator(flags)#
Parameters:

flags (int)

Return type:

Iterator[AtomPropertyDefinition]

class pyliblattix.Metric#

Bases: object

disable_hierarchy()#
Return type:

bool

property percent: bool#
property decimal_precision: int#
property segment_map_index: int#
get_description(resMgr)#
Parameters:

resMgr (ResourceManager)

Return type:

str

property format_string: str#
property format_string_res: str#
property id: str#
property image_name: str#
property name: str#
set_segment_map_index(index)#
Parameters:

index (int)

class pyliblattix.MetricsData#

Bases: object

get_metric(arg0, arg1)#
Parameters:
Return type:

Metric

get_metric2(tag)#
Parameters:

tag (AtomPropertyDefinition)

Return type:

Metric

get_metric3(tag)#
Parameters:

tag (Tag)

Return type:

Metric

property custom_metrics: MetricGroup#
property hidden_metrics: MetricGroup#
notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

property all_metrics_iterator: Iterator[Metric]#
property metrics_iterator: Iterator[MetricGroup]#
hash_code()#
Return type:

int

get_global_metric(id)#
Parameters:

id (str)

Return type:

Metric

add_global_metric(id, metric)#
Parameters:
set_global_metrics_data()#
add_to_all_metrics(metric)#
Parameters:

metric (Metric)

build_all_metrics()#
cleanup()#
dispose()#
dump_metrics()#
class pyliblattix.AtomCollection#

Bases: object

contains(atom)#

Returns true if the given atom is in this collection

Parameters:

atom (Atom)

Return type:

bool

property empty: bool#

Returns true if this collection is empty.

size()#

Return the number of atoms in this collection

Return type:

int

iterator()#

Return an iterator to visit each atom in this collection.

Return type:

Iterator[Atom]

class pyliblattix.AtomSet#

Bases: AtomCollection

contains(e)#

Return true if the given element is in the collection

Parameters:

e (Atom)

Return type:

bool

property empty: bool#

Return true if the collection is empty

remove(atom)#

remove the given atom from the set

Parameters:

atom (Atom) – remove the given atom

Return type:

bool

size()#

Return the number of atoms in this collection

Return type:

int

iterator()#

Returns an iterator over a collection of elements of type E.

Return type:

Iterator[Atom]

add(atom)#

Add the given atom to this set.

Parameters:

atom (Atom) – the atom to add

add_all(collection)#

Add all atoms in given collection

Parameters:

collection (AtomCollection) – Collection of atoms to add

class pyliblattix.DsmOrderingAlgorithm#

Bases: object

property id: str#
property name_res: str#
class pyliblattix.DependModule#

Bases: object

property id: str#

Return the uniqe ID of this plugin component

property name: str#
property version: str#
class pyliblattix.DependencyKind#

Bases: object

has_behavior(b)#

Return true if this DependencyKind has the given behavior

Parameters:

b (DependencyBehavior) – DependencyBehavior

Return type:

bool

clone()#
Return type:

DependencyKind

property flags: int#
property kind_id: str#

Return the id of this kind

property module_id: str#

Return the module id that created this kind

property res_name: str#

Return the resource name of this kind

behavior_iterator()#

Return an iterator of any behaviors this DependencyKind has

Return type:

Iterator[DependencyBehavior]

class pyliblattix.GraphCycles#

Bases: object

has_cycles()#
Return type:

bool

property container: Partition#
list_disjoint_paths(srcParts, targetParts)#
Parameters:
Return type:

PartitionEdgePathCollection

property cycle_components: Iterator[PartitionRelationCollection]#
notify()#
notify_all()#
wait2()#
property num_cycles: int#
hash_code()#
Return type:

int

to_string()#
Return type:

str

list_disjoint_paths2()#
Parameters:
  • srcParts

  • targetParts

Return type:

Iterator[PartitionEdgePathCollection]

class pyliblattix.DependencyBehavior#

Bases: object

property mask: int#
hash_code()#
Return type:

int

ordinal()#
Return type:

int

property name_res: str#
name()#
Return type:

str

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

value_of(name)#
Parameters:

name (str)

Return type:

DependencyBehavior

behavor_string_to_flags(string, ignoreUnknownBehaviors)#
Parameters:
  • string (str)

  • ignoreUnknownBehaviors (bool)

Return type:

int

get_behavior_string(flags)#
Parameters:

flags (DependencyKind)

Return type:

str

class pyliblattix.AtomBehavior#

Bases: object

property mask: int#
hash_code()#
Return type:

int

ordinal()#
Return type:

int

property name_res: str#
name()#
Return type:

str

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

has_member_behavior(flags)#
Parameters:

flags (AtomKind)

Return type:

bool

is_member_behavior(b)#
Parameters:

b (AtomBehavior)

Return type:

bool

value_of(name)#
Parameters:

name (str)

Return type:

AtomBehavior

behavor_string_to_flags(string, ignoreUnknownBehaviors)#
Parameters:
  • string (str)

  • ignoreUnknownBehaviors (bool)

Return type:

int

class pyliblattix.PartitionEdgePath#

Bases: object

contains(e)#

Return true if the given element is in the collection

Parameters:

e (Partition)

Return type:

bool

property empty: bool#

Return true if the collection is empty

get_at(index)#

Get the Partition at the given index in the path

Parameters:

index (int) – the index of the path

Return type:

Partition

size()#

Return the number of Partitions in the path

Return type:

int

iterator()#

Iterate over the Partitions in path order

Return type:

Iterator[Partition]

class pyliblattix.PartitionEdgePathCollection#

Bases: object

property empty: bool#

Return true if the collection is empty

property max_path_size: int#

Return the longest path in the collection

size()#

Return the number of paths in the collection

Return type:

int

iterator()#

Returns an iterator over the PartitionEdgePaths

Return type:

Iterator[PartitionEdgePath]

class pyliblattix.MetricGroup#

Bases: object

do_calc_as_group()#
Return type:

bool

property disable_hierarchy: bool#
property hidden: bool#
get_metric(id)#
Parameters:

id (str)

Return type:

Metric

remove_metric(id)#
Parameters:

id (str)

Return type:

Metric

property description: str#
notify()#
notify_all()#
wait2()#
property id: str#
property res_name: str#
to_string()#
Return type:

str

metric_iterator()#
Return type:

Iterator[Metric]

hash_code()#
Return type:

int

add_metric(metric)#
Parameters:

metric (Metric)

remove_all()#
set_disable_hierarchy(on)#
Parameters:

on (bool)

class pyliblattix.AtomKindCount#

Bases: object

disable_hierarchy()#
Return type:

bool

property percent: bool#
property segment_map_index: int#
property id: str#
property image_name: str#
property name: str#
notify()#
notify_all()#
set_segment_map_index(index)#
Parameters:

index (int)

wait2()#
property decimal_precision: int#
hash_code()#
Return type:

int

get_description(resMgr)#
Parameters:

resMgr (ResourceManager)

Return type:

str

property format_string: str#
property format_string_res: str#
to_string()#
Return type:

str

build_id(compId, kindId)#
Parameters:
  • compId (str)

  • kindId (str)

Return type:

str

create_count_resource(arg0, arg1)#
Parameters:
Return type:

str

class pyliblattix.Criteria#

Bases: object

property container_tag: Tag#
property name: str#
class pyliblattix.DependencyFilter#

Bases: object

property id: str#
class pyliblattix.RuleSet#

Bases: object

property default: bool#
property empty: bool#

Return true if the collection is empty

find_duplicate_rule(rule)#
Parameters:

rule (Rule)

Return type:

Rule

get_rule(index)#
Parameters:

index (int)

Return type:

Rule

property rule_source: RuleSource#
property rule_count: int#
get_rule_index(rule)#
Parameters:

rule (Rule)

Return type:

int

property name: str#
iterator()#
Return type:

Iterator[Rule]

class pyliblattix.WorkItem#

Bases: object

has_child_work_items()#
Return type:

bool

property parent_work_item: WorkItem#
property priority: int#
property key_index: int#
property key_map_index: int#
property default_description: str#
property description: str#
property id: str#
property name: str#
property owner: str#
property plain_text_description: str#
property title: str#
property type: str#
child_work_items()#
Return type:

Iterator[WorkItem]

set_key_index(index)#
Parameters:

index (int)

set_key_map_index(keyMapIndex)#
Parameters:

keyMapIndex (int)

class pyliblattix.WorkItemCollection#

Bases: object

contains(tag)#

Return true if the given element is in the collection

Parameters:

tag (WorkItem)

Return type:

bool

property empty: bool#

Return true if the collection is empty

iterator()#

Returns an iterator over the WorkItems

Return type:

Iterator[WorkItem]

class pyliblattix.RuleViolator#

Bases: object

property source_atom: Atom#

Get the source atom that causes the violation

property edges: DependencyEdgeCollection#

Get the DependencyEdges that cause the violation

property partition: Partition#

Get the partition that causes the violation

property rule: Rule#

Get the rule that is causing the violation

property dependencies: Iterator[Dependency]#

Get the collection of dependencies that cause the violation

property num_violations: int#
get_dependency_line_number(dep)#
Parameters:

dep (Dependency)

Return type:

Iterator[int]

class pyliblattix.Dependency#

Bases: object

property display_name: str#

Return the display name of this dependency

property kind_string: str#

Return the kind string of this dependency.

property module_id: str#

Return the module id in which to search for the target atom

property name: str#

Return the name of the dependency. The name of an dependency represents a target, which could be an atom or an external dependency. The target atom that matches may have a different name.

class pyliblattix.BasicDependencyCollection#

Bases: object

contains(tag)#

Return true if the given Dependency is in the collection

Parameters:

tag (Dependency)

Return type:

bool

property empty: bool#

Return true if the collection is empty

iterator()#

Returns an iterator over the Dependencies

Return type:

Iterator[Dependency]

class pyliblattix.Rule#

Bases: object

property cannot_use: bool#

Returns whether this is a CANNOT_USE rule

property default: bool#
property exception: bool#

Return true if this rule is considered an exception

property must_use: bool#

Returns whether this is a MUST_USE rule

property rule_set: RuleSet#

Return the RuleSet that contains this rule

property rule_source: RuleSource#

Get the source of this rule. Can be a Partition or Tag

property target_type: int#

Return the target type of the rule target. These are defined in RuleTarget

property clear_text_description: str#

Return the clear text description (strips off HTML tags)

property dependency_filter_string: str#

Return an encoded filter for dependencies

property description: str#

Return the description of this rule.

property display_name: str#

Get the display name of the rule

property name: str#

Get the name of the rule

property source_atom_filter_string: str#

Return an encoded filter for source atoms

property target_atom_filter_string: str#

Return an encoded filter for target atoms

property target_name: str#

Return the target name of this rule

class pyliblattix.RuleSource#

Bases: object

property parent_rule_source: RuleSource#
property display_name: str#
property name: str#
class pyliblattix.RuleViolatorCollection#

Bases: object

contains(tag)#

Return true if the given RuleViolator is in the collection

Parameters:

tag (RuleViolator)

Return type:

bool

property empty: bool#

Return true if the collection is empty

iterator()#

Returns an iterator over the RuleViolators

Return type:

Iterator[RuleViolator]

get_rule_violations_iterator()#
Return type:

Iterator[RuleViolator]

class pyliblattix.RuleViolatorSet#

Bases: object

contains(e)#

Return true if the given element is in the collection

Parameters:

e (RuleViolator)

Return type:

bool

add(rv)#
Parameters:

rv (RuleViolator)

Return type:

bool

property empty: bool#
iterator()#

Returns an iterator over a collection of elements of type E.

Return type:

Iterator[RuleViolator]

add_all(set)#
Parameters:

set (Iterable)

class pyliblattix.DependencyEdge#

Bases: object

property source_atom: Atom#

Get source atom

property dependency: Dependency#

Get dependency

property strength: int#

Get dependency strength. (optional operation).

edge_property_name_iterator()#
Return type:

Iterator[str]

class pyliblattix.DependencyEdgeCollection#

Bases: object

property empty: bool#
size()#
Return type:

int

iterator()#
Return type:

Iterator[DependencyEdge]

get_dependency_edge_iterator()#
Return type:

Iterator[DependencyEdge]

class pyliblattix.AtomPropertyDefinition#

Bases: object

has_behavior(b)#
Parameters:

b (PropertyBehavior)

Return type:

bool

property long_precision: bool#
clone()#
Return type:

AtomPropertyDefinition

property decimal_precision: int#
property flag: int#
property type: int#
property format_string_res: str#
property module_id: str#
property name: str#
property res_name: str#
behavior_iterator()#
Return type:

Iterator[PropertyBehavior]

class pyliblattix.PropertyBehavior#

Bases: object

property mask: int#
hash_code()#
Return type:

int

ordinal()#
Return type:

int

property name_res: str#
name()#
Return type:

str

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

value_of(name)#
Parameters:

name (str)

Return type:

PropertyBehavior

behavor_string_to_flags(string, ignoreUnknownBehaviors)#
Parameters:
  • string (str)

  • ignoreUnknownBehaviors (bool)

Return type:

int

class pyliblattix.Tag#

Bases: object

property visible: bool#

Return true if this tag is visible.

property criteria: Criteria#

Return the criteria of this tag. The Criteria defines the partitions contained in this tag.

property parent_rule_source: RuleSource#
property segment_map_index: int#
property color: Color#

Return the color of this tag

property display_name: str#
property name: str#
property full_name: str#
property description: str#
property display_name2: str#
property name2: str#
set_segment_map_index(index)#
Parameters:

index (int)

class pyliblattix.TagCollection#

Bases: object

contains(tag)#

Return true if the given Tag is in the collection

Parameters:

tag (Tag)

Return type:

bool

property empty: bool#

Return true if the collection is empty

iterator()#

Returns an iterator over the tags

Return type:

Iterator[Tag]

class pyliblattix.Number#

Bases: object

int_value()#
Return type:

int

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

hash_code()#
Return type:

int

class pyliblattix.Color#

Bases: object

notify()#
notify_all()#
wait2()#
property alpha: int#
property blue: int#
property green: int#
property r_g_b: int#
property red: int#
property transparency: int#
hash_code()#
Return type:

int

brighter()#
Return type:

Color

darker()#
Return type:

Color

to_string()#
Return type:

str

decode(arg0)#
Parameters:

arg0 (str)

Return type:

Color

get_color(arg0)#
Parameters:

arg0 (str)

Return type:

Color

get_color2(arg0, arg1)#
Parameters:
  • arg0 (str)

  • arg1 (int)

Return type:

Color

get_color3(arg0, arg1)#
Parameters:
  • arg0 (str)

  • arg1 (Color)

Return type:

Color

class pyliblattix.ProjectModel#

Bases: object

contains_atom(part, atom)#
Parameters:
Return type:

bool

has_ancestor(partition, ancestors)#

Return true if “ancestor” is an ancestor of “partition”

Parameters:
  • partition (Partition) – Partition to test

  • ancestors (Partition) – Partitions that might be ancestors

Return type:

bool

has_ancestor2(partition, ancestors)#

Return true if “ancestor” is an ancestor of “partition”

Parameters:
Return type:

bool

has_collapsed_members(parts)#

Returns true if any of the given partitions contains atoms that can be member level expanded

Parameters:

parts (PartitionCollection)

Return type:

bool

has_expanded_members(parts)#

Returns true if any of the given partitions contains atoms that can be member level collapsed

Parameters:

parts (PartitionCollection)

Return type:

bool

is_dependency_edge_hidden(sourceAtom, dep)#

Returns true if the given edge is hidden

Parameters:
  • sourceAtom (Atom) – source of the dependency edge

  • dep (Dependency) – Dependency kind and target of the edge

Return type:

bool

is_dependency_edge_hidden2(arg0)#

Returns true if the given edge is hidden

Parameters:
  • sourceAtom – source of the dependency edge

  • dep – Dependency kind and target of the edge

  • arg0 (DependencyEdge)

Return type:

bool

property disposed: bool#
is_partition_hidden(part)#

Returns true if the given partition is hidden.

Parameters:

part (Partition) – Partition

Return type:

bool

is_partition_tagged(part, tag)#
Parameters:
Return type:

bool

property read_only: bool#
is_top_level_atom_partition(part)#
Parameters:

part (Partition)

Return type:

bool

property valid: bool#
new_search_criteria_builder()#
Return type:

SearchCriteriaBuilder

get_manual_atom(moduleId, atomName)#

Find a manual atom of the given name in the given module, if it exists, else return null.

Parameters:
  • moduleId (str) – ID of a module

  • atomName (str) – Name of the Atom

Return type:

Atom

new_manual_atom(moduleId, atomName, atomKind)#

Create a manual atom with the given name in the given module. If atom with given name already exists, throw Exception

Parameters:
  • moduleId (str) – ID of a module

  • atomName (str) – Name of the Atom

  • atomKind (str) – Kind of the Atom

Return type:

Atom

get_atom(arg0)#

Returns the atom with the given name, or null if none exists.

Parameters:
  • name – of the atom

  • moduleId – ID of module

  • arg0 (str)

Return type:

Atom

get_atom2(name, moduleId)#

Returns the atom with the given name, or null if none exists.

Parameters:
  • name (str) – of the atom

  • moduleId (str) – ID of module

Return type:

Atom

get_atom_at(part)#

Get the atom at the given partition

Parameters:

part (Partition)

Return type:

Atom

get_main_ancestor_atom(arg0)#
Parameters:
  • resolver

  • atom

  • arg0 (Atom)

Return type:

Atom

get_source_atom_for(edge)#

Find the Source Atom for this dependency edge

Parameters:

edge (DependencyEdge) – the DependencyEdge

Return type:

Atom

get_target_atom_for(arg0, arg1)#

Find Atom (if any) that edge resolves to.

Parameters:
  • edge – DependencyEdge that may resolve to an Atom

  • arg0 (Atom)

  • arg1 (Dependency)

Return type:

Atom

get_target_atom_for2(edge)#

Find Atom (if any) that edge resolves to.

Parameters:

edge (DependencyEdge) – DependencyEdge that may resolve to an Atom

Return type:

Atom

get_all_atoms(parts)#

Returns a collection of atoms that are represented by the given partitions and their descendants

Parameters:

parts (PartitionCollection) – Collection or partitions

Return type:

AtomCollection

get_atoms_at(parts)#

Returns a collection of atoms that are directly represented by the given partitions

Parameters:

parts (PartitionCollection) – Collection of partitions

Return type:

AtomCollection

partitions_to_atoms(parts)#

Convert PartitionCollection to AtomCollection

Parameters:

parts (PartitionCollection)

Return type:

AtomCollection

get_atom_kind(atom)#

Returns the Atom kind

Parameters:

atom (Atom) – Atom

Return type:

AtomKind

new_atom_set()#

Create empty AtomSet

Return type:

AtomSet

get_dependencies(atoms)#

Finds all the dependencies from the given atom. This may not include manual dependencies if the atom is a manual atom.

Parameters:

atoms (AtomCollection) – The atoms

Return type:

BasicDependencyCollection

get_depend_module(id)#

Get DependModule by id

Parameters:

id (str)

Return type:

DependModule

new_manual_dependency(srcPart, targetPart, kind, strength)#

Create a new manual dependency between two partitions

Parameters:
  • srcPart (Partition) – the Source partition

  • targetPart (Partition) – the Target partition

  • kind (str) – the Dependency Kind

  • strength (int) – the strength of the dependency

Return type:

Dependency

new_dependency_edge(srcPart, targetPart, kind, strength)#

Create a new manual dependency edge between two partitions

Parameters:
  • srcPart (Partition) – the Source partition

  • targetPart (Partition) – the Target partition

  • kind (str) – the Dependency Kind

  • strength (int) – the strength of the dependency

Return type:

DependencyEdge

get_edges(source, target)#

Finds all the dependency edges between the source atom and target atom. dependencies if the atom is not a manual atom.

Parameters:
  • source (Atom) – The source atom

  • target (Atom) – The target atom

Return type:

DependencyEdgeCollection

get_edges2(source, target)#

Finds all the dependency edges between the source atom and target atom. dependencies if the atom is not a manual atom.

Parameters:
Return type:

DependencyEdgeCollection

get_edges3(arg0)#

Finds all the dependency edges between the source atom and target atom. dependencies if the atom is not a manual atom.

Parameters:
Return type:

DependencyEdgeCollection

get_edges_between(srcParts, targetParts)#

Find all the dependencies between the 2 collections

Parameters:
Return type:

DependencyEdgeCollection

get_edges_from(atoms)#

Finds all the dependency edges from a collection of atoms. This may not include manual dependencies if the atom is not a manual atom.

Parameters:

atoms (AtomCollection) – Atom Collection

Return type:

DependencyEdgeCollection

get_edges_from_work_item(workItem)#

Get all the edges reference by the given work item

Parameters:

workItem (WorkItem)

Return type:

DependencyEdgeCollection

get_external_edges(partitions)#

Finds all the dependency edges descendant from the given partitions to external targets.

Parameters:

partitions (PartitionCollection)

Return type:

DependencyEdgeCollection

get_used_by_edges(atoms)#

Returns collection of edges that are used by the given atoms

Parameters:

atoms (AtomCollection) – Collection of Atoms

Return type:

DependencyEdgeCollection

get_used_by_edges2(atoms)#

Returns collection of edges that are used by the given atoms

Parameters:

atoms (DependencyEdgeCollection) – Collection of Atoms

Return type:

DependencyEdgeCollection

get_used_by_edges3(atoms)#

Returns collection of edges that are used by the given atoms

Parameters:

atoms (PartitionCollection) – Collection of Atoms

Return type:

DependencyEdgeCollection

get_uses_edges(parts)#

Returns collection of edges that the given partitions use

Parameters:

parts (DependencyEdgeCollection) – Collection of Partitions

Return type:

DependencyEdgeCollection

get_uses_edges2(parts)#

Returns collection of edges that the given partitions use

Parameters:

parts (PartitionCollection) – Collection of Partitions

Return type:

DependencyEdgeCollection

get_dependency_kind(dep)#

Returns the DependencyKind object for the Dependency

Parameters:

dep (Dependency) – Dependency

Return type:

DependencyKind

get_ordering_algorithm(id)#

Iterator over the available ordering algorithms

Parameters:

id (str) – ID of the ordering algorithms

Return type:

DsmOrderingAlgorithm

get_metric_definition(id)#
Parameters:

id (str)

Return type:

Metric

new_partition(parent, name)#

Create a new partition with the given name as a child of the given parent.

Parameters:
  • parent (Partition) – Partition object, path to partition or name of partition

  • name (str) – The name of the new Partition

Return type:

Partition

new_partition_with_atom(parent, moduleId, name, atomKind)#

Create a new partition with the given name as a child of the given parent. The new partition will contain an atom with the same name

Parameters:
  • parent (Partition) – Partition object, path to partition or name of partition

  • moduleId (str) – module to use when creating atom

  • name (str) – The name of the new Partition

  • atomKind (str) – the kind of the atom

Return type:

Partition

get_child_partition_by_name(parent, name)#

Finds child partition with the given name.

Parameters:
  • parent (Partition) – parent Partition

  • name (str) – Name of a partition in parent Partition

Return type:

Partition

get_display_sub_partition(partition, index)#

Returns child partition at given display index

Parameters:
  • partition (Partition) – A partition

  • index (int) – child display index

Return type:

Partition

get_partition(atom)#

Return the partition that is associated with the given atom.

Parameters:

atom (Atom) – The atom object

Return type:

Partition

get_partition2(atom)#

Return the partition that is associated with the given atom.

Parameters:

atom (str) – The atom object

Return type:

Partition

property root_partition: Partition#

Returns the root partition of the project (top-most partition)

get_sub_partition(partition, index)#

Returns child partition at given index

Parameters:
  • partition (Partition) – A partition

  • index (int) – child index

Return type:

Partition

atoms_to_partitions(atoms)#

Convert AtomCollection to PartitionCollection

Parameters:

atoms (AtomCollection)

Return type:

PartitionCollection

get_all_partitions(tag)#

Finds all the partitions that have the given tag.

Parameters:

tag (PartitionCollection) – Tag that exists in the system

Return type:

PartitionCollection

get_all_partitions2(tag)#

Finds all the partitions that have the given tag.

Parameters:

tag (Tag) – Tag that exists in the system

Return type:

PartitionCollection

get_descendant_atom_partitions(part)#

Finds all atoms descendant from this partition (if member-level is on this includes members)

Parameters:

part (Partition)

Return type:

PartitionCollection

get_partitions_by_name(name)#

Finds all partitions that have a given name.

Parameters:

name (str) – Name of a partition in the system

Return type:

PartitionCollection

get_sub_partitions(partition)#

Returns partition collection

Parameters:

partition (Partition) – A partition

Return type:

PartitionCollection

get_tagged_partitions(tag)#

Finds all the partitions that have the given tag.

Parameters:

tag (Tag) – Tag that exists in the system

Return type:

PartitionCollection

get_cycle_components(part)#

Returns all the strongly connected components that are directly in a partition. Analyzes the dependencies in the sub-partitions of the given partition and returns them in groups of components. If there are no cycles, each component will contain exactly one partition.

Parameters:

part (Partition) – A Partition

Return type:

PartitionCollectionCollection

get_low_level_cycle_components(part)#

Returns all the low strongly connected components useful for finding files/classes in cycles without regard to whether they are in a cycle or not.

Parameters:

part (Partition) – A Partition

Return type:

PartitionCollectionCollection

new_partition_set()#

Create empty PartitionSet

Return type:

PartitionSet

new_sorted_partition_set()#

Create empty PartitionSet that sorts by hierarchy

Return type:

PartitionSet

get_partition_rules(part)#

Return the set of rules assigned to a given partition

Parameters:

part (Partition) – Partition

Return type:

RuleSet

get_rule_violators(arg0, arg1)#

Return collection of violations at or contained within the given partition intersections

Parameters:
Return type:

RuleViolatorCollection

get_rule_violators2(relations)#

Return collection of violations at or contained within the given partition intersections

Parameters:

relations (PartitionCollection)

Return type:

RuleViolatorCollection

get_rule_violators3(relations)#

Return collection of violations at or contained within the given partition intersections

Parameters:

relations (PartitionRelationCollection)

Return type:

RuleViolatorCollection

get_rule_violators_from_work_item(workItem)#

Get all the violations referenced by the given work item

Parameters:

workItem (WorkItem) – Work Item

Return type:

RuleViolatorCollection

new_rule_violator_set()#

Create an empty RuleViolatorSet

Return type:

RuleViolatorSet

property applied_rules: RuleViolatorSet#

Get all applied rules for each dependency

create_or_find_tag(name, color)#

Create new Tag if tag does not already exist, else return the existing tag. If tag already exists, color will be changed to the specified color, if color is non-null.

Parameters:
  • name (str) – Name for the new tag. Tag name must not already exist.

  • color (Color) – Color for new Tag. null value will result in default color.

Return type:

Tag

new_impact_tag(tagName, color, parts)#
Parameters:
Return type:

Tag

new_impact_tag2(tagName, color, parts)#
Parameters:
  • tagName (str)

  • color (Color)

  • parts (Tag)

Return type:

Tag

new_tag(name, color)#

Create a new Tag Object with the given name.

Parameters:
  • name (str) – Name for the new tag. Tag name must not already exist.

  • color (Color) – Color for new Tag. null value will result in default color.

Return type:

Tag

get_tag(name)#

Returns the Tag object with the given name

Parameters:

name (str) – Name of the tag to find.

Return type:

Tag

property all_tags: TagCollection#

Return a collection of all tags in the model.

get_direct_tags_for(parts)#

Return a collection of all tags directly associated with the given partitions. This does not include tags inherited from a parent partition. Only tags directly set on the given partitions are included

Parameters:

parts (PartitionCollection) – Collection of Partitions

Return type:

TagCollection

get_tags_for(part)#

Return a collection of all tags associated with the given partition.

Parameters:

part (PartitionCollection) – The partition

Return type:

TagCollection

create_work_item(comment, parts, name)#

Create a WorkItem associated with the given PartitionRelations

Parameters:
Return type:

WorkItem

create_work_item2(comment, parts, name)#

Create a WorkItem associated with the given PartitionRelations

Parameters:
Return type:

WorkItem

create_work_item3(comment, parts, name)#

Create a WorkItem associated with the given PartitionRelations

Parameters:
Return type:

WorkItem

create_work_item4(comment, parts, name)#

Create a WorkItem associated with the given PartitionRelations

Parameters:
Return type:

WorkItem

property work_items: WorkItemCollection#

Get all the WorkItem objects in the model

inc_ref()#
Return type:

int

get_dependency_strength(sourcePartition, targetPartition)#

Get dependency strength between 2 partitions

Parameters:
  • sourcePartition (Partition) –

    • Source Partition

  • targetPartition (Partition) –

    • Target Partition

Return type:

int

get_impact_strength(partition, level)#

Get the impact strength

Parameters:
Return type:

int

get_partition_index(partition)#

Get the index of the partition in its container

Parameters:

partition (Partition) – Partition to find the index of

Return type:

int

get_sub_partition_count(partition)#

Returns number of child partitions

Parameters:

partition (Partition) – A partition

Return type:

int

property instance: int#
get_metric_value(part, metric)#
Parameters:
Return type:

Number

get_atom_kind_resource_name(atom)#

Returns the localized name of the Atom kind

Parameters:

atom (Atom) – Atom

Return type:

str

get_atom_property_value(atom, propName)#

return the value of a property assigned to an atom

Parameters:
  • atom (Atom) – the atom

  • propName (str)

Return type:

str

get_dependency_kind_resource_name(dep)#

Returns the localized name of the Dependency kind

Parameters:

dep (Dependency) – Dependency

Return type:

str

get_full_source_name(atom)#

Return the full source filename that defines the atom

Parameters:

atom (Atom)

Return type:

str

get_partition_description(partition)#
Parameters:

partition (Partition)

Return type:

str

property project_name: str#

Returns the name of the Project.

property all_high_level_cycles: Iterator[GraphCycles]#

Returns an Iterator of all the high level cycles

property all_metric_definitions: Iterator[Metric]#
get_all_partition_iterator(parts)#

Finds all the partitions that have the given tag.

Parameters:

parts (PartitionCollection) – collection or partitions

Return type:

Iterator[Partition]

get_atom_partition_iterator(parts)#

Finds all the atom partitions that have the given tag.

Parameters:

parts (PartitionCollection) – collection or partitions

Return type:

Iterator[Partition]

property atoms_from_database: Iterator[Atom]#

Iterator over the atoms in the AtomDatabase

get_descendent_rules_for(source)#

Get the rules attached to the given source, and the ones attached to the children sources

Parameters:

source (RuleSource) – can be Partition, Tag

Return type:

Iterator[Rule]

get_inherited_rules_for(source)#

Get the rules attached to the given source, and all parent sources

Parameters:

source (RuleSource) – can be Partition, Tag

Return type:

Iterator[Rule]

get_module_atom_kinds(moduleId)#

Returns the atom kinds defined in the given module

Parameters:

moduleId (str) – id of the module

Return type:

Iterator[AtomKind]

get_module_dependency_kinds(moduleId)#

Returns the DependencyKinds defined in the given module

Parameters:

moduleId (str) – id of the module

Return type:

Iterator[DependencyKind]

property module_ids: Iterator[str]#

Returns the available module ids, specified by the given project profile.

property ordering_algorithms: Iterator[DsmOrderingAlgorithm]#

Iterator over the available ordering algorithms

property project_atom_kinds: Iterator[AtomKind]#

Returns the atom kinds defined in the current project

property project_dependency_kinds: Iterator[DependencyKind]#

Returns the DependencyKinds defined in the current project

get_rules_for(source)#

Get the rules attached to the given source

Parameters:

source (RuleSource) – can be Partition, Tag

Return type:

Iterator[Rule]

get_tags_for2(part)#

Return a collection of all tags associated with the given partition.

Parameters:

part (Partition) – The partition

Return type:

Iterator[Tag]

get_used_by_edges_closure(atoms, level)#

Returns collection of edges to transitive closure that are used by the given atoms

Parameters:
Return type:

Iterator[DependencyEdge]

get_uses_edges_closure(atoms, level)#

Returns collection of edges that the given atoms use

Parameters:
  • atoms (AtomCollection) – Collection of Atoms

  • level (int) – what level to calculate usage

Return type:

Iterator[DependencyEdge]

partition_property_name_iterator(partition)#
Parameters:

partition (Partition)

Return type:

Iterator[str]

sub_partition_display_iterator(partition)#

Returns partition collection, which consists of children of the given partition, in display order

Parameters:

partition (Partition) – A partition

Return type:

Iterator[Partition]

sub_partition_iterator(partition)#

Returns partition collection, which consitst of the children of the given partition.

Parameters:

partition (Partition) – A partition

Return type:

Iterator[Partition]

visible_sub_partition_iterator(partition)#

Returns partition collection, which consists of the visible children of the given partition.

Parameters:

partition (Partition) – A partition

Return type:

Iterator[Partition]

add_atom_to_partition(partition, atom)#

Add atom to the given partition.

Parameters:
  • partition (Partition) – Partition to put Atom in

  • atom (Atom) – Atom to be placed into Partition

add_partition_to_tag(tag, part)#

Add partition to the given tag

Parameters:
  • tag (Tag) – Tag that will be assigned a partition.

  • part (Partition) – Single partition to add to tag

add_partitions_to_tag(tag, parts)#

Add partitions to the given tag

Parameters:
  • tag (Tag) – Tag that will be assigned partitions.

  • parts (PartitionCollection) – Collection of partitions to add to tag

change_atom_kind(atom, atomKind)#

Change the kind of the given atom

Parameters:
  • atom (Atom) – the atom

  • atomKind (AtomKind) – The atom kind. You can use string “java:CLASS”

clear_partition_property(name)#

Clear named property for all partitions

Parameters:

name (str) – name of property

clear_tag_filter()#
collapse_members(parts)#

Collapse members on given partitions

param parts:

Partition Collection

Throws Exception is no atom database is found

Parameters:

parts (PartitionCollection)

delete_partition(partitions)#

Delete the given partitions. Children of deleted partition will be moved up a level

Parameters:

partitions (PartitionCollection) – Collection of partitions to delete. (Sub-partitions will not be deleted)

delete_partition_tree(partitions)#

Delete the given partitions and all descendants.

Parameters:

partitions (PartitionCollection) – Collection of partitions to delete. All sub-partitions will also be deleted.

delete_rule(rule)#

Delete a rule

Parameters:

rule (Rule) – Rule to delete

delete_tag(tag)#

Delete the given tag

Parameters:

tag (Tag) – tag to be deleted

expand_members(parts)#

Expand members on given partitions

param parts:

Partition Collection

Throws Exception is no atom database is found

Parameters:

parts (PartitionCollection)

hide_dependencies(edges)#

Hide the given dependencies.

Parameters:

edges (DependencyEdgeCollection) – Collection of DependencyEdges to hide

hide_partition(partitions)#

Hide the given dependencies.

Parameters:

partitions (PartitionCollection) – Collection of Partitions to hide

import_file_as_manual(sourceFile)#

Attempt to import file as manual atoms

Parameters:

sourceFile (File)

import_l_d_ias_module(sourceFile, moduleId)#

Import given LDI file using the given module

Parameters:
  • sourceFile (File)

  • moduleId (str)

move_partition(partitions, newParent)#

Move a collection of partitions to a new Partition

Parameters:
  • partitions (PartitionCollection) – Collection of partitions to move

  • newParent (Partition) – New partition partition to move partitions into.

move_partition_to(partitions, newParent, newIndex)#

Move a collection of partitions to a new Partition

Parameters:
  • partitions (PartitionCollection) – Collection of partitions to move

  • newParent (Partition) – New partition partition to move partitions into.

  • newIndex (int) – New index of the partition

perform_ordering(partition, ordering, createVirtual, recursive)#

Perform the ordering algorithm on the contents of the given partition

Parameters:
  • partition (Partition) – Parent partition

  • ordering (DsmOrderingAlgorithm) – Ordering algorithm to use

  • createVirtual (bool) – set to true to create Virtual Partitions

  • recursive (bool) – set to true to perform the ordering recursively

remove_atom_from_partition(partition, atom)#

Remove atom from the given partition.

Parameters:
  • partition (Partition) – Partition to remove Atom from

  • atom (Atom) – to be removed

remove_dependency_edge(sourceAtom, dependency, strength)#

Remove a dependency edge

Parameters:
remove_dependency_edge2(arg0)#

Remove a dependency edge

Parameters:
remove_partitions_from_tag(tag, parts)#

Remove partitions from the given tag

Parameters:
  • tag (Tag) – Tag that will be modified

  • parts (PartitionCollection) – Collection of partitions to remove from tag

rename_partition(partition, newName)#

Rename a partition to a new name

Parameters:
  • partition (Partition) – Partition object, path to partition or name of partition

  • newName (str) – new name of partition

set_atom_property(atom, name, value)#

Set property on an atom

Parameters:
  • atom (Atom) – Atom

  • name (str) – Property Name

  • value (str) – Property Value

set_cell_text(arg0, arg1, arg2)#

Set the text string in a given partition intersection

Parameters:
  • relation – partition intersection

  • text – Text for the cell

  • arg0 (Partition)

  • arg1 (Partition)

  • arg2 (str)

set_cell_text2(relation, text)#

Set the text string in a given partition intersection

Parameters:
  • relation (PartitionRelation) – partition intersection

  • text (str) – Text for the cell

set_edge_property(arg0, arg1, arg2, arg3)#

Set property on a dependency edge

Parameters:
  • edge – Source Dependency edge

  • name – Property Name

  • value – Property Value

  • arg0 (Atom)

  • arg1 (Dependency)

  • arg2 (str)

  • arg3 (str)

set_edge_property2(edge, name, value)#

Set property on a dependency edge

Parameters:
  • edge (DependencyEdge) – Source Dependency edge

  • name (str) – Property Name

  • value (str) – Property Value

set_partition_description(partition, description)#

Change the partition description text

Parameters:
  • partition (Partition) – Partition to change

  • description (str) – New description text

set_tag_color(tag, color)#

Set the color of the given tag

Parameters:
  • tag (Tag) – tag to be changed

  • color (Color) – new Color

set_tag_criteria(tag, criteria)#

Set the criteria that the tag will represent.

Parameters:
  • tag (Tag) – Tag that will be assigned partitions.

  • criteria (Criteria) – Criteria

set_tag_edges(tag, edges)#

Set the edges that the tag will represent.

Parameters:
set_tag_filter(tag, filterAtoms, filterDependencies)#
Parameters:
  • tag (Tag)

  • filterAtoms (bool)

  • filterDependencies (bool)

set_tag_partitions(tag, parts)#

Set the partitions that the tag will represent.

Parameters:
  • tag (Tag) – Tag that will be assigned partitions.

  • parts (PartitionCollection) – Collection of partitions to add to tag

set_work_item_description(workItem, description)#

Change the description of the WorkItem

Parameters:
  • workItem (WorkItem) – the WorkItem

  • description (str) – new WorkItem description

set_work_item_name(workItem, name)#

Change the name of the WorkItem

Parameters:
  • workItem (WorkItem) – the WorkItem

  • name (str) – new WorkItem name

set_work_item_owner(workItem, owner)#

Change the owner of the WorkItem

Parameters:
  • workItem (WorkItem) – the WorkItem

  • owner (str) – new WorkItem owner

unhide_dependencies(edges)#

Unhide the given dependencies.

Parameters:

edges (DependencyEdgeCollection) – Collection of DependencyEdges to hide

unhide_partition(partitions)#

Unhide the given dependencies.

Parameters:

partitions (PartitionCollection) – Collection of Partitions to unhide

check_canceled()#
dispose()#
create_or_find_tag2(name, color)#

Create new Tag if tag does not already exist, else return the existing tag. If tag already exists, color will be changed to the specified color, if color is non-null.

Parameters:
  • name (str) – Name for the new tag. Tag name must not already exist.

  • color (Color) – Color for new Tag. null value will result in default color.

Return type:

Tag

create_or_find_tag_red(name)#
Parameters:

name (str)

Return type:

Tag

color_from_str(colorStr)#
Parameters:

colorStr (str)

Return type:

Color

get_dsm_js_data()#
Return type:

str

get_name_alt()#
Return type:

str

get_string_atom_property(atom, propName)#
Parameters:
  • atom (Atom)

  • propName (str)

Return type:

str

get_atom_property_names(atom)#
Parameters:

atom (Atom)

Return type:

Iterator[str]

get_int_edge_propertys(dep, propName)#
Parameters:
Return type:

Iterator[int]

save_project()#
save_project_as(fileName)#
Parameters:

fileName (str)

class pyliblattix.LattixPythonApi#

Bases: object

create_new_lattix_project()#
Return type:

ProjectModel

open_lattix_project(path)#
Parameters:

path (str)

Return type:

ProjectModel

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

hash_code()#
Return type:

int

class pyliblattix.File#

Bases: object

can_execute()#
Return type:

bool

can_read()#
Return type:

bool

can_write()#
Return type:

bool

create_new_file()#
Return type:

bool

exists()#
Return type:

bool

property absolute: bool#
property directory: bool#
property file: bool#
property hidden: bool#
mkdir()#
Return type:

bool

mkdirs()#
Return type:

bool

rename_to(arg0)#
Parameters:

arg0 (File)

Return type:

bool

set_executable(arg0)#
Parameters:

arg0 (bool)

Return type:

bool

set_executable2(arg0, arg1)#
Parameters:
  • arg0 (bool)

  • arg1 (bool)

Return type:

bool

set_read_only()#
Return type:

bool

set_readable(arg0)#
Parameters:

arg0 (bool)

Return type:

bool

set_readable2(arg0, arg1)#
Parameters:
  • arg0 (bool)

  • arg1 (bool)

Return type:

bool

set_writable(arg0)#
Parameters:

arg0 (bool)

Return type:

bool

set_writable2(arg0, arg1)#
Parameters:
  • arg0 (bool)

  • arg1 (bool)

Return type:

bool

notify()#
notify_all()#
wait2()#
compare_to(arg0)#
Parameters:

arg0 (File)

Return type:

int

hash_code()#
Return type:

int

property absolute_file: File#
property canonical_file: File#
property parent_file: File#
property absolute_path: str#
property canonical_path: str#
property name: str#
property parent: str#
property path: str#
to_string()#
Return type:

str

create_temp_file(arg0, arg1)#
Parameters:
  • arg0 (str)

  • arg1 (str)

Return type:

File

create_temp_file2(arg0, arg1, arg2)#
Parameters:
  • arg0 (str)

  • arg1 (str)

  • arg2 (File)

Return type:

File

delete_on_exit()#
class pyliblattix.ResourceManager#

Bases: object

has_resource(resName)#
Parameters:

resName (str)

Return type:

bool

add_resource(key, res)#
Parameters:
  • key (str)

  • res (str)

Return type:

str

get_resource(arg0)#
Parameters:
  • id

  • param1

  • param2

  • arg0 (str)

Return type:

str

get_resource2(arg0, arg1)#
Parameters:
  • id

  • param1

  • param2

  • arg0 (str)

  • arg1 (str)

Return type:

str

get_resource3(id, param1, param2)#
Parameters:
  • id (str)

  • param1 (str)

  • param2 (str)

Return type:

str

add_all(resMgr)#
Parameters:

resMgr (ResourceManager)

class pyliblattix.SearchCriteriaBuilder#

Bases: object

atom_kind_filter_builder()#

Return AtomKindFilterBuilder to specify atom kinds

Return type:

AtomKindFilterBuilder

case_sensitive()#

Turn on case sensitive

Return type:

SearchCriteriaBuilder

property reg_ex: SearchCriteriaBuilder#

Turn on regex. Specifies if the search string is a regex expression

partitions_with_atoms()#

Turn on option to search for partitions with atoms

Return type:

SearchCriteriaBuilder

partitions_without_atoms()#

Turn on option to search for partitions with atoms

Return type:

SearchCriteriaBuilder

text(text)#

Set the text to search for

Parameters:

text (str) – string to search for

Return type:

SearchCriteriaBuilder

build()#

build the SearchCriteria

Return type:

SearchCriteria

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

hash_code()#
Return type:

int

class pyliblattix.AtomKindFilterBuilder#

Bases: object

disable_module(moduleId)#

Filter out an entire module

Parameters:

moduleId (str) – Module to be filtered

Return type:

AtomKindFilterBuilder

filter_atom_kind(atomKind)#

Add an atom kind that will be filtered out

Parameters:

atomKind (AtomKind) – AtomKind to be filtered

Return type:

AtomKindFilterBuilder

notify()#
notify_all()#
wait2()#
to_string()#
Return type:

str

hash_code()#
Return type:

int

class pyliblattix.SearchCriteria#

Bases: Criteria

property container_tag: Tag#
notify()#
notify_all()#
wait2()#
property id: str#
property name: str#
to_string()#
Return type:

str

hash_code()#
Return type:

int

pyliblattix.acquire_lattix_api()#
Return type:

LattixPythonApi