Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,9 @@ public void consumeStructRefSeq(StructRefSeq structRefSeq) {

DBRef dbRef = new DBRef();

dbRef.setIdCode(structRefSeq.getPdbxPDBIdCode().get(rowIndex));
dbRef.setDbAccession(structRefSeq.getPdbxDbAccession().get(rowIndex));
dbRef.setDbIdCode(structRefSeq.getPdbxDbAccession().get(rowIndex));
dbRef.setIdCode(structRefSeq.getPdbxPDBIdCode().isDefined()? structRefSeq.getPdbxPDBIdCode().get(rowIndex):null);
dbRef.setDbAccession(structRefSeq.getPdbxDbAccession().isDefined()? structRefSeq.getPdbxDbAccession().get(rowIndex):null);
dbRef.setDbIdCode(structRefSeq.getPdbxDbAccession().isDefined()? structRefSeq.getPdbxDbAccession().get(rowIndex):null);
dbRef.setChainName(structRefSeq.getPdbxStrandId().get(rowIndex));

OptionalInt structRefRowIndex = IntStream.range(0, structRef.getRowCount())
Expand Down Expand Up @@ -1330,7 +1330,7 @@ private String getEntityType(String entityId) {
private String getEntityDescription(String entityId) {
return IntStream.range(0, entity.getRowCount())
.filter(i -> entity.getId().get(i).equals(entityId))
.mapToObj(i -> entity.getPdbxDescription().get(i))
.mapToObj(i -> entity.getPdbxDescription().isDefined()? entity.getPdbxDescription().get(i):"")
.findFirst()
.orElseThrow(() -> new NoSuchElementException("could not find entity with id " + entityId));
}
Expand Down
Loading