Bonjour,

Déjà comme je l'avais dit, Daniel Durand souhaitait savoir quelles étaient 
les modifications apportées au code de GenJ, 

Nous disposions d'un moyen sur un site internet pour voir ce qui se passait, 
mais Nils, pour une bonne raison, (je ne la connaissais pas, mais il vient 
de l'indiquer sur le forum), a coupé cette info.

Plutot que de poster ici des résumés qui peuvent ne pas intéresser tout le 
monde, je me propose de mettre une mailing list dans laquelle vous ne 
pourriez pas poster mais qui vous enverrait ce que je reçois.
Ce n'est pas d'une lecture folichonne ;-)) mais ça donne des infos.
Pour vous montrez ce que je  reçois voilà un exemple d'un message de cette 
nuit. (j'en ai eu une bonne dizaine cette nuit).
Donc si ça vous intéresse vous me dites. J'essaierai de vous faire ça .
Francois


[Genj-commits] dev/app/src/report/validate ReportValidate.properties, 1.38, 
1.39 TestCardinality.java, 1.2, 1.3 ReportValidate.java, 1.49, 1.50
 Date : Mon Sep 17 06:17:21 2007
 De : 
 À : 
 
Update of /cvsroot/genj/dev/app/src/report/validate
In directory 
sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8912/src/report/validate

Modified Files:
        ReportValidate.properties TestCardinality.java 
        ReportValidate.java 
Log Message:
gedcom: break up 5.5 and 5.5.1 grammar - no switch in GenJ yet - that'll be 
a menu item per gedcom file - for now has to be changed by hand in the file 
header

Index: ReportValidate.properties
===================================================================
RCS 
file: /cvsroot/genj/dev/app/src/report/validate/ReportValidate.properties,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ReportValidate.properties   5 Sep 2007 17:31:49 -0000       1.38
--- ReportValidate.properties   17 Sep 2007 04:17:19 -0000      1.39
***************
*** 167,174 ****
  err.nosubmitter.pl   = Brak autora dla pliku {0}
  
! err.notgedcom        = {0} is not Gedcom compliant here (in {1})
! err.notgedcom.de     = {0} ist nicht Gedcom konform hier (in {1})
! err.notgedcom.fr     = {0} n'est pas conforme avec la norme Gedcom ici 
(dans {1})
! err.notgedcom.pl     = {0} nie jest plikem zgodnym z formatem Gedcom (w 
{1})
  
  err.nofile           = File not found
--- 167,174 ----
  err.nosubmitter.pl   = Brak autora dla pliku {0}
  
! err.notgedcom        = {0} is not Gedcom {1} compliant here (in {2})
! err.notgedcom.de     = {0} ist nicht Gedcom {1} konform hier (in {2})
! err.notgedcom.fr     = {0} n'est pas conforme avec la norme Gedcom {1} ici 
(dans {2})
! err.notgedcom.pl     = {0} nie jest plikem zgodnym z formatem Gedcom {1} 
(w {2})
  
  err.nofile           = File not found
***************
*** 182,192 ****
  err.notvalid.pl      = {0} nie zawiera dopuszczalnej wartoÅ›ci
  
! err.cardinality.max = {0} allows only one {1} ({2})
! err.cardinality.max.de  = {0} erlaubt nur ein {1} ({2})
! err.cardinality.max.fr  = L'entité {0} ne permet l'étiquette {1} qu'une 
seule fois ({2})
  
! err.cardinality.min = {0} requires {1} ({2})
! err.cardinality.min.de = {0} benötigt {1} ({2})
! err.cardinality.min.fr = {0} a besoin de {1} ({2})
  
  err.notuniqueid      = {0} {1} is not unique
--- 182,192 ----
  err.notvalid.pl      = {0} nie zawiera dopuszczalnej wartoÅ›ci
  
! err.cardinality.max = {0} allows only one {1} in Gedcom {2} ({3})
! err.cardinality.max.de  = {0} erlaubt nur ein {1} in Gedcom {2} ({3})
! err.cardinality.max.fr  = L'entité {0} ne permet l'étiquette {1} qu'une 
seule fois dans Gedcom {2} ({3})
  
! err.cardinality.min = {0} requires {1} in Gedcom {2} ({3})
! err.cardinality.min.de = {0} benötigt {1} in Gedcom {2} ({3})
! err.cardinality.min.fr = {0} a besoin de {1} dans Gedcom {2} ({3})
  
  err.notuniqueid      = {0} {1} is not unique

Index: ReportValidate.java
===================================================================
RCS file: /cvsroot/genj/dev/app/src/report/validate/ReportValidate.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** ReportValidate.java 14 Sep 2007 22:51:20 -0000      1.49
--- ReportValidate.java 17 Sep 2007 04:17:19 -0000      1.50
***************
*** 11,15 ****
  import genj.gedcom.Gedcom;
  import genj.gedcom.GedcomException;
- import genj.gedcom.Grammar;
  import genj.gedcom.MetaProperty;
  import genj.gedcom.Property;
--- 11,14 ----
***************
*** 32,39 ****
  public class ReportValidate extends Report {
    
-   public int gedcomVersion = 0;
-   
-   public final static String[] gedcomVersions = { "5.5", "5.5.1" };
- 
    /** whether we consider an empty value to be valid */
    public boolean isEmptyValueValid = true;
--- 31,34 ----
***************
*** 105,109 ****
      for (int i=0;i<props.length;i++) {
        TagPath path = props[i].getPath();
!       test(props[i], path, Grammar.getMeta(path), tests, issues);
      }
  
--- 100,104 ----
      for (int i=0;i<props.length;i++) {
        TagPath path = props[i].getPath();
!       test(props[i], path, 
props[i].getGedcom().getGrammar().getMeta(path), tests, issues);
      }
  
***************
*** 127,131 ****
      for (int i=0;i<entities.length;i++) {
        TagPath path = new TagPath(entities[i].getTag());
!       test(entities[i], path, Grammar.getMeta(path), tests, issues);
      }
  
--- 122,126 ----
      for (int i=0;i<entities.length;i++) {
        TagPath path = new TagPath(entities[i].getTag());
!       test(entities[i], path, 
entities[i].getGedcom().getGrammar().getMeta(path), tests, issues);
      }
  
***************
*** 166,170 ****
          Entity e = (Entity)es.next();
          TagPath path = new TagPath(e.getTag());
!         test(e, path, Grammar.getMeta(path), tests, issues);
        }
      }
--- 161,165 ----
          Entity e = (Entity)es.next();
          TagPath path = new TagPath(e.getTag());
!         test(e, path, gedcom.getGrammar().getMeta(path), tests, issues);
        }
      }
***************
*** 175,185 ****
    
    /**
-    * current version
-    */
-   /*package*/ String getGedcomVersion() {
-     return gedcomVersions[gedcomVersion];
-   }
- 
-   /**
     * show validation results
     */
--- 170,173 ----
***************
*** 228,232 ****
        // check if Gedcom grammar allows it
        if (!meta.allows(ctag)) {
!         String msg = translate("err.notgedcom", new String[]
{ctag,path.toString()});
          issues.add(new 
ViewContext(child).setText(msg).setImage(MetaProperty.IMG_ERROR));
          continue;
--- 216,220 ----
        // check if Gedcom grammar allows it
        if (!meta.allows(ctag)) {
!         String msg = translate("err.notgedcom", new String[]{ctag, 
prop.getGedcom().getGrammar().getVersion(), path.toString()});
          issues.add(new 
ViewContext(child).setText(msg).setImage(MetaProperty.IMG_ERROR));
          continue;

Index: TestCardinality.java
===================================================================
RCS file: /cvsroot/genj/dev/app/src/report/validate/TestCardinality.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestCardinality.java        14 Sep 2007 22:51:20 -0000      1.2
--- TestCardinality.java        17 Sep 2007 04:17:19 -0000      1.3
***************
*** 49,53 ****
            if (first!=null) {
              seen.put(tag, null);
!             issues.add(new 
ViewContext(first).setText(report.translate("err.cardinality.max", new 
String[]{ prop.getTag(), first.getTag(), meta.getCardinality() })));
            }
          }
--- 49,53 ----
            if (first!=null) {
              seen.put(tag, null);
!             issues.add(new 
ViewContext(first).setText(report.translate("err.cardinality.max", new 
String[]{ prop.getTag(), first.getTag(), 
prop.getGedcom().getGrammar().getVersion(), meta.getCardinality() })));
            }
          }
***************
*** 58,65 ****
      MetaProperty[] metas = prop.getNestedMetaProperties(0);
      for (int i = 0; i < metas.length; i++) {
-       if (!metas[i].isVersion(report.getGedcomVersion()))
-         continue;
        if (metas[i].isRequired() && seen.get(metas[i].getTag())==null) {
!         String txt = report.translate("err.cardinality.min", new String[]{ 
prop.getTag(), metas[i].getTag(), metas[i].getCardinality() });
          issues.add(new 
ViewContext(prop).setImage(metas[i].getImage()).setText(txt));
        }
--- 58,63 ----
      MetaProperty[] metas = prop.getNestedMetaProperties(0);
      for (int i = 0; i < metas.length; i++) {
        if (metas[i].isRequired() && seen.get(metas[i].getTag())==null) {
!         String txt = report.translate("err.cardinality.min", new String[]{ 
prop.getTag(), metas[i].getTag(), 
prop.getGedcom().getGrammar().getVersion(), metas[i].getCardinality() });
          issues.add(new 
ViewContext(prop).setImage(metas[i].getImage()).setText(txt));
        }



-- 

---------------------------------------------------------------------
<*> Pour vous d�sincrire de cette liste, envoyez un mail � :
              [EMAIL PROTECTED]
<*> Pour obtenir de l'aide sur les commandes de la liste :
              [EMAIL PROTECTED]

Répondre à