org.marc4j.marc
Interface Subfield

All Superinterfaces:
Serializable
All Known Implementing Classes:
SubfieldImpl

public interface Subfield
extends Serializable

Represents a subfield in a MARC record.

Version:
$Revision: 1.11 $
Author:
Bas Peters

Method Summary
 boolean find(String pattern)
          Returns true if the given regular expression matches a subsequence of the data element.
 char getCode()
          Returns the data element identifier.
 String getData()
          Returns the data element.
 Long getId()
          Returns the identifier.
 void setCode(char code)
          Sets the data element identifier.
 void setData(String data)
          Sets the data element.
 void setId(Long id)
          Sets the identifier.
 

Method Detail

setId

void setId(Long id)
Sets the identifier.

The purpose of this identifier is to provide an identifier for persistency.

Parameters:
id - the identifier

getId

Long getId()
Returns the identifier.

Returns:
Long - the identifier

getCode

char getCode()
Returns the data element identifier.

Returns:
char - the data element identifier

setCode

void setCode(char code)
Sets the data element identifier.

Parameters:
code - the data element identifier

getData

String getData()
Returns the data element.

Returns:
String - the data element

setData

void setData(String data)
Sets the data element.

Parameters:
data - the data element

find

boolean find(String pattern)
Returns true if the given regular expression matches a subsequence of the data element. See (@link java.util.regex.Pattern} for regular expressions.

Parameters:
pattern - the regular expression
Returns:
true if the pattern matches, false othewise


Copyright © 2002-2006 Bas Peters. All Rights Reserved.