* @param designate The designate whose object class definition should be determined.
* @return
* @throws ResourceProcessorException
*/
private ObjectClassDefinition getMetaTypeOCD(MetaData data, Designate designate) throws ResourceProcessorException {
ObjectClassDefinition ocd = null;
String ocdRef = designate.getObject().getOcdRef();
Bundle bundle = getBundle(designate.getBundleLocation(), isFactoryConfig(designate));
if (bundle != null) {
MetaTypeInformation mti = m_metaService.getMetaTypeInformation(bundle);
if (mti != null) {
String pid = isFactoryConfig(designate) ? pid = designate.getFactoryPid() : designate.getPid();
try {
ObjectClassDefinition tempOcd = mti.getObjectClassDefinition(pid, null);
// tempOcd will always have a value, if pid was not known IAE will be thrown
if (ocdRef.equals(tempOcd.getID())) {
ocd = tempOcd;
}
}
catch (IllegalArgumentException iae) {
// let null be returned