Package org.mizartools.system

Examples of org.mizartools.system.Article


      button.setEnabled(false);
      LinkedList<String> articleList = ListArticleFile.getAllArticleList();
        progressBar.setMaximum(articleList.size()+1);
        progressBar.setValue(0);
        progressBar.setIndeterminate(false);
        Article article = null;
        String articleName = null;
        String fileName = null;
        String initialChar = null;
        String path= null;
        int progress = 0;
      FileExtension[] fe = FileExtension.values();
      try {
        String check;
        boolean error = false;
          for (String aid : articleList){
            if (!error){
              article = ArticleFactory.getInstance().getArticle(aid);
              articleName = article.getAid().toLowerCase();
            initialChar = articleName.substring(0,1);
            path = prelPath + File.separator + initialChar;
            textArea.append((articleName+"        ").substring(0,10)+" : ");
            for (int i = 0; i < fe.length; i++){
              fileName = article.getAid().toLowerCase() + "."+ fe[i];
              File file = new File(path, fileName);
              if (file.exists()){
                check = FilePrel.check(file);
                textArea.append(fe[i].toString()+" ");
                  if (!check.equals("")) {
View Full Code Here


        progressBarMML.setValue(0);
        progressBarMML.setIndeterminate(false);
        progressBarVerifier.setMaximum(100);
        progressBarVerifier.setValue(0);
      progressBarVerifier.setIndeterminate(false);
        Article article = null;
        String fileName = null;
        int progress = 0;
      try {
        Boolean error = false;
          for (String aid : articleList){
            if (!error){
              article = ArticleFactory.getInstance().getArticle(aid);
            textArea.append((article.getAid()+"        ").substring(0,10)+" : ");
              textArea.repaint();
              textArea.setCaretPosition(textArea.getText().length()-1);
              /* test parser */
              File dliFile = new File(dliPath, aid.toLowerCase()+".dli");
              String text = UtilityFile.readFile(dliFile);
              String arrayText[] = text.split("\n");
              error = checkParser(arrayText);
              /* test xml dli converter */
              Article articleXml = ArticleFactory.getInstance().getArticle(aid);
              boolean arrayFound[] = new boolean[arrayText.length];
              if (!error) error = checkConstructors(articleXml, arrayText, arrayFound);
              if (!error) error = checkNotations(articleXml, arrayText, arrayFound)
              if (!error) error = checkDefinientia(articleXml, arrayText, arrayFound);
              if (!error) error = checkRegistrations(articleXml, arrayText, arrayFound);
View Full Code Here

      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());
View Full Code Here

  private static HashMap<String, ReductionRegistrationsSignature> hashMapReductionRegistrationSignature = new HashMap<String, ReductionRegistrationsSignature>();

  private ReductionRegistrationsSignature(Article article){
    boolean found = false;
    for (ArticleID articleID : article.getReductionRegistrations().getSignature().getArticleIDList()) {
      Article article1 = ArticleFactory.getInstance().getArticle(articleID.getName());
      signatureItemList.add(SignatureItem.getSignatureItem(article1));
      if (article1 == article) found = true;
    }
    if (!found && article.hasConstructors()) signatureItemList.add(SignatureItem.getSignatureItem(article));
  }
View Full Code Here

  private static HashMap<String, SchemesSignature> hashMapSchemes = new HashMap<String, SchemesSignature>();

  private SchemesSignature(Article article){
    boolean found = false;
    for (ArticleID articleID : article.getSchemes().getSignature().getArticleIDList()) {
      Article article1 = ArticleFactory.getInstance().getArticle(articleID.getName());
      signatureItemList.add(SignatureItem.getSignatureItem(article1));
      if (article1 == article) found = true;
    }
    if (!found && article.hasConstructors()) signatureItemList.add(SignatureItem.getSignatureItem(article));
  }
View Full Code Here

  private static HashMap<String, ConstructorsSignature> hashMapConstructorsSignature = new HashMap<String, ConstructorsSignature>();
 
  private ConstructorsSignature(Article article){
    boolean found = false;
    for (ArticleID articleID : article.getConstructors().getSignature().getArticleIDList()) {
      Article article1 = ArticleFactory.getInstance().getArticle(articleID.getName());
      signatureItemList.add(SignatureItem.getSignatureItem(article1));
      if (article1 == article) found = true;
    }
    if (!found) signatureItemList.add(SignatureItem.getSignatureItem(article));
  }
View Full Code Here

  private static HashMap<String, NotationsSignature> hashMapNotationsSignature = new HashMap<String, NotationsSignature>();

  private NotationsSignature(Article article){
    boolean found = false;
    for (ArticleID articleID : article.getNotations().getSignature().getArticleIDList()) {
      Article article1 = ArticleFactory.getInstance().getArticle(articleID.getName());
      signatureItemList.add(SignatureItem.getSignatureItem(article1));
      if (article1 == article) found = true;
    }
    if (!found && article.hasConstructors()) signatureItemList.add(SignatureItem.getSignatureItem(article));
  }
View Full Code Here

  private static HashMap<String, RequirementsSignature> hashMapRequirements = new HashMap<String, RequirementsSignature>();

  private RequirementsSignature(Article article){
    boolean found = false;
    for (ArticleID articleID : article.getRequirements().getSignature().getArticleIDList()) {
      Article article1 = ArticleFactory.getInstance().getArticle(articleID.getName());
      signatureItemList.add(SignatureItem.getSignatureItem(article1));
      if (article1 == article) found = true;
    }
    if (!found && article.hasConstructors()) signatureItemList.add(SignatureItem.getSignatureItem(article));
  }
View Full Code Here

  public LinkedList<VocabularyItem> getVocabularyItemList() {
    return vocabularyItemList;
  }

  private NotationsVocabulary(String aid){
    Article article = ArticleFactory.getInstance().getArticle(aid);
    for (Vocabulary vocabulary : article.getNotations().getVocabularies().getVocabularyList()) {
      Article article1 = ArticleFactory.getInstance().getArticle(vocabulary.getArticleID().getName());
      vocabularyItemList.add(VocabularyItem.getVocabularyItem(article1));
    }
  }
View Full Code Here

  private static HashMap<String, TheoremsSignature> hashMapTheorems = new HashMap<String, TheoremsSignature>();

  private TheoremsSignature(Article article){
    boolean found = false;
    for (ArticleID articleID : article.getTheorems().getSignature().getArticleIDList()) {
      Article articleList = ArticleFactory.getInstance().getArticle(articleID.getName());
      signatureItemList.add(SignatureItem.getSignatureItem(articleList));
      if (articleList == article) found = true;
    }
    if (!found && article.hasConstructors()) signatureItemList.add(SignatureItem.getSignatureItem(article));
  }
View Full Code Here

TOP

Related Classes of org.mizartools.system.Article

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.