- From: Denis Tea via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 22 Jan 2008 13:51:52 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/org/w3c/unicorn/contract In directory hutz:/tmp/cvs-serv14556/org/w3c/unicorn/contract Modified Files: RDFContractUnmarshallerJena.java Log Message: Modification of RDF file parser (RDFContractUnmarshallerJena.java) to get text between <ucn:lang> and </ucn:lang>. Index: RDFContractUnmarshallerJena.java =================================================================== RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/contract/RDFContractUnmarshallerJena.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- RDFContractUnmarshallerJena.java 31 Aug 2006 09:09:21 -0000 1.1.1.1 +++ RDFContractUnmarshallerJena.java 22 Jan 2008 13:51:50 -0000 1.2 @@ -52,6 +52,7 @@ private static Property PROPERTY_PARAMETERNAME = null; private static Property PROPERTY_REFERENCE = null; private static Property PROPERTY_TYPE = null; + private static Property PROPERTY_LANG = null; static { try { @@ -76,6 +77,8 @@ RDFContractUnmarshallerJena.PROPERTY_PROVIDER = RDFContractUnmarshallerJena.MODEL.getProperty(RDFContractUnmarshallerJena.UCN_NAMESPACE+"provider"); RDFContractUnmarshallerJena.PROPERTY_REFERENCE = RDFContractUnmarshallerJena.MODEL.getProperty(RDFContractUnmarshallerJena.UCN_NAMESPACE+"reference"); RDFContractUnmarshallerJena.PROPERTY_TYPE = RDFContractUnmarshallerJena.MODEL.getProperty("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); + RDFContractUnmarshallerJena.PROPERTY_LANG = RDFContractUnmarshallerJena.MODEL.getProperty(RDFContractUnmarshallerJena.UCN_NAMESPACE+"lang"); + } catch (final MalformedURLException e) { RDFContractUnmarshallerJena.logger.error("MalformedURLException : "+e.getMessage(), e); @@ -97,6 +100,9 @@ private LocalizedString aLocalizedStringDescription = null; private LocalizedString aLocalizedStringHelpLocation = null; private LocalizedString aLocalizedStringProvider = null; + + // name of parameter lang if observer has one + private String nameOfLangParameter = null; public String getID () { return this.sID; @@ -117,6 +123,10 @@ public LocalizedString getProvider () { return this.aLocalizedStringProvider; } + + public String getNameOfLangParameter () { + return this.nameOfLangParameter; + } /** * Map of different input method handle by the observer. @@ -198,6 +208,13 @@ this.sID = subject.getProperty(RDFContractUnmarshallerJena.PROPERTY_REFERENCE).getLiteral().getString(); + + // find and add lang + for (StmtIterator si = subject.listProperties(RDFContractUnmarshallerJena.PROPERTY_LANG); si.hasNext();) { + final Literal l = si.nextStatement().getLiteral(); + this.nameOfLangParameter=l.getString(); + } + // find and add input method for ( StmtIterator aStatementIterator = @@ -300,6 +317,7 @@ } this.aLocalizedStringHelpLocation.addLocalization(l.getLanguage(), l.getString()); } + } // find Observer into the RDF graph
Received on Tuesday, 22 January 2008 13:52:03 UTC