*
* @param definitionId Unique ID of the StructureDefinition to look for.
* @return StructureDefinition or <code>null</code> if none found.
*/
public StructureDefinition findStructure(final String definitionId) {
StructureDefinition strDef = getStructure();
// The root definition, don't need to look any further.
String name = strDef.getFullName();
if (definitionId.equals(name)) {
return strDef;
}
final Map<String, Map<String, StructureDefinition>> cache = getNamedStructsCache();
final Map<String, StructureDefinition> namedStructs = cache.get(this.mFullName);
StructureDefinition def = namedStructs.get(definitionId);
return def;
}