- From: Jean-Guilhem Rouel via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 28 Aug 2009 16:11:43 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/parser
In directory hutz:/tmp/cvs-serv23734/src/org/w3c/unicorn/response/parser
Modified Files:
DefaultParser.java
Log Message:
removed some warnings
updated tasklist a bit
Index: DefaultParser.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/parser/DefaultParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- DefaultParser.java 28 Aug 2009 12:40:07 -0000 1.2
+++ DefaultParser.java 28 Aug 2009 16:11:41 -0000 1.3
@@ -14,7 +14,6 @@
import org.apache.commons.logging.LogFactory;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException;
import org.w3.unicorn.observationresponse.ObservationresponseDocument;
import org.w3.unicorn.observationresponse.ObservationresponseDocument.Observationresponse;
@@ -101,13 +100,13 @@
if (result != null) {
org.w3.unicorn.observationresponse.WarningsDocument.Warnings warnings = result
.getWarnings();
- if (warnings != null && warnings.getWarninglistArray() != null) {
+ if (warnings != null && warnings.getWarninglistList() != null) {
for (org.w3.unicorn.observationresponse.WarninglistDocument.Warninglist wl : warnings
- .getWarninglistArray()) {
+ .getWarninglistList()) {
String lang = warnings.getLang();
Result r = new Result(lang, wl.getUri());
for (org.w3.unicorn.observationresponse.WarningDocument.Warning w : wl
- .getWarningArray()) {
+ .getWarningList()) {
r.getWarnings().add(swap(w, lang));
}
res.addResult(r);
@@ -116,13 +115,12 @@
org.w3.unicorn.observationresponse.ErrorsDocument.Errors errors = result
.getErrors();
- if (errors != null && errors.getErrorlistArray() != null) {
+ if (errors != null && errors.getErrorlistList() != null) {
for (org.w3.unicorn.observationresponse.ErrorlistDocument.Errorlist el : errors
- .getErrorlistArray()) {
+ .getErrorlistList()) {
String lang = errors.getLang();
Result r = new Result(errors.getLang(), el.getUri());
- for (org.w3.unicorn.observationresponse.ErrorDocument.Error e : el
- .getErrorArray()) {
+ for (org.w3.unicorn.observationresponse.ErrorDocument.Error e : el.getErrorList()) {
r.getErrors().add(swap(e, lang));
}
res.addResult(r);
@@ -131,13 +129,13 @@
org.w3.unicorn.observationresponse.InformationsDocument.Informations informations = result
.getInformations();
- if (informations != null && informations.getInfolistArray() != null) {
+ if (informations != null && informations.getInfolistList() != null) {
String lang = informations.getLang();
for (org.w3.unicorn.observationresponse.InfolistDocument.Infolist il : informations
- .getInfolistArray()) {
+ .getInfolistList()) {
Result r = new Result(informations.getLang(), il.getUri());
for (org.w3.unicorn.observationresponse.InfoDocument.Info i : il
- .getInfoArray()) {
+ .getInfoList()) {
r.getInfos().add(swap(i, lang));
}
res.addResult(r);
@@ -183,12 +181,12 @@
// just don't set the level. Or set it to 0?
}
try {
- y.setMessage(swapListMessage(x.getMessageArray(), lang));
+ y.setMessage(swapListMessage(x.getMessageList(), lang));
} catch(XmlValueOutOfRangeException e) {
// just don't set the message. Or set it to ""?
}
try {
- y.setLongmessage(swapListLongmessage(x.getLongmessageArray(), lang));
+ y.setLongmessage(swapListLongmessage(x.getLongmessageList(), lang));
} catch(XmlValueOutOfRangeException e) {
// just don't set the longmessage. Or set it to ""?
}
@@ -229,12 +227,12 @@
// just don't set the type. Or set it to 0?
}
try {
- y.setMessage(swapListMessage(x.getMessageArray(), lang));
+ y.setMessage(swapListMessage(x.getMessageList(), lang));
} catch(XmlValueOutOfRangeException e) {
// just don't set the message. Or set it to ""?
}
try {
- y.setLongmessage(swapListLongmessage(x.getLongmessageArray(), lang));
+ y.setLongmessage(swapListLongmessage(x.getLongmessageList(), lang));
} catch(XmlValueOutOfRangeException e) {
// just don't set the longmessage. Or set it to ""?
}
@@ -257,8 +255,8 @@
y.setLine(x.getLine());
y.setColumn(x.getColumn());
y.setContext(x.getContext());
- y.setMessage(swapListMessage(x.getMessageArray(), lang));
- y.setLongmessage(swapListLongmessage(x.getLongmessageArray(), lang));
+ y.setMessage(swapListMessage(x.getMessageList(), lang));
+ y.setLongmessage(swapListLongmessage(x.getLongmessageList(), lang));
return y;
}
@@ -272,7 +270,7 @@
* The language of the list.
* @return The new list of localized strings.
*/
- private List<LocalizedString> swapListMessage(String[] x, String lang) {
+ private List<LocalizedString> swapListMessage(List<String> x, String lang) {
List<LocalizedString> y = new ArrayList<LocalizedString>();
for (Object ox : x) {
String cox = (String) ox;
@@ -293,7 +291,7 @@
* @return The list of Longmessage objects.
*/
private List<Longmessage> swapListLongmessage(
- org.w3.unicorn.observationresponse.LongmessageDocument.Longmessage[] x,
+ List<org.w3.unicorn.observationresponse.LongmessageDocument.Longmessage> x,
String lang) {
List<Longmessage> y = new ArrayList<Longmessage>();
for (Object ox : x) {
Received on Friday, 28 August 2009 16:11:58 UTC