CmUtils::Objects::FieldSet

FieldSets are a collection of one or more Fields. Each Node has a FieldSet associated with it which defines the values stored at the Node.

FieldSet structure

FIELDS
A set of Fields which are part of this FieldSet
NUMVALS
For speed in reading in exnode files, this is the total number of values defined by all Fields in this FieldSet

VERSION

0.51 (20 February 2001)

METHODS

new()

Returns a new FieldSet.

copy()

Returns an identical copy of an existing FieldSet.

addField(Field)

Adds a Field to the list of Fields of this FieldSet. Returns the index of the last Field.

updateField(Field)

Updates a Field in the list of Fields of this FieldSet. Returns the index of the last Field.

deleteField(FieldName)

Deletes Field named FieldName in the FieldSet. Returns the total number of defined Fields in the FieldSet.

getFieldNames([FieldName(s)])

If FieldName(s) are specified, returns a list of names of all Fields with these names that exist in the FieldSet, in the order they are specified. If no argument is given, returns a list of names of ALL Fields, sorted in alphabetical order.

getFields([FieldName(s)])

If FieldName(s) are specified, returns a list of all Fields with these names that exist in the FieldSet, in the order they are specified. If no argument is given, returns a list of ALL Fields, sorted in alphabetical order.

getFieldsMatching([Pattern])

If Pattern is specified, returns a list of all Fields matching /Pattern/i that exist in the FieldSet. If no argument is given, returns a list of ALL Fields, sorted in alphabetical order.

getField(FieldName)

Returns the Field named FieldName from the FieldSet.

numberOfFields()

Returns the number of Fields defined in the FieldSet.

isSame(FieldSet)

Returns True if the FieldSet is the same as the owner FieldSet, otherwise returns False.

numValues([number])

Optional argument sets the number of values in this FieldSet. Returns the number of values in the FieldSet.

list(FH)

List the contents of this FieldSet to the filehandle FH (default to STDOUT). Set the "verbose" flag ($s->verbose(1)) to see extended information.