This class is aimed to export Data from the library into a well structured implementation of ADMS into Drupal (see Joinup) class DrupalAdapter

 Methods

CheckStatus()

CheckStatus($Input) 

Parameters

$Input

__construct()

__construct() 

This function is used by the usort function to order the object in the $data array

compare_weight(\$object $a, $b) : \-1,0,1

access public

Parameters

$a

\$object

compare by the usort function

$b

Returns

\-1,0,1instead of the compare value

This function needs to be implemented in order to export the data

export(\adms:AdmsObject[] $data, $output, $type) : boolean

access public

Parameters

$data

\adms:AdmsObject[]

data the data (AdmsObject table) which should be exported

$output

$type

Exceptions

\Exception

Returns

boolean

This method loads a table of AdmsObject from an RDF XML file

load(\$object $object) : \adms:AdmsObject[]

access public

Parameters

$object

\$object

the path to the file which should be loaded

Returns

\adms:AdmsObject[]a table of AdmsObject

This method check if a content type is already exisiting in joinup or in the file ta treat and create it if possible

_check_node(\$object $uri, $contenttype) : \the

access private

Parameters

$uri

\$object

the path to the file which should be loaded

$contenttype

Returns

\thenid of the new node or false if can't create it

This method check if an URI is in the correct format

_verifURI(\$object $uri) : true

access private

Parameters

$uri

\$object

the path to the file which should be loaded

Returns

trueor false

This method check if an URL is in the correct format

_verifURL(\$object $url) : true

access private

Parameters

$url

\$object

the path to the file which should be loaded

Returns

trueor false

This method create the drupal node from the data received and check if it's correct @$item $object to convert into drupal node

_verif_node($item) 

access private

Parameters

$item

This function check if at least one term of a vocabulary is fill for the node

_verif_taxo(\$object $term_array, $var_taxo, $property, $contenttype) : \-1,0,1

access public

Parameters

$term_array

\$object

compare by the usort function

$var_taxo

$property

$contenttype

Returns

\-1,0,1instead of the compare value

 Properties

 

$_asset_nodereference

$_asset_nodereference 

 

$_classes

$_classes 

 

$_field_contenttype_asset

$_field_contenttype_asset 

 

$_field_contenttype_distribution

$_field_contenttype_distribution 

 

$_flexi_asset

$_flexi_asset 

 

$_taxo_asset

$_taxo_asset 

 

$_taxo_distribution

$_taxo_distribution 

 

$_taxo_license

$_taxo_license 

 

$_taxo_publisher

$_taxo_publisher 

 

$_taxo_repository

$_taxo_repository 

 

$data

$data 

 

$data_copy

$data_copy 

 

$repository_nid

$repository_nid 

 

$repository_uri

$repository_uri 

 

$right_item

$right_item 

 

$treatment_type

$treatment_type 

 

$user_id

$user_id