html.append("<table width=100% border=1>");
html.append("<tr>");
html.append("<td>ARTICLEID</td>");
html.append("<td>Signature</td>");
html.append("</tr>");
Article article = ArticleFactory.getInstance().getArticle(articleID);
StringBuilder stringBuilder;
if (article.hasRegistrations()) {
html.append("<tr>");
html.append("<td>");
html.append("<font face=\"monospace\"><b>");
html.append(article.getAid());
html.append("</b></font");
html.append("</td>");
stringBuilder = new StringBuilder();
for (ArticleID articleID : article.getRegistrations().getSignature().getArticleIDList()){
if (stringBuilder.length()>0) stringBuilder.append(", ");
stringBuilder.append(articleID.getName());
}
html.append("<td>" + stringBuilder.toString() + "</td>");
html.append("</tr>");
}
html.append("</table>");
LinkedList<IClusterRegistration> clusterRegistrationList = article.getRegistrations().getIClusterRegistrationList();
progressBar.setMaximum(clusterRegistrationList.size()+1);
progressBar.setValue(0);
progressBar.setIndeterminate(false);
html.append("<h2>List of registrations</h2>");
html.append("<table width=100% border=1>");
html.append("<tr>");
html.append("<td>UniqueIdentifier</td>");
html.append("<td>Aid</td>");
html.append("<td>Nr</td>");
html.append("<td>ArgTypes</td>");
html.append("<td>Cluster1</td>");
html.append("<td>Cluster2</td>");
html.append("<td>Cluster3</td>");
html.append("<td>Typ</td>");
html.append("<td>Term</td>");
html.append("</tr>");
RegistrationsSignature registrationSignature = article.getRegistrationsSignature();
int i = 0;
for (IClusterRegistration iClusterRegistration : clusterRegistrationList){
progressBar.setValue(i++);
progressBar.repaint();
html.append("<tr>");
html.append("<td><b>");
try {
html.append(UniqueIdentifier.getInstance(registrationSignature, article.getAid(), iClusterRegistration.getClusterRegistrationKind(), iClusterRegistration.getClusterRegistrationNr()).toString());
} catch (UniqueIdentifierException e) {}
html.append("</b></td>");
CCluster cCluster = null;
FCluster fCluster = null;
RCluster rCluster = null;
if (iClusterRegistration instanceof CCluster) {
cCluster = (org.mizartools.system.xml.CCluster)iClusterRegistration;
html.append("<td>");
html.append(cCluster.getAid());
html.append("</td>");
html.append("<td>");
html.append(cCluster.getNr());
html.append("</td>");
html.append("<td>");
if (cCluster.getArgTypes() != null)
html.append(Html.changeChars(cCluster.getArgTypes().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (cCluster.getCluster1() != null)
html.append(Html.changeChars(cCluster.getCluster1().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (cCluster.getCluster2() != null)
html.append(Html.changeChars(cCluster.getCluster2().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (cCluster.getCluster3() != null)
html.append(Html.changeChars(cCluster.getCluster3().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (cCluster.getTyp() != null)
html.append(Html.changeChars(cCluster.getTyp().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
html.append("</td>");
}
if (iClusterRegistration instanceof FCluster) {
fCluster = (org.mizartools.system.xml.FCluster)iClusterRegistration;
html.append("<td>");
html.append(fCluster.getAid());
html.append("</td>");
html.append("<td>");
html.append(fCluster.getNr());
html.append("</td>");
html.append("<td>");
if (fCluster.getArgTypes() != null)
html.append(Html.changeChars(fCluster.getArgTypes().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (fCluster.getCluster1() != null)
html.append(Html.changeChars(fCluster.getCluster1().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (fCluster.getCluster2() != null)
html.append(Html.changeChars(fCluster.getCluster2().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
html.append("</td>");
html.append("<td>");
if (fCluster.getTyp() != null)
html.append(Html.changeChars(fCluster.getTyp().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (fCluster.getTerm() != null)
html.append(Html.changeChars(fCluster.getTerm().getXMLElementList().toString()));
html.append("</td>");
}
if (iClusterRegistration instanceof RCluster) {
rCluster = (org.mizartools.system.xml.RCluster)iClusterRegistration;
html.append("<td>");
html.append(rCluster.getAid());
html.append("</td>");
html.append("<td>");
html.append(rCluster.getNr());
html.append("</td>");
html.append("<td>");
if (rCluster.getArgTypes() != null)
html.append(Html.changeChars(rCluster.getArgTypes().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (rCluster.getCluster1() != null)
html.append(Html.changeChars(rCluster.getCluster1().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
if (rCluster.getCluster2() != null)
html.append(Html.changeChars(rCluster.getCluster2().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
html.append("</td>");
html.append("<td>");
if (rCluster.getTyp() != null)
html.append(Html.changeChars(rCluster.getTyp().getXMLElementList().toString()));
html.append("</td>");
html.append("<td>");
html.append("</td>");
}
html.append("</tr>");
}
html.append("</table>");
html.append("<h2>List of registrations in dli format</h2>");
html.append("<table width=100% border=1>");
html.append("<tr>");
html.append("<td>UniqueIdentifier</td>");
html.append("<td>UniqueId</td>");
html.append("<td>Dli</td>");
html.append("</tr>");
i = 0;
for (IClusterRegistration iClusterRegistration : clusterRegistrationList){
progressBar.setValue(i++);
progressBar.repaint();
html.append("<tr>");
try {
html.append("<td><b>");
html.append(UniqueIdentifier.getInstance(registrationSignature, article.getAid(), iClusterRegistration.getClusterRegistrationKind(), iClusterRegistration.getClusterRegistrationNr()).toString());
html.append("</b></td>");
html.append("<td>");
html.append(UniqueIdentifier.getInstance(registrationSignature, article.getAid(), iClusterRegistration.getClusterRegistrationKind(), iClusterRegistration.getClusterRegistrationNr()).id);
html.append("</td>");
} catch (UniqueIdentifierException e) {}
html.append("<td>");
try {
html.append(ItemFactory.getItem(registrationSignature, iClusterRegistration).toString());