public interface HierarchyInfo
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNDEFINED_PARENT_ID |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.String> |
getEntriesIds(int level)
Gets the ids of all the elements in the given hierarchy level
|
JGeometry |
getEntryGeometry(int level, java.lang.String entryId)
Gets the geometry of the specified entry in the given hierarchy level
|
java.lang.String |
getLevelName(int level)
Gets the name which identifies the given hierarchy level number.
|
int |
getLevelNumber(java.lang.String levelName)
Gets the number of the hierarchy level identified by the given name
|
int |
getNumberOfLevels()
Gets the total number of hierarchy levels
|
java.lang.String |
getParentId(int childLevel, java.lang.String childId)
Gets the id of the parent of the given entry
|
void |
initialize(Configuration conf)
This method is called always once a new instance is created.
|
void |
load(Path[] hierDataPaths, int fromLevel, JobConf conf)
Loads the hierarchical catalog content from the given paths.
|
void |
loadFromIndex(HierarchyDataIndexReader[] readers, int fromLevel, Configuration conf)
Loads the hierarchical catalog content from previously generated indices.
|
static final java.lang.String UNDEFINED_PARENT_ID
java.util.Collection<java.lang.String> getEntriesIds(int level)
level
- a hierarchy level number: a number between 1 and the number of hierarchy levelsJGeometry getEntryGeometry(int level, java.lang.String entryId)
level
- the hierarchy level of the entryentryId
- the id of the entryjava.lang.String getLevelName(int level)
level
- a hierarchy level number: a number between 1 and the number of hierarchy levelsint getLevelNumber(java.lang.String levelName)
levelName
- a hierarchy level nameint getNumberOfLevels()
java.lang.String getParentId(int childLevel, java.lang.String childId)
childLevel
- the hierarchy level where the child entry belongs tochildId
- the child idvoid initialize(Configuration conf)
conf
- a configuration instancevoid load(Path[] hierDataPaths, int fromLevel, JobConf conf) throws java.lang.Exception
hierDataPaths
- an array containing paths for each hierarchy level that needs to be loaded. The hierarchy levels to be loaded are determined by the paths array length and the value of fromLevel parameter. The array's length is inside the range: 1 <= length <= number of hierarchies. The paths are ordered by its hierarchy level in ascending way. The path in the array corresponds to the hierarchy level number resulting of adding the element index to the value of the fromLevel parameter (i + fromLevel). For example: for a hierarchy with 10 levels, load from level 6 to 10. In this case, the path array will contain 5 elements and fromValue will be 6. If the 10 levels need to be loaded, the path array length must be 10 and fromValue must be 1.fromLevel
- specifies the hierarchy level from which the hierarchy levels must be loaded. The value is in the range 1<= fromLevel <= number of hierarchies.conf
- the job configurationjava.lang.Exception
void loadFromIndex(HierarchyDataIndexReader[] readers, int fromLevel, Configuration conf) throws java.lang.Exception
readers
- an array of HierarchyDataIndexReader
. The readers are sorted by hierarchy level in ascending order. The top hierarchy level is determined by the value of fromLevel.fromLevel
- specifies the hierarchy level from which the hierarchy levels must be loaded. The value is in the range 1<= fromLevel <= number of hierarchies.conf
- the job configurationjava.lang.Exception
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.