if("GLink".equals(prop.getProperty("TYPE", false).getValue().trim()))
{
String propValue = ((PropertyEvent)prop).getEventValue();
if(propValue == null || propValue.trim().equals(""))
{
Property noteProp = prop.getProperty("NOTE", false);
if(noteProp == null)
{
propValue = NOT_NAMED;
}
else
{
propValue = noteProp.getValue();
if(propValue == null || propValue.trim().equals(""))
{
propValue = NOT_NAMED;
}
LOG.finer("The property is: "+noteProp);
LOG.finer("The property's value is: "+propValue);
}
}
else
{
LOG.finer("The parent property is: "+prop);
LOG.finer("The parent property's value is: "+propValue);
}
//individual.glinks.add(propValue);
Property placProp = prop.getProperty("PLAC", false);
if(placProp == null)
{
throw new RuntimeException("SEND MSG TO BROWSER: In the GEDCOM file '"+gedcomURL.getGedcomURL()+"' there is a GLink event/attribute that does not have a PLAC tag!!");
}
else
{
//individual.glinks.add(placProp.getValue());
GLink newGLink = new GLink();
newGLink.setToURLName(propValue);
newGLink.setToURL(placProp.getValue());
// DONE: get the date of the glink from prop.getProperty("DATE", false).getValue().trim()
// and look for a corresponding GLink-Relation EVEN tag whose PLAC tag is the same as placProp.getValue()
// if one is found then add in the newGLink.setFromRelation() and newGLink.setToRelation()
Property dateProp = prop.getProperty("DATE", false);
if(dateProp != null)
{
newGLink.setDate(dateProp.getValue().trim());
}
String glinkRelation = getGLinkRelation(propList, newGLink.getToURL());
if(glinkRelation != null)
{
String[] glinkRelations = GLinkPattern.splitRelation(glinkRelation);