org.nlogo.workspace
Class Library

java.lang.Object
  extended by org.nlogo.workspace.Library

public class Library
extends Object


Nested Class Summary
static class Library.Node
           
 
Field Summary
static Library.Node rootNode
           
 
Method Summary
static List<String> findModelsBySubstring(String targetName)
           
static String getImagePath(String filePath)
           
static String getInfoWindow(String filePath)
           
static String getModelPath(String targetName)
          scans for and returns the full path name to the given model in the models library.
static String[] getModelPaths()
           
static String[] getModelPaths(boolean exclusive)
           
static String[] getModelPathsAtRoot(String path)
           
static boolean isExternalModelPath(String path)
           
static boolean needsModelScan()
           
static void scanForModels(boolean exclusive)
           
static Library.Node scanForModelsAtRoot(String path, boolean exclusive)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootNode

public static Library.Node rootNode
Method Detail

getModelPaths

public static String[] getModelPaths()

getModelPaths

public static String[] getModelPaths(boolean exclusive)

getModelPathsAtRoot

public static String[] getModelPathsAtRoot(String path)

findModelsBySubstring

public static List<String> findModelsBySubstring(String targetName)

getModelPath

public static String getModelPath(String targetName)
scans for and returns the full path name to the given model in the models library.

Parameters:
targetName - the name of the model to scan for, not including the ".nlogo" extension.
Returns:
the path to the model, or null if no such model is in the library.

needsModelScan

public static boolean needsModelScan()

scanForModels

public static void scanForModels(boolean exclusive)

scanForModelsAtRoot

public static Library.Node scanForModelsAtRoot(String path,
                                               boolean exclusive)

getInfoWindow

public static String getInfoWindow(String filePath)
                            throws IOException
Throws:
IOException

getImagePath

public static String getImagePath(String filePath)

isExternalModelPath

public static boolean isExternalModelPath(String path)