Author: dandre
Date: Fri Dec 13 00:02:34 2013
New Revision: 4749

Log:
* Add option in Gedcom Validation to allow same sex families

Modified:
   
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/Bundle.properties
   
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidate.java
   
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.form
   
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.java

Modified: 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/Bundle.properties
==============================================================================
--- 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/Bundle.properties
       (original)
+++ 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/Bundle.properties
       Fri Dec 13 00:02:34 2013
@@ -48,3 +48,4 @@
 OpenIDE-Module-Short-Description=Validates GEDCOM file for GEDCOM compliancy 
and anomalies
 OpenIDE-Module-Long-Description=Validates GEDCOM file for GEDCOM compliancy 
and anomalies
 OpenIDE-Module-Display-Category=Tools
+GedcomValidateOptionsPanel.isSameSexFamValid.text=Same sex Family is valid

Modified: 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidate.java
==============================================================================
--- 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidate.java
     (original)
+++ 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidate.java
     Fri Dec 13 00:02:34 2013
@@ -47,6 +47,8 @@
     public boolean isExtramaritalValid = 
modulePreferences.getBoolean("isExtramaritalValid", true);
     /** whether a place format is binding and has to be adhered to */
     public boolean isRelaxedPlaceFormat = 
modulePreferences.getBoolean("isRelaxedPlaceFormat", false);
+    /** whether Same Sex families are allowed */
+    public boolean isSameSexFamValid = 
modulePreferences.getBoolean("isSameSexFamValid", false);
     /** options of reports are picked up via field-introspection */
     public int maxLife = modulePreferences.getInt("maxLife", 120);
     public int minAgeMARR = modulePreferences.getInt("minAgeMARR", 12);
@@ -202,7 +204,9 @@
         result.add(new TestValid(this));
 
         // spouses with wrong gender
-        result.add(new TestSpouseGender());
+        if (!isSameSexFamValid){
+            result.add(new TestSpouseGender());
+        }
 
         // non existing files
         if (!isFileNotFoundValid) {

Modified: 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.form
==============================================================================
--- 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.form
 (original)
+++ 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.form
 Fri Dec 13 00:02:34 2013
@@ -1,4 +1,4 @@
-<?xml version="1.1" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 
 <Form version="1.5" maxVersion="1.7" 
type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   <AuxValues>
@@ -62,6 +62,7 @@
                           <Component id="minAgeMARRLabel" alignment="0" 
min="-2" max="-2" attributes="0"/>
                       </Group>
                   </Group>
+                  <Component id="isSameSexFamValid" alignment="0" min="-2" 
max="-2" attributes="0"/>
               </Group>
               <EmptySpace max="32767" attributes="0"/>
           </Group>
@@ -72,7 +73,9 @@
           <Group type="102" alignment="0" attributes="0">
               <EmptySpace max="-2" attributes="0"/>
               <Component id="isExtramaritalValidCheckBox" min="-2" max="-2" 
attributes="0"/>
-              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="isSameSexFamValid" min="-2" max="-2" 
attributes="0"/>
+              <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
               <Group type="103" groupAlignment="3" attributes="0">
                   <Component id="maxLifeFormattedTextField" alignment="3" 
min="-2" max="-2" attributes="0"/>
                   <Component id="maxLifeLabel" alignment="3" min="-2" max="-2" 
attributes="0"/>
@@ -264,5 +267,12 @@
         <Property name="text" type="java.lang.String" value="000"/>
       </Properties>
     </Component>
+    <Component class="javax.swing.JCheckBox" name="isSameSexFamValid">
+      <Properties>
+        <Property name="text" type="java.lang.String" 
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString 
bundle="ancestris/modules/gedcom/gedcomvalidate/Bundle.properties" 
key="GedcomValidateOptionsPanel.isSameSexFamValid.text" 
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, 
&quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
   </SubComponents>
 </Form>

Modified: 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.java
==============================================================================
--- 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.java
 (original)
+++ 
trunk/AncestrisExtensions/gedcom.gedcomvalidate/src/ancestris/modules/gedcom/gedcomvalidate/GedcomValidateOptionsPanel.java
 Fri Dec 13 00:02:34 2013
@@ -42,6 +42,7 @@
         minAgeMotherFormattedTextField = new javax.swing.JFormattedTextField();
         maxAgeMotherFormattedTextField = new javax.swing.JFormattedTextField();
         minAgeRETIFormattedTextField = new javax.swing.JFormattedTextField();
+        isSameSexFamValid = new javax.swing.JCheckBox();
 
         
org.openide.awt.Mnemonics.setLocalizedText(isExtramaritalValidCheckBox, 
org.openide.util.NbBundle.getMessage(GedcomValidateOptionsPanel.class, 
"isExtramaritalValid")); // NOI18N
 
@@ -91,6 +92,8 @@
         minAgeRETIFormattedTextField.setColumns(3);
         minAgeRETIFormattedTextField.setText("000");
 
+        org.openide.awt.Mnemonics.setLocalizedText(isSameSexFamValid, 
org.openide.util.NbBundle.getMessage(GedcomValidateOptionsPanel.class, 
"GedcomValidateOptionsPanel.isSameSexFamValid.text")); // NOI18N
+
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
         this.setLayout(layout);
         layout.setHorizontalGroup(
@@ -132,7 +135,8 @@
                         
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                         
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addComponent(maxAgeBAPMLabel)
-                            .addComponent(minAgeMARRLabel))))
+                            .addComponent(minAgeMARRLabel)))
+                    .addComponent(isSameSexFamValid))
                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))
         );
         layout.setVerticalGroup(
@@ -140,7 +144,9 @@
             .addGroup(layout.createSequentialGroup()
                 .addContainerGap()
                 .addComponent(isExtramaritalValidCheckBox)
-                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(isSameSexFamValid)
+                .addGap(10, 10, 10)
                 
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                     .addComponent(maxLifeFormattedTextField, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                     .addComponent(maxLifeLabel))
@@ -193,6 +199,7 @@
         
isPrivateValueValidCheckBox.setSelected(modulePreferences.getBoolean("isPrivateValueValid",
 true));
         
isRelaxedPlaceFormatCheckBox.setSelected(modulePreferences.getBoolean("isRelaxedPlaceFormat",
 false));
         
isUnderscoreValidCheckBox.setSelected(modulePreferences.getBoolean("isUnderscoreValid",
 true));
+        
isSameSexFamValid.setSelected(modulePreferences.getBoolean("isSameSexFamValid", 
false));
         
maxAgeBAPMFormattedTextField.setValue(modulePreferences.getInt("maxAgeBAPM", 
120));
         
maxAgeMotherFormattedTextField.setValue(modulePreferences.getInt("maxAgeMother",
 48));
         maxLifeFormattedTextField.setValue(modulePreferences.getInt("maxLife", 
120));
@@ -211,6 +218,7 @@
         modulePreferences.putBoolean("isPrivateValueValid", 
isPrivateValueValidCheckBox.isSelected());
         modulePreferences.putBoolean("isRelaxedPlaceFormat", 
isRelaxedPlaceFormatCheckBox.isSelected());
         modulePreferences.putBoolean("isUnderscoreValid", 
isUnderscoreValidCheckBox.isSelected());
+        modulePreferences.putBoolean("isSameSexFamValid", 
isSameSexFamValid.isSelected());
         modulePreferences.putInt("maxAgeBAPM", 
(Integer)maxAgeBAPMFormattedTextField.getValue());
         modulePreferences.putInt("maxAgeMother", 
(Integer)maxAgeMotherFormattedTextField.getValue());
         modulePreferences.putInt("maxLife", 
(Integer)maxLifeFormattedTextField.getValue());
@@ -231,6 +239,7 @@
     private javax.swing.JCheckBox isOrderDiscretionaryCheckBox;
     private javax.swing.JCheckBox isPrivateValueValidCheckBox;
     private javax.swing.JCheckBox isRelaxedPlaceFormatCheckBox;
+    private javax.swing.JCheckBox isSameSexFamValid;
     private javax.swing.JCheckBox isUnderscoreValidCheckBox;
     private javax.swing.JFormattedTextField maxAgeBAPMFormattedTextField;
     private javax.swing.JLabel maxAgeBAPMLabel;

---------------------------------------------------------------------
Site Web Ancestris : http://www.ancestris.org

<*> Pour vous desinscrire de cette liste, envoyez un mail a :
              [email protected]
<*> Pour obtenir de l'aide sur les commandes de la liste :
              [email protected]

Pour obtenir tous les messages lies a ce fil de discussion, cliquez sur le 
lien ci-dessous, cela ouvrira votre logiciel de messagerie. Il vous suffira 
d'envoyer le message :
              [email protected]

Reply via email to