Skip to content

Commit

Permalink
Fix failing test and add new test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Aug 17, 2016
1 parent b231acc commit dbb35e5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/sf/jabref/logic/msbib/MSBibConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
import net.sf.jabref.model.entry.FieldName;

public class MSBibConverter {

private static final String MSBIB_PREFIX = "msbib-";
private static final String BIBTEX_PREFIX = "BIBTEX_";


public static MSBibEntry convert(BibEntry entry) {
MSBibEntry result = new MSBibEntry();

Expand Down Expand Up @@ -55,7 +57,7 @@ public static MSBibEntry convert(BibEntry entry) {
}

if (!entry.getFieldOptional(FieldName.YEAR).isPresent()) {
result.year = entry.getFieldOrAlias(FieldName.YEAR).orElse("");
result.year = entry.getFieldOrAlias(FieldName.YEAR).orElse(null);
}

// Value must be converted
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
% Encoding: UTF-8
@InBook{Orlowski;2011,
author = {Adam Czarnecki; Cezary Or{\l}owski;},
title = {Application of Ontology In the ITIL Domain},
date = {2011-03-12},
publisher = {Oficyna Wydawnicza Politechniki Wrocławskiej},
pages = {99--108},
doi = {10.13140/2.1.3259.2169},
__markedentry = {[Christoph Schwentker:6]},
journaltitle = {Information Systems Architecture and Technology: Service Oriented Networked Systems},
timestamp = {2016.08.17},
}

@Comment{jabref-meta: databaseType:biblatex;}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<b:Sources xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" SelectedStyle="">
<b:Source>
<b:BIBTEX_Entry>inbook</b:BIBTEX_Entry>
<b:SourceType>BookSection</b:SourceType>
<b:Title>Application of Ontology In the ITIL Domain</b:Title>
<b:Tag>Orlowski;2011</b:Tag>
<b:Publisher>Oficyna Wydawnicza Politechniki Wrocławskiej</b:Publisher>
<b:DOI>10.13140/2.1.3259.2169</b:DOI>
<b:Author>
<b:Author>
<b:NameList>
<b:Person>
<b:Last>Czarnecki</b:Last>
<b:Middle>and Or{\l}owski, Cezary</b:Middle>
<b:First>Adam</b:First>
</b:Person>
</b:NameList>
</b:Author>
</b:Author>
<b:Pages>99-108</b:Pages>
<b:Year>2011</b:Year>
<b:StandardNumber> DOI: 10.13140/2.1.3259.2169</b:StandardNumber>
</b:Source>
</b:Sources>

0 comments on commit dbb35e5

Please sign in to comment.