Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[dev_2.11]
- Fix for bugs #1221 and #1261 (also partly #1243): order of fields in customized entry types no longer gets destroyed by the entry editor
- "ISBN to BibTeX" fetcher now uses eBook.de's API (fixes bug #1241)
- BREAKING: Search groups now use same search logic as UI --> avoids confusion when converting a UI search into a search group. Behaviour before: contains/regex check of whole search string; behaviour after: contains/regex check of every word of the search string. The new search is more powerful and con simulate the old behaviour: enclose everything in double quotes, e.g., process language --> "process language".
- Fix for bug #1276: OO styles do not consider editor fields anymore for sorting
Expand Down
49 changes: 13 additions & 36 deletions src/main/java/net/sf/jabref/BibLatexEntryTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BibLatexEntryTypes {
"issuetitle", "issuesubtitle", "origlanguage", "version", "addendum"

*/

public static final BibtexEntryType ARTICLE = new BibtexEntryType() {

@Override
Expand Down Expand Up @@ -114,7 +114,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Inbook";
return "InBook";
}

@Override
Expand Down Expand Up @@ -156,7 +156,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Bookinbook";
return "BookInBook";
}

// Same fields as "INBOOK" according to Biblatex 1.0:
Expand Down Expand Up @@ -190,7 +190,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Suppbook";
return "SuppBook";
}

// Same fields as "INBOOK" according to Biblatex 1.0:
Expand Down Expand Up @@ -301,7 +301,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Incollection";
return "InCollection";
}

@Override
Expand Down Expand Up @@ -342,7 +342,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Suppcollection";
return "SuppCollection";
}

// Treated as alias of "INCOLLECTION" according to Biblatex 1.0:
Expand Down Expand Up @@ -557,7 +557,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Suppperiodical";
return "SuppPeriodical";
}

// Treated as alias of "ARTICLE" according to Biblatex 1.0:
Expand Down Expand Up @@ -630,7 +630,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Inproceedings";
return "InProceedings";
}

@Override
Expand Down Expand Up @@ -704,7 +704,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Inreference";
return "InReference";
}

// Treated as alias of "INCOLLECTION" according to Biblatex 1.0:
Expand Down Expand Up @@ -977,7 +977,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Mastersthesis";
return "MastersThesis";
}

// Treated as alias of "THESIS", except "type" field is optional
Expand Down Expand Up @@ -1014,7 +1014,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Phdthesis";
return "PhdThesis";
}

// Treated as alias of "THESIS", except "type" field is optional
Expand Down Expand Up @@ -1051,7 +1051,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Techreport";
return "TechReport";
}

// Treated as alias of "REPORT", except "type" field is optional
Expand Down Expand Up @@ -1088,7 +1088,7 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)

@Override
public String getName() {
return "Www";
return "WWW";
}

// Treated as alias of "ONLINE" according to Biblatex 1.0:
Expand Down Expand Up @@ -1159,27 +1159,4 @@ public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)
return true;
}
};

// Unsupported types and custom types left out

/*public static final BibtexEntryType ARTICLE = new BibtexEntryType() {
public String getName() {
return "Article";
}
public String[] getRequiredFields() {
return new String[] {};
}
public String[] getOptionalFields() {
return new String[] {};
}
public String[] getPrimaryOptionalFields() {
return new String[] {};
}
public String describeRequiredFields() {
return "";
}
public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database) {
return entry.allFieldsPresent(getRequiredFields(), database);
}
};*/
}
10 changes: 5 additions & 5 deletions src/main/java/net/sf/jabref/BibtexEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public BibtexEntry() {

public BibtexEntry(String id)
{
this(id, BibtexEntryType.OTHER);
this(id, BibtexEntryTypes.OTHER);
}

public BibtexEntry(String id, BibtexEntryType type)
Expand All @@ -113,15 +113,15 @@ public BibtexEntry(String id, BibtexEntryType type)
*/
public String[] getOptionalFields()
{
return _type.getOptionalFields();
return _type.getOptionalFields().clone();
}

/**
* Returns an array describing the required fields for this entry.
*/
public String[] getRequiredFields()
{
return _type.getRequiredFields();
return _type.getRequiredFields().clone();
}

public String[] getUserDefinedFields()
Expand Down Expand Up @@ -198,15 +198,15 @@ public void setType(BibtexEntryType type)
* current types.
* @return true if the entry could find a type, false if not (in
* this case the type will have been set to
* BibtexEntryType.TYPELESS).
* BibtexEntryTypes.TYPELESS).
*/
public boolean updateType() {
BibtexEntryType newType = BibtexEntryType.getType(_type.getName());
if (newType != null) {
_type = newType;
return true;
}
_type = BibtexEntryType.TYPELESS;
_type = BibtexEntryTypes.TYPELESS;
return false;
}

Expand Down
Loading