|
|
@@ -62,22 +62,30 @@ function get_publication_details($document_reference) { |
|
|
|
$json = json_decode($response); |
|
|
|
|
|
|
|
// For each invention title, check if it's in the original language |
|
|
|
foreach ($json->{'ops:world-patent-data'}->{'exchange-documents'}->{'exchange-document'}->{'bibliographic-data'}->{'invention-title'} as $invention_title){ |
|
|
|
if (isset($json->{'ops:world-patent-data'}->{'exchange-documents'}->{'exchange-document'}->{'bibliographic-data'}->{'invention-title'})){ |
|
|
|
|
|
|
|
if ((isset($invention_title->{'@lang'})) && ($invention_title->{'@lang'} === 'ol')){ |
|
|
|
foreach ($json->{'ops:world-patent-data'}->{'exchange-documents'}->{'exchange-document'}->{'bibliographic-data'}->{'invention-title'} as $invention_title){ |
|
|
|
|
|
|
|
$output['original_title'] = $invention_title->{'$'}; |
|
|
|
if ((isset($invention_title->{'@lang'})) && ($invention_title->{'@lang'} === 'ol')){ |
|
|
|
|
|
|
|
$output['original_title'] = $invention_title->{'$'}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// For each abstract, check if it's in the original language |
|
|
|
foreach ($json->{'ops:world-patent-data'}->{'exchange-documents'}->{'exchange-document'}->{'abstract'} as $abstract){ |
|
|
|
if (isset($json->{'ops:world-patent-data'}->{'exchange-documents'}->{'exchange-document'}->{'abstract'})){ |
|
|
|
|
|
|
|
foreach ($json->{'ops:world-patent-data'}->{'exchange-documents'}->{'exchange-document'}->{'abstract'} as $abstract){ |
|
|
|
|
|
|
|
if ((isset($abstract->{'@lang'})) && ($abstract->{'@lang'} === 'ol')){ |
|
|
|
|
|
|
|
if ((isset($abstract->{'@lang'})) && ($abstract->{'@lang'} === 'ol')){ |
|
|
|
$output['original_abstract'] = $abstract->p->{'$'}; |
|
|
|
|
|
|
|
$output['original_abstract'] = $abstract->p->{'$'}; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|