I tried to codify the following comment using OWL API:
<rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
CRECK Modeling Group (Politecnico di Milano)
http://creckmodeling.chem.polimi.it/
Primary Reference Fuels (PRF) + PAH Mechanism
Version 1311, November 2013
Detailed and semidetailed (lumped) mechanism of the pyrolysis,
partial oxidation and combustion Primary Reference Fuels,
including PAH (Polycyclic Aromatic Hydrocarbons) formation up to C20.Kinetic scheme (Low and High temperature): 276 species and 8476 reactions
References
E. Ranzi, A. Frassoldati, S. Granata, T. Faravelli,
Ind. Eng. Chem. Res. 44(14), 5170-5183 (2005), doi: 10.1021/ie049318gT. Bieleveld, A. Frassoldati, A. Cuoci, T. Faravelli, E. Ranzi, U. Niemann K. Seshadri,
Proceedings of the Combustion Institute 32 I, pp. 493-500 (2009), doi:10.116/j.proci.2008.06.214Saggese C., Frassoldati, Cuoci A., Faravelli T., Ranzi,
Combustion and Flame (2013), DOI: 10.1016/j.combustflame.2013.02.013CRECK Modeling Group (Politecnico di Milano)http://creckmodeling.chem.polimi.it/
Version 1311, November 2013
</rdfs:comment>
Unfortunately, it ends up showing me the following comment with empty lines removed:
<rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
CRECK Modeling Group (Politecnico di Milano)http://creckmodeling.chem.polimi.it/
Primary Reference Fuels (PRF) + PAH Mechanism
Version 1311, November 2013
Detailed and semidetailed (lumped) mechanism of the pyrolysis,
partial oxidation and combustion Primary Reference Fuels,
including PAH (Polycyclic Aromatic Hydrocarbons) formation up to C20.
Kinetic scheme (Low and High temperature): 276 species and 8476 reactionsReferences
E. Ranzi, A. Frassoldati, S. Granata, T. Faravelli,
Ind. Eng. Chem. Res. 44(14), 5170-5183 (2005), doi: 10.1021/ie049318g
T. Bieleveld, A. Frassoldati, A. Cuoci, T. Faravelli, E. Ranzi, U. Niemann, K. Seshadri,
Proceedings of the Combustion Institute 32 I, pp. 493-500 (2009), doi:10.1016/j.proci.2008.06.214
Saggese C., Frassoldati, Cuoci A., Faravelli T., Ranzi,
Combustion and Flame (2013), DOI: 10.1016/j.combustflame.2013.02.013
CRECK Modeling Group (Politecnico di Milano)
http://creckmodeling.chem.polimi.it/Version 1311, November 2013
</rdfs:comment>
For encoding the above comment in OWL, I'm using the following method: org.semanticweb.owlapi.model.OWLDataFactory.getOWLLiteral(comment);
The code snippet which is relevant to the problem description is as follows:
/**
* Creates an OWL literal with one of the following data types:</br>
* 1. String.
* 2. Integer, and
* 3. Float.
*
* @param ontoFactory
* @param propertyName
* @param literal
* @return
* @throws OntoException
*/
private OWLLiteral createOWLLiteral(OWLDataFactory ontoFactory, String propertyName, String literal) throws OntoException{
if(propertyName.startsWith(basePathTBox.concat(HASH))){
propertyName = propertyName.replace(basePathTBox.concat(HASH), EMPTY);
}
if(dataPropertyNameVsTypeMap.containsKey(propertyName.toLowerCase())){
if(dataPropertyNameVsTypeMap.get(propertyName.toLowerCase()).equals("string")){
return ontoFactory.getOWLLiteral(literal);
} else if(dataPropertyNameVsTypeMap.get(propertyName.toLowerCase()).equals("integer")){
try{
return ontoFactory.getOWLLiteral(Integer.parseInt(literal));
}catch(NumberFormatException e){
throw new OntoException("The following value is not an integer:"+literal);
}
} else if(dataPropertyNameVsTypeMap.get(propertyName.toLowerCase()).equals("float")){
try{
return ontoFactory.getOWLLiteral(Float.parseFloat(literal));
}catch(NumberFormatException e){
throw new OntoException("The following value is not a float:"+literal);
}
}
}
throw new OntoException("The following data type could not be recognised:"+dataPropertyNameVsTypeMap.get(propertyName.toLowerCase()));
}
I would highly appreciate your help in getting this resolved.