Package net.sf.jabref.mods

Examples of net.sf.jabref.mods.PersonName


    for(int i=0;i<person.getLength();i++)
    {
      NodeList firstName  = ((Element)(person.item(i))).getElementsByTagName(_bcol+"First");
      NodeList lastName   = ((Element)(person.item(i))).getElementsByTagName(_bcol+"Last");
      NodeList middleName = ((Element)(person.item(i))).getElementsByTagName(_bcol+"Middle");
      PersonName name = new PersonName();
      if(firstName.getLength()>0)
        name.setFirstname(firstName.item(0).getTextContent());
      if(middleName.getLength()>0)
        name.setMiddlename(middleName.item(0).getTextContent());
      if(lastName.getLength()>0)
        name.setSurname(lastName.item(0).getTextContent());
      result.add(name);
    }
   
    return result;
  }
View Full Code Here


  protected List<PersonName> getAuthors(String authors) {
    List<PersonName> result = new LinkedList<PersonName>();
   
    if (authors.indexOf(" and ") == -1)
    {
        result.add(new PersonName(authors));
    }
        else
        {
            String[] names = authors.split(" and ");
            for (int i=0; i<names.length; i++)
            {
                result.add(new PersonName(names[i]));
            }
        }
    return result;
  }
View Full Code Here

    if(authorsLst == null)
      return;
    Element authorTop = d.createElement(bcol+entryName);
    Element nameList = d.createElement(bcol+"NameList");
    for(Iterator<PersonName> iter = authorsLst.iterator(); iter.hasNext();) {
      PersonName name = iter.next();
      Element person = d.createElement(bcol+"Person");
      addField(d, person,"Last",name.getSurname());
      addField(d, person,"Middle",name.getMiddlename());
      addField(d, person,"First",name.getFirstname());
      nameList.appendChild(person);
    }
    authorTop.appendChild(nameList);
   
    allAuthors.appendChild(authorTop);
View Full Code Here

    if(authorsLst == null)
      return;
    String allAuthors = "";
    boolean First = true;
    for(Iterator<PersonName> iter = authorsLst.iterator(); iter.hasNext();) {
      PersonName name = iter.next();
      if(First == false)
        allAuthors += " and ";
      allAuthors += name.getFullname();
      First = false;
    }
    hm.put(type,allAuthors);
  }
View Full Code Here

TOP

Related Classes of net.sf.jabref.mods.PersonName

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.