You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by ia...@apache.org on 2016/10/14 14:09:34 UTC
[4/5] incubator-taverna-mobile git commit: Licences in json file
Licences in json file
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/908d9100
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/908d9100
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/908d9100
Branch: refs/heads/master
Commit: 908d9100f571211ff967a56f67e1f351e577044e
Parents: ec5e6ab
Author: Ian Dunlop <ia...@manchester.ac.uk>
Authored: Fri Oct 14 15:03:43 2016 +0100
Committer: Ian Dunlop <ia...@manchester.ac.uk>
Committed: Fri Oct 14 15:03:43 2016 +0100
----------------------------------------------------------------------
app/src/main/assets/licences.json | 147 +++++++++++++++++++
.../data/model/Licence/LicenceContent.java | 32 ----
.../data/model/licence/LicenceContent.java | 32 ++++
.../mobile/ui/licence/LicenceFragment.java | 85 +++++++++++
.../mobile/ui/licences/LicenceFragment.java | 86 -----------
5 files changed, 264 insertions(+), 118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/908d9100/app/src/main/assets/licences.json
----------------------------------------------------------------------
diff --git a/app/src/main/assets/licences.json b/app/src/main/assets/licences.json
new file mode 100644
index 0000000..3d54bfa
--- /dev/null
+++ b/app/src/main/assets/licences.json
@@ -0,0 +1,147 @@
+[
+ {
+ "name": "dropbox-android-sdk",
+ "version": "1.6.3",
+ "licence": "MIT"
+ },
+ {
+ "name": "json_simple",
+ "version": "1.1",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "sjxp",
+ "version": "2.2",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.android.support:appcompat",
+ "version": "v7:23.3.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.android.support:cardview",
+ "version": "v7:23.3.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.android.support:recyclerview",
+ "version": "v7:23.3.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.android.support:support",
+ "version": "v4:23.3.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.android.support:design",
+ "version": ":23.3.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.squareup.retrofit2:retrofit",
+ "version": "2.0.2",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.squareup.retrofit2:adapter-rxjava",
+ "version": "2.0.2",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.squareup.okhttp3:logging-interceptor",
+ "version": "3.2.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.squareup.retrofit2:converter-simplexml",
+ "version": "2.0.2",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.jakewharton:butterknife",
+ "version": "8.0.1",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.jakewharton:butterknife-compiler",
+ "version": "8.0.1",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "io.reactivex:rxandroid",
+ "version": "1.2.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "io.reactivex:rxjava",
+ "version": "1.1.4",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "org.simpleframework:simple-xml",
+ "version": "2.7. +",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.github.bumptech.glide:glide",
+ "version": "3.6.0",
+ "licence": "BSD, MIT & Apache 2"
+ },
+ {
+ "name": "com.caverock:androidsvg",
+ "version": "1.2.1",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.github.Raizlabs.DBFlow:dbflow-processor",
+ "version": "3.0.1",
+ "licence": "MIT"
+ },
+ {
+ "name": "com.github.Raizlabs.DBFlow:dbflow-core",
+ "version": "3.0.1",
+ "licence": "MIT"
+ },
+ {
+ "name": "com.github.Raizlabs.DBFlow:dbflow",
+ "version": "3.0.1",
+ "licence": "MIT"
+ },
+ {
+ "name": "com.facebook.stetho:stetho",
+ "version": "1.3.1",
+ "licence": "BSD"
+ },
+ {
+ "name": "com.facebook.stetho:stetho-okhttp",
+ "version": "3: 1.3.1",
+ "licence": "BSD"
+ },
+ {
+ "name": "com.github.chrisbanes:PhotoView",
+ "version": "1.2.6",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.androidsupport:multidex",
+ "version": "1.0.0",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.google.code.gson:gson",
+ "version": "2.7",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.squareup.retrofit2:converter-gson",
+ "version": "2.0.2",
+ "licence": "Apache 2"
+ },
+ {
+ "name": "com.anton46:stepsview",
+ "version": "0.0.2",
+ "licence": "Apache 2"
+ }
+]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/908d9100/app/src/main/java/org/apache/taverna/mobile/data/model/Licence/LicenceContent.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/data/model/Licence/LicenceContent.java b/app/src/main/java/org/apache/taverna/mobile/data/model/Licence/LicenceContent.java
deleted file mode 100644
index fdf346c..0000000
--- a/app/src/main/java/org/apache/taverna/mobile/data/model/Licence/LicenceContent.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.apache.taverna.mobile.data.model.licence;
-
-import com.google.gson.annotations.SerializedName;
-
-
-public class LicenceContent {
-
- @SerializedName("library_name")
- private String name;
-
- private String version;
-
- private String licence;
-
- public String getName() {
- return name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getLicence() {
- return licence;
- }
-
- @Override
- public String toString() {
- return name + " " + version + " " + licence;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/908d9100/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java b/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java
new file mode 100644
index 0000000..fdf346c
--- /dev/null
+++ b/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java
@@ -0,0 +1,32 @@
+package org.apache.taverna.mobile.data.model.licence;
+
+import com.google.gson.annotations.SerializedName;
+
+
+public class LicenceContent {
+
+ @SerializedName("library_name")
+ private String name;
+
+ private String version;
+
+ private String licence;
+
+ public String getName() {
+ return name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public String getLicence() {
+ return licence;
+ }
+
+ @Override
+ public String toString() {
+ return name + " " + version + " " + licence;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/908d9100/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java b/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
new file mode 100644
index 0000000..1bbe411
--- /dev/null
+++ b/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.taverna.mobile.ui.licence;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+import org.apache.taverna.mobile.R;
+import org.apache.taverna.mobile.data.model.licence.LicenceContent;
+import org.apache.taverna.mobile.ui.adapter.LicenceRecyclerViewAdapter;
+
+import java.lang.reflect.Type;
+import java.util.List;
+
+/**
+ * A fragment representing a list of Licence Items.
+ */
+public class LicenceFragment extends Fragment {
+
+
+ private List<LicenceContent> itemList;
+
+ private Gson gson;
+
+ public static LicenceFragment newInstance() {
+
+ return new LicenceFragment();
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ gson = new Gson();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_licence_list, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+
+ if (view instanceof RecyclerView) {
+
+ Context context = view.getContext();
+ RecyclerView recyclerView = (RecyclerView) view;
+ recyclerView.setLayoutManager(new LinearLayoutManager(context));
+ Type type = new TypeToken<List<org.apache.taverna.mobile.data.model.>>() {
+ }.getType();
+ itemList = gson.fromJson(getString(R.string.licence_data), type);
+ recyclerView.setAdapter(new LicenceRecyclerViewAdapter(itemList));
+ }
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/908d9100/app/src/main/java/org/apache/taverna/mobile/ui/licences/LicenceFragment.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/licences/LicenceFragment.java b/app/src/main/java/org/apache/taverna/mobile/ui/licences/LicenceFragment.java
deleted file mode 100644
index b80fc96..0000000
--- a/app/src/main/java/org/apache/taverna/mobile/ui/licences/LicenceFragment.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.taverna.mobile.ui.licences;
-
-import android.content.Context;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-
-import org.apache.taverna.mobile.R;
-import org.apache.taverna.mobile.data.model.licence.LicenceContent;
-import org.apache.taverna.mobile.ui.adapter.LicenceRecyclerViewAdapter;
-
-import java.lang.reflect.Type;
-import java.util.List;
-
-/**
- * A fragment representing a list of Licence Items.
- */
-public class LicenceFragment extends Fragment {
-
-
- private List<LicenceContent> itemList;
-
- private Gson gson;
-
- public static LicenceFragment newInstance() {
-
- return new LicenceFragment();
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- gson = new Gson();
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- return inflater.inflate(R.layout.fragment_licence_list, container, false);
- }
-
- @Override
- public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
-
- if (view instanceof RecyclerView) {
-
- Context context = view.getContext();
- RecyclerView recyclerView = (RecyclerView) view;
- recyclerView.setLayoutManager(new LinearLayoutManager(context));
- Type type = new TypeToken<List<org.apache.taverna.mobile.data.model.licence
- .LicenceContent>>() {
- }.getType();
- itemList = gson.fromJson(getString(R.string.licence_data), type);
- recyclerView.setAdapter(new LicenceRecyclerViewAdapter(itemList));
- }
- }
-
-
-}