public class

ShapeHierarchy

extends Object
java.lang.Object
   ↳ com.microstrategy.web.app.maps.ShapeHierarchy

Class Overview

The shape hierarchy class parses the hierarchy info file and generate two map objects (child to parent and parent to child relationship). The hierarchy info is cached as well.

Summary

Nested Classes
class ShapeHierarchy.HierarchyStructure A inner class used to store the child:parent relationship objects 
Public Constructors
ShapeHierarchy(String pathFolder)
Class Constructor
Public Methods
Set<String> getChildParentKeys()
Get all the shape Ids inside the hierarchy structure.
List<String> getChildParentPairForType(String type)
Get all the childShapeId:parentShapeId values for a given childShapeType:parentShapeType key.
Set<String> getChildren(String parentId, String type)
Get all the children of a shapeId with a specific shapeType
Set<String> getParents(String childId, String type)
Get all the parents of a shapeId with a specific shapeType
Protected Methods
static ShapeHierarchy.HierarchyStructure parseShapeHierachy(String filePath)
Read the shape hierarchy files from given path and build a ShapeHierarchy.HierarchyStructure object and caches it.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ShapeHierarchy (String pathFolder)

Class Constructor

Parameters
pathFolder The folder path to the hierarchy files

Public Methods

public Set<String> getChildParentKeys ()

Get all the shape Ids inside the hierarchy structure.

Returns
  • A set object with unique keys representing the shapeIds.

public List<String> getChildParentPairForType (String type)

Get all the childShapeId:parentShapeId values for a given childShapeType:parentShapeType key.

Parameters
type The key in the childShapeType:parentShapeType format.
Returns
  • A list of all childShapeId:parentShapeId objects for the given key.

public Set<String> getChildren (String parentId, String type)

Get all the children of a shapeId with a specific shapeType

Parameters
type The shape type
Returns
  • A set of all the child shape type@id objects.

public Set<String> getParents (String childId, String type)

Get all the parents of a shapeId with a specific shapeType

Parameters
childId The shape id
type The shape type
Returns
  • A set of all the shape parent type@id objects.

Protected Methods

protected static ShapeHierarchy.HierarchyStructure parseShapeHierachy (String filePath)

Read the shape hierarchy files from given path and build a ShapeHierarchy.HierarchyStructure object and caches it.

Parameters
filePath The path to the shape hierarchy files.