More bugfixes
git-svn-id: https://svn.libreccm.org/ccm/trunk@5818 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
8d2060ec0e
commit
bcae65f56b
|
|
@ -35,10 +35,11 @@ public class InternetArticleConverter extends AbstractRisConverter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String convert(final Publication publication) {
|
public String convert(final Publication publication) {
|
||||||
|
|
||||||
InternetArticle article;
|
InternetArticle article;
|
||||||
|
|
||||||
System.err.printf("Converting publication %s as InternetArticle to RIS...%n",
|
// System.err.printf("Converting publication %s as InternetArticle to RIS...%n",
|
||||||
Objects.toString(publication));
|
// Objects.toString(publication));
|
||||||
|
|
||||||
if (!(publication instanceof InternetArticle)) {
|
if (!(publication instanceof InternetArticle)) {
|
||||||
throw new UnsupportedCcmTypeException(
|
throw new UnsupportedCcmTypeException(
|
||||||
|
|
@ -54,29 +55,29 @@ public class InternetArticleConverter extends AbstractRisConverter {
|
||||||
publication.getClass().getName()));
|
publication.getClass().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
System.err.printf("Casting to InternetArticle%n");
|
// System.err.printf("Casting to InternetArticle%n");
|
||||||
article = (InternetArticle) publication;
|
article = (InternetArticle) publication;
|
||||||
|
|
||||||
System.err.printf("Setting RIS type to EJOUR...%n");
|
// System.err.printf("Setting RIS type to EJOUR...%n");
|
||||||
getRisBuilder().setType(RisType.EJOUR);
|
getRisBuilder().setType(RisType.EJOUR);
|
||||||
System.err.printf("Converting authors...%n");
|
// System.err.printf("Converting authors...%n");
|
||||||
convertAuthors(publication);
|
convertAuthors(publication);
|
||||||
System.err.printf("Converting title...%n");
|
// System.err.printf("Converting title...%n");
|
||||||
convertTitle(publication);
|
convertTitle(publication);
|
||||||
System.err.printf("Converting year...%n");
|
// System.err.printf("Converting year...%n");
|
||||||
convertYear(publication);
|
convertYear(publication);
|
||||||
|
|
||||||
System.err.printf("Converting reviewed...%n");
|
// System.err.printf("Converting reviewed...%n");
|
||||||
if (article.getReviewed() != null && article.getReviewed()) {
|
if (article.getReviewed() != null && article.getReviewed()) {
|
||||||
getRisBuilder().addField(RisField.RI, "");
|
getRisBuilder().addField(RisField.RI, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
System.err.printf("Converting URL...%n");
|
// System.err.printf("Converting URL...%n");
|
||||||
if (article.getUrl() != null) {
|
if (article.getUrl() != null) {
|
||||||
getRisBuilder().addField(RisField.UR, article.getUrl());
|
getRisBuilder().addField(RisField.UR, article.getUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
System.err.printf("Building String%n");
|
// System.err.printf("Building String%n");
|
||||||
return getRisBuilder().toRis();
|
return getRisBuilder().toRis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,11 @@ public class RisExporter implements SciPublicationsExporter {
|
||||||
public PublicationFormat getSupportedFormat() {
|
public PublicationFormat getSupportedFormat() {
|
||||||
try {
|
try {
|
||||||
return new PublicationFormat("RIS",
|
return new PublicationFormat("RIS",
|
||||||
new MimeType("text", "x-ris"),
|
new MimeType("text", "x-ris"),
|
||||||
"ris");
|
"ris");
|
||||||
} catch(MimeTypeParseException ex) {
|
} catch (MimeTypeParseException ex) {
|
||||||
logger.warn("Failed to create MimeType for PublicationFormat."
|
logger.warn("Failed to create MimeType for PublicationFormat."
|
||||||
+ "Using null mimetype instead. Cause: ", ex);
|
+ "Using null mimetype instead. Cause: ", ex);
|
||||||
return new PublicationFormat("RIS",
|
return new PublicationFormat("RIS",
|
||||||
null,
|
null,
|
||||||
"ris");
|
"ris");
|
||||||
|
|
@ -60,8 +60,9 @@ public class RisExporter implements SciPublicationsExporter {
|
||||||
return RisConverters.getInstance().convert(publication);
|
return RisConverters.getInstance().convert(publication);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPreamble() {
|
public String getPreamble() {
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue