corrected workflow url for downloading the workflow
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/commit/c32d847c Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/c32d847c Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/c32d847c Branch: refs/heads/master Commit: c32d847c9f061643342d25cf6eb9f28bdddde04a Parents: 811abb1 Author: larrytech7 <larrya...@gmail.com> Authored: Sat Jun 13 23:12:54 2015 +0100 Committer: larrytech7 <larrya...@gmail.com> Committed: Sat Jun 13 23:12:54 2015 +0100 ---------------------------------------------------------------------- .../org/apache/taverna/mobile/adapters/WorkflowAdapter.java | 6 +----- .../java/org/apache/taverna/mobile/tavernamobile/Workflow.java | 4 ++-- .../java/org/apache/taverna/mobile/utils/WorkflowLoader.java | 3 ++- 3 files changed, 5 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/c32d847c/app/src/main/java/org/apache/taverna/mobile/adapters/WorkflowAdapter.java ---------------------------------------------------------------------- diff --git a/app/src/main/java/org/apache/taverna/mobile/adapters/WorkflowAdapter.java b/app/src/main/java/org/apache/taverna/mobile/adapters/WorkflowAdapter.java index 4c924a8..7931899 100644 --- a/app/src/main/java/org/apache/taverna/mobile/adapters/WorkflowAdapter.java +++ b/app/src/main/java/org/apache/taverna/mobile/adapters/WorkflowAdapter.java @@ -125,11 +125,7 @@ public class WorkflowAdapter extends RecyclerView.Adapter<WorkflowAdapter.ViewHo @Override public int getItemCount() { - int size = 0; - for(Workflow w: workflow){ - size++; - } - return size; + return workflow.size(); } public Workflow getItem(int position){ http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/c32d847c/app/src/main/java/org/apache/taverna/mobile/tavernamobile/Workflow.java ---------------------------------------------------------------------- diff --git a/app/src/main/java/org/apache/taverna/mobile/tavernamobile/Workflow.java b/app/src/main/java/org/apache/taverna/mobile/tavernamobile/Workflow.java index f6f2282..f6758ff 100644 --- a/app/src/main/java/org/apache/taverna/mobile/tavernamobile/Workflow.java +++ b/app/src/main/java/org/apache/taverna/mobile/tavernamobile/Workflow.java @@ -29,7 +29,7 @@ public class Workflow { public static enum workflow_input_type{ TYPE_INT, TYPE_STRING, TYPE_OBJECT}; - public Workflow(Context ctx, String title, String author, String description, long id, String status){ + public Workflow(Context ctx, String title, String author, String description, long id, String url){ this.context = ctx; this.workflow_author = author; this.workflow_author_bitmap = BitmapFactory.decodeResource(this.context.getResources(), R.drawable.ic_userprofile); @@ -37,7 +37,7 @@ public class Workflow { this.workflow_title =title; this.workflow_input=1; this.id = id; - this.workflow_remote_url = "http://org.man.uc.taverna/workflows"; + this.workflow_remote_url = url; this.workflow_runs = new ArrayList<Runs>(); this.setWorkflow_datecreated(SimpleDateFormat.getDateTimeInstance().format(new Date())); this.setWorkflow_datemodified(SimpleDateFormat.getDateTimeInstance().format(new Date())); http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/c32d847c/app/src/main/java/org/apache/taverna/mobile/utils/WorkflowLoader.java ---------------------------------------------------------------------- diff --git a/app/src/main/java/org/apache/taverna/mobile/utils/WorkflowLoader.java b/app/src/main/java/org/apache/taverna/mobile/utils/WorkflowLoader.java index abffa1e..e1ec692 100644 --- a/app/src/main/java/org/apache/taverna/mobile/utils/WorkflowLoader.java +++ b/app/src/main/java/org/apache/taverna/mobile/utils/WorkflowLoader.java @@ -99,8 +99,9 @@ public class WorkflowLoader extends AsyncTaskLoader<List<Workflow>> { //String author = js.getString("author"); String title = js.getString("title"); String description = js.getString("description"); + String url = js.getString("url"); long id = js.getLong("id"); - userWorkflows.add(new Workflow(ctx,title,"Larry",description,id,"")); + userWorkflows.add(new Workflow(ctx,title,"Larry",description,id,url)); } } catch (MalformedURLException e) {