|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttreebolic.generator.model.ModelUtils
public class ModelUtils
Model utilities
Constructor Summary | |
---|---|
ModelUtils()
|
Method Summary | |
---|---|
private static java.lang.String |
decode(java.lang.String thisString)
Decode encoded URL (for display) |
private static java.lang.String |
encode(java.lang.String thisString)
Encode encoded URL |
private static void |
getIdMap(INode thisNode,
java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
Recursive traversal of nodes for ids |
static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> |
getIdMap(Model thisModel)
Map of ids in this model to their locations |
private static void |
getImageMap(INode thisNode,
java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
Recursive traversal of nodes for images |
static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> |
getImageMap(Model thisModel)
Map of images in this model to their locations |
private static void |
getLinkMap(INode thisNode,
java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
Recursive traversal of nodes for mounts |
static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> |
getLinkMap(Model thisModel)
Map of mounts in this model to their locations |
private static void |
getMountMap(INode thisNode,
java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
Recursive traversal of nodes for mounts |
static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> |
getMountMap(Model thisModel)
Map of mounts in this model to their locations |
static java.util.Map<java.lang.String,MutableNode> |
makeIdToNodeMap(Model thisModel)
Make id to node map for this model |
private static void |
makeIdToNodeMap(MutableNode thisNode,
java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap)
Make id to node map for this model |
private static void |
normalizeId(TreeMutableNode thisNode,
java.lang.String thisPrefix,
java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap,
java.util.Map<java.lang.String,java.lang.String> thisOldIdToNewIdMap)
Normalize ids in model |
static java.util.Map<java.lang.String,MutableNode> |
normalizeIds(Model thisModel,
java.lang.String thisPrefix)
Normalize ids in this model |
private static void |
normalizeLinks(TreeMutableNode thisNode,
java.util.Map<java.lang.String,java.lang.String> thisOldIdToNewIdMap)
Normalize node links |
private static void |
putReferenceMapKeyValue(java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap,
java.lang.String thisKey,
java.lang.String thisValue)
Put value in multi-valued map |
static void |
saveSettings(Settings theseSettings,
java.lang.String thisPropertyFile)
Save settings to file |
static java.util.Properties |
settingsToProperty(Settings theseSettings)
Save settings |
static TreeMutableNode |
toMutable(INode thatNode,
java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap,
java.util.Map<INode,MutableNode> thisOldToNewNodeMap)
Make of copy of this model with mutable nodes |
static Pair<Model,java.util.Map<java.lang.String,MutableNode>> |
toMutable(Model thisModel)
Make of copy of this model with mutable nodes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelUtils()
Method Detail |
---|
public static Pair<Model,java.util.Map<java.lang.String,MutableNode>> toMutable(Model thisModel)
thisModel
- model
public static TreeMutableNode toMutable(INode thatNode, java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap, java.util.Map<INode,MutableNode> thisOldToNewNodeMap)
thatNode
- start nodethisIdToNodeMap
- id to node mapthisOldToNewNodeMap
- old node to new node map
public static java.util.Map<java.lang.String,MutableNode> makeIdToNodeMap(Model thisModel)
thisModel
- model
private static void makeIdToNodeMap(MutableNode thisNode, java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap)
thisNode
- start nodethisIdToNodeMap
- id to node result mappublic static java.util.Map<java.lang.String,MutableNode> normalizeIds(Model thisModel, java.lang.String thisPrefix)
thisModel
- modelthisPrefix
- id prefix
private static void normalizeId(TreeMutableNode thisNode, java.lang.String thisPrefix, java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap, java.util.Map<java.lang.String,java.lang.String> thisOldIdToNewIdMap)
thisNode
- nodethisPrefix
- id prefixthisIdToNodeMap
- id to node result mapthisOldIdToNewIdMap
- old id to new id result mapprivate static void normalizeLinks(TreeMutableNode thisNode, java.util.Map<java.lang.String,java.lang.String> thisOldIdToNewIdMap)
thisNode
- start nodethisOldIdToNewIdMap
- old id to new id mappublic static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> getImageMap(Model thisModel)
thisModel
- model
private static void getImageMap(INode thisNode, java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
thisNode
- start nodethisMap
- map to collect resultspublic static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> getMountMap(Model thisModel)
thisModel
- model
private static void getMountMap(INode thisNode, java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
thisNode
- start nodethisMap
- map to collect resultspublic static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> getLinkMap(Model thisModel)
thisModel
- model
private static void getLinkMap(INode thisNode, java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
thisNode
- start nodethisMap
- map to collect resultspublic static java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> getIdMap(Model thisModel)
thisModel
- model
private static void getIdMap(INode thisNode, java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap)
thisNode
- start nodethisMap
- map to collect resultsprivate static void putReferenceMapKeyValue(java.util.Map<java.lang.String,java.util.SortedSet<java.lang.String>> thisMap, java.lang.String thisKey, java.lang.String thisValue)
thisMap
- mapthisKey
- keythisValue
- valueprivate static java.lang.String decode(java.lang.String thisString)
thisString
- encode URL string
private static java.lang.String encode(java.lang.String thisString)
thisString
- encode URL string
public static void saveSettings(Settings theseSettings, java.lang.String thisPropertyFile)
thisPropertyFile
- property file to save topublic static java.util.Properties settingsToProperty(Settings theseSettings)
theseSettings
- settings to convert to properties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |