How do you get the language of linked translation objects?
Version: Windchill 12.1
Use Case: I am working in a Java workflow Expression robot, on an EPMDocument. My end result is I need to create new translation packages based on what that document had been translated into in past versions and iterations. I have the Starting Document, and all version, and I have the target translation package. How can I get the actual TranslationLink object, and get the language attribute, or how can I get the language of the translated package?
Description:
I tried querying for the Translation link like this, but windchill indicates that source is not an attribute of TranslationLink.
wt.query.QuerySpec qs = new wt.query.QuerySpec(com.ptc.arbortext.windchill.translation.TranslationLink.class);
qs.appendWhere(new wt.query.SearchCondition(com.ptc.arbortext.windchill.translation.TranslationLink.class,
com.ptc.arbortext.windchill.translation.TranslationLink.SOURCE_ROLE,wt.query.SearchCondition.EQUAL, epmDoc.getIdentity()));
wt.fc.QueryResult linkResults = PersistenceHelper.manager.find(qs);
while(linkResults.hasMoreElements()){
com.ptc.arbortext.windchill.translation.TranslationLink link = (com.ptc.arbortext.windchill.translation.TranslationLink)linkResults.nextElement();
System.out.println("Lang ="+link.getLanguage());
}
I am getting the translation package like this, but I havent had any luck getting the language off of that document.
wt.fc.PersistenceHelper.manager.navigate(nextObj, com.ptc.arbortext.windchill.translation.TranslationLink.ALL_ROLES, com.ptc.arbortext.windchill.translation.TranslationLink.class);
Any help would be appreciated.

