-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Story/q20 19 #23
Open
Pooja444
wants to merge
194
commits into
develop
Choose a base branch
from
story/Q20-19
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Story/q20 19 #23
Changes from 179 commits
Commits
Show all changes
194 commits
Select commit
Hold shift + click to select a range
03e7120
[story/Q20-11] completed edit collections implementation, added unit …
Pooja444 e4a5a8b
[story/Q20-11] addressed review comments for edit collections
Pooja444 0a74117
[story/Q20-11] addressed review comments
Pooja444 2ada5f9
[story/Q20-12] added collectionId param while submitting network
Pooja444 19f9069
[story/Q20-12] added collectionId to EventGraph
Pooja444 ba4267b
[story/Q20-3] added token validity check
Pooja444 2167f2a
[Q20-7] Adding Citephere config
MaulikLim bd62381
[story/Q20-3] added token validation logic
Pooja444 3d8be96
[Q20-7] - Fetch apps from citesphere after registering quadriga
MaulikLim 83e9aa8
[story/Q20-3] completed check token dev, started unit tests
Pooja444 df99e9e
[Q20-7] - Working on front-end for multiple app selection
MaulikLim a23bc9a
[story/Q20-3] partially completed unit tests
Pooja444 d31e504
[story/Q20-3] added few more test cases
Pooja444 b1c48b8
[story/Q20-3] completed all unit tests
Pooja444 4b261e3
[story/Q20-3] added required=true for authHeader
Pooja444 a2a3ccf
[Q20-7] - Replaced pop-up selection with list selection
MaulikLim 5ead2a8
[story/Q20-12] changed Objects.isNull to simple null check
Pooja444 5e63e67
[story/Q20-3] changed Objects.isNull to simple null check
Pooja444 e6db79d
[Q20-7] - Completed front-end for add collections part
MaulikLim ecab67d
[Q20-7] - fixed test case
MaulikLim d3cbe2a
[story/Q20-18] added view to display collection info
Pooja444 dc4c9c3
[story/Q20-18] added creationTime to network graph
Pooja444 4ddadf0
[story/Q20-18] added last network submission info
Pooja444 27ed3e7
[story/Q20-12] addressed review comments
Pooja444 ad11972
[story/Q20-12] resolved merge conflicts with story Q20-11
Pooja444 82122dc
[story/Q20-12] removed double test cases
Pooja444 1425d51
[story/Q20-12] caught IllegalArgumentException while finding collection
Pooja444 a6375e7
[story/Q20-12] removed unnecessary null check
Pooja444 f2f3873
[story/Q20-18] Merge branch 'develop' of github.com:diging/quadriga-2…
Pooja444 2035910
[story/Q20-12] removed unncessary file changes
Pooja444 a52e64a
[story/Q20-12] removed unncessary file changes
Pooja444 d73135f
[Q20-18] added last submitted network time
Pooja444 f3d7a5a
[story/Q20-12] added mappedCollection to map mappedNetwork with colle…
Pooja444 8867145
[Q20-12] linked collection with concepts, edges, added unit tests
Pooja444 91d1ea6
[Q20-7] resolved merge conflicts, fixed test cases
MaulikLim 738db5f
[Q20-12] added all test cases MappedCollectionService
Pooja444 4614aa9
[Q20-12] added mappedCollection to concepts and edges
Pooja444 4e9e6e9
[Q20-12] added mappedCollection to EventGraph
Pooja444 44e7c24
[Q20-18] Resolving merge conflicts between Q20-12 and Q20-18
Pooja444 33c05a4
[Q20-18] added exception handling in DisplayCollectionController
Pooja444 4585d32
[Q20-7] - implemented front-end for adding apps to collections for ed…
MaulikLim 068ecf5
[Q20-12] set collectionId to EventGraph
Pooja444 30298c1
[Q20-18] resolving merge conflicts between Q20-12 and Q20-18
Pooja444 e19ef10
[Q20-18] Resolving conflicts between Q20-18 and Q20-3
Pooja444 85ad52a
[Q20-3] changed tokenValidatorImpl to tokenValidator
Pooja444 44fb9ae
[Q20-7] - code cleanup, added interaction for checkbox
MaulikLim bd25d2d
[Q20-7] - minor corrections
MaulikLim 1291e9d
[Q20-18] added appName property to EventGraph
Pooja444 d85dc80
[Q20-3] modified logic to get tokenInfo from TokenValidator
Pooja444 3ea2023
[Q20-3] resolving conflicts between Q20-3 and develop
Pooja444 58975fd
[Q20-3] changed initMocks to openMocks as per the new version
Pooja444 ef40d9c
[Q20-3] corrected javadoc for getTokenFromHeader
Pooja444 3c9592c
[Q20-18] resolving conflicts between Q20-18 and Q20-3
Pooja444 a371610
[Q20-18] added lastNetworkSubmittedBy logic
Pooja444 935c843
[Q20-3] improved getAuthHeader method
Pooja444 569803a
Merge branch 'story/Q20-3' of github.com:diging/quadriga-2.0 into sto…
Pooja444 a099184
[Q20-18] added lastNetworkSubmittedBy to displayCollection
Pooja444 7e9fb96
[Q20-18] added logic to display number of triples
Pooja444 2558d75
[Q20-7] - Made method to get citesphere access token public
MaulikLim f8d3d42
[Q20-18] added test cases for EventGraphServiceImpl
Pooja444 63dc182
[Q20-18] added default mapping to every network
Pooja444 bbfad1c
[Q20-18] fixed a bug and added a test case
Pooja444 310a563
[Q20-7] - revert back names for CollectionManager service
MaulikLim 25c36b3
Merge branch 'story/Q20-3' of github.com:diging/quadriga-2.0 into sto…
Pooja444 e6e07c4
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 3af5222
[Q20-19] added pagination for networks in a collection
Pooja444 d191254
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 3956605
[Q20-7] - Made the getAccessToken() method private
MaulikLim b25b927
[Q20-7] - renamed CitesphereConnector classes
MaulikLim e2e25cf
[Q20-7] Included javadocs
MaulikLim 509e3cb
[Q20-18] added default mappings and number of triples
Pooja444 95bd65c
Merge branch 'story/Q20-7' of github.com:diging/quadriga-2.0 into sto…
Pooja444 49981cf
[Q20-3] moved getToken methods to citeshere service
Pooja444 5ebd99c
[Q20-3] removed unnecessary extra dependency for nimbusds
Pooja444 e1654dc
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 d77619d
[Q20-19] added network controller and page
Pooja444 d4e32a1
[Q20-19] added network graph to network page with dummy data
Pooja444 12ca58d
[Q20-19] started with algorithm for displaying graph
Pooja444 12e5325
[Q20-19] added graph visualization logic from eventGraph
Pooja444 1cc84ce
[story/Q20-18] corrected defaultMapping logic
Pooja444 8a51ab0
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 7c2ed96
[Q20-19] implemented custom pagination for networks
Pooja444 1a64864
[Q20-19] added logic to convert multiple eventgraphs to one network
Pooja444 a5be290
[Q20-19] added test cases for EventGraphService
Pooja444 bbc9813
[Q20-19] started implementing conceptpower retrieval and persistence
Pooja444 d0575da
[Q20-19] added network details to network page
Pooja444 5ecab8b
[Q20-19] added conceptpower JSON parsing logic
Pooja444 9815c06
[Q20-19] created tables for ConceptPower in MySQL
Pooja444 ebf3325
[Q20-19] implemented concept caching logic
Pooja444 3b08100
[Q20-19] added logic for alternativeURIs, lastUpdated and deleting co…
Pooja444 29acec1
[Q20-19] added sourceURI validation, fixed alternativeURI bug
Pooja444 2091064
[Q20-19] added lazy collection fix
Pooja444 ece353e
[Q20-19] added lazy collection fix
Pooja444 425ecaf
[Q20-19] resolved few issues with conceptcache
Pooja444 cc5b478
[Q20-19] started with test cases for graph creation
Pooja444 ebd5a60
added test cases for ConceptPower cache and connector services
Pooja444 e4c4ca4
[Q20-19] added unit tests for ConceptPowerService
Pooja444 2313e87
[Q20-19] added adll GraphCreationServiceImpl tests
Pooja444 430ca90
[Q20-19] added tests for saveConceptCacheFromConceptPowerReply
Pooja444 b9c036c
[Q20-19] completed all unit tests
Pooja444 a63b893
[Q20-19] removed unnecessary TODO
Pooja444 5d41516
Merge branch 'story/Q20-3' of github.com:diging/quadriga-2.0 into sto…
Pooja444 ed1746a
[Q20-19] corrected indentation level, added missing dependency
Pooja444 8b8ae17
[Q20-18] added missing dependency
Pooja444 f2ff9e2
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 c1f4f09
[Q20-19] corrected indentation level
Pooja444 e8718ee
[Q20-19] fixing codefactor issues
Pooja444 2cba6cc
[Q20-19] fixing codefactor issues
Pooja444 25513df
[Q20-19] fixing codefactor issues
Pooja444 bc33ec1
[Q20-12] made changes as per PR comments
Pooja444 43de630
Merge branch 'story/Q20-12' of github.com:diging/quadriga-2.0 into st…
Pooja444 419f668
[Q20-18] removed unnecessary mappingType from Concepts and Predicates
Pooja444 14e261d
[Q20-12] added logic where new MappedTripleGroup is created per network
Pooja444 1305bb7
Merge branch 'story/Q20-12' of github.com:diging/quadriga-2.0 into st…
Pooja444 6f222c9
[Q20-18] added MappedTripleGroup related changes
Pooja444 86208ab
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 433d214
[Q20-12] addressed review comments
Pooja444 23ad602
Merge branch 'story/Q20-12' of github.com:diging/quadriga-2.0 into st…
Pooja444 b22d407
[Q20-18] updated defaultMapping logic as per MappedTripleGroups
Pooja444 4058d2c
Merge branch 'story/Q20-3' of github.com:diging/quadriga-2.0 into sto…
Pooja444 a2d6d5b
[Q20-12] updated javadoc comments
Pooja444 e1c3b33
[Q20-12] resolved code factor issue
Pooja444 dde92e1
[Q20-18] completed changes for OffsetDateTime
Pooja444 14b2ff4
[Q20-18] fixed CodeFactor issues
Pooja444 aad3e95
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 830bdc4
[Q20-19] completed changes as per updates to Q20-18
Pooja444 cedf185
[Q20-12] addressed review comments
Pooja444 2eede6c
Merge branch 'story/Q20-12' of github.com:diging/quadriga-2.0 into st…
Pooja444 4d92223
[Q20-18] removed unnecessary method from MappedTripleGroupService
Pooja444 7d7e144
Merge branch 'story/Q20-18' of github.com:diging/quadriga-2.0 into st…
Pooja444 af95ceb
Merge branch 'develop' of github.com:diging/quadriga-2.0 into story/Q…
Pooja444 28cc4c7
[Q20-18] updated Q20-18 as per modified Q20-12
Pooja444 39e7bc5
[Q20-18] corrected code factor issue
Pooja444 54e39a3
[Q20-18] review comments
7eaaa43
[Q20-18] refactor
aecbb8e
[Q20-18] added test case
cf42c39
[Q20-18] code factor
6743f67
[Q20-18] refactor
c8e2cfa
[Q20-18] refactor
5be7a71
[Q20-18] refactor
042da8f
[Q20-18] review comments
d539efb
[Q20-18] modified event graph aggregation
23c1dba
[Q20-18] refactored
4bdd28c
[Q20-18] modified find all to findFirst eventgraph to get latest
11c7322
[Q20-18] removed unwanted import
e374c05
[Q20-19] pulled latest changes from Q20-18
468f35c
[Q20-19] fixed test cases
a194e14
[Q20-18] modified find first return type
4848a2f
[Q20-18] refactor
a83519e
[Q20-18] indentation
6ccb356
[Q20-18] review comment
38d9994
[Q20-18] addded null and empty check
1775498
[Q20-19] updated branch with latest changes from Q20-18
643c0c1
[Q20-19] removed commented code
def1c1a
[Q20-19] indentation
489a236
[Q20-18] addressed review comments
46cfbd4
[Q20-18] removed unwanted lines
37d1f81
[Q20-18] merged develop into story/q20-18
7784067
[Q20-19] fixed merge conflict
4c0ca46
[Q20-18] removed unwanted lines
517d697
[Q20-18] remove unwanted file changes
0058a6c
[Q20-18] refactored add network api controller
c4c4436
[Q20-18] refactored collectionController
ca54d84
[Q20-18] latest network
56d6635
[Q20-18] latest network null condition
0ef1a95
[Q20-19] merged develop
fc99228
[Q20-19] updated story/q20-18
3e05448
[Q20-19] refactor
2ca90e5
[Q20-19] concept cache refactor
29ee7b9
[Q20-19] pom xml
fa56f02
[Q20-19]
47e1274
[Q20-19] resolved conflicts
6e362ee
[Q20-19] revert config.properties change
cc54be3
[Q20-19] removed unnecessary changes
7b4acc0
[Q20-19] addressed PR review comments
24666d4
[Q20-19] added pagination for display networks
2492f19
[Q20-19] refactor
740c589
[Q20-19] removed appName
5570d08
[Q20-19] added page and size as request param
6626db7
[Q20-19] pr review comments
ce57820
[Q20-19] review comment
050afff
[Q20-19] refactor
0a429ba
[Q20-19] refactor
4f77dc2
[Q20-19] Addressed review comments.
ShivaniYerram 2de4433
Merge branch 'develop' into story/Q20-19
pooja-thalur 2db6fc6
[Q20-19] review comments addressed
pooja-thalur 7519a39
[Q20-19] fixing codefactor issue
pooja-thalur 2527a8b
[Q20-19] codefactor issue
pooja-thalur 6fe474e
[Q20-19] indentation changes
pooja-thalur 7edb536
[Q20-19] upgrading security core dependency
pooja-thalur 09d697f
[Q20-19] dependency upgrade
pooja-thalur 4228f31
[Q20-19] jackson dependency upgraded
pooja-thalur c18e489
[Q20-19] reverting dependency update changes
pooja-thalur 5cbc2a1
[Q20-19] unnecessary change removed
pooja-thalur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
quadriga/src/main/java/edu/asu/diging/quadriga/api/v1/model/Metadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
quadriga/src/main/java/edu/asu/diging/quadriga/api/v1/model/NodeData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.../src/main/java/edu/asu/diging/quadriga/core/conceptpower/data/ConceptCacheRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package edu.asu.diging.quadriga.core.conceptpower.data; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import edu.asu.diging.quadriga.core.conceptpower.model.ConceptCache; | ||
|
||
/** | ||
* | ||
* An interface used to retrieve data from conceptpower_concept_entry table that | ||
* stores data extracted from ConceptPower | ||
* | ||
* @author poojakulkarni | ||
* | ||
*/ | ||
@Repository | ||
public interface ConceptCacheRepository extends PagingAndSortingRepository<ConceptCache, String> { | ||
|
||
@Query("SELECT c from ConceptCache c WHERE ?1 in elements(c.alternativeUris)") | ||
public List<ConceptCache> findConceptByAlternativeURI(String uri); | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
...a/src/main/java/edu/asu/diging/quadriga/core/conceptpower/data/ConceptTypeRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package edu.asu.diging.quadriga.core.conceptpower.data; | ||
|
||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import edu.asu.diging.quadriga.core.conceptpower.model.ConceptType; | ||
|
||
/** | ||
* An interface used to retrieve data from conceptpower_concept_type table that | ||
* stores information for a concept's type extracted from ConceptPower | ||
* | ||
* @author poojakulkarni | ||
* | ||
*/ | ||
@Repository | ||
public interface ConceptTypeRepository extends PagingAndSortingRepository<ConceptType, String> { | ||
|
||
} |
226 changes: 226 additions & 0 deletions
226
quadriga/src/main/java/edu/asu/diging/quadriga/core/conceptpower/model/ConceptCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,226 @@ | ||
package edu.asu.diging.quadriga.core.conceptpower.model; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
import javax.persistence.CollectionTable; | ||
import javax.persistence.ElementCollection; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Lob; | ||
import javax.persistence.Table; | ||
import javax.persistence.Transient; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.hibernate.annotations.LazyCollection; | ||
import org.hibernate.annotations.LazyCollectionOption; | ||
|
||
/** | ||
* This class represents the 'conceptpower_concept_cache' table present in the | ||
* database that stores cached concept data | ||
* | ||
* @author Digital Innovation Group | ||
* | ||
*/ | ||
@Entity | ||
@Table(name = "conceptpower_concept_cache") | ||
public class ConceptCache implements Serializable, Comparable<ConceptCache> { | ||
|
||
/** | ||
* | ||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove if there is no javadoc |
||
private static final long serialVersionUID = 6260562492095202271L; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should start at 1 |
||
|
||
@Id | ||
private String uri; | ||
private String id; | ||
private String word; | ||
private String pos; | ||
|
||
@Lob | ||
private String description; | ||
|
||
private String conceptList; | ||
private String typeId; | ||
private boolean deleted; | ||
private LocalDateTime lastUpdated; | ||
|
||
@ElementCollection | ||
@LazyCollection(LazyCollectionOption.FALSE) | ||
@CollectionTable(name = "conceptpower_alternative_uris") | ||
private List<String> alternativeUris; | ||
|
||
@ElementCollection | ||
@LazyCollection(LazyCollectionOption.FALSE) | ||
@CollectionTable(name = "conceptpower_equal_to") | ||
private List<String> equalTo; | ||
|
||
@ElementCollection | ||
@LazyCollection(LazyCollectionOption.FALSE) | ||
@CollectionTable(name = "conceptpower_wordnetids") | ||
private List<String> wordNetIds; | ||
|
||
private String creatorId; | ||
|
||
@Transient | ||
private ConceptType conceptType; | ||
|
||
public ConceptCache() { | ||
this.lastUpdated = LocalDateTime.now(); | ||
} | ||
|
||
public String getUri() { | ||
return uri; | ||
} | ||
|
||
public void setUri(String uri) { | ||
this.uri = uri; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getWord() { | ||
return word; | ||
} | ||
|
||
public void setWord(String word) { | ||
this.word = word; | ||
} | ||
|
||
public String getPos() { | ||
return pos; | ||
} | ||
|
||
public void setPos(String pos) { | ||
this.pos = pos; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public String getConceptList() { | ||
return conceptList; | ||
} | ||
|
||
public void setConceptList(String conceptList) { | ||
this.conceptList = conceptList; | ||
} | ||
|
||
public String getTypeId() { | ||
return typeId; | ||
} | ||
|
||
public void setTypeId(String typeId) { | ||
this.typeId = typeId; | ||
} | ||
|
||
public boolean isDeleted() { | ||
return deleted; | ||
} | ||
|
||
public void setDeleted(boolean deleted) { | ||
this.deleted = deleted; | ||
} | ||
|
||
public LocalDateTime getLastUpdated() { | ||
return lastUpdated; | ||
} | ||
|
||
public void setLastUpdated(LocalDateTime lastUpdated) { | ||
this.lastUpdated = lastUpdated; | ||
} | ||
|
||
public List<String> getAlternativeUris() { | ||
return alternativeUris; | ||
} | ||
|
||
public void setAlternativeUris(List<String> alternativeUris) { | ||
this.alternativeUris = alternativeUris; | ||
} | ||
|
||
public List<String> getEqualTo() { | ||
return equalTo; | ||
} | ||
|
||
public void setEqualTo(List<String> equalTo) { | ||
this.equalTo = equalTo; | ||
} | ||
|
||
public List<String> getWordNetIds() { | ||
return wordNetIds; | ||
} | ||
|
||
public void setWordNetIds(List<String> wordNetIds) { | ||
this.wordNetIds = wordNetIds; | ||
} | ||
|
||
public String getCreatorId() { | ||
return creatorId; | ||
} | ||
|
||
public void setCreatorId(String creatorId) { | ||
this.creatorId = creatorId; | ||
} | ||
|
||
public ConceptType getConceptType() { | ||
return conceptType; | ||
} | ||
|
||
public void setConceptType(ConceptType conceptType) { | ||
this.conceptType = conceptType; | ||
} | ||
|
||
@Override | ||
public int compareTo(ConceptCache conceptCache) { | ||
// If both old and new cache values are null/blank/empty, nothing has changed | ||
// If old value is null/blank/empty, new value is not null/blank/empty, difference present | ||
// If old value is not null/blank/empty, new value is null/blank/empty, difference present | ||
// If both are not null/blank/empty, we need to check difference | ||
|
||
if(isDifferentList(conceptCache.getAlternativeUris(), this.getAlternativeUris())) return -1; | ||
if(isDifferentList(conceptCache.getEqualTo(), this.getEqualTo())) return -1; | ||
if(isDifferentList(conceptCache.getWordNetIds(), this.getWordNetIds())) return -1; | ||
if (isDifferentString(conceptCache.getConceptList(), this.getConceptList())) return -1; | ||
if (isDifferentString(conceptCache.getCreatorId(), this.getCreatorId())) return -1; | ||
if (isDifferentString(conceptCache.getDescription(), this.getDescription())) return -1; | ||
if (isDifferentString(conceptCache.getId(), this.getId())) return -1; | ||
if (isDifferentString(conceptCache.getPos(), this.getPos())) return -1; | ||
if (isDifferentString(conceptCache.getTypeId(), this.getTypeId())) return -1; | ||
if (isDifferentString(conceptCache.getUri(), this.getUri())) return -1; | ||
if (isDifferentString(conceptCache.getWord(), this.getWord())) return -1; | ||
return 0; | ||
} | ||
|
||
private static boolean isDifferentString(String str1, String str2) { | ||
if(!(StringUtils.isEmpty(str1) && StringUtils.isEmpty(str2)) | ||
&& (StringUtils.isEmpty(str1) || !str1.equals(str2))) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
private static boolean isDifferentList(List<String> list1, List<String> list2) { | ||
if (!(isNullOrEmpty(list1) && isNullOrEmpty(list2) | ||
&& (isNullOrEmpty(list1) || !list1.equals(list2)))) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
private static boolean isNullOrEmpty(List<String> list) { | ||
return list == null || list.isEmpty(); | ||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this used?