IsisMap Class Reference

Inheritance diagram for IsisMap:
IsisReader IsisConnector IsisFinder IsisAudit

List of all members.

Public Member Functions

 getMainItemName ($field)
 getSubfieldList ($field)
 getMap ($field, $subfield=NULL)
 getMapType ($field)
 fieldHasMap ($field)
 subfieldHasMap ($field, $subfield)
 getSubfieldKey ($field, $subfield)
 getItemKey ($field, $item)
 getFieldKey ($field)
 getFieldArray ($field_key)
 getSubfieldName ($field, $subfield_key, $by_key=FALSE)
 getSubfieldNames ($field_key)
 getFieldName ($field_key)
 getFieldNames ()
 getFullMap ($field)
 getAttributes ($field, $subfield=null)
 getDeniedCombinations ($field)

Static Public Member Functions

static methodName ($type)
static normalizeFieldName ($name)
static mapName ($name)

Detailed Description

Provides mappings and schema functionalities around Cinisis.


Member Function Documentation

IsisMap::fieldHasMap ( field  ) 

Check on an ISIS schema whether a field has a map.

Parameters:
$field Field array.
Returns:
TRUE if field has a map, FALSE otherwise.
IsisMap::getAttributes ( field,
subfield = null 
)

Get attributes based on field and subfield.

Parameters:
$field Field data from ISIS database schema.
$subfield Subfield name.
Returns:
Attributes.
IsisMap::getDeniedCombinations ( field  ) 

Defines the denied field combinations.

Parameters:
$field Field data from ISIS database schema.
Returns:
Denied field combinations.

Sample denied combination.

$sample = array( 0 => array('a', 'b', 'c'), // a AND b AND c OR 1 => array('a', 'c', '!d'), // a AND b BUT WITHOUT d OR 2 => array('a', 'b', '*'), // a AND b AND any other item OR 3 => array('*2'), // ANY two items together OR 4 => array('main', '*'), // main AND ANY other item OR );

IsisMap::getFieldArray ( field_key  ) 

Get the array which defines a field.

Parameters:
$field_key Field key.
Returns:
Field array.
IsisMap::getFieldKey ( field  ) 

Get the key of a field entry.

Parameters:
$field Field array.
Returns:
Field key.
IsisMap::getFieldName ( field_key  ) 

Get a field name.

Parameters:
$field_key Field key.
Returns:
Field name.
IsisMap::getFieldNames (  ) 

Get all field names.

Returns:
Array with field names.
IsisMap::getFullMap ( field  ) 

Get the full map.

Parameters:
$field Field key.
Returns:
Array with full map or false if there is no map.
IsisMap::getItemKey ( field,
item 
)

Get the item key.

Parameters:
$field Field array.
$item Item name.
Returns:
Item key.
IsisMap::getMainItemName ( field  ) 

Get the main field name.

Parameters:
$field Field data from ISIS database schema.
Returns:
Main field name.
IsisMap::getMap ( field,
subfield = NULL 
)

Determine which model field an ISIS db field should be mapped to. When importing an ISIS database to another system, a mapping provided in the database schema can be used to put the originating entries (fields and subfields) in the right place at the destination database.

Map format:

map: type: relation

map: type: value field: dest subfields: a: dest b: dest

Examples:

map: type: Performer

map: type: value field: title subfields: a: subtitle

Parameters:
$field Field array.
$subfield Subfield name.
Returns:
A map destination to the field or subfield.
IsisMap::getMapType ( field  ) 

Get the mapping type of a given field.

Parameters:
$field Field array.
Returns:
The mapping type.
IsisMap::getSubfieldKey ( field,
subfield 
)

Get the key of a subfield entry.

Parameters:
$field Field array.
$subfield Subfield name.
Returns:
Subfield key.
IsisMap::getSubfieldList ( field  ) 

Get the list of subfields from a given field.

Parameters:
$field Field array.
IsisMap::getSubfieldName ( field,
subfield_key,
by_key = FALSE 
)

Get a subfield name.

Parameters:
$field Field name or key.
$subfield_key Subfield key.
$by_key Set to true if you're passing the field key instead of it's name.
Returns:
Subfield name.
IsisMap::getSubfieldNames ( field_key  ) 

Get all subfield names.

Parameters:
$field_key Field key.
Returns:
Array with subfield names.
static IsisMap::mapName ( name  )  [static]

Build a map name.

Parameters:
$name Field name
Returns:
Map name
static IsisMap::methodName ( type  )  [static]

Guess a method name from a type.

Parameters:
$type Mapping type.
Returns:
Method name.
static IsisMap::normalizeFieldName ( name  )  [static]

Normalize field names.

Parameters:
$name Field name
Returns:
Normalized field name
IsisMap::subfieldHasMap ( field,
subfield 
)

Check on an ISIS schema whether a subfield has a map.

Parameters:
$field Field array.
$subfield Subfield name.
Returns:
TRUE if subfield has a map, FALSE otherwise.

The documentation for this class was generated from the following file:
 All Classes Functions Variables
Generated on Mon Sep 20 13:53:32 2010 for Cinisis Database Reader by  doxygen 1.6.3