Properties

$resourceId

$resourceId : 

int

Type

Methods

__construct()

__construct() : 

IMPORT

Returns

checkDuplicates()

checkDuplicates(  noSort,   title,   subtitle,   type) : 

Check for duplicate title/resourceType

If the session variable 'import_ImportDuplicates' is TRUE, the function quits immediately. NoSort, Title, Subtitle and resource type must match.

Parameters

noSort

(A word like 'the', 'a' or translated equivalents that is at the start of the raw title)

title
subtitle
type

Returns

TRUE if resource already exists, FALSE if not.

printDuplicates()

printDuplicates(  numDiscarded, mixed||string|int  titlesDiscarded) : 

Print a list of discarded resources.

Parameters

numDiscarded

Num. resources discarded

mixed||string|int titlesDiscarded

Titles of discarded resources

Returns

splitTitle()

splitTitle( title) : mixed||string|int

split title into WIKINDX component parts (noSort, title : subtitle)

title / subtitle split is calculated on the session variable 'import_TitleSubtitleSeparator'.

Parameters

title

Returns

mixed||string|int —

(noSort, title, subtitle)

keywordSeparator()

keywordSeparator() : 

Select box for specifying keyword separation character in source bibliography

Returns

titleSubtitleSeparator()

titleSubtitleSeparator() : 

Select box for specifying title/subtitle separation character in source bibliography

Returns

bibliographySelect()

bibliographySelect() : 

Selext box for selecting user bibliographies to import into

Returns

writeResourceTable()

writeResourceTable(mixed||string|int  fields, mixed||string|int  values) : 

Write the resource table

Parameters

mixed||string|int fields
mixed||string|int values

Returns

New resource Id

writeResourcemiscTable()

writeResourcemiscTable(mixed||string|int  fields, mixed||string|int  values) : 

Write the resource_misc table

Parameters

mixed||string|int fields
mixed||string|int values

Returns

writeCreatorTables()

writeCreatorTables( creators) : 

Write creator and resource_creator tables

Parameters

creators

Returns

writePublisherTable()

writePublisherTable(  name,   location,   wkType) : 

Write the publisher table

Parameters

name

Publisher name

location

Publisher location

wkType

wikindx resource type

Returns

Publisher ID

writeCollectionTable()

writeCollectionTable(  title,   titleShort,   wkType) : 

Write collection table

Parameters

title

Collection title

titleShort

Collection short title

wkType

wikindx resource type

Returns

Collection ID

writeResourceTimestampTable()

writeResourceTimestampTable() : 

writeResourceTimestampTable - write timestamp to resource_timestamp table an add blank statistics row

Returns

writePageTable()

writePageTable(mixed||string|int  fields, mixed||string|int  values) : 

Wite resource_page table

Parameters

mixed||string|int fields
mixed||string|int values

Returns

writeYearTable()

writeYearTable(mixed||string|int  fields, mixed||string|int  values) : 

Wite resource_year table

Parameters

mixed||string|int fields
mixed||string|int values

Returns

writeResourcetextTable()

writeResourcetextTable(  notes,   abstract,   url = FALSE) : 

Write resource_text table

Parameters

notes
abstract
url

Default is FALSE

Returns

writeKeywordTables()

writeKeywordTables(mixed||string|int  keywords) : 

Write keyword tables

Parameters

mixed||string|int keywords

Returns

writeResourcecategoryTable()

writeResourcecategoryTable(  categories) : 

Write resource_category table

Parameters

categories

Comma-delimited list of category IDs. At the very least, this must comprise '1' (the 'General' category)

Returns

writeResourcecustomTable()

writeResourcecustomTable(  string,   customId) : 

Write resource_custom tables

Parameters

string
customId

Returns

writeImportrawTable()

writeImportrawTable(mixed||string|int  rejectedArray,   bibtexStringId = FALSE,   importType = FALSE) : 

writeImportRawTable - write import_raw table

Parameters

mixed||string|int rejectedArray

Rejected input values for this resource

bibtexStringId

ID of the BibTeX string in the bibtex_string table. Default is FALSE

importType

Default is FALSE

Returns

writeUserbibliographyresourceTable()

writeUserbibliographyresourceTable(  bibId) : 

Write user_bibliography_resource table

Parameters

bibId

Comma-delimited string of user_bibliography ids

Returns

writeTagTable()

writeTagTable() : 

writeTagTable - write import tag to tag table

Returns

lastAutoId

writeBibtexKey()

writeBibtexKey() : 

Write the bibtexKey field for a new resource

Returns

tidyTables()

tidyTables() : 

Tidy up the database by checking for creators etc. that do not have resources.

This should be called just once at the end of multiple inserts.

Returns

promptFieldNames()

promptFieldNames(mixed||string|int  entries, mixed||string|int  inputTypes, mixed||string|int  map, mixed||string|int  invalidFieldNames,   strings = FALSE,   importType = FALSE) : mixed||string|int

promptFieldNames - print field name mapping to browser as an intermediate stage when invalid field names are found in the input.

This allows users to map them to any existing custom fields.

Parameters

mixed||string|int entries
mixed||string|int inputTypes
mixed||string|int map
mixed||string|int invalidFieldNames
strings

array|FALSE. Default is FALSE

importType

Returns

mixed||string|int —

1st element is error message or FALSE, 2nd element is string for display

getUnrecognisedFields()

getUnrecognisedFields() : mixed||string|int

getUnrecognised fields

Follows from prompting for field mapping

Returns

mixed||string|int —

1st element is error message or FALSE, 2nd element is array of custom fields, 3rd element is array of unrecognized fields

collectionDefaults()

collectionDefaults() : 

Set collectionDefault column in the collections table

Returns