Changeset 962:a0a96f98fc45

Show
Ignore:
Timestamp:
03/05/10 09:48:31 (3 years ago)
Author:
tgambet
Branch:
default
convert_revision:
svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@963
Message:

Removed RDFUnmarshallerJena initialization

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/org/w3c/unicorn/Framework.java

    r959 r962  
    1 // $Id: Framework.java,v 1.30 2010-03-04 18:18:21 tgambet Exp $ 
     1// $Id: Framework.java,v 1.31 2010-03-05 09:48:31 tgambet Exp $ 
    22// Author: Damien LEROY & Thomas GAMBET. 
    33// (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. 
     
    4040import org.w3c.unicorn.exceptions.InitializationFailedException; 
    4141import org.w3c.unicorn.exceptions.UnknownParserException; 
    42 import org.w3c.unicorn.tasklist.RDFUnmarshallerJena; 
    4342import org.w3c.unicorn.tasklist.Task; 
    4443import org.w3c.unicorn.tasklist.TaskListUnmarshallerBeans; 
     
    5251import org.w3c.unicorn.util.UCNProperties; 
    5352import org.w3c.unicorn.response.Response; 
    54  
    55 import com.hp.hpl.jena.rdf.model.Model; 
    5653 
    5754/** 
     
    222219                        } 
    223220                }); 
    224                  
    225                 // Initialize RDFUnmarshallerJena 
    226                 logger.debug("-------------------------------------------------------"); 
    227                 logger.debug("Initializing RDFUnmarshallerJena"); 
    228                  
    229                 try { 
    230                         FileInputStream fis = new FileInputStream(Property.get("TASKLIST_RDF_MODEL")); 
    231                         RDFUnmarshallerJena.getModel().read(fis, null); 
    232                         logger.debug("> Used model: " + Property.get("TASKLIST_RDF_MODEL")); 
    233                 } catch (FileNotFoundException e) { 
    234                         logger.fatal("The tasklist rdf model could not be found: " + Property.get("TASKLIST_RDF_MODEL")); 
    235                         return; 
    236                 } 
    237                 Model model = RDFUnmarshallerJena.getModel(); 
    238                 String namespace = RDFUnmarshallerJena.getUcnNamespace(); 
    239                 // define resource use to find information into the RDF graph 
    240                 RDFUnmarshallerJena.setRESOURCE_TASK(model.getProperty( 
    241                                 namespace + "Task")); 
    242                 // define property use to find information into the RDF graph 
    243                 RDFUnmarshallerJena.setPROPERTY_DESCRIPTION(model.getProperty( 
    244                                 namespace + "description")); 
    245                 RDFUnmarshallerJena.setPROPERTY_HASPARAMETER(model.getProperty( 
    246                                 namespace + "hasParameter")); 
    247                 RDFUnmarshallerJena.setPROPERTY_HASVALUE(model.getProperty( 
    248                                 namespace + "hasValue")); 
    249                 RDFUnmarshallerJena.setPROPERTY_LONGNAME(model.getProperty( 
    250                                 namespace + "longName")); 
    251                 RDFUnmarshallerJena.setPROPERTY_PARAMETER(model.getProperty( 
    252                                 namespace + "parameter")); 
    253                 RDFUnmarshallerJena.setPROPERTY_REFERENCE(model.getProperty( 
    254                                 namespace + "reference")); 
    255                 RDFUnmarshallerJena.setPROPERTY_DEFAULT(model.getProperty( 
    256                                 namespace + "default")); 
    257                 RDFUnmarshallerJena.setPROPERTY_TYPE(model.getProperty( 
    258                                 "http://www.w3.org/1999/02/22-rdf-syntax-ns#type")); 
    259                 RDFUnmarshallerJena.setPROPERTY_VALUE(model.getProperty( 
    260                                 namespace + "value")); 
    261                 logger.info("OK - RDFUnmarshallerJena successfully initialized."); 
    262221        } 
    263222