@@ -195,14 +195,14 @@ func (book *Book) Id() string {
195
195
return book .Onix .RecordReference
196
196
}
197
197
198
- //Valid returns true if Book is valid data
199
- func (book * Book ) Valid () bool {
198
+ //IsValid returns true if Book is valid data
199
+ func (book * Book ) IsValid () bool {
200
200
return len (book .Id ()) > 0
201
201
}
202
202
203
203
//ISBN returns ISBN code
204
204
func (book * Book ) ISBN () string {
205
- if ! book .Valid () {
205
+ if ! book .IsValid () {
206
206
return ""
207
207
}
208
208
if len (book .Onix .ProductIdentifier .IDValue ) > 0 {
@@ -216,7 +216,7 @@ func (book *Book) ISBN() string {
216
216
217
217
//Title returns string of Book Title
218
218
func (book * Book ) Title () string {
219
- if ! book .Valid () {
219
+ if ! book .IsValid () {
220
220
return ""
221
221
}
222
222
title := ""
@@ -231,7 +231,7 @@ func (book *Book) Title() string {
231
231
232
232
//SubTitle returns string of sub-title
233
233
func (book * Book ) SubTitle () string {
234
- if ! book .Valid () {
234
+ if ! book .IsValid () {
235
235
return ""
236
236
}
237
237
//TODO: Subtitle
@@ -240,7 +240,7 @@ func (book *Book) SubTitle() string {
240
240
241
241
//SeriesTitle returns string of series title
242
242
func (book * Book ) SeriesTitle () string {
243
- if ! book .Valid () {
243
+ if ! book .IsValid () {
244
244
return ""
245
245
}
246
246
if book .Onix .DescriptiveDetail .Collection .TitleDetail != nil {
@@ -255,7 +255,7 @@ func (book *Book) SeriesTitle() string {
255
255
256
256
//Label returns string of book label
257
257
func (book * Book ) Label () string {
258
- if ! book .Valid () {
258
+ if ! book .IsValid () {
259
259
return ""
260
260
}
261
261
if book .Onix .DescriptiveDetail .Collection .TitleDetail != nil {
@@ -270,7 +270,7 @@ func (book *Book) Label() string {
270
270
271
271
//ImageURL returns string of book cover image URL
272
272
func (book * Book ) ImageURL () string {
273
- if ! book .Valid () {
273
+ if ! book .IsValid () {
274
274
return ""
275
275
}
276
276
if book .Onix .CollateralDetail != nil {
@@ -290,7 +290,7 @@ func (book *Book) ImageURL() string {
290
290
//Authors returns strings of Contributors
291
291
func (book * Book ) Authors () []string {
292
292
authors := []string {}
293
- if ! book .Valid () {
293
+ if ! book .IsValid () {
294
294
return authors
295
295
}
296
296
for _ , elm := range book .Onix .DescriptiveDetail .Contributor {
@@ -306,7 +306,7 @@ func (book *Book) Authors() []string {
306
306
307
307
//Publisher returns strings of Publisher
308
308
func (book * Book ) Publisher () string {
309
- if ! book .Valid () {
309
+ if ! book .IsValid () {
310
310
return ""
311
311
}
312
312
pub := book .Onix .PublishingDetail .Imprint .ImprintName
@@ -321,7 +321,7 @@ func (book *Book) Publisher() string {
321
321
322
322
//PublicationDate returns Date of Publication
323
323
func (book * Book ) PublicationDate () Date {
324
- if ! book .Valid () {
324
+ if ! book .IsValid () {
325
325
return NewDate (time.Time {})
326
326
}
327
327
for _ , pubdate := range book .Onix .PublishingDetail .PublishingDate {
@@ -337,7 +337,7 @@ func (book *Book) PublicationDate() Date {
337
337
338
338
//Description returns strings of book description or table of content
339
339
func (book * Book ) Description () string {
340
- if ! book .Valid () {
340
+ if ! book .IsValid () {
341
341
return ""
342
342
}
343
343
desc := ""
0 commit comments