| 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."); |