public void setGlobals(TProcess iProcess, PetriNetModelProcessor pnp)
{
TVariables itempVars = (TVariables) pnp.getElementContainer()
.getTVariablesList();
TPartnerLinks itempLinks = (TPartnerLinks) pnp.getElementContainer()
.getTPartnerLinkList();
if ((itempVars.sizeOfVariableArray() > 0) & (itempVars != null))
{
TVariables iVars = iProcess.addNewVariables();
for (int i = 0; itempVars.sizeOfVariableArray() > i; i++)
{
iVars.addNewVariable().set(itempVars.getVariableArray(i));
XmlCursor curs = iVars.getVariableArray(i).newCursor();
curs.toNextToken();
curs.toNextToken();
curs.toNextToken();
if (curs.isNamespace())
{
curs.removeXml();
}
}
}
if ((itempLinks.sizeOfPartnerLinkArray() > 0) & (itempLinks != null))
{
TPartnerLinks iLinks = iProcess.addNewPartnerLinks();
for (int j = 0; itempLinks.sizeOfPartnerLinkArray() > j; j++)
{
iLinks.addNewPartnerLink().set(
(TPartnerLink) itempLinks.getPartnerLinkArray(j));
XmlCursor curs = iLinks.getPartnerLinkArray(j).newCursor();
curs.toNextToken();
curs.toNextToken();
curs.toNextToken();
curs.toNextToken();
curs.toNextToken();