public class CollectionNameRegistry
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Set<java.lang.String> |
getAllInventoriedCollectionNames() |
static java.lang.String |
lookupInventoriedCollectionName(java.lang.String collectionName)
Looks up the inventoried collection name corresponding to the specified collection name using the cached map.
|
static java.lang.String |
lookupInventoriedOriginalCollectionName(java.lang.String collectionName)
Similar to
lookupInventoriedCollectionName(String) , except it looks up the original collection
corresponding to the specified collection name. |
static void |
refreshIfNecessary()
Refreshes the cache if its data version if out of date
|
static void |
refreshIfNecessary(boolean forceRefresh)
Refreshes the cache if its data version if out of date
|
public static void refreshIfNecessary()
public static void refreshIfNecessary(boolean forceRefresh)
forceRefresh
- - Fetch the latest dataVersion and not use the cached one.public static java.lang.String lookupInventoriedCollectionName(java.lang.String collectionName) throws KeyNotFoundException
collectionName
- a collection name string, which could be an inventoried collection or a project-specific collection nameKeyNotFoundException
- if no inventoried collection name was found that matches the specified namepublic static java.lang.String lookupInventoriedOriginalCollectionName(java.lang.String collectionName) throws KeyNotFoundException
lookupInventoriedCollectionName(String)
, except it looks up the original collection
corresponding to the specified collection name. For example, let's say we are given a project-specific collection
name "wine_copy_11011" that corresponds to a private collection copy of the original cataloged collection named
"wine". This method will return "wine" because it's the parent collection of inventoried collection, wine_copy.
This method not only dereferences the specified collectionName back to a key found in the data set inventory, it
also returns the key of the original collection corresponding to the potentially project-private specified
collectionName.collectionName
- KeyNotFoundException
- if no such original collection can be found, likely because collectionName is not knownpublic static java.util.Set<java.lang.String> getAllInventoriedCollectionNames()
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.