Skip to content

Commit

Permalink
Fixed #1190 - ILibraryInformation - add index field
Browse files Browse the repository at this point in the history
  • Loading branch information
eselmeister committed Nov 16, 2022
1 parent 25bd7e5 commit 07ba225
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public abstract class AbstractLibraryInformation implements ILibraryInformation
private double molWeight = 0.0d;
private double exactMass = 0.0d;
private String database = "";
private int databaseIndex = -1;
private String contributor = "";
private String hit;
private final Set<String> classification = new LinkedHashSet<>();
Expand Down Expand Up @@ -83,6 +84,7 @@ public AbstractLibraryInformation(ILibraryInformation libraryInformation) {
molWeight = libraryInformation.getMolWeight();
exactMass = libraryInformation.getExactMass();
database = libraryInformation.getDatabase();
databaseIndex = libraryInformation.getDatabaseIndex();
contributor = libraryInformation.getContributor();
hit = libraryInformation.getHit();
classification.addAll(libraryInformation.getClassifier());
Expand Down Expand Up @@ -308,6 +310,18 @@ public void setDatabase(String database) {
}
}

@Override
public int getDatabaseIndex() {

return databaseIndex;
}

@Override
public void setDatabaseIndex(int databaseIndex) {

this.databaseIndex = databaseIndex;
}

@Override
public String getContributor() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,14 @@ public interface ILibraryInformation extends IClassifier, Serializable {
*/
void setMiscellaneous(String miscellaneous);

/**
* Returns the database information.
*
* @return String
*/
String getDatabase();

/**
* Sets the database information.
*
* @return String
*/
void setDatabase(String database);

int getDatabaseIndex();

void setDatabaseIndex(int databaseIndex);

/**
* Returns the contributor information.
*
Expand Down

0 comments on commit 07ba225

Please sign in to comment.