/*
* SPDXVersion: SPDX-1.1
* Person: Person: Nuno Brito (nuno.brito@triplecheck.de)
* Person: Organization: TripleCheck (contact@triplecheck.de)
* Created: 2013-08-29T00:00:00Z
* LicenseName: NOASSERTION
* FileName: Person.java
* FileType: SOURCE
* FileCopyrightText: <text> Copyright 2013 Nuno Brito, TripleCheck </text>
* FileComment: <text> Class defining the identity of a given person </text>
*/
package spdxlib;
public class Person {
private String
person, // mandatory field
personEmail, // optional field
organization, // mandatory field
organizationEmail, // optional field
tool, // mandatory field
toolVersion // mandatory field
;
public TagValue
tagPerson,
tagOrganization,
tagTool;
/**
* Provides a distinctive identifier title
* @return
*/
public String getTitle(){
// if there is a name, use it
if(tagPerson != null){
return tagPerson.toString();
}
// or use the organization name if available
if(tagOrganization != null){
return tagOrganization.toString();
}
// or even use the tool name if available
if(tagTool != null){
return tagTool.toString();
}
// nothing good here, just return null..
return null;
}
@Override
public String toString(){
return getTitle();
}
}