@Component(roles=PhenotipsFamilyMigrations.class) @Singleton public class PhenotipsFamilyMigrations extends Object
| Constructor and Description |
|---|
PhenotipsFamilyMigrations() |
| Modifier and Type | Method and Description |
|---|---|
com.xpn.xwiki.doc.XWikiDocument |
createFamilyDocument(com.xpn.xwiki.doc.XWikiDocument patientXDoc,
org.json.JSONObject pedigreeData,
String pedigreeImage,
com.xpn.xwiki.XWikiContext xcontext,
org.hibernate.Session hsession)
Creates a new family document for given patient with pedigree data.
|
String |
getOwner(com.xpn.xwiki.doc.XWikiDocument patientDoc)
Returns the owner of the patient.
|
org.json.JSONObject |
processPedigree(org.json.JSONObject data,
String patientId)
Adds to the pedigree JSON: "phenotipsId": patient ID in XWiki; "probandNodeID": 0; "JSON_version": "1.0".
|
boolean |
setFamilyReference(com.xpn.xwiki.doc.XWikiDocument patientDoc,
String documentReference,
com.xpn.xwiki.XWikiContext xcontext)
Sets the reference to the family document in the patient document.
|
void |
updatePedigreeComment(org.json.JSONObject pedigree,
String patientId,
String commentAddition)
Finds a pedigree node linked to patientID and adds the given comment to it's free-text comment.
|
public com.xpn.xwiki.doc.XWikiDocument createFamilyDocument(com.xpn.xwiki.doc.XWikiDocument patientXDoc,
org.json.JSONObject pedigreeData,
String pedigreeImage,
com.xpn.xwiki.XWikiContext xcontext,
org.hibernate.Session hsession)
patientXDoc - patient documentpedigreeData - pedigree data JSONpedigreeImage - pedigree SVG image textxcontext - xwiki contexthsession - hibernate sessionpublic boolean setFamilyReference(com.xpn.xwiki.doc.XWikiDocument patientDoc,
String documentReference,
com.xpn.xwiki.XWikiContext xcontext)
patientDoc - patient documentdocumentReference - family document referencexcontext - contextpublic org.json.JSONObject processPedigree(org.json.JSONObject data,
String patientId)
data - pedigree datapatientId - patient Idpublic void updatePedigreeComment(org.json.JSONObject pedigree,
String patientId,
String commentAddition)
pedigree - pedigree as JSONpatientId - the PhenoTips patient idcommentAddition - text of comment additionpublic String getOwner(com.xpn.xwiki.doc.XWikiDocument patientDoc)
patientDoc - patient XDocumentCopyright © 2011–2017 University of Toronto, Computational Biology Lab. All rights reserved.