[jabref] 01/01: clean-up some debian/patches applicable to 2.10
Tony Mancill
tmancill at moszumanska.debian.org
Tue Nov 29 05:06:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
tmancill pushed a commit to branch dev
in repository jabref.
commit 6b57dac70929438aa512dc6066b1ab5ad30585e6
Author: tony mancill <tmancill at debian.org>
Date: Mon Nov 28 21:00:42 2016 -0800
clean-up some debian/patches applicable to 2.10
---
debian/patches/debian_libs.patch | 115 ---
debian/patches/mrDlib_jayatana.patch | 1364 ----------------------------------
debian/patches/series | 3 -
debian/patches/upstream_1240.patch | 35 -
4 files changed, 1517 deletions(-)
diff --git a/debian/patches/debian_libs.patch b/debian/patches/debian_libs.patch
deleted file mode 100644
index a097851..0000000
--- a/debian/patches/debian_libs.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-Description: Use debian libraries and disable unnecesary unjarlib target,
-Forwarded: not needed
-Author: Gerardo Curiel <gerardo at sophie.gerardo.com.ve>,
- Philip Rinn <rinni at gmx.net>
-Reviewed-by: gregor herrmann <gregoa at debian.org>
-Last-Update: 2013-01-01
-
---- a/build.xml
-+++ b/build.xml
-@@ -76,8 +76,9 @@
- <property name="help.dir" value="${src.dir}/help" />
- <property name="extensions.dir" value="${src.dir}/extensions" />
- <property name="layout.dir" value="${src.dir}/resource/layout" />
-- <property name="lib.dir" value="lib" />
-- <property name="buildlib.dir" value="buildlib" />
-+ <property name="lib.dir" value="/usr/share/java" />
-+ <property name="oo.dir" value="/usr/lib/libreoffice/program/classes" />
-+ <property name="buildlib.dir" value="/usr/share/java" />
- <property name="tests.dir" value="${src.dir}/tests" />
-
- <property name="osxbin.dir" value="osx" />
-@@ -102,33 +104,35 @@
-
- <fileset id="jarsFileset" dir="${lib.dir}">
- <include name="antlr.jar" />
-- <include name="antlr-3.4-complete.jar" />
-- <include name="jgoodies-common-1.4.0.jar" />
-- <include name="jgoodies-looks-2.5.2.jar" />
-- <include name="jgoodies-forms-1.6.0.jar" />
-- <include name="jayatana-1.2.4.jar" />
-+ <include name="antlr3.jar" />
-+ <include name="antlr3-runtime.jar" />
-+ <include name="jgoodies-common.jar" />
-+ <include name="jgoodies-looks.jar" />
-+ <include name="jgoodies-forms.jar" />
- <include name="spin.jar" />
-- <include name="glazedlists-1.8.0_java15.jar" />
-+ <include name="glazedlists.jar" />
- <include name="microba.jar" />
-- <include name="pdfbox-1.7.1.jar" />
-- <include name="jempbox-1.7.1.jar" />
-- <include name="fontbox-1.7.1.jar" />
-+ <include name="pdfbox.jar" />
-+ <include name="jempbox.jar" />
-+ <include name="fontbox.jar" />
- <include name="zoom-java.jar" />
-- <include name="mysql-connector-java-5.0.7-bin.jar" />
-- <include name="postgresql-9.2-1002.jdbc4.jar" />
-+ <include name="mysql-connector-java.jar" />
-+ <include name="postgresql.jar" />
- <!-- Plugin runtime dependencies -->
-- <include name="plugin/JPFCodeGenerator-rt.jar" />
-- <include name="plugin/jpf.jar" />
-- <include name="plugin/jpf-boot.jar" />
-- <include name="plugin/commons-logging.jar" />
-+ <include name="JPFCodeGenerator-rt.jar" />
-+ <include name="jpf.jar" />
-+ <include name="jpf-boot.jar" />
-+ <include name="commons-logging.jar" />
- </fileset>
-
- <!-- Openoffice connection dependencies. Compile-time only -->
-- <fileset id="ooFileset" dir="${lib.dir}">
-- <include name="oo/unoil.jar" />
-- <include name="oo/ridl.jar" />
-- <include name="oo/juh.jar" />
-- <include name="oo/jurt.jar" />
-+ <fileset id="ureFileset" dir="${oo.dir}">
-+ <include name="ridl.jar" />
-+ <include name="juh.jar" />
-+ <include name="jurt.jar" />
-+ </fileset>
-+ <fileset id="ooFileset" dir="${oo.dir}">
-+ <include name="unoil.jar" />
- </fileset>
-
- <!-- Done by MrDlib -->
-@@ -151,14 +155,15 @@
- <!-- Done by MrDlib -->
- <fileset refid="jarsFileset" />
- <fileset refid="ooFileset" />
-+ <fileset refid="ureFileset" />
- </path>
-
- <!-- Classpath for running the code generator -->
- <path id="codegenerator">
-- <pathelement location="${lib.dir}/plugin/JPFCodeGenerator.jar" />
-- <pathelement location="${lib.dir}/plugin/jpf.jar" />
-- <pathelement location="${lib.dir}/plugin/jpf-boot.jar" />
-- <pathelement location="${lib.dir}/plugin/velocity-dep-1.5.jar" />
-+ <pathelement location="${lib.dir}/JPFCodeGenerator.jar" />
-+ <pathelement location="${lib.dir}/jpf.jar" />
-+ <pathelement location="${lib.dir}/jpf-boot.jar" />
-+ <pathelement location="${lib.dir}/velocity.jar" />
- </path>
-
- <!-- Classpath for tests -->
-@@ -238,7 +243,7 @@
- </target>
-
- <!-- Jars up project -->
-- <target name="jars" depends="build, unjarlib">
-+ <target name="jars" depends="build">
- <mkdir dir="${build.lib}" />
-
- <mkdir dir="${build.tmp}" />
-@@ -645,8 +650,6 @@
- </jalopy>
- </target>
-
-- <taskdef name="jarbundler" classpath="${buildlib.dir}/jarbundler-2.2.0.jar" classname="net.sourceforge.jarbundler.JarBundler" />
--
- <target name="compresssrc">
- <!-- clone current repo into tmp dir. Reason: we want to have a clean src.zip, but do not want to execute "git clean -xdf" to allow developers having some temporary files (and user.properties) -->
- <mkdir dir="${temp.dir}"/>
diff --git a/debian/patches/mrDlib_jayatana.patch b/debian/patches/mrDlib_jayatana.patch
deleted file mode 100644
index 39a7e83..0000000
--- a/debian/patches/mrDlib_jayatana.patch
+++ /dev/null
@@ -1,1364 +0,0 @@
-Description: This is the diff between the debian branch and the v_2.10 tag
- in upstream git; the debian branch was created for us with the purpose to
- disable the mrDlib functionality which needs libraries not packaged in
- Debian yet.
-Origin: upstream git
-Forwarded: not-needed
-Author: Oliver Kopp <oliver.kopp at gmail.com>
-Reviewed-by: gregor herrmann <gregoa at debian.org>
-Last-Update: 2014-03-12
-
---- a/.classpath
-+++ b/.classpath
-@@ -11,8 +11,6 @@
- <classpathentry exported="true" kind="lib" path="lib/plugin/JPFCodeGenerator-rt.jar" sourcepath="/JPFCodeGenerator/src"/>
- <classpathentry exported="true" kind="lib" path="lib/glazedlists-1.8.0_java15.jar"/>
- <classpathentry kind="lib" path="lib/mysql-connector-java-5.0.7-bin.jar"/>
-- <classpathentry kind="lib" path="lib/spl/sciplore/xstream-1.4.1.jar"/>
-- <classpathentry kind="lib" path="lib/spl/sciplore/mrDlib-serialization-api.jar" sourcepath="/Serialization API"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
- <accessrules>
- <accessrule kind="accessible" pattern="**"/>
-@@ -21,14 +19,10 @@
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/sciplore"/>
-- <classpathentry kind="lib" path="lib/spl/jersey/mimepull-1.3.jar"/>
- <classpathentry kind="lib" path="lib/oo/juh.jar"/>
- <classpathentry kind="lib" path="lib/oo/jurt.jar"/>
- <classpathentry kind="lib" path="lib/oo/ridl.jar"/>
- <classpathentry kind="lib" path="lib/oo/unoil.jar"/>
-- <classpathentry kind="lib" path="lib/spl/jersey/jersey-client-1.14.jar"/>
-- <classpathentry kind="lib" path="lib/spl/jersey/jersey-core-1.14.jar"/>
-- <classpathentry kind="lib" path="lib/spl/jersey/jersey-multipart-1.14.jar"/>
- <classpathentry kind="lib" path="lib/antlr-3.4-complete.jar"/>
- <classpathentry kind="lib" path="lib/jgoodies-common-1.4.0.jar"/>
- <classpathentry kind="lib" path="lib/jgoodies-forms-1.6.0.jar"/>
-@@ -36,7 +30,6 @@
- <classpathentry kind="lib" path="lib/fontbox-1.7.1.jar"/>
- <classpathentry kind="lib" path="lib/jempbox-1.7.1.jar"/>
- <classpathentry kind="lib" path="lib/pdfbox-1.7.1.jar"/>
-- <classpathentry kind="lib" path="lib/jayatana-1.2.4.jar"/>
- <classpathentry kind="lib" path="lib/postgresql-9.2-1002.jdbc4.jar"/>
- <classpathentry kind="output" path="bin"/>
- </classpath>
---- a/src/java/net/sf/jabref/ImportSettingsTab.java
-+++ b/src/java/net/sf/jabref/ImportSettingsTab.java
-@@ -44,10 +44,8 @@
-
- private JRadioButton radioButtonXmp;
- private JRadioButton radioButtonPDFcontent;
-- private JRadioButton radioButtonMrDlib;
- private JRadioButton radioButtonNoMeta;
- private JRadioButton radioButtononlyAttachPDF;
-- private JRadioButton radioButtonUpdateEmptyFields;
- private JCheckBox useDefaultPDFImportStyle;
-
- private JTextField fileNamePattern;
-@@ -59,17 +57,12 @@
- radioButtonNoMeta = new JRadioButton(Globals.lang("Create_blank_entry_linking_the_PDF"));
- radioButtonXmp = new JRadioButton(Globals.lang("Create_entry_based_on_XMP_data"));
- radioButtonPDFcontent = new JRadioButton(Globals.lang("Create_entry_based_on_content"));
-- radioButtonMrDlib = new JRadioButton(Globals.lang("Create_entry_based_on_data_fetched_from")+" Mr.DLib");
- radioButtononlyAttachPDF = new JRadioButton(Globals.lang("Only_attach_PDF"));
-- radioButtonUpdateEmptyFields = new JRadioButton(Globals.lang("Update_empty_fields_with_data_fetched_from")
-- +" Mr.DLib");
- ButtonGroup bg = new ButtonGroup();
- bg.add(radioButtonNoMeta);
- bg.add(radioButtonXmp);
- bg.add(radioButtonPDFcontent);
-- bg.add(radioButtonMrDlib);
- bg.add(radioButtononlyAttachPDF);
-- bg.add(radioButtonUpdateEmptyFields);
-
- useDefaultPDFImportStyle = new JCheckBox(Globals.lang("Always use this PDF import style (and do not ask for each import)"));
-
-@@ -96,15 +89,9 @@
- builder.append(radioButtonPDFcontent);
- builder.nextLine();
- builder.append(pan);
-- builder.append(radioButtonMrDlib);
-- builder.nextLine();
-- builder.append(pan);
- builder.append(radioButtononlyAttachPDF);
- builder.nextLine();
- builder.append(pan);
-- builder.append(radioButtonUpdateEmptyFields);
-- builder.nextLine();
-- builder.append(pan);
- builder.append(useDefaultPDFImportStyle);
- builder.nextLine();
-
-@@ -136,15 +123,9 @@
- case ImportDialog.CONTENT:
- radioButtonPDFcontent.setSelected(true);
- break;
-- case ImportDialog.MRDLIB:
-- radioButtonMrDlib.setSelected(true);
-- break;
- case ImportDialog.ONLYATTACH:
- radioButtononlyAttachPDF.setSelected(true);
- break;
-- case ImportDialog.UPDATEEMPTYFIELDS:
-- radioButtonUpdateEmptyFields.setSelected(true);
-- break;
- default:
- // fallback
- radioButtonPDFcontent.setSelected(true);
-@@ -162,12 +143,9 @@
- style = ImportDialog.XMP;
- else if (radioButtonPDFcontent.isSelected())
- style = ImportDialog.CONTENT;
-- else if (radioButtonMrDlib.isSelected())
-- style = ImportDialog.MRDLIB;
- else if (radioButtononlyAttachPDF.isSelected())
- style = ImportDialog.ONLYATTACH;
-- else if (radioButtonUpdateEmptyFields.isSelected())
-- style = ImportDialog.UPDATEEMPTYFIELDS;
-+ else throw new IllegalStateException();
- Globals.prefs.putInt(PREF_IMPORT_DEFAULT_PDF_IMPORT_STYLE, style);
- Globals.prefs.put(PREF_IMPORT_FILENAMEPATTERN, fileNamePattern.getText());
- }
---- a/src/java/net/sf/jabref/JabRefFrame.java
-+++ b/src/java/net/sf/jabref/JabRefFrame.java
-@@ -1,4 +1,4 @@
--/* Copyright (C) 2003-2012 JabRef contributors.
-+/* Copyright (C) 2003-2011 JabRef contributors.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
-@@ -40,8 +40,6 @@
- import javax.swing.event.ChangeEvent;
- import javax.swing.event.ChangeListener;
-
--import org.java.ayatana.ApplicationMenu;
--
- import net.sf.jabref.export.*;
- import net.sf.jabref.external.ExternalFileTypeEditor;
- import net.sf.jabref.external.PushToApplicationButton;
-@@ -562,13 +560,6 @@
- }
- }
- });
--
-- // The following sets up integration with Unity's global menu, but currently (Nov 18, 2012)
-- // this doesn't work with OpenJDK 6 (leads to crash), only with 7.
-- String javaVersion = System.getProperty("java.version", null);
-- if (javaVersion.compareTo("1.7") >= 0)
-- ApplicationMenu.tryInstall(this);
--
- }
-
- public void setWindowTitle() {
---- a/src/java/spl/DocumentWrapper.java
-+++ /dev/null
-@@ -1,272 +0,0 @@
--package spl;
--
--import java.util.List;
--
--import org.sciplore.beans.Abstract;
--import org.sciplore.beans.Author;
--import org.sciplore.beans.Authors;
--import org.sciplore.beans.Document;
--import org.sciplore.formatter.Bean;
--import org.sciplore.formatter.SimpleTypeElementBean;
--
--/**
-- * Created by IntelliJ IDEA.
-- * User: Christoph Arbeit
-- * Date: 10.09.2010
-- * Time: 20:02:51
-- * To change this template use File | Settings | File Templates.
-- */
--public class DocumentWrapper {
--
-- Document xmlDocument;
--
-- public DocumentWrapper(Document xmlDocument) {
-- this.xmlDocument = xmlDocument;
-- }
--
-- public Document getXmlDocument() {
-- return xmlDocument;
-- }
--
-- public void setXmlDocument(Document xmlDocument) {
-- this.xmlDocument = xmlDocument;
-- }
--
-- public String getTitle(){
-- if(this.hasTitle()){
-- return xmlDocument.getTitle().getValue();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasTitle(){
-- return (xmlDocument.getTitle() != null && xmlDocument.getTitle().getValue() != null && !xmlDocument.getTitle().getValue().isEmpty());
-- }
--
-- public String getAbstract(){
-- if(this.hasAbstract()){
-- return ((Abstract)xmlDocument.getAbstract()).getValue();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasAbstract(){
-- return (xmlDocument.getAbstract() != null && ((Abstract)xmlDocument.getAbstract()).getValue() != null && !((Abstract)xmlDocument.getAbstract()).getValue().isEmpty());
-- }
--
-- public String getAuthors(String seperator){
-- if(this.hasAuthors()){
-- List<Bean> authors = xmlDocument.getAuthors().getCollection();
-- authors = this.sortAuthors(authors);
-- String value = "";
-- int i = 1;
-- for(Bean author : authors){
-- if(i < authors.size()){
-- value = value + getNameComplete((Author)author);
-- value = value + " " + seperator + " ";
-- }
-- else{
-- value = value + getNameComplete((Author)author);
-- }
-- i++;
-- }
-- return value;
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasAuthors(){
-- return (xmlDocument.getAuthors() != null && xmlDocument.getAuthors().getCollection() != null && !xmlDocument.getAuthors().getCollection().isEmpty());
-- }
--
-- /* public String getKeyWords(){
-- if(this.hasKeyWords()){
-- List<XmlKeyword> keywords = xmlDocument.getKeywords().getKeywords();
-- String value = "";
-- int i = 1;
-- for(XmlKeyword keyword : keywords){
-- if(i < keywords.size()){
-- value = value + keyword.getValue();
-- value = value + ", ";
-- }
-- else{
-- value = value + keyword.getValue();
-- }
-- i++;
-- }
-- return value;
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasKeyWords(){
-- return (xmlDocument.getKeywords() != null && xmlDocument.getKeywords().getKeywords() != null && !xmlDocument.getKeywords().getKeywords().isEmpty());
-- }
--*/
--
-- public String getDoi(){
-- if(this.hasDoi()){
-- return this.getSimpleTypeValue(xmlDocument.getDoi());
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasDoi(){
-- return (xmlDocument.getDoi() != null && this.getSimpleTypeValue(xmlDocument.getDoi()) != null && !this.getSimpleTypeValue(xmlDocument.getDoi()).isEmpty());
-- }
--/*
-- public String getPages(){
-- if(this.hasPages()){
-- return xmlDocument.getPages().getValue();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasPages(){
-- return (xmlDocument.getPages() != null && xmlDocument.getPages().getValue() != null && !xmlDocument.getPages().getValue().isEmpty());
-- }
--
-- public String getVolume(){
-- if(this.hasVolume()){
-- return xmlDocument.getVolume().getValue();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasVolume(){
-- return (xmlDocument.getVolume() != null && xmlDocument.getVolume().getValue() != null && !xmlDocument.getVolume().getValue().isEmpty());
-- }
--
-- public String getNumber(){
-- if(this.hasNumber()){
-- return xmlDocument.getNumber().getValue();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasNumber(){
-- return (xmlDocument.getNumber() != null && xmlDocument.getNumber().getValue() != null && !xmlDocument.getNumber().getValue().isEmpty());
-- }
--*/
--
-- public String getYear(){
-- if(this.hasYear()){
-- return this.getSimpleTypeValue(xmlDocument.getYear());
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasYear(){
-- return (this.getSimpleTypeValue(xmlDocument.getYear()) != null && !this.getSimpleTypeValue(xmlDocument.getYear()).isEmpty() && !this.getSimpleTypeValue(xmlDocument.getYear()).equalsIgnoreCase("null"));
-- }
--
--/*
-- public String getMonth(){
-- if(this.hasMonth()){
-- return xmlDocument.getPublishdate().getMonth();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasMonth(){
-- return (xmlDocument.getPublishdate() != null && xmlDocument.getPublishdate().getMonth() != null && !xmlDocument.getPublishdate().getMonth().isEmpty());
-- }
--
-- public String getDay(){
-- if(this.hasDay()){
-- return xmlDocument.getPublishdate().getDay();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasDay(){
-- return (xmlDocument.getPublishdate() != null && xmlDocument.getPublishdate().getDay() != null && !xmlDocument.getPublishdate().getDay().isEmpty());
-- }
--
-- /*
-- public String getVenue() {
-- if(this.hasVenue()){
-- return xmlDocument.getVenue().getValue();
-- }
-- else{
-- return "";
-- }
-- }
--
-- public boolean hasVenue(){
-- return (xmlDocument.getVenue() != null && xmlDocument.getVenue().getValue() != null && !xmlDocument.getVenue().getValue().isEmpty());
-- }*/
--
-- private String getNameComplete(Author author){
-- if(author == null) return "";
-- String result = "";
-- if(getSimpleTypeValue(author.getName_First()) != null)
-- result = result + getSimpleTypeValue(author.getName_First()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Middle()) != null)
-- result = result + getSimpleTypeValue(author.getName_Middle()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Last_Prefix()) != null)
-- result = result + getSimpleTypeValue(author.getName_Last_Prefix()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Last()) != null)
-- result = result + getSimpleTypeValue(author.getName_Last()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Last_Suffix()) != null)
-- result = result + getSimpleTypeValue(author.getName_Last_Suffix()).trim() + " ";
-- return result.trim();
-- }
--
-- private String getSimpleTypeValue(Bean bean){
-- if(bean == null || !(bean instanceof SimpleTypeElementBean)) return null;
-- SimpleTypeElementBean simpleTypeElementBean = (SimpleTypeElementBean)bean;
-- if(simpleTypeElementBean.getValue() == null || simpleTypeElementBean.getValue().equalsIgnoreCase("null") || simpleTypeElementBean.getValue().length() <= 0) return null;
-- return simpleTypeElementBean.getValue();
-- }
--
-- private List<Bean> sortAuthors(List<Bean> authors){
-- boolean unsorted = true;
-- Bean temp;
--
-- while (unsorted){
-- unsorted = false;
-- for (int i = 0; i < authors.size() - 1; i++){
-- int rank = 99;
-- int otherRank = 99;
-- if(((Author)authors.get(i)).getRank() != null && !((Author)authors.get(i)).getRank().equalsIgnoreCase("null")){
-- rank = Integer.parseInt(((Author)authors.get(i)).getRank());
-- }
-- if(((Author)authors.get(i + 1)).getRank() != null && !((Author)authors.get(i + 1)).getRank().equalsIgnoreCase("null")){
-- otherRank = Integer.parseInt(((Author)authors.get(i + 1)).getRank());
-- }
--
-- if (rank > otherRank) {
-- temp = authors.get(i);
-- authors.set(i, authors.get(i + 1));
-- authors.set(i + 1, temp);
-- unsorted = true;
-- }
-- }
-- }
--
-- return authors;
-- }
--}
---- a/src/java/spl/DocumentsWrapper.java
-+++ /dev/null
-@@ -1,132 +0,0 @@
--package spl;
--
--import java.util.ArrayList;
--import java.util.List;
--import java.util.Vector;
--
--import org.sciplore.beans.Author;
--import org.sciplore.beans.Document;
--import org.sciplore.beans.Year;
--import org.sciplore.formatter.Bean;
--import org.sciplore.formatter.SimpleTypeElementBean;
--
--/**
-- * Created by IntelliJ IDEA.
-- * User: Christoph Arbeit
-- * Date: 09.09.2010
-- * Time: 10:56:50
-- * To change this template use File | Settings | File Templates.
-- */
--public class DocumentsWrapper {
--
-- Document xmlDocuments;
--
-- public DocumentsWrapper(Document documents) {
-- this.xmlDocuments = documents;
-- }
--
-- public Document getXmlDocuments() {
-- return xmlDocuments;
-- }
--
-- public void setXmlDocuments(Document xmlDocuments) {
-- this.xmlDocuments = xmlDocuments;
-- }
--
-- public List<Vector> getDocuments(){
-- List<Vector> documents = new ArrayList<Vector>();
-- //List<XmlDocument> xmlDocuments = this.xmlDocuments.getDocuments();
-- //for(XmlDocument xmlDocument : xmlDocuments){
-- Document xmlDocument = xmlDocuments;
-- Vector<String> vector = new Vector<String>();
-- if(xmlDocument.getTitle() != null){
-- vector.add(xmlDocument.getTitle().getValue());
-- }
-- else{
-- vector.add("");
-- }
-- if(xmlDocument.getAuthors() != null){
-- List<Bean> authors = xmlDocument.getAuthors().getCollection();
-- authors = this.sortAuthors(authors);
-- String value = "";
-- int i = 1;
-- for(Bean author : authors){
-- if(i < authors.size()){
-- value = value + getNameComplete(((Author)author));
-- value = value + ", ";
-- }
-- else{
-- value = value + getNameComplete(((Author)author));
-- }
-- i++;
-- }
-- vector.add(value);
-- }
-- else{
-- vector.add("");
-- }
-- if(xmlDocument.getYear() != null && ((Year)xmlDocument.getYear()).getValue() != null && !((Year)xmlDocument.getYear()).getValue().equalsIgnoreCase("null")){
-- vector.add(((Year)xmlDocument.getYear()).getValue());
-- }
-- /*if(xmlDocument.getPublishdate() != null && xmlDocument.getPublishdate().getYear() != null && !xmlDocument.getPublishdate().getYear().equalsIgnoreCase("null")){
-- vector.add(xmlDocument.getPublishdate().getYear());
-- }*/
-- else{
-- vector.add("");
-- }
-- documents.add(vector);
-- //}
-- return documents;
-- }
--
-- private String getNameComplete(Author author){
-- if(author == null) return "";
-- String result = "";
-- if(getSimpleTypeValue(author.getName_First()) != null)
-- result = result + getSimpleTypeValue(author.getName_First()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Middle()) != null)
-- result = result + getSimpleTypeValue(author.getName_Middle()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Last_Prefix()) != null)
-- result = result + getSimpleTypeValue(author.getName_Last_Prefix()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Last()) != null)
-- result = result + getSimpleTypeValue(author.getName_Last()).trim() + " ";
-- if(getSimpleTypeValue(author.getName_Last_Suffix()) != null)
-- result = result + getSimpleTypeValue(author.getName_Last_Suffix()).trim() + " ";
-- return result.trim();
-- }
--
-- private String getSimpleTypeValue(Bean bean){
-- if(bean == null || !(bean instanceof SimpleTypeElementBean)) return null;
-- SimpleTypeElementBean simpleTypeElementBean = (SimpleTypeElementBean)bean;
-- if(simpleTypeElementBean.getValue() == null || simpleTypeElementBean.getValue().equalsIgnoreCase("null") || simpleTypeElementBean.getValue().length() <= 0) return null;
-- return simpleTypeElementBean.getValue();
-- }
--
-- private List<Bean> sortAuthors(List<Bean> authors){
-- boolean unsorted = true;
-- Bean temp;
--
-- while (unsorted){
-- unsorted = false;
-- for (int i = 0; i < authors.size() - 1; i++){
-- int rank = 99;
-- int otherRank = 99;
-- if(((Author)authors.get(i)).getRank() != null && !((Author)authors.get(i)).getRank().equalsIgnoreCase("null")){
-- rank = Integer.parseInt(((Author)authors.get(i)).getRank());
-- }
-- if(((Author)authors.get(i + 1)).getRank() != null && !((Author)authors.get(i + 1)).getRank().equalsIgnoreCase("null")){
-- otherRank = Integer.parseInt(((Author)authors.get(i + 1)).getRank());
-- }
--
-- if (rank > otherRank) {
-- temp = authors.get(i);
-- authors.set(i, authors.get(i + 1));
-- authors.set(i + 1, temp);
-- unsorted = true;
-- }
-- }
-- }
--
-- return authors;
-- }
--}
---- a/src/java/spl/PdfImporter.java
-+++ b/src/java/spl/PdfImporter.java
-@@ -19,12 +19,8 @@
- import net.sf.jabref.undo.UndoableInsertEntry;
- import net.sf.jabref.util.XMPUtil;
-
--import org.sciplore.beans.Document;
--
- import spl.filter.PdfFileFilter;
- import spl.gui.ImportDialog;
--import spl.gui.MetaDataListDialog;
--
-
- /**
- * Created by IntelliJ IDEA.
-@@ -129,7 +125,6 @@
- BibtexEntryType type;
- InputStream in = null;
- List<BibtexEntry> localRes = null;
-- MetaDataListDialog metaDataListDialog;
- switch (choice) {
- case ImportDialog.XMP:
- //SplDatabaseChangeListener dataListener = new SplDatabaseChangeListener(frame, panel, entryTable, fileName);
-@@ -222,88 +217,10 @@
- }
- res.add(entry);
- break;
-- case ImportDialog.MRDLIB:
-- metaDataListDialog = new MetaDataListDialog(fileName, true);
-- Tools.centerRelativeToWindow(metaDataListDialog, frame);
-- metaDataListDialog.showDialog();
-- Document document = metaDataListDialog.getXmlDocuments();
-- entry = null; // to satisfy the Java compiler
-- if(document != null /*&& documents.getDocuments() != null && documents.getDocuments().size() > 0*/ && metaDataListDialog.getResult() == JOptionPane.OK_OPTION){
-- int selected = metaDataListDialog.getTableMetadata().getSelectedRow();
-- if(selected > -1 /*&& selected < documents.getDocuments().size()*/){
-- //Document document = documents/*.getDocuments().get(selected)*/;
-- String id = Util.createNeutralId();
-- entry = new BibtexEntry(id);
-- if(fieldExists(document.getType())){
-- type = BibtexEntryType.getStandardType(document.getType());
-- if(type == null){
-- type = BibtexEntryType.ARTICLE;
-- }
-- entry.setType(type);
-- }
-- else{
-- entry.setType(BibtexEntryType.ARTICLE);
-- }
-- ArrayList<BibtexEntry> list = new ArrayList<BibtexEntry>();
-- list.add(entry);
-- Util.setAutomaticFields(list, true, true, false);
-- //insertFields(entry.getRequiredFields(), entry, document);
-- insertFields(BibtexFields.getAllFieldNames(), entry, document);
-- //insertFields(entry.getOptionalFields(), entry, document);
-- panel.database().insertEntry(entry);
-- dfh = new DroppedFileHandler(frame, panel);
-- dfh.linkPdfToEntry(fileName, entryTable, entry);
-- LabelPatternUtil.makeLabel(panel.metaData(), panel.database(), entry);
-- }
-- else{
-- entry = createNewBlankEntry(fileName);
-- }
-- }
-- else if(metaDataListDialog.getResult() == JOptionPane.CANCEL_OPTION ){
-- continue;
-- }
-- else if(metaDataListDialog.getResult() == JOptionPane.NO_OPTION ){
-- entry = createNewBlankEntry(fileName);
-- }
-- else if(document == null /*|| document.getDocuments() == null || document.getDocuments().size() <= 0*/ && metaDataListDialog.getResult() == JOptionPane.OK_OPTION){
-- entry = createNewBlankEntry(fileName);
-- }
-- assert(entry != null);
-- res.add(entry);
-- break;
- case ImportDialog.NOMETA:
- entry = createNewBlankEntry(fileName);
- res.add(entry);
- break;
-- case ImportDialog.UPDATEEMPTYFIELDS:
-- metaDataListDialog = new MetaDataListDialog(fileName, false);
-- Tools.centerRelativeToWindow(metaDataListDialog, frame);
-- metaDataListDialog.showDialog();
-- document = metaDataListDialog.getXmlDocuments();
-- if(document != null /*&& document.getDocuments() != null && document.getDocuments().size() > 0*/ && metaDataListDialog.getResult() == JOptionPane.OK_OPTION){
-- int selected = metaDataListDialog.getTableMetadata().getSelectedRow();
-- if(selected > -1 /*&& selected < document.getDocuments().size()*/){
-- //XmlDocument document = documents.getDocuments().get(selected);
-- entry = entryTable.getEntryAt(dropRow);
-- if(fieldExists(document.getType())){
-- type = BibtexEntryType.getStandardType(document.getType());
-- if(type != null){
-- entry.setType(type);
-- }
-- }
-- //insertFields(entry.getRequiredFields(), entry, document);
-- insertFields(BibtexFields.getAllFieldNames(), entry, document);
-- //insertFields(entry.getOptionalFields(), entry, document);
--
-- dfh = new DroppedFileHandler(frame, panel);
-- dfh.linkPdfToEntry(fileName, entryTable, dropRow);
-- }
-- }
-- break;
-- case ImportDialog.ONLYATTACH:
-- dfh = new DroppedFileHandler(frame, panel);
-- dfh.linkPdfToEntry(fileName, entryTable, dropRow);
-- break;
- }
- }
-
-@@ -322,58 +239,6 @@
- return newEntry;
- }
-
-- private void insertFields(String[] fields, BibtexEntry entry, Document xmlDocument) {
-- DocumentWrapper document = new DocumentWrapper(xmlDocument);
-- for(String field : fields){
-- if(entry.getField(field) != null){
-- continue;
-- }
-- if(field.equalsIgnoreCase("author")){
-- entry.setField(field, document.getAuthors("and"));
-- }
-- if(field.equalsIgnoreCase("title")){
-- entry.setField(field, document.getTitle());
-- }
-- if(field.equalsIgnoreCase("abstract")){
-- entry.setField(field, document.getAbstract());
-- }
-- /*if(field.equalsIgnoreCase("keywords")){
-- entry.setField(field, document.getKeyWords());
-- }*/
-- if(field.equalsIgnoreCase("doi")){
-- entry.setField(field, document.getDoi());
-- }
-- /*if(field.equalsIgnoreCase("pages")){
-- entry.setField(field, document.getPages());
-- }
-- if(field.equalsIgnoreCase("volume")){
-- entry.setField(field, document.getVolume());
-- }
-- if(field.equalsIgnoreCase("number")){
-- entry.setField(field, document.getNumber());
-- }*/
-- if(field.equalsIgnoreCase("year")){
-- entry.setField(field, document.getYear());
-- }
-- /*if(field.equalsIgnoreCase("month")){
-- entry.setField(field, document.getMonth());
-- }
-- if(field.equalsIgnoreCase("day")){
-- entry.setField(field, document.getDay());
-- }
-- if(field.equalsIgnoreCase("booktitle")){
-- entry.setField(field, document.getVenue());
-- }
-- if(field.equalsIgnoreCase("journal")){
-- entry.setField(field, document.getVenue());
-- }*/
-- }
-- }
--
-- private boolean fieldExists(String string) {
-- return string != null && !string.isEmpty();
-- }
--
- private BibtexEntry createNewEntry() {
-
- // Find out what type is wanted.
---- a/src/java/spl/SplWebClient.java
-+++ /dev/null
-@@ -1,196 +0,0 @@
--package spl;
--
--import java.io.ByteArrayInputStream;
--import java.io.File;
--import java.io.FileInputStream;
--import java.io.InputStream;
--import java.io.UnsupportedEncodingException;
--
--import javax.ws.rs.core.MediaType;
--import javax.xml.bind.JAXB;
--
--import org.sciplore.beans.Author;
--import org.sciplore.beans.Document;
--import org.sciplore.deserialize.creator.AuthorBeanCreator;
--import org.sciplore.deserialize.creator.AuthorsBeanCreator;
--import org.sciplore.deserialize.creator.DefaultStringCreator;
--import org.sciplore.deserialize.creator.DocumentBeanCreator;
--import org.sciplore.deserialize.creator.DocumentsBeanCreator;
--import org.sciplore.deserialize.creator.ObjectCreator;
--import org.sciplore.deserialize.creator.TitleBeanCreator;
--import org.sciplore.deserialize.creator.YearBeanCreator;
--import org.sciplore.deserialize.reader.ObjectCreatorMapper;
--import org.sciplore.deserialize.reader.XmlResourceReader;
--import org.sciplore.formatter.Bean;
--import org.sciplore.formatter.SimpleTypeElementBean;
--
--import com.sun.jersey.api.client.Client;
--import com.sun.jersey.api.client.ClientResponse;
--import com.sun.jersey.api.client.WebResource;
--import com.sun.jersey.multipart.FormDataMultiPart;
--
--/**
-- * Created by IntelliJ IDEA.
-- * User: Christoph Arbeit
-- * Date: 09.09.2010
-- * Time: 10:35:20
-- * To change this template use File | Settings | File Templates.
-- */
--public class SplWebClient {
--
-- private static Client CLIENT = Client.create();
-- static{
-- CLIENT.setConnectTimeout(1000);
-- CLIENT.setReadTimeout(70000);
-- }
-- private static WebResource WEBRESOURCE = CLIENT.resource( "http://api.mr-dlib.org/" );
-- private static WebResource INTERNETRESOURCE = CLIENT.resource( "http://www.google.com" );
-- //private static WebResource WEBRESOURCE = CLIENT.resource( "http://localhost:8080/rest/" );
--
-- public static Document metadata;
--
-- public static WebServiceStatus getMetaData(File file){
-- try{
-- if(isWebServiceAvailable() == false){
-- if(isInternetAvailable()){
-- return WebServiceStatus.WEBSERVICE_DOWN;
-- }
-- else{
-- return WebServiceStatus.NO_INTERNET;
-- }
-- }
-- if(isWebServiceOutDated()){
-- return WebServiceStatus.OUTDATED;
-- }
-- if(isMetaDataServiceAvailable() == false){
-- return WebServiceStatus.UNAVAILABLE;
-- }
-- FileInputStream fin = new FileInputStream(file);
-- byte[] data = new byte[(int)file.length()];
-- fin.read(data);
--
-- FormDataMultiPart formDataMultiPart = new FormDataMultiPart();
-- formDataMultiPart.field("file", data, MediaType.APPLICATION_OCTET_STREAM_TYPE);
-- formDataMultiPart.field("source", "jabref", MediaType.TEXT_PLAIN_TYPE);
-- formDataMultiPart.field("filename", file.getName(), MediaType.TEXT_PLAIN_TYPE);
--
--
-- ClientResponse response = WEBRESOURCE.path("documents").type(MediaType.MULTIPART_FORM_DATA_TYPE).post(ClientResponse.class, formDataMultiPart);
-- //System.out.println(response.getEntity(String.class));
-- if(response.getClientResponseStatus() == ClientResponse.Status.OK && response.hasEntity()){
-- String entity = response.getEntity(String.class);
-- byte[] bytes = new byte[0];
-- try {
-- bytes = entity.getBytes("UTF-8");
-- } catch (UnsupportedEncodingException e) {
-- return null;
-- }
-- InputStream is = new ByteArrayInputStream(bytes);
-- if(is != null){
-- ObjectCreatorMapper resourceMapper = new ObjectCreatorMapper();
-- ObjectCreator stringCreator = new DefaultStringCreator();
-- // initialize Mapper
-- resourceMapper.addCreator("documents", new DocumentsBeanCreator());
-- resourceMapper.addCreator("authors", new AuthorsBeanCreator());
-- resourceMapper.addCreator("document", new DocumentBeanCreator());
-- resourceMapper.addCreator("title", new TitleBeanCreator());
-- resourceMapper.addCreator("year", new YearBeanCreator());
-- resourceMapper.addCreator("author", new AuthorBeanCreator());
--
-- resourceMapper.addCreator("name_first", stringCreator);
-- resourceMapper.addCreator("name_middle", stringCreator);
-- resourceMapper.addCreator("name_last", stringCreator);
-- resourceMapper.addCreator("name_last_prefix", stringCreator);
-- resourceMapper.addCreator("name_last_suffix", stringCreator);
--
-- // initialize xml reader
-- XmlResourceReader<?> reader = new XmlResourceReader(resourceMapper);
--
-- // parse given file -> create object tree
-- Document docs = (Document)reader.parse(is);
-- for(Bean author : docs.getAuthors().getCollection()){
-- Author temp = (Author)author;
-- System.out.println(((SimpleTypeElementBean)temp.getName_Last()).getValue() + " " + temp.getRank());
-- }
-- // XmlDocuments documents = JAXB.unmarshal(is, XmlDocuments.class);
-- SplWebClient.metadata = docs;
-- return WebServiceStatus.OK;
-- }
-- else{
-- return WebServiceStatus.NO_METADATA;
-- }
-- }
-- if(response.getClientResponseStatus() == ClientResponse.Status.SERVICE_UNAVAILABLE){
-- return WebServiceStatus.UNAVAILABLE;
-- }
-- }catch(Exception e){
-- System.out.println(Tools.getStackTraceAsString(e));
-- //Todo logging
-- }
-- return WebServiceStatus.NO_METADATA;
-- }
--
-- public static boolean isWebServiceOutDated(){
-- try{
-- ClientResponse response = WEBRESOURCE.path("service/versioncheck/" + Tools.WEBSERVICE_APP_ID + "/current").get(ClientResponse.class);
-- if(response.getClientResponseStatus() == ClientResponse.Status.OK && response.hasEntity()){
-- String entity = response.getEntity(String.class);
-- byte[] bytes = entity.getBytes();
-- InputStream is = new ByteArrayInputStream(bytes);
-- if(is != null){
-- /*XmlApplication app = JAXB.unmarshal(is, XmlApplication.class);
-- if(app != null){
-- if(app.getVersion() != null && !app.getVersion().equalsIgnoreCase(Tools.WEBSERVICE_VERSION_SHORT)){
-- return true;
-- }
-- }*/
-- }
-- }
-- }catch(Exception e){
-- //Todo logging
-- }
-- return false;
-- }
--
-- public static boolean isMetaDataServiceAvailable(){
-- try{
-- ClientResponse response = WEBRESOURCE.path("service/metadata/available").get(ClientResponse.class);
-- if(response.getClientResponseStatus() == ClientResponse.Status.OK && response.hasEntity()){
-- String entity = response.getEntity(String.class);
-- if(entity != null && entity.equalsIgnoreCase("false")){
-- return false;
-- }
-- }
-- }catch(Exception e){
-- //Todo logging
-- }
-- return true;
-- }
--
-- public static boolean isWebServiceAvailable(){
-- try{
-- ClientResponse response = WEBRESOURCE.path("service/metadata/available").get(ClientResponse.class);
-- }catch(Exception e){
-- return false;
-- }
-- return true;
-- }
--
-- public static boolean isInternetAvailable(){
-- try{
-- ClientResponse response = INTERNETRESOURCE.get(ClientResponse.class);
-- }catch(Exception e){
-- return false;
-- }
-- return true;
-- }
--
-- public enum WebServiceStatus {
-- OK,
-- NO_METADATA,
-- UNAVAILABLE,
-- OUTDATED,
-- WEBSERVICE_DOWN,
-- NO_INTERNET
-- }
--}
---- a/src/java/spl/gui/ImportDialog.java
-+++ b/src/java/spl/gui/ImportDialog.java
-@@ -20,9 +20,7 @@
- public final static int NOMETA = 0;
- public final static int XMP = 1;
- public final static int CONTENT = 2;
-- public final static int MRDLIB = 3;
- public final static int ONLYATTACH = 4;
-- public final static int UPDATEEMPTYFIELDS = 5;
-
- private JPanel contentPane;
- private JLabel labelSubHeadline;
-@@ -32,14 +30,10 @@
- private JCheckBox useDefaultPDFImportStyle;
- private JRadioButton radioButtonXmp;
- private JRadioButton radioButtonPDFcontent;
-- private JRadioButton radioButtonMrDlib;
- private JRadioButton radioButtonNoMeta;
- private JLabel labelHeadline;
- private JLabel labelFileName;
- private JRadioButton radioButtononlyAttachPDF;
-- private JRadioButton radioButtonUpdateEmptyFields;
-- private JLabel labelMrDlib1;
-- private JLabel labelMrDlib2;
- private int result;
- private String fileName;
- // indicates whether the drop target is a row in the table or whether other kinds of imports are used
-@@ -72,15 +66,7 @@
- radioButtonNoMeta = new JRadioButton(Globals.lang("Create_blank_entry_linking_the_PDF"));
- radioButtonXmp = new JRadioButton(Globals.lang("Create_entry_based_on_XMP_data"));
- radioButtonPDFcontent = new JRadioButton(Globals.lang("Create_entry_based_on_content"));
-- radioButtonMrDlib = new JRadioButton(Globals.lang("Create_entry_based_on_data_fetched_from"));
- radioButtononlyAttachPDF = new JRadioButton(Globals.lang("Only_attach_PDF"));
-- radioButtonUpdateEmptyFields = new JRadioButton(Globals.lang("Update_empty_fields_with_data_fetched_from"));
-- labelMrDlib1 = new JLabel("Mr._dLib");
-- labelMrDlib1.setFont(new Font(labelMrDlib1.getFont().getName(), Font.BOLD, 13));
-- labelMrDlib1.setForeground(new Color(-16776961));
-- labelMrDlib2 = new JLabel("Mr._dLib");
-- labelMrDlib2.setFont(new Font(labelMrDlib1.getFont().getName(), Font.BOLD, 13));
-- labelMrDlib2.setForeground(new Color(-16776961));
- buttonOK = new JButton(Globals.lang("Ok"));
- buttonCancel = new JButton(Globals.lang("Cancel"));
- checkBoxDoNotShowAgain = new JCheckBox(Globals.lang("Do not show this box again for this import"));
-@@ -90,12 +76,8 @@
- b.append(radioButtonNoMeta, 3);
- b.append(radioButtonXmp, 3);
- b.append(radioButtonPDFcontent, 3);
-- b.append(radioButtonMrDlib);
-- b.append(labelMrDlib1);
- b.appendSeparator(Globals.lang("Update_Existing_Entry"));
- b.append(radioButtononlyAttachPDF, 3);
-- b.append(radioButtonUpdateEmptyFields);
-- b.append(labelMrDlib2);
- b.nextLine();
- b.append(checkBoxDoNotShowAgain);
- b.append(useDefaultPDFImportStyle);
-@@ -113,8 +95,6 @@
-
- if (!this.targetIsARow) {
- this.radioButtononlyAttachPDF.setEnabled(false);
-- this.radioButtonUpdateEmptyFields.setEnabled(false);
-- this.labelMrDlib2.setEnabled(false);
- }
- this.fileName = fileName;
- String name = new File(this.fileName).getName();
-@@ -123,8 +103,6 @@
- } else {
- this.labelFileName.setText(new File(this.fileName).getName().substring(0, 33) + "...");
- }
-- this.labelMrDlib1.addMouseListener(new LabelLinkListener(this.labelMrDlib1, "www.mr-dlib.org/docs/pdf_metadata_extraction.php"));
-- this.labelMrDlib2.addMouseListener(new LabelLinkListener(this.labelMrDlib2, "www.mr-dlib.org/docs/pdf_metadata_extraction.php"));
- this.setTitle(LocalizationSupport.message("Import_Metadata_From_PDF"));
-
- setModal(true);
-@@ -135,9 +113,7 @@
- bg.add(radioButtonNoMeta);
- bg.add(radioButtonXmp);
- bg.add(radioButtonPDFcontent);
-- bg.add(radioButtonMrDlib);
- bg.add(radioButtononlyAttachPDF);
-- bg.add(radioButtonUpdateEmptyFields);
-
- buttonOK.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
-@@ -174,15 +150,9 @@
- case CONTENT:
- radioButtonPDFcontent.setSelected(true);
- break;
-- case MRDLIB:
-- radioButtonMrDlib.setSelected(true);
-- break;
- case ONLYATTACH:
- radioButtononlyAttachPDF.setSelected(true);
- break;
-- case UPDATEEMPTYFIELDS:
-- radioButtonUpdateEmptyFields.setSelected(true);
-- break;
- default:
- // fallback
- radioButtonPDFcontent.setSelected(true);
-@@ -217,14 +187,10 @@
- return XMP;
- else if (radioButtonPDFcontent.isSelected())
- return CONTENT;
-- else if (radioButtonMrDlib.isSelected())
-- return MRDLIB;
- else if (radioButtonNoMeta.isSelected())
- return NOMETA;
- else if (radioButtononlyAttachPDF.isSelected())
- return ONLYATTACH;
-- else if (radioButtonUpdateEmptyFields.isSelected())
-- return UPDATEEMPTYFIELDS;
- else throw new IllegalStateException();
- }
-
---- a/src/java/spl/gui/MetaDataListDialog.java
-+++ /dev/null
-@@ -1,314 +0,0 @@
--package spl.gui;
--
--
--import java.awt.BorderLayout;
--import java.awt.CardLayout;
--import java.awt.Color;
--import java.awt.Component;
--import java.awt.Dimension;
--import java.awt.Font;
--import java.awt.event.ActionEvent;
--import java.awt.event.ActionListener;
--import java.awt.event.KeyEvent;
--import java.awt.event.WindowAdapter;
--import java.awt.event.WindowEvent;
--import java.io.File;
--import java.io.IOException;
--import java.util.List;
--import java.util.Vector;
--
--import javax.swing.BorderFactory;
--import javax.swing.ImageIcon;
--import javax.swing.JButton;
--import javax.swing.JComponent;
--import javax.swing.JDialog;
--import javax.swing.JLabel;
--import javax.swing.JOptionPane;
--import javax.swing.JPanel;
--import javax.swing.JScrollPane;
--import javax.swing.JTable;
--import javax.swing.KeyStroke;
--import javax.swing.ListSelectionModel;
--import javax.swing.SwingWorker;
--import javax.swing.table.DefaultTableModel;
--
--import net.sf.jabref.Globals;
--import net.sf.jabref.MetaData;
--import net.sf.jabref.Util;
--
--import org.sciplore.beans.Document;
--
--import spl.DocumentsWrapper;
--import spl.SplWebClient;
--import spl.listener.LabelLinkListener;
--import spl.localization.LocalizationSupport;
--
--import com.jgoodies.forms.builder.ButtonBarBuilder;
--
--public class MetaDataListDialog extends JDialog {
-- private JPanel contentPane;
-- private JTable tableMetadata;
-- private JButton buttonOK;
-- private JButton buttonCancel;
-- private JScrollPane scrollPane;
-- private JPanel panelWait;
-- private JLabel labelFetch;
-- private JLabel iconLabel;
-- private JButton blankButton;
-- private JLabel labelLogo;
-- private JButton moreInformationButton;
-- private JPanel panelMetadata;
-- private DefaultTableModel tableModel;
-- private int result;
-- private Document xmlDocuments;
-- private String fileName;
-- private SplWebClient.WebServiceStatus webserviceStatus;
-- private Component thisDialog;
-- private boolean showBlankButton;
-- private CardLayout cardLayou = new CardLayout();
--
-- public MetaDataListDialog(String fileName, boolean showBlankButton) {
-- $$$setupUI$$$();
-- this.showBlankButton = showBlankButton;
-- this.thisDialog = this;
-- this.fileName = fileName;
-- this.labelLogo.addMouseListener(new LabelLinkListener(this.labelLogo, "www.mr-dlib.org"));
-- this.setTitle(LocalizationSupport.message("Mr._dLib_Metadata_Entries_Associated_With_PDF_File"));
-- this.tableMetadata.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-- setContentPane(contentPane);
-- pack();
-- setModal(true);
-- getRootPane().setDefaultButton(buttonOK);
--
-- buttonOK.addActionListener(new ActionListener() {
-- public void actionPerformed(ActionEvent e) {
-- onOK();
-- }
-- });
--
-- buttonCancel.addActionListener(new ActionListener() {
-- public void actionPerformed(ActionEvent e) {
-- onCancel();
-- }
-- });
--
-- blankButton.addActionListener(new ActionListener() {
-- public void actionPerformed(ActionEvent e) {
-- onBlank();
-- }
-- });
--
-- moreInformationButton.addActionListener(new ActionListener() {
-- public void actionPerformed(ActionEvent e) {
-- onInfo();
-- }
-- });
--
-- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
-- addWindowListener(new WindowAdapter() {
-- public void windowClosing(WindowEvent e) {
-- onCancel();
-- }
-- });
--
-- contentPane.registerKeyboardAction(new ActionListener() {
-- public void actionPerformed(ActionEvent e) {
-- onCancel();
-- }
-- }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
--
-- cardLayou.show(panelMetadata, "panelWait");
-- //this.scrollPane.setVisible(false);
-- //this.blankButton.setVisible(false);
-- this.moreInformationButton.setVisible(true);
-- this.setSize(616, 366);
-- }
--
-- private void onInfo() {
-- try {
-- Util.openExternalViewer(new MetaData(), "http://www.mr-dlib.org/docs/jabref_metadata_extraction_alpha.php", "url");
-- } catch (IOException exc) {
-- exc.printStackTrace();
-- }
-- }
--
-- private void onBlank() {
-- this.result = JOptionPane.NO_OPTION;
-- dispose();
-- }
--
-- private void onOK() {
-- this.result = JOptionPane.OK_OPTION;
-- dispose();
-- }
--
-- private void onCancel() {
-- this.result = JOptionPane.CANCEL_OPTION;
-- dispose();
-- }
--
-- public void showDialog() {
-- SwingWorker worker = new SwingWorker<Void, Void>() {
-- @Override
-- public Void doInBackground() {
-- System.out.println("Starting Webclient...");
-- webserviceStatus = SplWebClient.getMetaData(new File(fileName));
-- return null;
-- }
--
-- @Override
-- public void done() {
-- if (webserviceStatus == SplWebClient.WebServiceStatus.OK) {
-- xmlDocuments = SplWebClient.metadata;
-- if (xmlDocuments != null /*&& xmlDocuments.getDocuments() != null && xmlDocuments.getDocuments().size() > 0*/) {
-- DocumentsWrapper documents = new DocumentsWrapper(xmlDocuments);
-- List<Vector> vectorList = documents.getDocuments();
-- for (Vector vector : vectorList) {
-- tableModel.addRow(vector);
-- }
--
-- tableMetadata.getSelectionModel().setSelectionInterval(0, 0);
-- cardLayou.show(panelMetadata, "scrollPane");
-- //panelWait.setVisible(false);
-- //scrollPane.setVisible(true);
-- moreInformationButton.setVisible(true);
-- } else {
-- iconLabel.setVisible(false);
-- labelFetch.setText(LocalizationSupport.message("No_metadata_found."));
-- blankButton.setVisible(showBlankButton);
-- }
-- }
-- if (webserviceStatus == SplWebClient.WebServiceStatus.NO_METADATA) {
-- iconLabel.setVisible(false);
-- labelFetch.setText(LocalizationSupport.message("No_metadata_found."));
-- blankButton.setVisible(showBlankButton);
-- }
-- if (webserviceStatus == SplWebClient.WebServiceStatus.UNAVAILABLE) {
-- iconLabel.setVisible(false);
-- labelFetch.setText(LocalizationSupport.message("Mr._dLib_web_service_is_temporarily_unavailable."));
-- blankButton.setVisible(showBlankButton);
-- }
-- if (webserviceStatus == SplWebClient.WebServiceStatus.OUTDATED) {
-- iconLabel.setVisible(false);
-- labelFetch.setText(LocalizationSupport.message("The_Mr._dLib_web_service_version_you_trying_to_access_is_outdated."));
-- blankButton.setVisible(showBlankButton);
-- JOptionPane.showMessageDialog(thisDialog, LocalizationSupport.message("This_JabRef_version_is_trying_to_access_an_old_version_of_Mr._dLib's_webservice_that_is_not_working_any_more.\nPlease_visit_http://jabref.sourceforge.net_or_http://www.mr-dlib.org_for_more_information_and_updates."), LocalizationSupport.message("Web_Service_Version_Outdated"), JOptionPane.INFORMATION_MESSAGE);
-- }
-- if (webserviceStatus == SplWebClient.WebServiceStatus.WEBSERVICE_DOWN) {
-- iconLabel.setVisible(false);
-- labelFetch.setText(LocalizationSupport.message("Mr._dLib_web_service_is_temporarily_down._Please_try_again_later."));
-- blankButton.setVisible(showBlankButton);
-- }
-- if (webserviceStatus == SplWebClient.WebServiceStatus.NO_INTERNET) {
-- iconLabel.setVisible(false);
-- labelFetch.setText(LocalizationSupport.message("No_Internet_Connection."));
-- blankButton.setVisible(showBlankButton);
-- JOptionPane.showMessageDialog(thisDialog, LocalizationSupport.message("You_are_not_connected_to_the_Internet._To_access_Mr._dLib_web_service_an_internet_connection_is_needed."), LocalizationSupport.message("No_Internet_Connection."), JOptionPane.INFORMATION_MESSAGE);
-- }
-- }
-- };
-- worker.execute();
-- this.pack();
-- this.setVisible(true);
-- }
--
-- public Document getXmlDocuments() {
-- return xmlDocuments;
-- }
--
-- private void createUIComponents() {
-- this.tableModel = new MyTableModel();
-- this.tableModel.addColumn(LocalizationSupport.message("Title"));
-- this.tableModel.addColumn(LocalizationSupport.message("Author(s)"));
-- this.tableModel.addColumn(LocalizationSupport.message("Published_Year"));
-- this.tableMetadata = new JTable(this.tableModel);
-- }
--
-- public JTable getTableMetadata() {
-- return tableMetadata;
-- }
--
-- public int getResult() {
-- return result;
-- }
--
-- public JButton getBlankButton() {
-- return blankButton;
-- }
--
-- private void $$$setupUI$$$() {
-- createUIComponents();
-- contentPane = new JPanel();
-- contentPane.setLayout(new BorderLayout());
-- labelLogo = new JLabel();
-- labelLogo.setIcon(new ImageIcon(getClass().getResource("/spl/gui/mrdlib header.png")));
-- labelLogo.setText("");
-- contentPane.add(labelLogo, BorderLayout.NORTH);
-- panelMetadata = new JPanel();
-- panelMetadata.setLayout(cardLayou);
--
--
-- panelMetadata.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
-- scrollPane = new JScrollPane();
-- scrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), null));
-- tableMetadata.setAutoCreateRowSorter(false);
-- tableMetadata.setEnabled(true);
-- tableMetadata.setFillsViewportHeight(true);
-- tableMetadata.setShowVerticalLines(true);
-- scrollPane.setViewportView(tableMetadata);
-- panelMetadata.add(scrollPane, "scrollPane");
-- panelWait = new JPanel();
-- panelWait.setLayout(new BorderLayout());
-- panelWait.setBackground(new Color(-1));
-- panelMetadata.add(panelWait, "panelWait");
-- panelWait.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), null));
-- iconLabel = new JLabel();
-- iconLabel.setBackground(new Color(-1));
-- iconLabel.setHorizontalAlignment(0);
-- iconLabel.setHorizontalTextPosition(11);
-- iconLabel.setIcon(new ImageIcon(getClass().getResource("/spl/gui/ajax-loader.gif")));
-- iconLabel.setText("");
-- panelWait.add(iconLabel, BorderLayout.CENTER);
-- labelFetch = new JLabel();
-- labelFetch.setHorizontalAlignment(JLabel.CENTER);
-- labelFetch.setFont(new Font(labelFetch.getFont().getName(), labelFetch.getFont().getStyle(), 13));
-- labelFetch.setText(Globals.lang("Fetching Metadata..."));
-- panelWait.add(labelFetch, BorderLayout.SOUTH);
--
-- cardLayou.show(panelMetadata, "panelWait");
-- panelMetadata.setPreferredSize(new Dimension(400, 200));
-- contentPane.add(panelMetadata, BorderLayout.CENTER);
--
-- buttonOK = new JButton(Globals.lang("Ok"));
-- buttonCancel = new JButton(Globals.lang("Cancel"));
-- moreInformationButton = new JButton(Globals.lang("More information"));
-- ButtonBarBuilder bb = new ButtonBarBuilder();
-- bb.addGlue();
-- bb.addButton(moreInformationButton);
-- bb.addButton(buttonOK);
-- bb.addButton(buttonCancel);
-- bb.addGlue();
-- blankButton = new JButton();
-- blankButton.setText("");
-- contentPane.add(bb.getPanel(), BorderLayout.SOUTH);
-- iconLabel.setLabelFor(scrollPane);
--
--
-- }
--
-- /**
-- * @noinspection ALL
-- */
-- public JComponent $$$getRootComponent$$$() {
-- return contentPane;
-- }
--
-- public class MyTableModel extends DefaultTableModel {
--
-- @Override
-- public boolean isCellEditable(int row, int column) {
-- return false;
-- }
-- }
--
--}
diff --git a/debian/patches/series b/debian/patches/series
index b64cd1f..45b07c5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,5 @@
-#debian_libs.patch
-#mrDlib_jayatana.patch
#generated_JabRefPlugin.java.patch
#fix-headless-bibtex-output.diff
-#upstream_1240.patch
gradle_build.patch
disable_automatic_upgrade_check.patch
xjc.patch
diff --git a/debian/patches/upstream_1240.patch b/debian/patches/upstream_1240.patch
deleted file mode 100644
index 6b21624..0000000
--- a/debian/patches/upstream_1240.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-commit dd4676b6cc75f0ce38cf44843ab7abea89249fb1
-Author: Leonardo Haddad <leeohaddad at usp.br>
-Date: Tue Oct 28 01:46:39 2014 -0200
-
- Fixed bug #1240. Now, strings with length of one character can be included and no exception is thrown by the system.
-
---- a/src/help/About.html
-+++ b/src/help/About.html
-@@ -81,7 +81,8 @@
- David Weitzman,
- Seb Wills,
- John Zedlewski,
-- Waluyo Adi Siswanto</p>
-+ Waluyo Adi Siswanto,
-+ Leonardo Haddad Carlos</p>
-
- <h2>Thanks to:</h2>
-
---- a/src/java/net/sf/jabref/BibtexString.java
-+++ b/src/java/net/sf/jabref/BibtexString.java
-@@ -1,4 +1,4 @@
--/* Copyright (C) 2003-2011 JabRef contributors.
-+/* Copyright (C) 2003-2014 JabRef contributors.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
-@@ -67,7 +67,7 @@
- }
-
- public static final Type get(String name) {
-- if (name.length() == 0) {
-+ if (name.length() <= 1) {
- return OTHER;
- }
- if (!(name.charAt(1) + "").toUpperCase().equals(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jabref.git
More information about the pkg-java-commits
mailing list