ConverterBibtex Class Reference
[Converter Bibtex Web Service]
Convert Bibtex data into RDF.
More...
Inherits WebService.

Public Member Functions | |
| __construct ($document="", $docmime="application/x-bibtex", $base_uri="http://www.baseuri.com/resource/", $registered_ip, $requester_ip) | |
| Constructor. | |
| __destruct () | |
| pipeline_getResultset () | |
| Generate the converted TSV items using the internal XML representation. | |
| injectDoctype ($xmlDoc) | |
| Inject the DOCType in a XML document. | |
| ws_conneg ($accept, $accept_charset, $accept_encoding, $accept_language) | |
| Do content negotiation as an external Web Service. | |
| pipeline_conneg ($accept, $accept_charset, $accept_encoding, $accept_language) | |
| Do content negotiation as an internal, pipelined, Web Service that is part of a Compound Web Service. | |
| pipeline_getResponseHeaderStatus () | |
| Returns the response HTTP header status. | |
| pipeline_getResponseHeaderStatusMsg () | |
| Returns the response HTTP header status message. | |
| pipeline_getResponseHeaderStatusMsgExt () | |
| Returns the response HTTP header status message extension. | |
| pipeline_serialize () | |
| Serialize the converted UCB Memorial Data content into different serialization formats. | |
| pipeline_serialize_reification () | |
| Non implemented method (only defined). | |
| ws_serialize () | |
| Serialize the converted UCB Memorial Data content into different serialization formats. | |
| ws_respond ($content) | |
| Sends the HTTP response to the requester. | |
| process () | |
| Convert the target document. | |
| pipeline_getError () | |
| Returns the error structure. | |
| xmlEncode ($string) | |
| Encode content to be included in XML files. | |
| jsonEncode ($string) | |
| Encode a string to put in a JSON value. | |
Static Public Attributes | |
| static | $supportedSerializations |
| Supported serialization mime types by this Web service. | |
| static | $data_ini = "/data/" |
| data.ini file folder | |
| static | $network_ini = "/usr/share/structwsf/" |
| network.ini file folder | |
Protected Member Functions | |
| validateQuery () | |
| Validate a query to this web service. | |
Protected Attributes | |
| $db_username = "" | |
| Database user name. | |
| $db_password = "" | |
| Database password. | |
| $db_dsn = "" | |
| Database DSN connection. | |
| $db_host = "localhost" | |
| Database host. | |
| $dtdBaseURL = "" | |
| DTD URL of the web service. | |
| $wsf_graph = "" | |
| The graph where the Web Services Framework description has been indexed. | |
| $wsf_base_url = "" | |
| Base URL of the WSF. | |
| $wsf_base_path = "" | |
| Local server path of the WSF files. | |
| $wsf_local_ip = "" | |
| Local server path of the WSF files. | |
| $wsf_solr_core = "" | |
| The core to use for Solr; "" for no core. | |
| $ontologies_files_folder = "" | |
| Path to the ontologies description files (in RDFS and OWL). | |
| $solr_host = "localhost" | |
| Hostname where to send queries to the Solr instance. | |
| $ontological_structure_folder = "" | |
| Path to the structWSF ontological structure. | |
| $log_table = "SD.WSF.ws_queries_log" | |
| Name of the logging table on the Virtuoso instance. | |
| $solr_auto_commit = FALSE | |
| Auto commit handled by the Solr data management systems. If this parameter is true, then this means Solr will handle the commit operation by itself. If it is false, then the web services will trigger the commit operations. Usually, Auto-commit should be handled by Solr when the size of the dataset is too big, otherwise operation such as delete could take much time. | |
| $uri | |
| The URI of the Authentication Registrar web service. | |
| $title | |
| The Title of the Authentication Registrar web service. | |
| $crud_usage | |
| The CRUD usage of the Authentication Registrar web service. | |
| $endpoint | |
| The endpoint of the Authentication Registrar web service. | |
Private Member Functions | |
| uriEncode ($uri) | |
| Normalize the remaining of a URI. | |
| get_uri_label ($uri) | |
| Get a prefix for a given ontology URI. | |
Private Attributes | |
| $db | |
| Database connection. | |
| $conneg | |
| Conneg object that manage the content negotiation capabilities of the web service. | |
| $dtdURL | |
| URL where the DTD of the XML document can be located on the Web. | |
| $text | |
| Text being converted. | |
| $docmime | |
| Type of the resource being converted. | |
| $bibItems | |
| Parsed TSV data items. | |
| $baseURI | |
| Base URI for the resources being created by this convertion process. | |
| $errorMessages = "" | |
| Error message to report. | |
| $enhancedBibtex = FALSE | |
| Enable the enhanced bibtex parsing. | |
| $requester_ip = "" | |
| IP of the requester. | |
| $registered_ip = "" | |
| Requested IP. | |
| $bibTypes | |
| Mapping between bib item types and bibo classes. | |
| $bibTypesAdditionalProperties | |
| Additional properties for special bib item types. These properties are automatically added when the resource is created for a given type. Example: a "unpublished" bib item type is a bibo:Document with a bibo:status/unpublished status & kind of thesis. | |
| $bibProperties | |
| Mapping of properties. | |
| $bibPropertiesAdditionalObjects | |
| Mapping of additional properties. | |
Detailed Description
Convert Bibtex data into RDF.This class takes Bibtex files as input, convert them into RDF using the BKN Ontology, and output RDF in different formats.
- Todo:
- Implementing the input of RDF and output in Bibtex's format
Definition at line 30 of file ConverterBibtex.php.
Constructor & Destructor Documentation
| ConverterBibtex::__construct | ( | $ | document = "", |
|
| $ | docmime = "application/x-bibtex", |
|||
| $ | base_uri = "http://www.baseuri.com/resource/", |
|||
| $ | registered_ip, | |||
| $ | requester_ip | |||
| ) |
Constructor.
Initialize the Bibtex Converter Web Service
- Parameters:
-
[in] $document Text of a Bibtex document [in] $docmime The mime type of the incoming document to convert [in] $base_uri The base URI to use to create the URIs of the resources created by this web service [in] $registered_ip Target IP address registered in the WSF [in] $requester_ip IP address of the requester
- Returns:
- returns NULL
Definition at line 175 of file ConverterBibtex.php.
References $base_uri, $docmime, $document, $registered_ip, $requester_ip, and WebService::__construct().

| ConverterBibtex::__destruct | ( | ) |
Reimplemented from WebService.
Definition at line 223 of file ConverterBibtex.php.
Referenced by ws_respond().
Member Function Documentation
| ConverterBibtex::get_uri_label | ( | $ | uri | ) | [private] |
Get a prefix for a given ontology URI.
This function return the prefix literal for a given ontologu URI. This is a simple procedure that associate an Ontology URI to its "generally used prefix".
- Attention:
- All the data ingested by a conStruct node has to define a prefix for the ontologies used to describe any data.
- Parameters:
-
[in] $uri is the URI of a class or a property of an ontology
- Returns:
- A string where the class or the property is prefixed with the most commonly used prefix
Definition at line 588 of file ConverterBibtex.php.
References WebService::$uri.
Referenced by pipeline_serialize().
| ConverterBibtex::injectDoctype | ( | $ | xmlDoc | ) |
Inject the DOCType in a XML document.
- Parameters:
-
[in] $xmlDoc The XML document where to inject the doctype
- Returns:
- a XML document with a doctype
Reimplemented from WebService.
Definition at line 462 of file ConverterBibtex.php.
Referenced by pipeline_getResultset().
| WebService::jsonEncode | ( | $ | string | ) | [inherited] |
Encode a string to put in a JSON value.
- Parameters:
-
[in] $string The string to escape
- Returns:
- returns the escaped string
Definition at line 398 of file WebService.php.
Referenced by Sparql::pipeline_serialize(), Search::pipeline_serialize(), DatasetRead::pipeline_serialize(), CrudRead::pipeline_serialize(), Browse::pipeline_serialize(), and AuthLister::pipeline_serialize().
| ConverterBibtex::pipeline_conneg | ( | $ | accept, | |
| $ | accept_charset, | |||
| $ | accept_encoding, | |||
| $ | accept_language | |||
| ) |
Do content negotiation as an internal, pipelined, Web Service that is part of a Compound Web Service.
- Parameters:
-
[in] $accept Accepted mime types (HTTP header) [in] $accept_charset Accepted charsets (HTTP header) [in] $accept_encoding Accepted encodings (HTTP header) [in] $accept_language Accepted languages (HTTP header)
- Returns:
- returns NULL
Reimplemented from WebService.
Definition at line 530 of file ConverterBibtex.php.
References ws_conneg().

| WebService::pipeline_getError | ( | ) | [abstract, inherited] |
Returns the error structure.
- Returns:
- returns the error structure
Reimplemented in AuthLister, AuthRegistrarAccess, AuthRegistrarWs, AuthValidator, Browse, ConverterIrJSON, ConverterTsv, CrudCreate, CrudDelete, CrudRead, CrudUpdate, DatasetCreate, DatasetDelete, DatasetRead, DatasetUpdate, OntologyCreate, Search, and Sparql.
| ConverterBibtex::pipeline_getResponseHeaderStatus | ( | ) |
Returns the response HTTP header status.
- Returns:
- returns the response HTTP header status
Reimplemented from WebService.
Definition at line 543 of file ConverterBibtex.php.
| ConverterBibtex::pipeline_getResponseHeaderStatusMsg | ( | ) |
Returns the response HTTP header status message.
- Returns:
- returns the response HTTP header status message
Reimplemented from WebService.
Definition at line 555 of file ConverterBibtex.php.
| ConverterBibtex::pipeline_getResponseHeaderStatusMsgExt | ( | ) |
Returns the response HTTP header status message extension.
- Returns:
- returns the response HTTP header status message extension
- Note:
- The extension of a HTTP status message is
Reimplemented from WebService.
Definition at line 569 of file ConverterBibtex.php.
| ConverterBibtex::pipeline_getResultset | ( | ) |
Generate the converted TSV items using the internal XML representation.
- Returns:
- a XML document
Reimplemented from WebService.
Definition at line 308 of file ConverterBibtex.php.
References injectDoctype(), and uriEncode().
Referenced by pipeline_serialize(), and ws_serialize().

| ConverterBibtex::pipeline_serialize | ( | ) |
Serialize the converted UCB Memorial Data content into different serialization formats.
- Returns:
- returns the serialized content
Reimplemented from WebService.
Definition at line 682 of file ConverterBibtex.php.
References get_uri_label(), pipeline_getResultset(), and WebService::xmlEncode().
Referenced by ws_serialize().

| ConverterBibtex::pipeline_serialize_reification | ( | ) |
Non implemented method (only defined).
Reimplemented from WebService.
Definition at line 878 of file ConverterBibtex.php.
| ConverterBibtex::process | ( | ) |
Convert the target document.
Reimplemented from WebService.
Definition at line 975 of file ConverterBibtex.php.
| ConverterBibtex::uriEncode | ( | $ | uri | ) | [private] |
Normalize the remaining of a URI.
- Parameters:
-
[in] $uri The remaining of a URI to normalize
- Returns:
- a Normalized remaining URI
Definition at line 258 of file ConverterBibtex.php.
References WebService::$uri.
Referenced by pipeline_getResultset().
| ConverterBibtex::validateQuery | ( | ) | [protected] |
Validate a query to this web service.
- Returns:
- TRUE if valid; FALSE otherwise
Reimplemented from WebService.
Definition at line 243 of file ConverterBibtex.php.
| ConverterBibtex::ws_conneg | ( | $ | accept, | |
| $ | accept_charset, | |||
| $ | accept_encoding, | |||
| $ | accept_language | |||
| ) |
Do content negotiation as an external Web Service.
- Parameters:
-
[in] $accept Accepted mime types (HTTP header) [in] $accept_charset Accepted charsets (HTTP header) [in] $accept_encoding Accepted encodings (HTTP header) [in] $accept_language Accepted languages (HTTP header)
- Returns:
- returns NULL
Reimplemented from WebService.
Definition at line 490 of file ConverterBibtex.php.
References $supportedSerializations.
Referenced by pipeline_conneg().
| ConverterBibtex::ws_respond | ( | $ | content | ) |
Sends the HTTP response to the requester.
- Parameters:
-
[in] $content The content (body) of the response.
- Returns:
- NULL
Reimplemented from WebService.
Definition at line 951 of file ConverterBibtex.php.
References __destruct().

| ConverterBibtex::ws_serialize | ( | ) |
Serialize the converted UCB Memorial Data content into different serialization formats.
- Returns:
- returns the serialized content
Reimplemented from WebService.
Definition at line 890 of file ConverterBibtex.php.
References pipeline_getResultset(), and pipeline_serialize().

| WebService::xmlEncode | ( | $ | string | ) | [inherited] |
Encode content to be included in XML files.
- Parameters:
-
[in] $string The content string to be encoded
- Returns:
- returns the encoded string
Definition at line 383 of file WebService.php.
Referenced by Sparql::pipeline_getResultset(), Search::pipeline_getResultset(), DatasetRead::pipeline_getResultset(), CrudRead::pipeline_getResultset(), ConverterTsv::pipeline_getResultset(), ConverterIrJSON::pipeline_getResultset(), Browse::pipeline_getResultset(), AuthLister::pipeline_getResultset(), Sparql::pipeline_serialize(), Search::pipeline_serialize(), CrudRead::pipeline_serialize(), ConverterTsv::pipeline_serialize(), ConverterIrJSON::pipeline_serialize(), pipeline_serialize(), Browse::pipeline_serialize(), Search::pipeline_serialize_reification(), CrudRead::pipeline_serialize_reification(), Browse::pipeline_serialize_reification(), CrudUpdate::process(), and CrudCreate::process().
Member Data Documentation
ConverterBibtex::$baseURI [private] |
Base URI for the resources being created by this convertion process.
Definition at line 51 of file ConverterBibtex.php.
ConverterBibtex::$bibItems [private] |
ConverterBibtex::$bibProperties [private] |
Initial value:
array ( // Standard BIBTEX "title" => "dcterms:title", "author" => "dcterms:creator", "booktitle" => "dcterms:title", "publisher" => "dcterms:publisher", "year" => "dcterms:date", "month" => "dcterms:date", "isbn" => "bibo:isbn", "editor" => "bibo:editor", "institution" => "dcterms:contributor", "volume" => "bibo:volume", "url" => "bkn:url", "type" => "dcterms:type", "series" => "dcterms:isPartOf", // "school" => "rdfs:seeAlso", "pages" => "bibo:pages", "organization" => "bibo:organizer", "number" => "bibo:number", "note" => "skos:note", "journal" => "dcterms:isPartOf", "edition" => "bibo:edition", "chapter" => "bibo:chapter", "address" => "address:localityName", // "eprint" => "rdfs:seeAlso", "eprint" => "bkn:eprint", "crossref" => "dcterms:isPartOf", "name" => "foaf:name", "homepage" => "foaf:homepage", "last_updated" => "dcterms:modified", "bibliography" => "foaf:page", "honor" => "foaf:page", "born_date" => "foaf:birthdate", "death_date" => "bio:event", "image" => "foaf:page", "memorial" => "foaf:page", "biography" => "foaf:page", "url" => "bkn:url", "author_tex" => "bkn:authorTex", "title_tex" => "bkn:titleTex", "coden" => "bibo:coden", "sici" => "bibo:sici", "mrclass" => "bkn:mrClass", "mrnumber" => "bkn:mrNumber", "arxiv" => "bkn:arxiv", "euclid" => "bkn:euclid", "id_ar" => "bkn:ar", "msc_mr" => "bkn:mscmr", "comment" => "skos:note", "comment_post" => "skos:note", "rev" => "dcterms:modified", "date" => "dcterms:date", "subjectTitle" => "skos:prefLabel", "subjects" => "umbel:isAbout", // "howpublished" => "dcterms:publisher", // "howpublished_ar" => "dcterms:publisher", // Bibsonomy.org BIBTEX extension "biburl" => "bkn:url", "keywords" => "dcterms:subject", "abstract" => "bibo:abstract", "asin" => "bibo:asin", "ean" => "bibo:eanucc13", "doi" => "bibo:doi", "issn" => "bibo:issn", "description" => "dcterms:description")
Definition at line 111 of file ConverterBibtex.php.
ConverterBibtex::$bibPropertiesAdditionalObjects [private] |
Initial value:
array ( // Standard BIBTEX "author" => array ("foaf:Agent", "foaf:name"), "publisher" => array ("foaf:Organization", "foaf:name"), "editor" => array ("foaf:Person", "foaf:name"), "institution" => array ("foaf:Organization", "foaf:name"), "series" => array ("bibo:Series", "dcterms:title"), // "school" => array("foaf:Organization", "foaf:name"), "organization" => array ("foaf:Organization", "foaf:name"), "journal" => array ("bibo:Journal", "dcterms:title"), // "eprint" => array("bibo:Document", "dcterms:title"), "homepage" => array ("bkn:Homepage", "bkn:url"), "honor" => array ("bkn:Honor", "bkn:url"), "image" => array ("bkn:PhotoGallery", "bkn:url"), "memorial" => array ("bkn:Memorial", "bkn:url"), "biography" => array ("bkn:Biography", "bkn:url"), "bibliography" => array ("bkn:Bibliography", "bkn:url"), "death_date" => array ("bio:Death", "bio:date"),)
Definition at line 146 of file ConverterBibtex.php.
ConverterBibtex::$bibTypes [private] |
Initial value:
array ( // Standard BIBTEX "book" => "bibo:Book", "booklet" => "bibo:Book", "misc" => "bibo:Document", "article" => "bibo:Article", "inbook" => "bibo:Chapter", "manual" => "bibo:Manual", "inproceedings" => "bibo:Article", "conference" => "bibo:Article", "unpublished" => "bibo:Document", "masterthesis" => "bibo:Thesis", "phdthesis" => "bibo:Thesis", "proceedings" => "bibo:Proceedings", "techreport" => "bibo:Report", "incollection" => "bibo:BookSection", "heading" => "bibo:Collection", "subject" => "umbel:SubjectConcept", "person" => "foaf:Person")
Definition at line 71 of file ConverterBibtex.php.
ConverterBibtex::$bibTypesAdditionalProperties [private] |
Initial value:
array ( // Standard BIBTEX "unpublished" => array ("bibo:status", "http://purl.org/ontology/bibo/status/unpublished"), "masterthesis" => array ("bibo:degree", "http://purl.org/ontology/bibo/degrees/ma"), "phdthesis" => array ("bibo:degree", "http://purl.org/ontology/bibo/degrees/phd"))
Definition at line 80 of file ConverterBibtex.php.
ConverterBibtex::$conneg [private] |
Conneg object that manage the content negotiation capabilities of the web service.
Definition at line 36 of file ConverterBibtex.php.
WebService::$crud_usage [protected, inherited] |
The CRUD usage of the Authentication Registrar web service.
Definition at line 95 of file WebService.php.
Referenced by AuthRegistrarWs::ws_conneg().
WebService::$data_ini = "/data/" [static, inherited] |
data.ini file folder
Definition at line 34 of file WebService.php.
Referenced by WebService::__construct(), and Logger::__construct().
ConverterBibtex::$db [private] |
WebService::$db_dsn = "" [protected, inherited] |
WebService::$db_host = "localhost" [protected, inherited] |
WebService::$db_password = "" [protected, inherited] |
WebService::$db_username = "" [protected, inherited] |
ConverterBibtex::$docmime [private] |
Type of the resource being converted.
Definition at line 45 of file ConverterBibtex.php.
Referenced by __construct().
WebService::$dtdBaseURL = "" [protected, inherited] |
ConverterBibtex::$dtdURL [private] |
URL where the DTD of the XML document can be located on the Web.
Definition at line 39 of file ConverterBibtex.php.
WebService::$endpoint [protected, inherited] |
The endpoint of the Authentication Registrar web service.
Definition at line 98 of file WebService.php.
ConverterBibtex::$enhancedBibtex = FALSE [private] |
ConverterBibtex::$errorMessages = "" [private] |
WebService::$log_table = "SD.WSF.ws_queries_log" [protected, inherited] |
WebService::$network_ini = "/usr/share/structwsf/" [static, inherited] |
network.ini file folder
Definition at line 37 of file WebService.php.
Referenced by WebService::__construct().
WebService::$ontological_structure_folder = "" [protected, inherited] |
WebService::$ontologies_files_folder = "" [protected, inherited] |
Path to the ontologies description files (in RDFS and OWL).
Definition at line 70 of file WebService.php.
ConverterBibtex::$registered_ip = "" [private] |
ConverterBibtex::$requester_ip = "" [private] |
IP of the requester.
Definition at line 65 of file ConverterBibtex.php.
Referenced by __construct().
WebService::$solr_auto_commit = FALSE [protected, inherited] |
Auto commit handled by the Solr data management systems. If this parameter is true, then this means Solr will handle the commit operation by itself. If it is false, then the web services will trigger the commit operations. Usually, Auto-commit should be handled by Solr when the size of the dataset is too big, otherwise operation such as delete could take much time.
Definition at line 86 of file WebService.php.
WebService::$solr_host = "localhost" [protected, inherited] |
ConverterBibtex::$supportedSerializations [static] |
Initial value:
array ("application/rdf+xml", "application/rdf+n3", "application/*", "text/xml", "application/x-bibtex", "text/*",
"*/*")
Definition at line 57 of file ConverterBibtex.php.
Referenced by ws_conneg().
ConverterBibtex::$text [private] |
WebService::$title [protected, inherited] |
The Title of the Authentication Registrar web service.
Definition at line 92 of file WebService.php.
Referenced by DatasetUpdate::__construct(), and DatasetRead::process().
WebService::$uri [protected, inherited] |
The URI of the Authentication Registrar web service.
Definition at line 89 of file WebService.php.
Referenced by DatasetUpdate::__construct(), DatasetRead::__construct(), DatasetDelete::__construct(), DatasetCreate::__construct(), CrudRead::__construct(), CrudDelete::__construct(), get_uri_label(), Sparql::getNamespace(), Search::getNamespace(), DatasetRead::getNamespace(), CrudRead::getNamespace(), ConverterTsv::getNamespace(), ConverterIrJSON::getNamespace(), Browse::getNamespace(), Sparql::pipeline_getResultset(), Search::pipeline_getResultset(), ConverterTsv::pipeline_getResultset(), ConverterIrJSON::pipeline_getResultset(), Browse::pipeline_getResultset(), ConverterIrJSON::pipeline_serialize(), Search::process(), CrudUpdate::process(), CrudCreate::process(), Browse::process(), AuthRegistrarAccess::process(), DatasetRead::uriEncode(), ConverterTsv::uriEncode(), ConverterIrJSON::uriEncode(), uriEncode(), and AuthRegistrarAccess::uriEncode().
WebService::$wsf_base_path = "" [protected, inherited] |
WebService::$wsf_base_url = "" [protected, inherited] |
WebService::$wsf_graph = "" [protected, inherited] |
The graph where the Web Services Framework description has been indexed.
Definition at line 55 of file WebService.php.
WebService::$wsf_local_ip = "" [protected, inherited] |
WebService::$wsf_solr_core = "" [protected, inherited] |
The documentation for this class was generated from the following file:
