Package org.mizartools.system

Examples of org.mizartools.system.Article


        progressBarMML.setValue(0);
        progressBarMML.setIndeterminate(false);
        progressBarExecutable.setMaximum(100);
        progressBarExecutable.setValue(0);
      progressBarExecutable.setIndeterminate(false);
        Article article = null;
        String articleName = null;
        String fileName = null;
        int progress = 0;
      try {
        boolean error = false;
          for (String aid : articleList){
            if (!error){
              temporaryDirectory.clear();
              article = ArticleFactory.getInstance().getArticle(aid);
              articleName = article.getAid().toLowerCase();
            textArea.append((articleName+"        ").substring(0,10)+" : ");
              textArea.repaint();
              textArea.setCaretPosition(textArea.getText().length()-1);
            File sourceFile = new File(mmlPath, articleName+".miz");
            File destinationFile = new File(workDirectory, articleName+".miz");
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.hasTheorems()) {
      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.getTheorems().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<Theorem> theoremList = article.getTheorems().getTheoremList();
      progressBar.setMaximum(theoremList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of theorems</h2>");
     
      html.append("<table width=100% border=1>");
    html.append("<tr>");
    html.append("<td>UniqueIdentifier</td>");
    html.append("<td>Kind</td>");
    html.append("<td>Nr</td>");
    html.append("<td>Articlenr</td>");
    html.append("<td>Constrkind</td>");
    html.append("<td>Constrnr</td>");
    html.append("<td>Formula</td>");
    html.append("</tr>");

    TheoremsSignature theoremsSignature = article.getTheoremsSignature();
      int i = 0;
    TheoremId theoremId = new TheoremId();
    TheoremId theoremIdDef = new TheoremId();
    for (Theorem theorem : theoremList ){
      int nr = 0;
      switch (theorem.getKind()){
      case D :
        theoremIdDef.increment();
        nr = theoremIdDef.getId();
        break;
      case T :
        theoremId.increment();
        nr = theoremId.getId();
        break;
      default :
      }
      if (theorem.getNr() != null) nr = theorem.getNr();
     
      progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(theoremsSignature, article.getAid(), theorem.getKind(), nr).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");
      html.append("<td>");
      html.append(theorem.getKind().toString());
      html.append("</td>");
      html.append("<td>");
      if (theorem.getNr() != null)
        html.append(theorem.getNr().toString());
      html.append("</td>");
      html.append("<td>");
      if (theorem.getArticlenr() != null)
        html.append(theorem.getArticlenr().toString());
      html.append("</td>");
      html.append("<td>");
      if (theorem.getConstrkind() != null)
        html.append(theorem.getConstrkind().toString());
      html.append("</td>");
      html.append("<td>");
      if (theorem.getConstrnr() != null)
        html.append(theorem.getConstrnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (theorem.getFormula() != null)
        html.append(Html.changeChars(theorem.getFormula().getXMLElementList().toString()));
      html.append("</td>");
      html.append("</tr>");
    }
    html.append("</table>");

   
    html.append("<h2>List of theorems 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;
    theoremId = new TheoremId();
    theoremIdDef = new TheoremId();
    for (Theorem theorem : theoremList ){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        DecodedLibraryItem decodedLibraryItem = ItemFactory.getItem(theoremsSignature, theorem, theoremId, theoremIdDef);
        int nr = 0;
        switch (theorem.getKind()){
        case D :
          nr = theoremIdDef.getId();
          break;
        case T :
          nr = theoremId.getId();
          break;
        default :
        }
        if (theorem.getNr() != null) nr = theorem.getNr();
        html.append("<td><b>");
        try {
          html.append(UniqueIdentifier.getInstance(theoremsSignature, article.getAid(), theorem.getKind(), nr).toString());
          html.append("</b></td>");
          html.append("<td>");
          html.append(UniqueIdentifier.getInstance(theoremsSignature, article.getAid(), theorem.getKind(), nr).id);
          html.append("</td>");
        } catch (UniqueIdentifierException e) {}
        html.append("<td>");
        html.append(decodedLibraryItem.toString());
      } catch (DliException e) {
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.hasSchemes()) {
      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.getSchemes().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<Scheme> schemeList = article.getSchemes().getSchemeList();
      progressBar.setMaximum(schemeList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of schemes</h2>");
     
      html.append("<table width=100% border=1>");
    html.append("<tr>");
    html.append("<td>UniqueIdentifier</td>");
    html.append("<td>Nr</td>");
    html.append("<td>ArgTypes</td>");
    html.append("<td>Formula1</td>");
    html.append("<td>formula2List</td>");
    html.append("</tr>");

    SchemesSignature schemesSignature = article.getSchemesSignature();
    UniqueIdentifierType type = UniqueIdentifierType.sch;
      int i = 0;
    SchemeId schemeId = new SchemeId();
    for (Scheme scheme : schemeList ){
      int nr = 0;
      schemeId.increment();
      nr = schemeId.getId();
      if (scheme.getNr() != null) nr = scheme.getNr();
     
      progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(article.getAid(), type, nr).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");
      html.append("<td>");
      if (scheme.getNr() != null)
        html.append(scheme.getNr().toString());
      html.append("</td>");
      html.append("<td>");
      if (scheme.getArgTypes() != null)
        html.append(Html.changeChars(scheme.getArgTypes().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (scheme.getFormula1() != null)
        html.append(Html.changeChars(scheme.getFormula1().getXMLElementList().toString()));
      html.append("</td>");

      html.append("<td>");
      if (scheme.getFormula2List() != null){
          stringBuilder = new StringBuilder();
        for (Formula formula : scheme.getFormula2List()){
            if (stringBuilder.length()>0) stringBuilder.append(", ");
          stringBuilder.append(formula.getXMLElementList().toString());
        }
        html.append(Html.changeChars(stringBuilder.toString()));
      }
      html.append("</td>");
      html.append("</tr>");
    }
    html.append("</table>");

   
    html.append("<h2>List of schemes 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;
    schemeId = new SchemeId();
    for (Scheme scheme : schemeList){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        DecodedLibraryItem decodedLibraryItem = ItemFactory.getItem(schemesSignature, scheme, schemeId);
        int nr = schemeId.getId();
        if (scheme.getNr() != null) nr = scheme.getNr();
        html.append("<td><b>");
        try {
          html.append(UniqueIdentifier.getInstance(article.getAid(), type, nr).toString());
          html.append("</b></td>");
          html.append("<td>");
          html.append(UniqueIdentifier.getInstance(article.getAid(), type, nr).id);
          html.append("</td>");
        } catch (UniqueIdentifierException e) {}
        html.append("<td>");
        html.append(decodedLibraryItem.toString());
        html.append("</td>");
View Full Code Here

    html.append("<tr>");
    html.append("<td>ARTICLEID</td>");
    html.append("<td>Signature</td>");
    html.append("<td>ConstrCounts</td>");
    html.append("</tr>");
      Article article = ArticleFactory.getInstance().getArticle(articleID);
      StringBuilder stringBuilder;
    if (article.hasConstructors()) {
      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.getConstructors().getSignature().getArticleIDList()){
          if (stringBuilder.length()>0) stringBuilder.append(", ");
          stringBuilder.append(articleID.getName());
        }
      html.append("<td>" + stringBuilder.toString() + "</td>");
        stringBuilder = new StringBuilder();
      for (ConstrCount constrCount : article.getConstructors().getConstrCounts().getConstrCountList()){
          if (stringBuilder.length()>0) stringBuilder.append(", ");
        stringBuilder.append(constrCount.getKind().toString()+"="+constrCount.getNr().toString());
      }
      html.append("<td>" + stringBuilder.toString() + "</td>");
     
      html.append("</tr>");
    }
      html.append("</table>");

      LinkedList<Constructor> constructorList = article.getConstructors().getConstructorList();
      progressBar.setMaximum(constructorList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of constructors</h2>");
     
      html.append("<table width=100% border=1>");
    html.append("<tr>");
    html.append("<td>UniqueIdentifier</td>");
    html.append("<td>Kind</td>");
    html.append("<td>Nr</td>");
    html.append("<td>Relnr</td>");
    html.append("<td>Properties</td>");
    html.append("<td>ArgTypes</td>");
    html.append("<td>typList</td>");
    html.append("</tr>");
     
    ConstructorsSignature constructorsSignature = article.getConstructorsSignature();
      int i = 0;
    for (Constructor constructor :constructorList ){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(constructorsSignature, article.getAid(), constructor.getKind(), constructor.getNr()).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");
      html.append("<td>");
      html.append(constructor.getKind().toString());
      html.append("</td>");
      html.append("<td>");
      html.append(constructor.getNr().toString());
      html.append("</td>");
      html.append("<td>");
      if (constructor.getRelnr() != null)
        html.append(constructor.getRelnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (constructor.getProperties() != null)
        html.append(Html.changeChars(constructor.getProperties().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (constructor.getArgTypes() != null)
        html.append(Html.changeChars(constructor.getArgTypes().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      for (Typ typ : constructor.getTypList()) {
        html.append("<p>"+Html.changeChars(typ.getXMLElementList().toString())+"</p>");
      }
      html.append("</td>");
     
      html.append("</tr>");
    }
    html.append("</table>");

   
    html.append("<h2>List of constructors 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 (Constructor constructor :constructorList ){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        html.append("<td><b>");
        html.append(UniqueIdentifier.getInstance(constructorsSignature, article.getAid(), constructor.getKind(), constructor.getNr()).toString());
        html.append("</b></td>");
        html.append("<td>");
        html.append(UniqueIdentifier.getInstance(constructorsSignature, article.getAid(), constructor.getKind(), constructor.getNr()).id);
        html.append("</td>");
      } catch (UniqueIdentifierException e) {}
      html.append("<td>");
      try {
        html.append(ItemFactory.getItem(constructorsSignature, constructor).toString());
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.hasIdentifyRegistrations()) {
      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.getIdentifyRegistrations().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<Identify> identifyList = article.getIdentifyRegistrations().getIdentifyList();
      progressBar.setMaximum(identifyList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of identify 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>Constrkind</td>");
    html.append("<td>EqArgs</td>");
    html.append("<td>Formula1</td>");
    html.append("<td>Formula2</td>");
    html.append("<td>typList</td>");
    html.append("<td>Term1</td>");
    html.append("<td>Term2</td>");
    html.append("</tr>");

    IdentifyRegistrationsSignature identifyRegistrationsSignature = article.getIdentifyRegistrationsSignature();
      int i = 0;
    for (Identify identify : identifyList){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.idreg, identify.getNr()).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");

      html.append("<td>");
      html.append(identify.getAid());
      html.append("</td>");
      html.append("<td>");
      html.append(identify.getNr());
      html.append("</td>");
      html.append("<td>");
      if (identify.getConstrkind() != null)
        html.append(identify.getConstrkind().toString());
      html.append("</td>");
      html.append("<td>");
      if (identify.getEqArgs() != null)
        html.append(Html.changeChars(identify.getEqArgs().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (identify.getFormula1() != null)
        html.append(Html.changeChars(identify.getFormula1().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (identify.getFormula2() != null)
        html.append(Html.changeChars(identify.getFormula2().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (identify.getTypList() != null) {
          stringBuilder = new StringBuilder();
        for (Typ typ : identify.getTypList()){
            if (stringBuilder.length()>0) stringBuilder.append(", ");
          stringBuilder.append(typ.getXMLElementList().toString());
        }
        html.append(Html.changeChars(stringBuilder.toString()));
      }
      html.append("</td>");
      html.append("<td>");
      if (identify.getTerm1() != null)
        html.append(Html.changeChars(identify.getTerm1().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (identify.getTerm2() != null)
        html.append(Html.changeChars(identify.getTerm2().getXMLElementList().toString()));
      html.append("</td>");
      html.append("</tr>");
    }
    html.append("</table>");

   
    html.append("<h2>List of identify 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 (Identify identify : identifyList){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        html.append("<td><b>");
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.idreg, identify.getNr()).toString());
        html.append("</b></td>");
        html.append("<td>");
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.idreg, identify.getNr()).id);
        html.append("</td>");
      } catch (UniqueIdentifierException e) {}
      html.append("<td>");
      try {
        html.append(ItemFactory.getItem(identifyRegistrationsSignature, identify).toString());
View Full Code Here

    html.append("<td>Registrations</td>");
    html.append("<td>Requirements</td>");
    html.append("<td>Schemes</td>");
    html.append("<td>Theorems</td>");
    html.append("</tr>");
      Article article = null;
      int i = 0;
      for (String aid : sortedArticles.keySet()){
          progressBar.setValue(i++);
          progressBar.repaint();
        article = ArticleFactory.getInstance().getArticle(aid);
      html.append("<tr>");
        html.append("<td>");
          html.append("<font face=\"monospace\"><b>");
          html.append(article.getAid());
          html.append("</b></font");
        html.append("</td>");
      html.append("<td>"+sortedArticles.get(aid).toString()+"</td>");
        if (VocabularyFile.hasVocabulary(article.getAid()))
          html.append("<td>Y</td>");
        else
          html.append("<td></td>");
        if (article.hasConstructors())
          html.append("<td><a href=\"Constructors+"+article.getAid()+"\">con</a></td>");
        else
          html.append("<td></td>");
        if (article.hasDefinientia())
          html.append("<td><a href=\"Definientia+"+article.getAid()+"\">def</a></td>");
        else
          html.append("<td></td>");
        if (article.hasIdentifyRegistrations())
          html.append("<td><a href=\"IdentifyRegistrations+"+article.getAid()+"\">ide</a></td>");
        else
          html.append("<td></td>");
        if (article.hasReductionRegistrations())
          html.append("<td><a href=\"ReductionRegistrations+"+article.getAid()+"\">drd</a></td>");
        else
          html.append("<td></td>");
        if (article.hasNotations())
          html.append("<td><a href=\"Notations+"+article.getAid()+"\">not</a></td>");
        else
          html.append("<td></td>");
        if (article.hasRegistrations())
          html.append("<td><a href=\"Registrations+"+article.getAid()+"\">reg</a></td>");
        else
          html.append("<td></td>");
        if (article.hasRequirements())
          html.append("<td>Y</td>");
        else
          html.append("<td></td>");
        if (article.hasSchemes())
          html.append("<td><a href=\"Schemes+"+article.getAid()+"\">sch</a></td>");
        else
          html.append("<td></td>");
        if (article.hasTheorems())
          html.append("<td><a href=\"Theorems+"+article.getAid()+"\">the</a></td>");
        else
          html.append("<td></td>");
      html.append("</tr>");
      }
      html.append("</table>");
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.hasDefinientia()) {
      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.getDefinientia().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<Definiens> definiensList = article.getDefinientia().getDefiniensList();
      progressBar.setMaximum(definiensList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of definiens</h2>");
     
      html.append("<table width=100% border=1>");
    html.append("<tr>");
    html.append("<td>UniqueIdentifier</td>");
    html.append("<td>Nr</td>");
    html.append("<td>Constrkind</td>");
    html.append("<td>Constrnr</td>");
    html.append("<td>Relnr</td>");
    html.append("<td>Defnr</td>");
    html.append("<td>DefMeaning</td>");
    html.append("<td>Essentials</td>");
    html.append("<td>Formula</td>");
    html.append("<td>typList()</td>");
    html.append("</tr>");

    DefinientiaSignature definientiaSignature = article.getDefinientiaSignature();
      int i = 0;
    int relativeNr = 0;
    int nrDefiniens = 0;
    for (Definiens definiens : definiensList ){
      nrDefiniens++;
      relativeNr = definiens.getDefnr() - nrDefiniens;
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.dfs, definiens.getDefnr() - relativeNr).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");
      html.append("<td>");
      if (definiens.getNr() != null)
        html.append(definiens.getNr().toString());
      html.append("</td>");
      html.append("<td>");
      if (definiens.getConstrkind() != null)
        html.append(definiens.getConstrkind().toString());
      html.append("</td>");
      html.append("<td>");
      if (definiens.getConstrnr() != null)
        html.append(definiens.getConstrnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (definiens.getRelnr() != null)
        html.append(definiens.getRelnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (definiens.getDefnr() != null)
        html.append(definiens.getDefnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (definiens.getDefMeaning() != null)
        html.append(Html.changeChars(definiens.getDefMeaning().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (definiens.getEssentials() != null)
        html.append(Html.changeChars(definiens.getEssentials().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (definiens.getFormula() != null)
        html.append(Html.changeChars(definiens.getFormula().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      stringBuilder = new StringBuilder();
      if (definiens.getTypList() != null)
          for (Typ typ : definiens.getTypList()){
            if (stringBuilder.length()>0) stringBuilder.append(", ");
            stringBuilder.append(typ.getXMLElementList().toString());
          }
        html.append(Html.changeChars(stringBuilder.toString()));
      html.append("</td>");
      html.append("</tr>");
    }
    html.append("</table>");

    html.append("<h2>List of definiens 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;
    relativeNr = 0;
    nrDefiniens = 0;
    for (Definiens definiens : definiensList ){
      nrDefiniens++;
      relativeNr = definiens.getDefnr() - nrDefiniens;
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        html.append("<td><b>");
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.dfs, definiens.getDefnr() - relativeNr).toString());
        html.append("</b></td>");
        html.append("<td>");
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.dfs, definiens.getDefnr() - relativeNr).id);
        html.append("</td>");
      } catch (UniqueIdentifierException e) {}
      html.append("<td>");
      try {
        html.append(ItemFactory.getItem(definientiaSignature, definiens, relativeNr).toString());
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.hasReductionRegistrations()) {
      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.getReductionRegistrations().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<Reduction> reductionList = article.getReductionRegistrations().getReductionList();
      progressBar.setMaximum(reductionList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of reduction 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>typList</td>");
    html.append("<td>Term1</td>");
    html.append("<td>Term2</td>");
    html.append("</tr>");

    ReductionRegistrationsSignature reductionRegistrationsSignature = article.getReductionRegistrationsSignature();
      int i = 0;
    for (Reduction reduction : reductionList){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.redreg, reduction.getNr()).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");

      html.append("<td>");
      html.append(reduction.getAid());
      html.append("</td>");
      html.append("<td>");
      html.append(reduction.getNr());
      html.append("</td>");
      html.append("<td>");
      if (reduction.getTypList() != null) {
          stringBuilder = new StringBuilder();
        for (Typ typ : reduction.getTypList()){
            if (stringBuilder.length()>0) stringBuilder.append(", ");
          stringBuilder.append(typ.getXMLElementList().toString());
        }
        html.append(Html.changeChars(stringBuilder.toString()));
      }
      html.append("</td>");
      html.append("<td>");
      if (reduction.getTerm1() != null)
        html.append(Html.changeChars(reduction.getTerm1().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (reduction.getTerm2() != null)
        html.append(Html.changeChars(reduction.getTerm2().getXMLElementList().toString()));
      html.append("</td>");
      html.append("</tr>");
    }
    html.append("</table>");

   
    html.append("<h2>List of reduction 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 (Reduction reduction : reductionList){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        html.append("<td><b>");
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.redreg, reduction.getNr()).toString());
        html.append("</b></td>");
        html.append("<td>");
        html.append(UniqueIdentifier.getInstance(article.getAid(), UniqueIdentifierType.redreg, reduction.getNr()).id);
        html.append("</td>");
      } catch (UniqueIdentifierException e) {}
      html.append("<td>");
      try {
        html.append(ItemFactory.getItem(reductionRegistrationsSignature, reduction).toString());
View Full Code Here

    html.append("<tr>");
    html.append("<td>ARTICLEID</td>");
    html.append("<td>Signature</td>");
    html.append("<td>Vocabulary</td>");
    html.append("</tr>");
      Article article = ArticleFactory.getInstance().getArticle(articleID);
      StringBuilder stringBuilder;
    if (article.hasNotations()) {
      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.getNotations().getSignature().getArticleIDList()){
          if (stringBuilder.length()>0) stringBuilder.append(", ");
          stringBuilder.append(articleID.getName());
        }
      html.append("<td>" + stringBuilder.toString() + "</td>");
        stringBuilder = new StringBuilder();
      for (Vocabulary vocabulary : article.getNotations().getVocabularies().getVocabularyList()){
          if (stringBuilder.length()>0) stringBuilder.append(", ");
          stringBuilder.append(vocabulary.getArticleID().getName());
      }
      html.append("<td>" + stringBuilder.toString() + "</td>");
     
      html.append("</tr>");
    }
      html.append("</table>");

      LinkedList<Pattern> patternList = article.getNotations().getPatternList();
      progressBar.setMaximum(patternList.size()+1);
      progressBar.setValue(0);
      progressBar.setIndeterminate(false);
    html.append("<h2>List of patterns</h2>");
     
      html.append("<table width=100% border=1>");
    html.append("<tr>");
    html.append("<td>UniqueIdentifier</td>");
    html.append("<td>Kind</td>");
    html.append("<td>Nr</td>");

    html.append("<td>Relnr</td>");
    html.append("<td>Redefnr</td>");
    html.append("<td>Formatnr</td>");
    html.append("<td>Constrkind</td>");
    html.append("<td>Constrnr</td>");
    html.append("<td>Antonymic</td>");

    html.append("<td>Format</td>");
    html.append("<td>ArgTypes</td>");

    html.append("<td>Visible</td>");
    html.append("<td>Expansion</td>");
    html.append("</tr>");

    NotationsSignature notationsSignature = article.getNotationsSignature();
      int i = 0;
    for (Pattern pattern : patternList ){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      html.append("<td><b>");
      try {
        html.append(UniqueIdentifier.getInstance(notationsSignature, article.getAid(), pattern.getKind(), pattern.getNr()).toString());
      } catch (UniqueIdentifierException e) {}
      html.append("</b></td>");
      html.append("<td>");
      html.append(pattern.getKind().toString());
      html.append("</td>");
      html.append("<td>");
      html.append(pattern.getNr().toString());
      html.append("</td>");
      html.append("<td>");
      if (pattern.getRelnr() != null)
        html.append(pattern.getRelnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (pattern.getRedefnr() != null)
        html.append(pattern.getRedefnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (pattern.getFormatnr() != null)
        html.append(pattern.getFormatnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (pattern.getConstrkind() != null)
        html.append(pattern.getConstrkind().toString());
      html.append("</td>");
      html.append("<td>");
      if (pattern.getConstrnr() != null)
        html.append(pattern.getConstrnr().toString());
      html.append("</td>");
      html.append("<td>");
      if (pattern.getAntonymic() != null)
        html.append(Html.changeChars(pattern.getAntonymic().toString()));
      html.append("</td>");
      html.append("<td>");
      if (pattern.getFormat() != null)
        html.append(Html.changeChars(pattern.getFormat().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (pattern.getArgTypes() != null)
        html.append(Html.changeChars(pattern.getArgTypes().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (pattern.getVisible() != null)
        html.append(Html.changeChars(pattern.getVisible().getXMLElementList().toString()));
      html.append("</td>");
      html.append("<td>");
      if (pattern.getExpansion() != null)
        html.append(Html.changeChars(pattern.getExpansion().getXMLElementList().toString()));
      html.append("</td>");
     
      html.append("</tr>");
    }
    html.append("</table>");

   
    html.append("<h2>List of patterns 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 (Pattern pattern : patternList ){
        progressBar.setValue(i++);
        progressBar.repaint();
      html.append("<tr>");
      try {
        html.append("<td><b>");
        html.append(UniqueIdentifier.getInstance(notationsSignature, article.getAid(), pattern.getKind(), pattern.getNr()).toString());
        html.append("</b></td>");
        html.append("<td>");
        html.append(UniqueIdentifier.getInstance(notationsSignature, article.getAid(), pattern.getKind(), pattern.getNr()).id);
        html.append("</td>");
      } catch (UniqueIdentifierException e) {}
      html.append("<td>");
      try {
        html.append(Html.changeChars(ItemFactory.getItem(notationsSignature, pattern).toString()));
View Full Code Here

        progressBarMML.setValue(0);
        progressBarMML.setIndeterminate(false);
        progressBarVerifier.setMaximum(100);
        progressBarVerifier.setValue(0);
      progressBarVerifier.setIndeterminate(false);
        Article article = null;
        String articleName = null;
        String fileName = null;
        int progress = 0;
        long duration = 0;
        WorkFileExtension[] wfe = WorkFileExtension.values();
      try {
        String check;
        boolean error = false;
          for (String aid : articleList){
            if (!error){
              temporaryDirectory.clear();
              article = ArticleFactory.getInstance().getArticle(aid);
              articleName = article.getAid().toLowerCase();
            textArea.append((articleName+"        ").substring(0,10)+" : ");
              textArea.repaint();
              textArea.setCaretPosition(textArea.getText().length()-1);
            File sourceFile = new File(mmlPath, articleName+".miz");
            File destinationFile = new File(workDirectory, articleName+".miz");
            error = !UtilityFile.Copy(sourceFile, destinationFile);
            if (!error) {
              textArea.append("[MakeEnvironment] ");
                textArea.repaint();
                textArea.setCaretPosition(textArea.getText().length()-1);
                duration = Calendar.getInstance().getTimeInMillis();
              try {
                MakeEnvironment makeEnvironment = new MakeEnvironment(temporaryDirectory, destinationFile.getName());
                makeEnvironment.start();
                while (makeEnvironment.isExecuting()) {
                  Thread.sleep(50);
                }
                if (makeEnvironment.getExitValue() != 0) {
                  error = true;
                  textArea.append("Error exit value = " + makeEnvironment.getExitValue());
                  textArea.append("\n");
                }
                if (makeEnvironment.getException() != null) {
                  error = true;
                  textArea.append(makeEnvironment.getException().getMessage());
                  textArea.append("\n");
                }
              } catch (ExecutableException e) {
                error = true;
                textArea.append(e.getMessage());
                textArea.append("\n");
              } catch (InterruptedException e) {
                error = true;
                textArea.append(e.getMessage());
                textArea.append("\n");
              }
                duration = Calendar.getInstance().getTimeInMillis() - duration;
              textArea.append("["+((double)duration)/1000+"] ");
                textArea.repaint();
                textArea.setCaretPosition(textArea.getText().length()-1);
            }
            if (!error) {
              textArea.append("[Verifier] ");
                textArea.repaint();
                textArea.setCaretPosition(textArea.getText().length()-1);
                duration = Calendar.getInstance().getTimeInMillis();
              try {
                Verifier verifier = new Verifier(temporaryDirectory, destinationFile.getName());
                verifier.start();
                while (verifier.isExecuting()) {
                  Thread.sleep(250);
                    progressBarVerifier.setValue(verifier.getPercentage());
                }
                if (verifier.getExitValue() != 0) {
                  error = true;
                  textArea.append("Error exit value = " + verifier.getExitValue());
                  textArea.append("\n");
                }
                if (verifier.getException() != null) {
                  error = true;
                  textArea.append(verifier.getException().getMessage());
                  textArea.append("\n");
                }
              } catch (ExecutableException e) {
                error = true;
                textArea.append(e.getMessage());
                textArea.append("\n");
              } catch (InterruptedException e) {
                error = true;
                textArea.append(e.getMessage());
                textArea.append("\n");
              }
                duration = Calendar.getInstance().getTimeInMillis() - duration;
              textArea.append("["+((double)duration)/1000+"] ");
                textArea.repaint();
                textArea.setCaretPosition(textArea.getText().length()-1);
            }
            textArea.append("\n");
            textArea.append("           : ");
              textArea.repaint();
              textArea.setCaretPosition(textArea.getText().length()-1);
              progressBarVerifier.setValue(0);
            for (int i = 0; i < wfe.length; i++){
              if (!error && !WorkFileExtension.getClassName(wfe[i].toString()).equals("?")) {
                fileName = article.getAid().toLowerCase() + "."+ wfe[i];
                if ((i+1)%8 == 0) {
                  textArea.append("\n");
                  textArea.append("           : ");
                }
                textArea.append(wfe[i] + " ");
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.