Adding existing documents from IDM
Before the introduction of the Document Hub, only the IDM DMS was supported. The <bic_dom>
include still contains these functions, which can be
used to add existing documents from IDM:
- dom.idm.list.documents.by.attributes
-
Syntax: function long dom.idm.list.documents.by.attributes (string idm.doctype, … ) Description: Use this function to retrieve a list of documents from IDM using attributes. Arguments: string idm.doctype: The IDM document type …: A variable number of arguments, containing the name and the value of each attribute Return value: The number of documents found, otherwise -1
- dom.idm.list.documents.by.xquery
-
Syntax: function long dom.idm.list.documents.by.xquery (string i.xquery ) Description: Use this function to retrieve a list of documents from IDM using XQuery. Arguments: string i.xquery: The XQuery string to retrieve a list of documents. See the IDM documentation for the syntax of the XQuery string. Return value: The number of documents found, otherwise -1
- dom.idm.get.document
-
Syntax: function long dom.idm.get.document (string i.pid, string i.filename ref string o.tempfile) Description: Use this function to retrieve one document from IDM and store it as a temporary file. Arguments: string i.pid: The internal IDM document ID string i.filename: The filename (display name) of the IDM document ref string o.tempfile: (Output) The temporary file (including path), which contains the downloaded IDM document Return value: 0 if document retrieved, otherwise -1
- dom.idm.get.document.attribute
-
Syntax: function string dom.idm.get.document.attribute (long i.entry, string i.attribute) Description: Use this function to retrieve the value of a document attribute from IDM. Pre: Call dom.idm.list.documents.by.attributes or dom.idm.list.documents.by.xquery before this method to retrieve the list of documents. Arguments: long i.entry: The index of the IDM document string i.attribute: The name of the attribute which value should be retrieved Return value: The attribute’s value of the document, or empty if an error occurred
- dom.idm.get.document.pid
-
Syntax: function string dom.idm.get.document.pid (long i.entry) Description: Use this function to retrieve an internal ID of a document from IDM. Pre: Call dom.idm.list.documents.by.attributes or dom.idm.list.documents.by.xquery before this method to retrieve the list of documents. Arguments: long i.entry: The index of the IDM document Return value: The ID of the document, or empty if an error occurred
- dom.idm.get.document.filename
-
Syntax: function string dom.idm.get.document.filename (long i.entry) Description: Use this function to retrieve the filename of a document from IDM. Pre: Call dom.idm.list.documents.by.attributes or dom.idm.list.documents.by.xquery before this method to retrieve the list of documents. Arguments: long i.entry: The index of the IDM document Return value: The filename of the document, or empty if an error occurred
- dom.idm.get.document.mimetype
-
Syntax: function string dom.idm.get.document.mimetype (long i.entry) Description: Use this function to retrieve the mime type of a document from IDM. Pre: Call dom.idm.list.documents.by.attributes or dom.idm.list.documents.by.xquery before this method to retrieve the list of documents. Arguments: long i.entry: The index of the IDM document Return value: The mime type of the document, or empty if an error occurred
- dom.idm.get.document.created.by
-
Syntax: function string dom.idm.get.document.created.by(long i.entry) Description: Use this function to retrieve this document attribute: created by. Pre+Arguments: Same as dom.idm.get.document.mimetype Return value: The created by attribute of the document, or empty if an error occurred
- dom.idm.get.document.created.timestamp
-
Syntax: function string dom.idm.get.document.created.timestamp(long i.entry) Description: Use this function to retrieve this document attribute: created timestamp. Pre+Arguments: Same as dom.idm.get.document.mimetype Return value: The created timestamp attribute of the document, or empty if an error occurred
- dom.idm.get.document.last.changed.by
-
Syntax: function string dom.idm.get.document.last.changed.by(long i.entry) Description: Use this function to retrieve this document attribute: changed by. Pre+Arguments: Same as dom.idm.get.document.mimetype Return value: The changed by attribute of the document, or empty if an error occurred
- dom.idm.get.document.last.changed.timestamp
-
Syntax: function string dom.idm.get.document.last.changed.timestamp(long i.entry) Description: Use this function to retrieve this document attribute: changed timestamp. Pre+Arguments: Same as dom.idm.get.document.mimetype Return value: The changed timestamp attribute of the document, or empty if an error occurred
- dom.add.document.to.distribution
-
Syntax: function long dom.add.document.to.distribution (string i.tempfile, string i.name, string i.mimetype) Description: This function adds an existing document from IDM to the list of distributions. Arguments: string i.tempfile: The name of the IDM document to add (including path) string i.name: The display name of the IDM document to add string i.mimetype: The mime type of the IDM document to add Return value: 0 in case of success, otherwise -1