Changeset 53:84b610ea94aa
- Timestamp:
- 01/22/08 13:52:05 (5 years ago)
- Author:
- dtea
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@54
- Message:
-
Modification of RDF file parser (RDFContractUnmarshallerJena.java) to get text between <ucn:lang> and </ucn:lang>.
- Location:
- org/w3c/unicorn/contract
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1
|
r53
|
|
| 1 | | // $Id: RDFContractUnmarshaller.java,v 1.1.1.1 2006-08-31 09:09:20 dleroy Exp $ |
| | 1 | // $Id: RDFContractUnmarshaller.java,v 1.2 2008-01-22 13:52:05 dtea Exp $ |
| 2 | 2 | // Author: Damien LEROY. |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. |
| … |
… |
|
| 25 | 25 | |
| 26 | 26 | public LocalizedString getProvider (); |
| | 27 | |
| | 28 | public String getNameOfLangParameter (); |
| 27 | 29 | |
| 28 | 30 | //ObserverDescription getDescription(); |
-
|
r1
|
r53
|
|
| 53 | 53 | private static Property PROPERTY_REFERENCE = null; |
| 54 | 54 | private static Property PROPERTY_TYPE = null; |
| | 55 | private static Property PROPERTY_LANG = null; |
| 55 | 56 | |
| 56 | 57 | static { |
| … |
… |
|
| 77 | 78 | RDFContractUnmarshallerJena.PROPERTY_REFERENCE = RDFContractUnmarshallerJena.MODEL.getProperty(RDFContractUnmarshallerJena.UCN_NAMESPACE+"reference"); |
| 78 | 79 | RDFContractUnmarshallerJena.PROPERTY_TYPE = RDFContractUnmarshallerJena.MODEL.getProperty("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); |
| | 80 | RDFContractUnmarshallerJena.PROPERTY_LANG = RDFContractUnmarshallerJena.MODEL.getProperty(RDFContractUnmarshallerJena.UCN_NAMESPACE+"lang"); |
| | 81 | |
| 79 | 82 | |
| 80 | 83 | } catch (final MalformedURLException e) { |
| … |
… |
|
| 98 | 101 | private LocalizedString aLocalizedStringHelpLocation = null; |
| 99 | 102 | private LocalizedString aLocalizedStringProvider = null; |
| | 103 | |
| | 104 | // name of parameter lang if observer has one |
| | 105 | private String nameOfLangParameter = null; |
| 100 | 106 | |
| 101 | 107 | public String getID () { |
| … |
… |
|
| 117 | 123 | public LocalizedString getProvider () { |
| 118 | 124 | return this.aLocalizedStringProvider; |
| | 125 | } |
| | 126 | |
| | 127 | public String getNameOfLangParameter () { |
| | 128 | return this.nameOfLangParameter; |
| 119 | 129 | } |
| 120 | 130 | |
| … |
… |
|
| 199 | 209 | this.sID = subject.getProperty(RDFContractUnmarshallerJena.PROPERTY_REFERENCE).getLiteral().getString(); |
| 200 | 210 | |
| | 211 | |
| | 212 | // find and add lang |
| | 213 | for (StmtIterator si = subject.listProperties(RDFContractUnmarshallerJena.PROPERTY_LANG); si.hasNext();) { |
| | 214 | final Literal l = si.nextStatement().getLiteral(); |
| | 215 | this.nameOfLangParameter=l.getString(); |
| | 216 | } |
| | 217 | |
| 201 | 218 | // find and add input method |
| 202 | 219 | for ( |
| … |
… |
|
| 301 | 318 | this.aLocalizedStringHelpLocation.addLocalization(l.getLanguage(), l.getString()); |
| 302 | 319 | } |
| | 320 | |
| 303 | 321 | |
| 304 | 322 | } // find Observer into the RDF graph |