Package com.microstrategy.web.app.maps
Class ShapeHierarchy
- java.lang.Object
-
- com.microstrategy.web.app.maps.ShapeHierarchy
-
public class ShapeHierarchy extends java.lang.Object
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ShapeHierarchy.HierarchyStructure
A inner class used to store the child:parent relationship objects
-
Constructor Summary
Constructors Constructor Description ShapeHierarchy(java.lang.String pathFolder)
Class Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
getChildParentKeys()
Get all the shape Ids inside the hierarchy structure.java.util.List<java.lang.String>
getChildParentPairForType(java.lang.String type)
Get all the childShapeId:parentShapeId values for a given childShapeType:parentShapeType key.java.util.Set<java.lang.String>
getChildren(java.lang.String parentId, java.lang.String type)
Get all the children of a shapeId with a specific shapeTypejava.util.Set<java.lang.String>
getParents(java.lang.String childId, java.lang.String type)
Get all the parents of a shapeId with a specific shapeTypeprotected static ShapeHierarchy.HierarchyStructure
parseShapeHierachy(java.lang.String filePath)
Read the shape hierarchy files from given path and build aShapeHierarchy.HierarchyStructure
object and caches it.
-
-
-
Method Detail
-
parseShapeHierachy
protected static ShapeHierarchy.HierarchyStructure parseShapeHierachy(java.lang.String filePath)
Read the shape hierarchy files from given path and build aShapeHierarchy.HierarchyStructure
object and caches it.- Parameters:
filePath
- The path to the shape hierarchy files.- Returns:
- A
ShapeHierarchy.HierarchyStructure
object.
-
getParents
public java.util.Set<java.lang.String> getParents(java.lang.String childId, java.lang.String type)
Get all the parents of a shapeId with a specific shapeType- Parameters:
childId
- The shape idtype
- The shape type- Returns:
- A set of all the shape parent type@id objects.
-
getChildren
public java.util.Set<java.lang.String> getChildren(java.lang.String parentId, java.lang.String type)
Get all the children of a shapeId with a specific shapeType- Parameters:
childId
- The shape idtype
- The shape type- Returns:
- A set of all the child shape type@id objects.
-
getChildParentPairForType
public java.util.List<java.lang.String> getChildParentPairForType(java.lang.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.
-
getChildParentKeys
public java.util.Set<java.lang.String> getChildParentKeys()
Get all the shape Ids inside the hierarchy structure.- Returns:
- A set object with unique keys representing the shapeIds.
-
-