JavaDoc für die Publikations Exporter
git-svn-id: https://svn.libreccm.org/ccm/trunk@740 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1ac3d33cd9
commit
a3e451f01a
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
|
|
@ -8,15 +27,27 @@ import java.util.Map;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Base implementation of the {@link BibTeXBuilder} interface providing common
|
||||
* functionality.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractBibTeXBuilder implements BibTeXBuilder {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(
|
||||
AbstractBibTeXBuilder.class);
|
||||
/**
|
||||
* The authors of the publication
|
||||
*/
|
||||
private List<GenericPerson> authors = new ArrayList<GenericPerson>();
|
||||
/**
|
||||
* The editors of the publication
|
||||
*/
|
||||
private List<GenericPerson> editors = new ArrayList<GenericPerson>();
|
||||
/**
|
||||
* The BibTeX fields of the reference.
|
||||
*/
|
||||
private EnumMap<BibTeXField, String> fields = new EnumMap<BibTeXField, String>(
|
||||
BibTeXField.class);
|
||||
|
||||
|
|
@ -86,13 +117,18 @@ public abstract class AbstractBibTeXBuilder implements BibTeXBuilder {
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for generating the BibTeX id for the reference.
|
||||
*
|
||||
* @return The BibTeX id for the reference.
|
||||
*/
|
||||
protected String generateBibTeXId() {
|
||||
StringBuilder builder;
|
||||
|
||||
builder = new StringBuilder();
|
||||
|
||||
if (authors.size() > 0) {
|
||||
builder.append(authors.get(0).getSurname().substring(0, 3));
|
||||
builder.append(authors.get(0));
|
||||
} else if (fields.containsKey(BibTeXField.TITLE)) {
|
||||
builder.append(fields.get(BibTeXField.TITLE));
|
||||
}
|
||||
|
|
@ -104,10 +140,27 @@ public abstract class AbstractBibTeXBuilder implements BibTeXBuilder {
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Fields mandatory for the BibTeX type.
|
||||
*/
|
||||
protected abstract List<BibTeXField> getMandatoryFields();
|
||||
|
||||
/**
|
||||
* Checks if a field is supported by the BibTeX type.
|
||||
*
|
||||
* @param name The name of the field.
|
||||
* @return <code>true</code> if the field is supported, <code>false</code>
|
||||
* otherwise.
|
||||
*/
|
||||
protected abstract boolean isFieldSupported(final BibTeXField name);
|
||||
|
||||
/**
|
||||
* Checks if all mandatory fields are present.
|
||||
*
|
||||
* @return <code>false</code> if not all mandatory fields are present,
|
||||
* <code>true</code> if all required fields are present.
|
||||
*/
|
||||
private boolean checkMandatoryFields() {
|
||||
if (getMandatoryFields().contains(BibTeXField.AUTHOR)
|
||||
&& authors.isEmpty()) {
|
||||
|
|
@ -138,19 +191,26 @@ public abstract class AbstractBibTeXBuilder implements BibTeXBuilder {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for generating to <code>authors</code> and the
|
||||
* <code>editors</code> field.
|
||||
*
|
||||
* @param persons List of persons for the field.
|
||||
* @return The value for the authors or editors field.
|
||||
*/
|
||||
private String generatePersonFieldValue(final List<GenericPerson> persons) {
|
||||
StringBuilder builder;
|
||||
GenericPerson person;
|
||||
|
||||
builder = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < authors.size(); i++) {
|
||||
person = authors.get(i);
|
||||
for (int i = 0; i < persons.size(); i++) {
|
||||
person = persons.get(i);
|
||||
builder.append(person.getGivenName());
|
||||
builder.append(' ');
|
||||
builder.append(person.getSurname());
|
||||
|
||||
if (i < (authors.size() - 1)) {
|
||||
if (i < (persons.size() - 1)) {
|
||||
builder.append(" and ");
|
||||
}
|
||||
}
|
||||
|
|
@ -158,6 +218,13 @@ public abstract class AbstractBibTeXBuilder implements BibTeXBuilder {
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for adding a field to the string.
|
||||
*
|
||||
* @param name The name of the field.
|
||||
* @param value The value of the field.
|
||||
* @param builder The {@link StringBuilder} to use.
|
||||
*/
|
||||
private void addField(final String name,
|
||||
final String value,
|
||||
final StringBuilder builder) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>article</em> BibTeX type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @verson $Id$
|
||||
*/
|
||||
public class ArticleBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Interface implemented by all <code>BibTeXBuilder</code>.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface BibTeXBuilder {
|
||||
|
||||
/**
|
||||
* Add an author to the BibTeX reference.
|
||||
*
|
||||
* @param author The author to add.
|
||||
*/
|
||||
void addAuthor(GenericPerson author);
|
||||
|
||||
/**
|
||||
* Add an editor to the BibTeX reference.
|
||||
*
|
||||
* @param editor The editor to add.
|
||||
*/
|
||||
void addEditor(GenericPerson editor);
|
||||
|
||||
void setField(BibTeXField name, String value) throws UnsupportedFieldException;
|
||||
/**
|
||||
* Add a field to the BibTeX reference.
|
||||
*
|
||||
* @param name The name of the field.
|
||||
* @param value The value of the field.
|
||||
* @throws UnsupportedFieldException If the field is not supported by the
|
||||
* BibTeX reference type provided by the implementing builder.
|
||||
*/
|
||||
void setField(BibTeXField name, String value) throws
|
||||
UnsupportedFieldException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The BibTeX reference type provided by this builder.
|
||||
*/
|
||||
String getBibTeXType();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Converts the data passed to the builder to a string formatted
|
||||
* according to the BibTeX format.
|
||||
*/
|
||||
String toBibTeX();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -6,15 +25,25 @@ import java.util.ServiceLoader;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* This class provides a central access point to all available
|
||||
* {@link BibTeXBuilder}s. The {@link ServiceLoader} is used to find all
|
||||
* available <code>BibTeXBuilder</code>s.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BibTeXBuilders {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(BibTeXBuilders.class);
|
||||
/**
|
||||
* Map which associates the builders with their supported type.
|
||||
*/
|
||||
private Map<String, BibTeXBuilder> builders =
|
||||
new HashMap<String, BibTeXBuilder>();
|
||||
|
||||
/**
|
||||
* Private constructor, loads all available {@link BibTeXBuilder}s.
|
||||
*/
|
||||
private BibTeXBuilders() {
|
||||
ServiceLoader<BibTeXBuilder> builderServices;
|
||||
|
||||
|
|
@ -25,15 +54,29 @@ public class BibTeXBuilders {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Static inner class which keeps the one and only instance of this class.
|
||||
*/
|
||||
private static class Instance {
|
||||
|
||||
private static final BibTeXBuilders INSTANCE = new BibTeXBuilders();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The instance of this class.
|
||||
*/
|
||||
public static BibTeXBuilders getInstance() {
|
||||
return Instance.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a builder for a BibTeX type.
|
||||
*
|
||||
* @param type The BibTeX type.
|
||||
* @return A BibTeX builder for the provided type, or <code>null</code>
|
||||
* if no builder for provided type is found.
|
||||
*/
|
||||
public BibTeXBuilder getBibTeXBuilderForType(final String type) {
|
||||
if (builders.containsKey(type)) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
/**
|
||||
* Enumeration containing all possible names for BibTeX fields.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public enum BibTeXField {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>book</em> type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BookBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>InCollection</em> type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InCollectionBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>InProceedings</em> type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InProceedingsBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>misc</em> type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MiscBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>proceedings</em> type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ProceedingsBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Builder for the <em>unpublished</em> type.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class UnPublishedBuilder extends AbstractBibTeXBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
||||
/**
|
||||
* Thrown if an unsupported field is passed to a {@link BibTeXBuilder}.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class UnsupportedFieldException extends Exception {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* This package contains <em>Builder</em> classes which are used to create
|
||||
* <em>BibTeX</em> references.
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.builders;
|
||||
|
|
@ -34,6 +34,7 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
* of the {@link BibTeXBuilder} interface are used.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractBibTeXConverter implements BibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
|
@ -9,8 +28,11 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts an {@link ArticleInCollectedVolume} to a BibTeX
|
||||
* <code>incollection</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArticleInCollectedVolumeConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ArticleInJournal;
|
||||
|
|
@ -8,8 +27,11 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts an {@link ArticleInJournal} to a <code>article</code> BibTeX
|
||||
* reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArticleInJournalConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import com.arsdigita.cms.contenttypes.Publication;
|
|||
* Interface for the BibTeX converters.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface BibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import org.apache.log4j.Logger;
|
|||
* Provides easy access to all available BibTeX converters.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BibTeXConverters {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
|
@ -6,8 +25,10 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link CollectedVolume} to a BibTeX <code>book</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CollectedVolumeConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Expertise;
|
||||
|
|
@ -7,8 +26,10 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link Expertise} to a BibTeX <code>misc</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ExpertiseConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GreyLiterature;
|
||||
|
|
@ -7,8 +26,11 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link GreyLiterature} item to a BibTeX <code>misc</code>
|
||||
* reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class GreyLiteratureConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,22 @@
|
|||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.InProceedings;
|
||||
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||
|
|
@ -9,8 +27,10 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts an {@link InProceedings} item to an BibTeX
|
||||
* <code>inproceedings</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
*/
|
||||
public class InProceedingsConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.InternetArticle;
|
||||
|
|
@ -7,8 +26,11 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts an {@link InternetArticle} item to a BibTeX <code>misc</code>
|
||||
* reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InternetArticleConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
|
@ -6,8 +25,10 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link Monograph} to a BibTeX <code>book</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MonographConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||
|
|
@ -8,8 +27,11 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link Proceedings} publication to a BibTeX
|
||||
* <code>proceedings</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ProceedingsConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
||||
import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFieldException;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a publication to a BibTeX <code>misc</code> reference. This
|
||||
* converter is used by the {@link BibTeXConverters} class as a fallback if
|
||||
* no suitable converter can be found and the publication to convert is a
|
||||
* {@link Publication} but not a {@link PublicationWithPublisher}.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PublicationConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
|
@ -6,8 +25,13 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link PublicationWithPublisher} to a BibTeX <code>misc</code>
|
||||
* reference. This converter is used as a fallback by the
|
||||
* {@link BibTeXConverters} class if no suitable converter can be found and
|
||||
* the publication to convert is a {@link PublicationWithPublisher}.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PublicationWithPublisherConverter extends AbstractBibTeXConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Review;
|
||||
|
||||
/**
|
||||
* Converts an {@link Review} to a BibTeX <code>article</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ReviewConverter extends ArticleInJournalConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
/**
|
||||
* Thrown if a unsupported CCM type is passed to an {@link BibTeXConverter}.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class UnsupportedCcmTypeException extends RuntimeException {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.bibtex.converters;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.WorkingPaper;
|
||||
|
|
@ -7,6 +26,7 @@ import com.arsdigita.cms.scipublications.exporter.bibtex.builders.UnsupportedFie
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Converts a {@link WorkingPaper} to a BibTeX <code>misc</code> reference.
|
||||
*
|
||||
* @author jensp
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ArticleInCollectedVolume;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link ArticleInCollectedVolume} to a RIS reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArticleInCollectedVolumeConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ArticleInJournal;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link ArticleInJournal} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArticleInJournalConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.CollectedVolume;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link CollectedVolume} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CollectedVolumeConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Expertise;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link Expertise} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ExpertiseConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.InProceedings;
|
||||
|
|
@ -5,8 +24,10 @@ import com.arsdigita.cms.contenttypes.Proceedings;
|
|||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link InProceedings} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InProceedingsConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.InternetArticle;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link InternetArticle} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InternetArticleConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Monograph;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link Monograph} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MonographConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
||||
/**
|
||||
* Converts a {@link Proceedings} to a RIS reference.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ProceedingsConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
||||
|
||||
/**
|
||||
* Converts a {@link Publication} to a RIS reference. This converter is used
|
||||
* as a fallback if no other suitable converter can be found and the publication
|
||||
* to convert is <em>no</em> subclass of {@link PublicationWithPublisher}.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PublicationConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
||||
|
||||
/**
|
||||
* Converts a {@link PublicationWithPublisher} to a RIS reference. This converter
|
||||
* is used as a fallback if no other suitable converter can be found and the
|
||||
* publication to convert is a subclass of {@link PublicationWithPublisher}.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Review;
|
||||
|
||||
/**
|
||||
* Converts a {@link Review} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ReviewConverter extends ArticleInJournalConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ import java.util.EnumMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Build an reference in RIS format.
|
||||
* Builds an reference in RIS format.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RisBuilder {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
|
|
@ -8,8 +27,10 @@ import java.util.ServiceLoader;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Central access point to retrieve {@link RisConverter}s.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RisConverters {
|
||||
|
||||
|
|
@ -20,6 +41,10 @@ public class RisConverters {
|
|||
private Map<String, RisConverter> converters =
|
||||
new HashMap<String, RisConverter>();
|
||||
|
||||
/**
|
||||
* The constructor loads all available implementations of the
|
||||
* {@link RisConverter} interface using the {@link ServiceLoader}.
|
||||
*/
|
||||
private RisConverters() {
|
||||
logger.debug("Loading RIS converters...");
|
||||
ServiceLoader<RisConverter> converterServices;
|
||||
|
|
@ -34,15 +59,33 @@ public class RisConverters {
|
|||
logger.debug(String.format("Found %d converters.", converters.size()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps the instance of this class.
|
||||
*/
|
||||
private static class Instance {
|
||||
|
||||
private static RisConverters INSTANCE = new RisConverters();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The instance of this class.
|
||||
*/
|
||||
public static RisConverters getInstance() {
|
||||
return Instance.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a {@link Publication} content item to an RIS reference. Tries
|
||||
* to find a suitable converter for the type of the publication. If no
|
||||
* converter to the special type is found, the
|
||||
* {@link PublicationWithPublisherConverter} or the
|
||||
* {@link PublicationConverter} is used, depending on the base class of the
|
||||
* publication item.
|
||||
*
|
||||
* @param publication The publication to convert.
|
||||
* @return The publication as RIS reference.
|
||||
*/
|
||||
public String convert(final Publication publication) {
|
||||
try {
|
||||
RisConverter converter;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,17 @@ import javax.activation.MimeTypeParseException;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Implementation of {@link SciPublicationsExporter} which exports publications
|
||||
* in the RIS format. The RIS format is described at
|
||||
* <a href="http://www.refman.com/support/risformat_intro.asp">http://www.refman.com/support/risformat_intro.asp</a>
|
||||
* and
|
||||
* <a href="http://www.adeptscience.co.uk/kb/article/FE26">http://www.adeptscience.co.uk/kb/article/FE26</a>.
|
||||
* The <code>RisExporter</code> uses implementations of the {@link RisConverter}
|
||||
* interface provided by the {@link RisConverters} class to convert the
|
||||
* publication content items from CCM to RIS references.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RisExporter implements SciPublicationsExporter {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.scipublications.exporter.bibtex.converters.*;
|
||||
|
||||
/**
|
||||
* Thrown if an unsupported type is passed to an implementation of the
|
||||
* {@link RisConverter} interface.
|
||||
*
|
||||
* @author jensp
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class UnsupportedCcmTypeException extends RuntimeException {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Jens Pelzetter,
|
||||
* for the Center of Social Politics of the University of Bremen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.Publication;
|
||||
import com.arsdigita.cms.contenttypes.WorkingPaper;
|
||||
|
||||
/**
|
||||
* Converts a {@link WorkingPaper} to a RIS reference.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class WorkingPaperConverter extends AbstractRisConverter {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* Exporter for the RIS format supported by many reference manager software
|
||||
* products.
|
||||
*/
|
||||
package com.arsdigita.cms.scipublications.exporter.ris;
|
||||
Loading…
Reference in New Issue