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
42 changes: 1 addition & 41 deletions src/main/java/net/sf/jabref/gui/BibtexFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
import net.sf.jabref.model.entry.BibtexEntry;
import net.sf.jabref.model.entry.IEEETranEntryTypes;
import net.sf.jabref.specialfields.SpecialFieldsUtils;
import net.sf.jabref.logic.util.io.TXMLReader;

import org.w3c.dom.Element;

public class BibtexFields {

Expand Down Expand Up @@ -454,7 +451,7 @@ private static class BibtexSingleField {
private static final int WRITEABLE = 0x08; // These fields will not be saved to the .bib file.

// the fieldname
private String name;
private final String name;

// contains the standard, private, displayable, writable infos
// default is: not standard, public, displayable and writable
Expand Down Expand Up @@ -517,43 +514,6 @@ public BibtexSingleField(String fieldName, boolean pStandard,
length = pLength;
}

/**
* the constructor reads all neccessary data from the xml file
*/
public BibtexSingleField(TXMLReader reader, Element node) {
// default is: not standard, public, displayable and writable
flag = BibtexSingleField.DISPLAYABLE | BibtexSingleField.WRITEABLE;

name = reader.readStringAttribute(node, "name", "field");
name = name.toLowerCase();

// read the weight
String wStr = reader.readStringAttribute(node, "weight", null);
if (wStr != null) {
int hCode = wStr.toLowerCase().hashCode();
if (hCode == "small".hashCode()) {
weight = GUIGlobals.SMALL_W;
} else if (hCode == "medium".hashCode()) {
weight = GUIGlobals.MEDIUM_W;
} else if (hCode == "large".hashCode()) {
weight = GUIGlobals.LARGE_W;
} else // try to convert to a double value
{
try {
weight = Double.parseDouble(wStr);
if ((weight < 0.0) || (weight > GUIGlobals.MAX_FIELD_WEIGHT)) {
weight = GUIGlobals.DEFAULT_FIELD_WEIGHT;
}
} catch (Exception e) {
weight = GUIGlobals.DEFAULT_FIELD_WEIGHT;
}
}
}
length = reader.readIntegerAttribute(node, "length", GUIGlobals.DEFAULT_FIELD_LENGTH);

extras = reader.readStringAttribute(node, "extras", null);
}

// -----------------------------------------------------------------------
// -----------------------------------------------------------------------

Expand Down
142 changes: 0 additions & 142 deletions src/main/java/net/sf/jabref/logic/util/io/TXMLReader.java

This file was deleted.