add hasSubfields() method to MarcField builder
This commit is contained in:
parent
1cdcd03c94
commit
74ec0f9a34
4 changed files with 24 additions and 6 deletions
|
@ -6,9 +6,12 @@
|
||||||
|
|
||||||
## Bibliographic data processing library for Java
|
## Bibliographic data processing library for Java
|
||||||
|
|
||||||
image:https://api.travis-ci.org/xbib/marc.svg[Build status]
|
image:https://api.travis-ci.org/xbib/marc.svg[title="Build status", link="https://travis-ci.org/xbib/marc/"]
|
||||||
image:https://img.shields.io/sonar/http/nemo.sonarqube.com/org.xbib:marc/coverage.svg?style=flat-square[Coverage]
|
image:https://img.shields.io/sonar/http/nemo.sonarqube.com/org.xbib:marc/coverage.svg?style=flat-square[title="Coverage", link="https://sonarqube.com/dashboard/index?id=org.xbib%3Amarc"]
|
||||||
image:https://maven-badges.herokuapp.com/maven-central/org.xbib/marc/badge.svg[Maven Central]
|
image:https://maven-badges.herokuapp.com/maven-central/org.xbib/marc/badge.svg[title="Maven Central", link="http://search.maven.org/#search%7Cga%7C1%7Cxbib%20marc"]
|
||||||
|
image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[title="Apache License 2.0", link="https://opensource.org/licenses/Apache-2.0"]
|
||||||
|
image:https://img.shields.io/twitter/url/https/twitter.com/xbib.svg?style=social&label=Follow%20%40xbib)[title="Twitter", link="https://twitter.com/xbib"]
|
||||||
|
image:https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif[title="PayPal", link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GVHFQYZ9WZ8HG"]
|
||||||
|
|
||||||
This is a Java library for processing bibliographic data in the following formats:
|
This is a Java library for processing bibliographic data in the following formats:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ apply plugin: 'pmd'
|
||||||
apply plugin: 'checkstyle'
|
apply plugin: 'checkstyle'
|
||||||
apply plugin: "jacoco"
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
|
group = "org.xbib"
|
||||||
|
version = "1.0.5"
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
wagon
|
wagon
|
||||||
provided
|
provided
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
group = org.xbib
|
|
||||||
version = 1.0.4
|
|
||||||
org.gradle.daemon = true
|
|
|
@ -516,6 +516,14 @@ public class MarcField implements Comparable<MarcField> {
|
||||||
return tag == null;
|
return tag == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has this MARC field subfields?
|
||||||
|
* @return true if subfields exist
|
||||||
|
*/
|
||||||
|
public boolean hasSubfields() {
|
||||||
|
return !subfields.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a MARC field.
|
* Build a MARC field.
|
||||||
* @return the built MARC field.
|
* @return the built MARC field.
|
||||||
|
@ -524,6 +532,13 @@ public class MarcField implements Comparable<MarcField> {
|
||||||
return new MarcField(tag, indicator, position, length,
|
return new MarcField(tag, indicator, position, length,
|
||||||
value, subfields, subfieldIds.toString(), isControl());
|
value, subfields, subfieldIds.toString(), isControl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "tag=" + tag + ",indicator=" + indicator +
|
||||||
|
",value=" + value + ",subfields=" +
|
||||||
|
subfields;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue