Package genj.gedcom

Examples of genj.gedcom.Indi


   
    // the last part of the gedcomURL should be the individual id
    // if the gedcomURL does not end in an individual id then the
    // data for the first person in the gedcom is retrieved
    Gedcom gedcom = gedcomURL.loadGedcom(networkReload, request);
    Indi indi;
    if(gedcomURL.isValidIndividualId())
    {
      indi = (Indi)gedcom.getEntity(Gedcom.INDI, gedcomURL.getIndividualId());
      if(indi == null)
      {
        throw new ServletException(ErrorCodes.NONEXISTANT_INDI.getErrorMessage(new Object[] {gedcomURL.getIndividualId(), gedcomURL.getGedcomURL()}));
      }
    }
    else
    {
      indi = (Indi)gedcom.getFirstEntity(Gedcom.INDI);
      if(indi == null)
      {
        throw new ServletException(ErrorCodes.NO_INDIVIDUALS.getErrorMessage(new Object[] {gedcomURL.getGedcomURL()}));
      }
      gedcomURL.setIndividualId(indi.getId());
    }
   
    //switch on the view to know how to get the correct view data into X-JSON format
    BaseView baseView = null;
    switch(view)
View Full Code Here


            //now use the filename to get the glinkIndividualId and then use the gedcom object to get the name
            String glinkIndividualId = filename.substring(0,filename.indexOf(".glink.xml"));
            glinkIndividualId = glinkIndividualId.substring(glinkIndividualId.lastIndexOf('.')+1);
            //gedcom.getEntity(glinkIndividualId);
            Collection<String> glinks = searchView.getGlinkURLs();
            Indi gedcomIndi = (Indi)gedcom.getEntity("INDI", glinkIndividualId);
            if(gedcomIndi != null)
            {
              glinks.add(Gedcom2View.getIndiName(gedcomIndi));
            }
            else
View Full Code Here

TOP

Related Classes of genj.gedcom.Indi

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.