@Override
public DmcNamedObjectIF findNamedObject(DmcObjectName name, int attributeID) {
if (attributeID == MetaDMSAG.__internalTypeRef.id){
// DebugInfo.debug("internal type ref: " + name.getNameString());
DmcNamedObjectIF def = (DmcNamedObjectIF)internalTypeDefs.get(name);
return(def);
}
else if (attributeID == MetaDMSAG.__type.id){
// DebugInfo.debug("type " + name.getNameString());
DmcNamedObjectIF def = (DmcNamedObjectIF)internalTypeDefs.get(name);
if (def != null)
return(def);
}
else if (attributeID == MetaDMSAG.__internalTypeDefList.id){
// DebugInfo.debug("internalTypeDefList " + name.getNameString());
DmcNamedObjectIF def = (DmcNamedObjectIF)internalTypeDefs.get(name);
if (def != null)
return(def);
}
else if (attributeID == MetaDMSAG.__enumDefList.id){
// DebugInfo.debug("enumDefList " + name.getNameString());
DmcNamedObjectIF def = (DmcNamedObjectIF)enumDefs.get(name);
if (def != null)
return(def);
}
else if (attributeID == MetaDMSAG.__extendedReferenceTypeDefList.id){
// DebugInfo.debug("extendedReferenceTypeDefList " + name.getNameString());
DmcNamedObjectIF def = (DmcNamedObjectIF)extendedReferenceTypeDefs.get(name);
if (def != null)
return(def);
}
else if (attributeID == MetaDMSAG.__complexTypeDefList.id){
// DebugInfo.debug("complexTypeDefList " + name.getNameString());
DmcNamedObjectIF def = (DmcNamedObjectIF)complexTypeDefs.get(name);
if (def != null)
return(def);
}
// Added this after working on rules. Had a case where allowedType was defined as
// type TypeDefinition but got DmcValueException when referring to AttributeDefinition.
// This occurred because allowedType was not specified in the list above - so, to make
// things extensible, added this chunk of code.
AttributeDefinition ad = attrByID.get(attributeID);
if (ad != null){
if (ad.getDMO().getType().getObjectName().getNameString().equals(MetaDMSAG.__type_TypeDefinition.name)){
DmcNamedObjectIF def = (DmcNamedObjectIF)internalTypeDefs.get(name);
if (def != null)
return(def);
}
}