public class DmcOmni extends Object implements DmcNameResolverIF
| Modifier | Constructor and Description |
|---|---|
protected |
DmcOmni()
Protected constructor called when the omni singleton is required.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCompactSchema(DmcCompactSchemaIF schema)
Dark Matter Schema Auto Generated (DMSAGs) are generated by the DMO Generator utility and
placed in the generated/dmo folder.
|
void |
addResolver(DmcNameResolverIF res)
Adds a name resolver.
|
boolean |
autoResolution() |
void |
autoResolution(boolean f)
Turns auto resolution on/off.
|
boolean |
backRefTracking() |
void |
backRefTracking(boolean f)
Turns backref tracking on/off.
|
DmcTypeDmcObjectName<?> |
buildName(DmcObjectName name) |
boolean |
cleanUpDeadRefs() |
void |
cleanUpDeadRefs(boolean f)
Turns clean up of dead references on/off.
|
void |
dumpASAG()
This method displays the currently loaded attribute schemas in dmdID order.
|
DmcObject |
findNamedDMO(DmcObjectName name)
The DmcOmni can act as a global name resolver.
|
DmcNamedObjectIF |
findNamedObject(DmcObjectName name)
The DmcOmni can act as a global name resolver.
|
DmcNamedObjectIF |
findNamedObject(DmcObjectName name,
int attributeID)
Finds a named object based on its name and indicates the attribute via which
the reference is being made.
|
DmcAttributeInfo |
getAttributeInfo(String an)
Tries to find the specified attribute by its name.
|
DmcClassInfo |
getClassInfo(Integer id)
Tries to find the specified class by its id.
|
DmcClassInfo |
getClassInfo(String cn)
Tries to find the specified class by its name.
|
DmcAttributeInfo |
getInfo(Integer id)
Returns the DmcAttributeInfo associate with the ID or complains bitterly that you've
forgotten to prime the DmcOmni with the generated
|
DmcSliceInfo |
getSliceInfo(String name)
Returns the slice information if it's available.
|
DmcTypeInfo |
getTypeInfo(String tn) |
static DmcOmni |
instance() |
boolean |
lazyResolution() |
void |
lazyResolution(boolean f)
Turns lazy resolution on/off.
|
TreeMap<String,DmcCompactSchemaIF> |
loadedCompactSchemas() |
void |
logDeadReference(DmcObject referrer,
DmcAttribute<?> viaAttribute,
DmcObjectName referenceTo)
This method is called from DmcTypeNamedObjectREF when it is unable to resolve a reference.
|
DmcLoggerIF |
logger() |
void |
logger(DmcLoggerIF l)
Sets the logger.
|
void |
removeReferences(DmcTypeModifierMV mods) |
void |
reset()
Resets the DmcOmni to its initial state.
|
void |
ruleAdded(String info) |
void |
ruleExecuted(String info) |
void |
ruleFailed(DmcRuleExceptionSet errors) |
void |
ruleTracer(RuleTracerIF t) |
boolean |
ruleTracing() |
void |
ruleTracing(boolean f) |
void |
setCacheIF(DmcCacheIF c)
Sets the implementor of the DmcCacheIF that will be notified when objects with backrefs
are deleted.
|
void |
setTrackSchemaReferences(boolean f)
This method should be used with caution! Generally, we don't attempt to perform
back reference tracking on schema related references, but, in certain tools/utilities,
we make use of this functionality.
|
boolean |
trackThisAttribute(int attributeID)
This method is called from the DmcObject to determine whether or not are
particular attribute should have its reference tracked.
|
protected static DmcOmni omni
protected DmcOmni()
public void reset()
public static DmcOmni instance()
public TreeMap<String,DmcCompactSchemaIF> loadedCompactSchemas()
public void setTrackSchemaReferences(boolean f)
f - Set to true if we want perform back reference tracking on schema related objects.public boolean trackThisAttribute(int attributeID)
attributeID - public boolean backRefTracking()
public void backRefTracking(boolean f)
f - set to true to turn it on.public boolean lazyResolution()
public void lazyResolution(boolean f)
f - set to true to turn it on.public boolean autoResolution()
public void autoResolution(boolean f)
f - set to true to turn it on.public boolean cleanUpDeadRefs()
public void cleanUpDeadRefs(boolean f)
f - set to true to turn it on.public DmcLoggerIF logger()
public void logger(DmcLoggerIF l)
l - the logger.public void logDeadReference(DmcObject referrer, DmcAttribute<?> viaAttribute, DmcObjectName referenceTo)
referrer - The object that had the reference.viaAttribute - The object reference attribute.referenceTo - The name that couldn't be resolved.public void addResolver(DmcNameResolverIF res)
res - The name resolver.public void addCompactSchema(DmcCompactSchemaIF schema)
schema - public DmcTypeDmcObjectName<?> buildName(DmcObjectName name)
public void setCacheIF(DmcCacheIF c)
c - The cache.public void removeReferences(DmcTypeModifierMV mods)
public DmcClassInfo getClassInfo(String cn)
cn - The class name.public DmcClassInfo getClassInfo(Integer id)
id - The class id.public DmcTypeInfo getTypeInfo(String tn)
tn - the type namepublic DmcAttributeInfo getInfo(Integer id)
id - The attribute's ID.public DmcAttributeInfo getAttributeInfo(String an)
an - The attribute name.public DmcObject findNamedDMO(DmcObjectName name)
findNamedDMO in interface DmcNameResolverIFname - the name of the objectpublic DmcNamedObjectIF findNamedObject(DmcObjectName name)
findNamedObject in interface DmcNameResolverIFpublic DmcNamedObjectIF findNamedObject(DmcObjectName name, int attributeID)
DmcNameResolverIFfindNamedObject in interface DmcNameResolverIFname - the name of an objectattributeID - the attribute by which it is namedpublic void dumpASAG()
public DmcSliceInfo getSliceInfo(String name)
name - the name of the slice.public boolean ruleTracing()
public void ruleTracing(boolean f)
public void ruleTracer(RuleTracerIF t)
public void ruleExecuted(String info)
public void ruleAdded(String info)
public void ruleFailed(DmcRuleExceptionSet errors)
Copyright © 2023. All rights reserved.