WIKINDX METHODS

Method:
writeCollectionTable()

Class:
IMPORTCOMMON

Method Call:
include_once("core/file/import/IMPORTCOMMON.php");
$common = new IMPORTCOMMON($this->db);
INT $common->writeCollectionTable(STRING: $collectionTitle, STRING: $wikindxResourceType);

Description:
Write a collection name to the database and return the collection ID. If the collection already exists in the database, that collection's ID is returned, if not, the new collection is written to the database and the new ID returned. A WIKINDX collection is a journal, proceedings title etc. of which a WIKINDX resource is a part. It is not intended for book series but would, for example, be used for the title of a book where a book_article type resource is being imported.

Once you have an ID back from this function, it needs to be written to the collection field of WKX_resource_misc for that resource.

Usage:
Example:
	include_once("core/file/import/IMPORTCOMMON.php");
	$common = new IMPORTCOMMON($this->db);
	$collectionId = $common->writeCollectionTable("An Important Journal", "journal_article");

WIKINDX home      WIKINDX usage      WIKINDX classes