Package org.ivoa.vodml
Class ModelContext
- java.lang.Object
-
- org.ivoa.vodml.ModelContext
-
public class ModelContext extends java.lang.ObjectA context for storing ephemeral information about a model.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ReferenceCache<T>cache(java.lang.Class<T> clazz)Return the cache for a particular reference type.java.util.Set<java.lang.Class>containedRefs()List the reference types contained in the context.static voidcreate(java.util.Map<java.lang.Class,ReferenceCache> m)create a new model context with the associated reference cache.static ModelContextcurrent()
-
-
-
Method Detail
-
current
public static ModelContext current()
-
create
public static void create(java.util.Map<java.lang.Class,ReferenceCache> m)
create a new model context with the associated reference cache.- Parameters:
m- the reference cache.
-
cache
public <T> ReferenceCache<T> cache(java.lang.Class<T> clazz)
Return the cache for a particular reference type.- Type Parameters:
T- the type of the reference.- Parameters:
clazz- the type of the reference.- Returns:
- the cache.
-
containedRefs
public java.util.Set<java.lang.Class> containedRefs()
List the reference types contained in the context.- Returns:
- the set of types.
-
-