Skip to content

Commit

Permalink
cleaned up and redid the rest doc for newer routes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Dec 11, 2019
1 parent b0d4336 commit 8e8e091
Show file tree
Hide file tree
Showing 11 changed files with 1,228 additions and 1,252 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ class AnnotatorController {
feature.name = data.name
feature.symbol = data.symbol
feature.description = data.description
println "status input ${data.status}"

if(data.status==null){
// delete old status if it existed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class NcbiProxyServiceController {
String db = params.db
String id = params.id
String operation = params.operation
println "params ${params}"
String urlString

switch (operation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class FeaturePropertyService {
@Transactional
boolean deleteComment(Feature feature, String commentString) {
Comment comment = Comment.findByFeatureAndValue(feature, commentString)
println "founda comment to dleete ${comment}"
if (comment) {
feature.removeFromFeatureProperties(comment)
Comment.deleteAll(comment)
Expand Down
2 changes: 0 additions & 2 deletions grails-app/services/org/bbop/apollo/FeatureService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1603,9 +1603,7 @@ public void setTranslationEnd(Transcript transcript, int translationEnd) {
String cvString = jsonCVTerm.getJSONObject(FeatureStringEnum.CV.value).getString(FeatureStringEnum.NAME.value)
String cvTermString = jsonCVTerm.getString(FeatureStringEnum.NAME.value)

println "convertin from ${jsonCVTerm} ${cvString} ${cvTermString}"
if (cvString.equalsIgnoreCase(FeatureStringEnum.CV.value) || cvString.equalsIgnoreCase(FeatureStringEnum.SEQUENCE.value)) {
println "looking for ${cvTermString}"
switch (cvTermString.toUpperCase()) {
case MRNA.cvTerm.toUpperCase(): return MRNA.ontologyId
case MiRNA.cvTerm.toUpperCase(): return MiRNA.ontologyId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ class RequestHandlingService {
String uniqueName = jsonFeature.get(FeatureStringEnum.UNIQUENAME.value)
Feature feature = Feature.findByUniqueName(uniqueName)
JSONObject originalFeatureJsonObject = featureService.convertFeatureToJSON(feature)
println "deleting comments ${commentsArray} on feature $feature"

for (int commentIndex = 0; commentIndex < commentsArray.size(); commentIndex++) {
String commentString = commentsArray.getString(commentIndex);
Expand Down
1 change: 0 additions & 1 deletion src/gwt/org/bbop/apollo/gwt/client/AnnotatorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ public void onKeyUp(KeyUpEvent event) {
@Override
public void onSelection(SelectionEvent<Integer> event) {
selectedSubTabIndex = event.getSelectedItem();
GWT.log("selected tab: "+ selectedSubTabIndex);
TAB_INDEX tab = TAB_INDEX.getTabEnumForIndex(selectedSubTabIndex);
switch (tab) {
case DETAILS:
Expand Down
5 changes: 0 additions & 5 deletions src/gwt/org/bbop/apollo/gwt/client/AttributePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ public void update(int i, AttributeInfo object, String s) {
dataGrid.redrawRow(i);
redrawTable();
} else if (!object.getTag().equals(s)) {
GWT.log("Tag Changed");
object.setTag(s);
selectAttributeData(object);
updateAttribute();
Expand All @@ -173,7 +172,6 @@ public void update(int i, AttributeInfo object, String s) {
dataGrid.redrawRow(i);
redrawTable();
} else if (!object.getValue().equals(s)) {
GWT.log("Value Changed");
object.setValue(s);
selectAttributeData(object);
updateAttribute();
Expand Down Expand Up @@ -210,15 +208,13 @@ public int compare(AttributeInfo o1, AttributeInfo o2) {
}

public void updateData(AnnotationInfo annotationInfo) {
GWT.log("updating annotation info: " + annotationInfo);
if (annotationInfo == null) {
return;
}
this.internalAnnotationInfo = annotationInfo;
attributeInfoList.clear();
attributeInfoList.addAll(annotationInfo.getAttributeList());
ColumnSortEvent.fire(dataGrid, dataGrid.getColumnSortList());
GWT.log("List size: " + attributeInfoList.size());
loadCannedKeys();
loadCannedValues();
redrawTable();
Expand Down Expand Up @@ -316,7 +312,6 @@ public void onError(Request request, Throwable exception) {
}

private void resetTags() {
GWT.log("reseting tag");
this.tag = this.oldTag;
this.value = this.oldValue;
updateData(this.internalAnnotationInfo);
Expand Down
5 changes: 0 additions & 5 deletions src/gwt/org/bbop/apollo/gwt/client/CommentPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public void initializeTable() {
Column<CommentInfo, String> commentColumn = new Column<CommentInfo, String>(commentCell) {
@Override
public String getValue(CommentInfo commentInfo) {
GWT.log("getting comment info data: "+commentInfo.getComment());
return commentInfo.getComment();
}
};
Expand All @@ -137,7 +136,6 @@ public void update(int i, CommentInfo object, String s) {
dataGrid.redrawRow(i);
redrawTable();
} else if (!object.getComment().equals(s)) {
GWT.log("Value Changed");
object.setComment(s);
selectCommentData(object);
updateComment();
Expand Down Expand Up @@ -165,7 +163,6 @@ public int compare(CommentInfo o1, CommentInfo o2) {
}

public void updateData(AnnotationInfo annotationInfo) {
GWT.log("updating annotation info: " + annotationInfo);
if (annotationInfo == null) {
return;
}
Expand Down Expand Up @@ -193,9 +190,7 @@ public void selectCommentData(CommentInfo v) {
}

public void updateComment() {
GWT.log("updating comment "+this.comment);
if (this.comment!=null && !this.comment.isEmpty()) {
GWT.log("completely valid man"+this.comment);
final CommentInfo newCommentInfo = new CommentInfo(this.comment);
RequestCallback requestCallBack = new RequestCallback() {
@Override
Expand Down
7 changes: 0 additions & 7 deletions src/gwt/org/bbop/apollo/gwt/client/DbXrefPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public void update(int i, DbXrefInfo object, String s) {
dataGrid.redrawRow(i);
redrawTable();
} else if (!object.getTag().equals(s)) {
GWT.log("Tag Changed");
object.setTag(s);
selectDbXrefData(object);
updateDbXref();
Expand All @@ -139,7 +138,6 @@ public void update(int i, DbXrefInfo object, String s) {
dataGrid.redrawRow(i);
redrawTable();
} else if (!object.getValue().equals(s)) {
GWT.log("Value Changed");
object.setValue(s);
selectDbXrefData(object);
updateDbXref();
Expand Down Expand Up @@ -176,15 +174,13 @@ public int compare(DbXrefInfo o1, DbXrefInfo o2) {
}

public void updateData(AnnotationInfo annotationInfo) {
GWT.log("updating annotation info: " + annotationInfo);
if (annotationInfo == null) {
return;
}
this.internalAnnotationInfo = annotationInfo;
dbXrefInfoList.clear();
dbXrefInfoList.addAll(annotationInfo.getDbXrefList());
ColumnSortEvent.fire(dataGrid, dataGrid.getColumnSortList());
GWT.log("List size: " + dbXrefInfoList.size());
redrawTable();
setVisible(true);
}
Expand Down Expand Up @@ -235,7 +231,6 @@ public void onError(Request request, Throwable exception) {
}

private void resetTags() {
GWT.log("reseting tag");
this.tag = this.oldTag;
this.value = this.oldValue;
updateData(this.internalAnnotationInfo);
Expand Down Expand Up @@ -320,8 +315,6 @@ public void onResponseReceived(Request request, Response response) {
try {
title = returnValue.isObject().get("PubmedArticleSet").isObject().get("PubmedArticle").isObject().get("MedlineCitation").isObject().get("Article").isObject().get("ArticleTitle").isString().stringValue();
} catch (Exception e) {
GWT.log("Could not find error: "+e.getMessage() );
GWT.log("Return object "+returnValue.toString() );
Bootbox.alert("No article found for " + pmidValue);
resetTags();
redrawTable();
Expand Down
6 changes: 3 additions & 3 deletions src/gwt/org/bbop/apollo/gwt/client/GeneDetailPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ private void enableFields(boolean enabled) {

private void updateGene() {
final AnnotationInfo updatedInfo = this.internalAnnotationInfo;
// enableFields(false);
enableFields(false);

RequestCallback requestCallback = new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
// JSONValue returnValue = JSONParser.parseStrict(response.getText());
// enableFields(true);
JSONValue returnValue = JSONParser.parseStrict(response.getText());
enableFields(true);
// Annotator.eventBus.fireEvent(new AnnotationInfoChangeEvent(updatedInfo, AnnotationInfoChangeEvent.Action.UPDATE));
}

Expand Down
Loading

0 comments on commit 8e8e091

Please sign in to comment.