-
Notifications
You must be signed in to change notification settings - Fork 6
Spls annotation model
Domeo represents all annotations in a variant of the Open Annotation Data Model. This model represents an annotation as an RDF resource consisting of a set if RDF triples representing the "target" of an annotation (e.g., a text selection on a web page) and another set of RDF triples representing the "body" (e.g., a comment or semantic tag on the text selection). The "body" resources in Open Data Annotation can be RDF graphs themselves. The SPLs Plugin uses this feature to provide detailed annotations on product labeling using a special semantic model. Currently, the model focuses on pharmacogenomics clinical statements but it is being extended to cover simple drug entity mentions, drug-drug interaction mentions, and adverse drug reaction mentions. This Figure shows the current semantic model for clinical pharmacogenomics statements:
The DomeoClient is developed using GWT. To load pharmacogenomics data model into the persistence manager that process data usage and transfer, we had to create Plain Old Java Object for the basic elements of a pharmacogenomics annotation. The code of MPharmgx.java is listed as follows:
public class MPharmgx extends MTrustedResource {
// String pkImpact, pdImpact, doseRec, drugRec, monitRec, testRec;
MLinkedResource pkImpactResource, pdImpactResource, doseRecResource,
drugRecResource, monitRecResource, testRecResource, comment;
public MLinkedResource getComment() {
return comment;
}
public void setComment(MLinkedResource comment) {
this.comment = comment;
}
Set<MLinkedResource> statementsResource;
public MPharmgx(String url, String label, MGenericResource source) {
super(url, label, source);
}
public Set<MLinkedResource> getStatementsResource() {
return statementsResource;
}
public MLinkedResource getPkImpactResource() {
return pkImpactResource;
}
public void setPkImpact(MLinkedResource pkImpact) {
this.pkImpactResource = pkImpact;
}
public MLinkedResource getPdImpactResource() {
return pdImpactResource;
}
public void setPdImpact(MLinkedResource pdImpact) {
this.pdImpactResource = pdImpact;
}
public void setStatementsResource(Set<MLinkedResource> statementsResource) {
this.statementsResource = statementsResource;
}
public MLinkedResource getDoseRecResource() {
return doseRecResource;
}
public void setDoseRec(MLinkedResource doseRec) {
this.doseRecResource = doseRec;
}
public MLinkedResource getDrugRecResource() {
return drugRecResource;
}
public void setDrugRec(MLinkedResource drugRec) {
this.drugRecResource = drugRec;
}
public MLinkedResource getMonitRecResource() {
return monitRecResource;
}
public void setMonitRec(MLinkedResource monitRec) {
this.monitRecResource = monitRec;
}
public MLinkedResource getTestRecResource() {
return testRecResource;
}
public void setTestRec(MLinkedResource testRec) {
this.testRecResource = testRec;
}
}
MSPLsAnnotation.java used for attach information to annotation body, convert to JSON-LD and send to Domeo Server.MSPLsAnnotation attaches extra information, such as version number, local id, creator, and selector, so that the data we storing would be metadata that follows open data annotation standard.
Specifically, MSPLsAnnotation inheritance from MAnnotation for supports functions, such as track version and prevalence, in the server side. MAnnotation persistence the creator of current annotation, embed URI into basic pharmacogenomics data model and selected segments of resources. When domeo client converts annotation from JavaScript to JSON-LD, these information will be embed with annotation body and then send to domeo server.
In code, the variable PharmgxUsage response for the editing from users. pharmgxUsage will temporarily hold these changes and save into pharmacogenomics annotation.
public class MSPLsAnnotation extends MAnnotation implements IPharmgxOntology{
private MSPLPharmgxUsage pharmgxUsage;
public MSPLPharmgxUsage getPharmgxUsage() {
return pharmgxUsage;
}
public void setPharmgxUsage(MSPLPharmgxUsage pharmgxUsage) {
this.pharmgxUsage = pharmgxUsage;
}
public String getComment() {
return pharmgxUsage.getComment();
}
public void setComment(String comment) {
pharmgxUsage.setComment(comment);
}
public String getText() {
return pharmgxUsage.getPharmgx().getLabel();
}
public MLinkedResource getPKImpact(){
return pharmgxUsage.getPkImpact();
}
public void setPKImpact(MLinkedResource pkImpact){
pharmgxUsage.setPkImpact(pkImpact);
}
public MLinkedResource getPdImpact(){
return pharmgxUsage.getPdImpact();
}
public void setPdImpact(MLinkedResource pdImpact){
pharmgxUsage.setPdImpact(pdImpact);
}
public MLinkedResource getDoseRec(){
return pharmgxUsage.getDoseRec();
}
public void setDoseRec(MLinkedResource doseRec){
pharmgxUsage.setDoseRec(doseRec);
}
public MLinkedResource getDrugRec(){
return pharmgxUsage.getDrugRec();
}
public void setDrugRec(MLinkedResource drugRec){
pharmgxUsage.setDrugRec(drugRec);
}
public MLinkedResource getMonitRec(){
return pharmgxUsage.getMonitRec();
}
public void setMonitRec(MLinkedResource monitRec){
pharmgxUsage.setMonitRec(monitRec);
}
public MLinkedResource getTestRec(){
return pharmgxUsage.getTestRec();
}
//statements refers to ...
public void setStatements(Set<MLinkedResource> statement){
pharmgxUsage.setStatements(statement);
}
public Set<MLinkedResource> getStatements(){
return pharmgxUsage.getStatements();
}
public void setTestRec(MLinkedResource testRec){
pharmgxUsage.setTestRec(testRec);
}
@Override
public String getLabel() {
return LABEL;
}
@Override
public String getAnnotationType() {
return TYPE;
}
}
Interface IPharmgxOntology defined name space based on pharmacogenomics data model.
public interface IPharmgxOntology {
public final String LABEL = "SPL Annotation";
public final String TYPE = "ao:SPLAnnotation";
public final String BODY_TYPE = "domeo:PharmgxUsage";
}