Package org.spdx.core
Class DefaultModelStore
- java.lang.Object
-
- org.spdx.core.DefaultModelStore
-
public class DefaultModelStore extends Object
Singleton class to hold a default model store used when no model store is providedWARNING: The model store and copy manager are in memory and will continue to grow as they are utilized. There is NO garbage collection.
- Author:
- Gary O'Neall
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IModelCopyManager
getDefaultCopyManager()
static String
getDefaultDocumentUri()
static IModelStore
getDefaultModelStore()
static void
initialize(IModelStore newModelStore, String newDefaultDocumentUri, IModelCopyManager newDefaultCopyManager)
Initialize the default model store.static boolean
isInitialized()
Checks if the default model store is initialized
-
-
-
Method Detail
-
isInitialized
public static boolean isInitialized()
Checks if the default model store is initialized- Returns:
- true if the model store is initialized
-
getDefaultModelStore
public static IModelStore getDefaultModelStore() throws DefaultStoreNotInitializedException
- Returns:
- the default model store
- Throws:
DefaultStoreNotInitializedException
- if theinitialize(...)
was not called prior
-
getDefaultDocumentUri
public static String getDefaultDocumentUri() throws DefaultStoreNotInitializedException
- Returns:
- the default SPDX 2.X document URi
- Throws:
DefaultStoreNotInitializedException
- if theinitialize(...)
was not called prior
-
initialize
public static void initialize(IModelStore newModelStore, String newDefaultDocumentUri, IModelCopyManager newDefaultCopyManager)
Initialize the default model store. This must be done prior to any use- Parameters:
newModelStore
- new default model storenewDefaultDocumentUri
- new SPDX 2.X document URInewDefaultCopyManager
- new default copy manager
-
getDefaultCopyManager
public static IModelCopyManager getDefaultCopyManager() throws DefaultStoreNotInitializedException
- Returns:
- the default copy manager
- Throws:
DefaultStoreNotInitializedException
- if theinitialize(...)
was not called prior
-
-