-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
begin of database-detail interface (request the data, no good display for the moment)
- Loading branch information
Showing
32 changed files
with
4,508 additions
and
125 deletions.
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
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
4 changes: 1 addition & 3 deletions
4
src/main/java/nc/ird/malariaplantdb/repository/SpeciesRepository.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
38 changes: 38 additions & 0 deletions
38
src/main/java/nc/ird/malariaplantdb/service/PublicationService.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,38 @@ | ||
package nc.ird.malariaplantdb.service; | ||
|
||
import nc.ird.malariaplantdb.domain.Publication; | ||
import nc.ird.malariaplantdb.domain.util.CitationConverter; | ||
import nc.ird.malariaplantdb.repository.PublicationRepository; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import javax.inject.Inject; | ||
|
||
/** | ||
* Service for the Publication entity | ||
*/ | ||
@Service | ||
@Transactional | ||
public class PublicationService { | ||
|
||
private final Logger log = LoggerFactory.getLogger(PublicationService.class); | ||
|
||
@Inject | ||
private PublicationRepository publicationRepository; | ||
|
||
/** | ||
* Save a publication entity which the citation has been set | ||
* | ||
* @param publication the publication to save | ||
* @return the saved publication | ||
*/ | ||
public Publication save(Publication publication){ | ||
|
||
CitationConverter converter = new CitationConverter(); | ||
publication.setCitation(converter.convert(publication)); | ||
|
||
return publicationRepository.save(publication); | ||
} | ||
} |
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
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
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
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,14 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<!DOCTYPE hibernate-configuration PUBLIC | ||
"-//Hibernate/Hibernate Configuration DTD//EN" | ||
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> | ||
<hibernate-configuration> | ||
<session-factory> | ||
<property name="connection.url"/> | ||
<property name="connection.driver_class"/> | ||
<property name="connection.username"/> | ||
<property name="connection.password"/> | ||
<!-- DB schema will be updated if needed --> | ||
<!-- <property name="hbm2ddl.auto">update</property> --> | ||
</session-factory> | ||
</hibernate-configuration> |
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
Oops, something went wrong.