Class SubfieldDefinition
java.lang.Object
de.gwdg.metadataqa.marc.definition.structure.SubfieldDefinition
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubfieldDefinition(String code, String label) Create a MarcSubfield objectSubfieldDefinition(String code, String label, boolean repeatable) SubfieldDefinition(String code, String label, String cardinalityCode) -
Method Summary
Modifier and TypeMethodDescriptiondisallowIn(MarcVersion... versions) getCode()Get the EncodedValue object (label+code) from the list of codes of this subfield for the given code.getCode(List<EncodedValue> codes, String code) Get the EncodedValue object (label+code) for a given subfield code.Returns the subfield code needed for Solr indexing.getCodes()getLabel()getLocalCode(MarcVersion version, String code) getLocalCodes(MarcVersion version) getMqTag()getPath()getPosition(int start, int end) booleanvoidhasCodeList(boolean hasCodeList) booleanbooleanbooleanbooleanbooleanisDisallowedIn(MarcVersion marcVersion) booleanResolves the value of a subfield to its label if it can be found in the codeList or the list of codes.resolvePositional(String value) setBibframeTag(String bibframeTag) setCodeList(CodeList codeList) setCodes(List<EncodedValue> codes) setCompilanceLevels(String national) setCompilanceLevels(String national, String minimal) setContentParser(SubfieldContentParser contentParser) setContentSplitter(SubfieldContentSplitter contentSplitter) setFrbrFunctions(FRBRFunction... functions) setLocalCodes(MarcVersion version, String... input) Local codes are defined by a particular library, not in the LoC MARC21 definitionvoidsetMarcVersion(MarcVersion marcVersion) setMinimalCompilanceLevel(CompilanceLevel minimalLevel) setMinimalCompilanceLevel(String level) setNationalCompilanceLevel(CompilanceLevel nationalLevel) setNationalCompilanceLevel(String level) voidsetPositions(List<ControlfieldPositionDefinition> positions) setValidator(SubfieldValidator validator) toString()
-
Field Details
-
codeList
-
-
Constructor Details
-
SubfieldDefinition
Create a MarcSubfield object- Parameters:
code- The subfield codelabel- The description of the code
-
SubfieldDefinition
-
SubfieldDefinition
-
-
Method Details
-
getCodeForIndex
Returns the subfield code needed for Solr indexing. If MQ or BIBFRAME tags are defined, they are used in that order. Otherwise, the code is prefixed with an underscore (and special characters are replaced with their names). Note: The code that's referred to here is the identifier of the subfield and not code in the sense of possible values of the subfield.- Returns:
- The subfield code for Solr indexing.
-
getCode
-
getPath
-
setCodes
-
setCodes
-
setLocalCodes
Local codes are defined by a particular library, not in the LoC MARC21 definition- Parameters:
version-input-- Returns:
-
getCode
Get the EncodedValue object (label+code) from the list of codes of this subfield for the given code.- Parameters:
code- The code to look up.- Returns:
- The EncodedValue object for the given code or null if not found.
-
getCode
Get the EncodedValue object (label+code) for a given subfield code.- Parameters:
codes- The list of EncodedValue objects (codes of the subfield).code- The code to look up.- Returns:
- The EncodedValue object for the given code or null if not found.
-
getCodes
-
getLocalCodes
-
getLocalCodes
-
getLocalCode
-
getCardinalityCode
-
getCardinality
-
getLabel
-
getAllowedCodes
-
getContentParser
-
hasContentParser
public boolean hasContentParser() -
setContentParser
-
hasContentSplitter
public boolean hasContentSplitter() -
getContentSplitter
-
setContentSplitter
-
setValidator
-
hasValidator
public boolean hasValidator() -
getValidator
-
setCodeList
-
getCodeList
-
resolve
Resolves the value of a subfield to its label if it can be found in the codeList or the list of codes. Otherwise, it returns the value as is.- Parameters:
value- The value of the subfield to resolve.- Returns:
- The resolved value. Either the label of the code or the value itself.
-
resolvePositional
-
getBibframeTag
-
setBibframeTag
-
getMqTag
-
getParent
-
getFrbrFunctions
-
setParent
-
setMqTag
-
setPositions
-
getPositions
-
hasPositions
public boolean hasPositions() -
getPosition
-
setCompilanceLevels
-
setCompilanceLevels
-
getNationalCompilanceLevel
-
setNationalCompilanceLevel
-
setNationalCompilanceLevel
-
getMinimalCompilanceLevel
-
setMinimalCompilanceLevel
-
setMinimalCompilanceLevel
-
setFrbrFunctions
-
disallowIn
-
getDisallowedIn
-
isDisallowedIn
-
getMarcVersion
-
setMarcVersion
-
isRepeatable
public boolean isRepeatable() -
hasCodeList
public boolean hasCodeList() -
hasCodeList
public void hasCodeList(boolean hasCodeList) -
toString
-