forked from fastluca/JRis
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [#129] Change M1 implementation from RisRecord.number to RisRec…
…ord.miscellaneous1 using String
- Loading branch information
Showing
8 changed files
with
150 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,6 @@ package ch.difty.kris.domain | |
|
||
/** | ||
* A single RIS record. It contains all the allowed tag from RIS format. | ||
* | ||
* @author Gianluca Colaianni -- [email protected] | ||
* @version 1.0 | ||
* @since 22 apr 2017 | ||
*/ | ||
@Suppress("ParameterListWrapping", "SpellCheckingInspection", "TooManyFunctions") | ||
public data class RisRecord( | ||
|
@@ -172,7 +168,12 @@ public data class RisRecord( | |
/** LK */ | ||
public var websiteLink: String? = null, | ||
|
||
/** M1 */ | ||
/** M1. Often used for Number. This is an alphanumeric field, thus suporting e.g. ranges or chars */ | ||
public var miscellaneous1: String? = null, | ||
|
||
// TODO remove in #132 | ||
/** M1 - deprecated */ | ||
@Deprecated("Use miscellaneous1 (returning a nullable String) instead", ReplaceWith("miscellaneous1")) | ||
public var number: Long? = null, | ||
|
||
/** | ||
|
@@ -339,6 +340,7 @@ public data class RisRecord( | |
private var language: String? = null | ||
private var label: String? = null | ||
private var websiteLink: String? = null | ||
private var miscellaneous1: String? = null | ||
private var number: Long? = null | ||
private var miscellaneous2: String? = null | ||
private var typeOfWork: String? = null | ||
|
@@ -460,6 +462,9 @@ public data class RisRecord( | |
public fun language(language: String?): Builder = apply { this.language = language } | ||
public fun label(label: String?): Builder = apply { this.label = label } | ||
public fun websiteLink(websiteLink: String?): Builder = apply { this.websiteLink = websiteLink } | ||
public fun miscellaneous1(miscellaneous1: String?): Builder = apply { this.miscellaneous1 = miscellaneous1 } | ||
|
||
@Deprecated("use miscellaneous1(number.toString()) instead", ReplaceWith("miscellaneous1(number.toString())")) | ||
public fun number(number: Long?): Builder = apply { this.number = number } | ||
public fun miscellaneous2(miscellaneous2: String?): Builder = apply { this.miscellaneous2 = miscellaneous2 } | ||
public fun typeOfWork(typeOfWork: String?): Builder = apply { this.typeOfWork = typeOfWork } | ||
|
@@ -549,6 +554,7 @@ public data class RisRecord( | |
language, | ||
label, | ||
websiteLink, | ||
miscellaneous1, | ||
number, | ||
miscellaneous2, | ||
typeOfWork, | ||
|
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