package gov.nih.ncgc.bard.entity;
import gov.nih.ncgc.bard.rest.BARDConstants;
import gov.nih.ncgc.bard.tools.BARDJsonRequired;
/**
* Represents a publication.
* <p/>
* Most will be derived from Pubmed, though arbitrary documents can be
* represented, especially if a DOI is provided.
*
* @author Rajarshi Guha
*/
public class Publication extends BaseEntity {
String title, doi, abs;
@BARDJsonRequired
Long pubmedId;
public Publication() {
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDoi() {
return doi;
}
public void setDoi(String doi) {
this.doi = doi;
}
public String getAbs() {
return abs;
}
public void setAbs(String abs) {
this.abs = abs;
}
public Long getPubmedId() {
return pubmedId;
}
public void setPubmedId(Long pubmedId) {
this.pubmedId = pubmedId;
}
/**
* Return the path for this resource in the REST API.
* <p/>
* The actual resource can be accessed by prepending the hostname of the server
* hosting the REST API.
*
* @return The path to this resource. <code>null</code> if the object is not meant
* to be publically available via the REST API
*/
public String getResourcePath() {
return BARDConstants.API_BASE + "/documents/" + pubmedId;
}
/**
* Set the resource path.
* <p/>
* In most cases, this can be an empty function as its primary purpose
* is to allow Jackson to deserialize a JSON entity to the relevant Java
* entity.
*
* @param resourcePath the resource path for this entity
*/
public void setResourcePath(String resourcePath) {
//To change body of implemented methods use File | Settings | File Templates.
}
}