protected function addLanguageToOntology()
    {
        
        $this->outVerbose("Importing RDF language description '" . $this->options['language'] . "' to ontology...");
        
        // RDF Language Descriptions are stored in the tao meta-extension locales.
        $expectedDescriptionPath = $this->buildLanguagePath('tao', $this->options['language']) . '/lang.rdf';
        
        if (file_exists($expectedDescriptionPath)){
            if (is_readable($expectedDescriptionPath)){
                
                // Let's remove any instance of the language description before inserting the new one.
                $taoNS = 'http://www.tao.lu/Ontologies/TAO.rdf#';
                $expectedLangUri = $taoNS . 'Lang' . $this->options['language'];
                $lgDescription = new core_kernel_classes_Resource($expectedLangUri);
                
                if ($lgDescription->exists()){
                    $lgDescription->delete();
                    $this->outVerbose("Existing RDF Description language '" . $this->options['language'] . "' deleted.");
                }
                
                $generisAdapterRdf = new tao_helpers_data_GenerisAdapterRdf();
                if (true === $generisAdapterRdf->import($expectedDescriptionPath, null, LOCAL_NAMESPACE)){
                    $this->outVerbose("RDF language description '" . $this->options['language'] . "' successfully imported.");
                }else{
                    $this->err("An error occured while importing the RDF language description '" . $this->options['language'] . "'.", true);
                }
                
            }else{
                $this->err("RDF language description (lang.rdf) cannot be read in meta-extension 'tao' for language '" . $this->options['language'] . "'.", true);
            }
        }else{
            $this->err("RDF language description (lang.rdf) not found in meta-extension 'tao' for language '" . $this->options['language'] . "'.", true);
        }
        
        
        $this->outVerbose("RDF language description '" . $this->options['language'] . "' added to ontology.");
        
    }
protected function addLanguageToOntology()
    {
        
        $this->outVerbose("Importing RDF language description '" . $this->options['language'] . "' to ontology...");
        
        // RDF Language Descriptions are stored in the tao meta-extension locales.
        $expectedDescriptionPath = $this->buildLanguagePath('tao', $this->options['language']) . '/lang.rdf';
        
        if (file_exists($expectedDescriptionPath)){
            if (is_readable($expectedDescriptionPath)){
                
                // Let's remove any instance of the language description before inserting the new one.
                $taoNS = 'http://www.tao.lu/Ontologies/TAO.rdf#';
                $expectedLangUri = $taoNS . 'Lang' . $this->options['language'];
                $lgDescription = new core_kernel_classes_Resource($expectedLangUri);
                
                if ($lgDescription->exists()){
                    $lgDescription->delete();
                    $this->outVerbose("Existing RDF Description language '" . $this->options['language'] . "' deleted.");
                }
                
                $generisAdapterRdf = new tao_helpers_data_GenerisAdapterRdf();
                if (true === $generisAdapterRdf->import($expectedDescriptionPath, null, LOCAL_NAMESPACE)){
                    $this->outVerbose("RDF language description '" . $this->options['language'] . "' successfully imported.");
                }else{
                    $this->err("An error occured while importing the RDF language description '" . $this->options['language'] . "'.", true);
                }
                
            }else{
                $this->err("RDF language description (lang.rdf) cannot be read in meta-extension 'tao' for language '" . $this->options['language'] . "'.", true);
            }
        }else{
            $this->err("RDF language description (lang.rdf) not found in meta-extension 'tao' for language '" . $this->options['language'] . "'.", true);
        }
        
        
        $this->outVerbose("RDF language description '" . $this->options['language'] . "' added to ontology.");
        
    }
protected function addLanguageToOntology ( ) { $ this -> outVerbose ( "Importing RDF language description '" . $ this -> options [ 'language' ] . "' to ontology..." ) ; // RDF Language Descriptions are stored in the tao meta-extension locales. $ expectedDescriptionPath = $ this -> buildLanguagePath ( 'tao' , $ this -> options [ 'language' ] ) . '/lang.rdf' ; if ( file_exists ( $ expectedDescriptionPath ) ) { if ( is_readable ( $ expectedDescriptionPath ) ) { // Let's remove any instance of the language description before inserting the new one. $ taoNS = 'http://www.tao.lu/Ontologies/TAO.rdf#' ; $ expectedLangUri = $ taoNS . 'Lang' . $ this -> options [ 'language' ] ; $ lgDescription = new core_kernel_classes_Resource ( $ expectedLangUri ) ; if ( $ lgDescription -> exists ( ) ) { $ lgDescription -> delete ( ) ; $ this -> outVerbose ( "Existing RDF Description language '" . $ this -> options [ 'language' ] . "' deleted." ) ; } $ generisAdapterRdf = new tao_helpers_data_GenerisAdapterRdf ( ) ; if ( true === $ generisAdapterRdf -> import ( $ expectedDescriptionPath , null , LOCAL_NAMESPACE ) ) { $ this -> outVerbose ( "RDF language description '" . $ this -> options [ 'language' ] . "' successfully imported." ) ; } else { $ this -> err ( "An error occured while importing the RDF language description '" . $ this -> options [ 'language' ] . "'." , true ) ; } } else { $ this -> err ( "RDF language description (lang.rdf) cannot be read in meta-extension 'tao' for language '" . $ this -> options [ 'language' ] . "'." , true ) ; } } else { $ this -> err ( "RDF language description (lang.rdf) not found in meta-extension 'tao' for language '" . $ this -> options [ 'language' ] . "'." , true ) ; } $ this -> outVerbose ( "RDF language description '" . $ this -> options [ 'language' ] . "' added to ontology." ) ; }
Add the requested language in the ontology. It will used the parameters
the command line for logic.

@access protected
@author Joel Bout, <joel.bout@tudor.lu>
@return void
Add the requested language in the ontology . It will used the parameters the command line for logic .