2006/unicorn/src/org/w3c/unicorn/response Longmessage.java,NONE,1.1.2.1 Code.java,NONE,1.1.2.1 Result.java,NONE,1.1.2.1 Response.java,NONE,1.1.2.1 Info.java,NONE,1.1.2.1 Warning.java,NONE,1.1.2.1 Inline.java,NONE,1.1.2.1 Img.java,NONE,1.1.2.1 Error.java,NONE,1.1.2.1 A.java,NONE,1.1.2.1

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response
In directory hutz:/tmp/cvs-serv2609/src/org/w3c/unicorn/response

Added Files:
      Tag: dev2
	Longmessage.java Code.java Result.java Response.java Info.java 
	Warning.java Inline.java Img.java Error.java A.java 
Log Message:
all initialization actions in Init.java
+ compatibility windows/linux

--- NEW FILE: Img.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

import java.math.BigInteger;

/**
 * <p>
 * Java class for img element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;img&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
 *         &lt;attribute name=&quot;alt&quot; use=&quot;required&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}string&quot; /&gt;
 *         &lt;attribute name=&quot;height&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}nonNegativeInteger&quot; /&gt;
 *         &lt;attribute name=&quot;longdesc&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}anyURI&quot; /&gt;
 *         &lt;attribute name=&quot;name&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}NMTOKEN&quot; /&gt;
 *         &lt;attribute name=&quot;src&quot; use=&quot;required&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}anyURI&quot; /&gt;
 *         &lt;attribute name=&quot;width&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}nonNegativeInteger&quot; /&gt;
 *       &lt;/restriction&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */
public class Img {

	protected String alt;

	protected BigInteger height;

	protected String longdesc;

	protected String name;

	protected String src;

	protected BigInteger width;

	/**
	 * Gets the value of the alt property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getAlt() {
		return alt;
	}

	/**
	 * Sets the value of the alt property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setAlt(String value) {
		this.alt = value;
	}

	/**
	 * Gets the value of the height property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public BigInteger getHeight() {
		return height;
	}

	/**
	 * Sets the value of the height property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setHeight(BigInteger value) {
		this.height = value;
	}

	/**
	 * Gets the value of the longdesc property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getLongdesc() {
		return longdesc;
	}

	/**
	 * Sets the value of the longdesc property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setLongdesc(String value) {
		this.longdesc = value;
	}

	/**
	 * Gets the value of the name property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the value of the name property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setName(String value) {
		this.name = value;
	}

	/**
	 * Gets the value of the src property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getSrc() {
		return src;
	}

	/**
	 * Sets the value of the src property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setSrc(String value) {
		this.src = value;
	}

	/**
	 * Gets the value of the width property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public BigInteger getWidth() {
		return width;
	}

	/**
	 * Sets the value of the width property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setWidth(BigInteger value) {
		this.width = value;
	}
	/*
	 * @Override public String toString() { String res="<img"; if (src!=null &&
	 * !"".equals(src)) res += " src=\""+src+"\""; if (name!=null &&
	 * !"".equals(name)) res += " name=\""+name+"\""; if (longdesc!=null &&
	 * !"".equals(longdesc)) res += " longdesc=\""+longdesc+"\""; if (alt!=null &&
	 * !"".equals(alt)) res += " alt=\""+alt+"\""; if (width!=null) res += "
	 * width\""+width+"\""; if (height!=null) res += " height\""+height+"\"";
	 * return res+" />"; }
	 */
}

--- NEW FILE: Error.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

import org.w3c.unicorn.util.LocalizedString;

/**
 * <p>
 * Java class for error element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;error&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
 *         &lt;sequence&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}line&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}column&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}errortype&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}context&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}message&quot; maxOccurs=&quot;unbounded&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}longmessage&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
 *         &lt;/sequence&gt;
 *       &lt;/restriction&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */
public class Error {

	protected BigInteger line;

	protected BigInteger column;

	protected String errortype;

	protected String context;

	protected List<LocalizedString> message;

	protected List<Longmessage> longmessage;

	/**
	 * Gets the value of the line property.
	 * 
	 * @return possible object is {@link BigInteger }
	 * 
	 */
	public BigInteger getLine() {
		return line;
	}

	/**
	 * Sets the value of the line property.
	 * 
	 * @param value
	 *            allowed object is {@link BigInteger }
	 * 
	 */
	public void setLine(BigInteger value) {
		this.line = value;
	}

	/**
	 * Gets the value of the column property.
	 * 
	 * @return possible object is {@link BigInteger }
	 * 
	 */
	public BigInteger getColumn() {
		return column;
	}

	/**
	 * Sets the value of the column property.
	 * 
	 * @param value
	 *            allowed object is {@link BigInteger }
	 * 
	 */
	public void setColumn(BigInteger value) {
		this.column = value;
	}

	/**
	 * Gets the value of the errortype property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getErrortype() {
		return errortype;
	}

	/**
	 * Sets the value of the errortype property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setErrortype(String value) {
		this.errortype = value;
	}

	/**
	 * Gets the value of the context property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getContext() {
		return context;
	}

	/**
	 * Sets the value of the context property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setContext(String value) {
		this.context = value;
	}

	/**
	 * Gets the value of the message property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the message property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getMessage().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list {@link String }
	 * 
	 * 
	 */
	public List<LocalizedString> getMessage() {
		if (message == null) {
			message = new ArrayList<LocalizedString>();
		}
		return this.message;
	}

	/**
	 * Gets the value of the longmessage property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the longmessage property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getLongmessage().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list
	 * {@link Longmessage }
	 * 
	 * 
	 */
	public List<Longmessage> getLongmessage() {
		if (longmessage == null) {
			longmessage = new ArrayList<Longmessage>();
		}
		return this.longmessage;
	}

	public void setMessage(List<LocalizedString> message) {
		this.message = message;
	}

	public void setLongmessage(List<Longmessage> longmessage) {
		this.longmessage = longmessage;
	}

}

--- NEW FILE: Info.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

import org.w3c.unicorn.util.LocalizedString;

/**
 * <p>
 * Java class for info element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;info&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
 *         &lt;sequence&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}line&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}column&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}context&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}message&quot; maxOccurs=&quot;unbounded&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}longmessage&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
 *         &lt;/sequence&gt;
 *       &lt;/restriction&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */
public class Info {

	protected BigInteger line;

	protected BigInteger column;

	protected String context;

	protected List<LocalizedString> message;

	protected List<Longmessage> longmessage;

	/**
	 * Gets the value of the line property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public BigInteger getLine() {
		return line;
	}

	/**
	 * Sets the value of the line property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setLine(BigInteger value) {
		this.line = value;
	}

	/**
	 * Gets the value of the column property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public BigInteger getColumn() {
		return column;
	}

	/**
	 * Sets the value of the column property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setColumn(BigInteger value) {
		this.column = value;
	}

	/**
	 * Gets the value of the context property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getContext() {
		return context;
	}

	/**
	 * Sets the value of the context property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setContext(String value) {
		this.context = value;
	}

	/**
	 * Gets the value of the message property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the message property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getMessage().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list {@link String }
	 * 
	 * 
	 */
	public List<LocalizedString> getMessage() {
		if (message == null) {
			message = new ArrayList<LocalizedString>();
		}
		return this.message;
	}

	/**
	 * Gets the value of the longmessage property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the longmessage property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getLongmessage().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list
	 * {@link Longmessage }
	 * 
	 * 
	 */
	public List<Longmessage> getLongmessage() {
		if (longmessage == null) {
			longmessage = new ArrayList<Longmessage>();
		}
		return this.longmessage;
	}

	public void setMessage(List<LocalizedString> message) {
		this.message = message;
	}

	public void setLongmessage(List<Longmessage> longmessage) {
		this.longmessage = longmessage;
	}

}

--- NEW FILE: Longmessage.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * Java class for longmessage element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;longmessage&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
 *         &lt;sequence maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}a&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}code&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}img&quot;/&gt;
 *         &lt;/sequence&gt;
 *       &lt;/restriction&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */
public class Longmessage {

	protected List<Object> content = new ArrayList<Object>();

	protected String lang;

	/**
	 * 
	 * @return The list of the contents.
	 */
	public List<Object> getContent() {
		if (content == null) {
			content = new ArrayList<Object>();
		}
		return this.content;
	}

	/**
	 * Sets the contents of the message.
	 * 
	 * @param content
	 *            The list to set.
	 */
	public void setContent(List<Object> content) {
		this.content = content;
	}

	/*
	 * @Override public String toString() { String res = ""; for (Object o :
	 * content) { res += o.toString(); } return res; }
	 */
	/**
	 * @return The language of the message.
	 */
	public String getLang() {
		return lang;
	}

	/**
	 * Sets the language for this message.
	 * 
	 * @param lang
	 *            The language of the message.
	 */
	public void setLang(String lang) {
		this.lang = lang;
	}

}

--- NEW FILE: Inline.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * Java class for Inline complex type.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;complexType name=&quot;Inline&quot;&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
 *       &lt;choice maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;&gt;
 *         &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}a&quot;/&gt;
 *         &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}img&quot;/&gt;
 *       &lt;/choice&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
public class Inline {

	protected List<Object> content = new ArrayList<Object>();

	/**
	 * Gets the value of the content property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the content property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getContent().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list {@link A }
	 * {@link String } {@link Img }
	 * 
	 * 
	 */
	public List<Object> getContent() {
		return this.content;
	}

	public void setContent(List<Object> content) {
		this.content = content;
	}
	/*
	 * @Override public String toString() { String res = ""; for (Object o :
	 * content) { res += o.toString(); } return res; }
	 */
}

--- NEW FILE: Response.java ---
package org.w3c.unicorn.response;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import javax.xml.datatype.XMLGregorianCalendar;

public class Response {
	protected String uri;

	protected String checkedby;

	protected String version;

	protected XMLGregorianCalendar date;

	protected Boolean passed;

	protected StringBuilder xml; // the xml version of the response

	/**
	 * Result aResult =
	 * mapOfLangURIResult.get("fr").get("http://w3.org/home.css")
	 */
	protected Map<String, Map<String, Result>> mapOfLangURIResult = new LinkedHashMap<String, Map<String, Result>>();

	/**
	 * Gets the value of the uri property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getUri() {
		return uri;
	}

	/**
	 * Sets the value of the uri property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setUri(String value) {
		this.uri = value;
	}

	/**
	 * Gets the value of the checkedby property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getCheckedby() {
		return checkedby;
	}

	/**
	 * Sets the value of the checkedby property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setCheckedby(String value) {
		this.checkedby = value;
	}

	/**
	 * Gets the value of the version property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getVersion() {
		return version;
	}

	/**
	 * Sets the value of the version property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setVersion(String value) {
		this.version = value;
	}

	/**
	 * Gets the value of the date property.
	 * 
	 * @return possible object is {@link XMLGregorianCalendar }
	 * 
	 */
	public XMLGregorianCalendar getDate() {
		return date;
	}

	/**
	 * Sets the value of the date property.
	 * 
	 * @param value
	 *            allowed object is {@link XMLGregorianCalendar }
	 * 
	 */
	public void setDate(XMLGregorianCalendar value) {
		this.date = value;
	}

	/**
	 * Gets the value of the passed property.
	 * 
	 * @return possible object is {@link Boolean }
	 * 
	 */
	public Boolean isPassed() {
		return passed;
	}

	/**
	 * Sets the value of the passed property.
	 * 
	 * @param value
	 *            allowed object is {@link Boolean }
	 * 
	 */
	public void setPassed(Boolean value) {
		this.passed = value;
	}

	/**
	 * Gets the value of the result property.
	 * 
	 * @return possible object is {@link Result }
	 * 
	 */
	public List<Result> getResultsList() {
		List<Result> resultList = new ArrayList<Result>();
		// iterate all language
		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
			// iterate all URI
			for (Result aResult : aMapOfURIResult.values()) {
				resultList.add(aResult);
			}
		}
		return resultList;
	}

	/**
	 * Gets the result of the specified URI given a language.
	 * 
	 * @param lang
	 *            The language to consider.
	 * @param uri
	 *            The URI to consider.
	 * @return The result in the given language for the URI.
	 */
	public Result getResult(String lang, String uri) {
		if (mapOfLangURIResult.get(lang) == null) {
			mapOfLangURIResult.put(lang, new LinkedHashMap<String, Result>());
		}
		if (mapOfLangURIResult.get(lang).get(uri) == null) {
			mapOfLangURIResult.get(lang).put(uri, new Result(lang, uri));
		}
		return mapOfLangURIResult.get(lang).get(uri);
	}

	/**
	 * Adds a Result r to the map, if there is already a result which has the
	 * same uri and the same language, we will append r to this result otherwise
	 * we'll simply add r to the list.
	 * 
	 * @param value
	 *            The value of the result.
	 */
	public void addResult(Result value) {
		// search in the list a result which have the same uri and the same
		// language
		Result currentRes = this.getResult(value.lang, value.uri);
		if (currentRes != null) {
			currentRes.warnings.addAll(value.warnings);
			currentRes.errors.addAll(value.errors);
			currentRes.infos.addAll(value.infos);
		} else {
			if (mapOfLangURIResult.get(value.lang) == null) {
				mapOfLangURIResult.put(value.lang,
						new LinkedHashMap<String, Result>());
			}
			mapOfLangURIResult.get(value.lang).put(value.uri, value);
		}
	}

	/**
	 * 
	 * @return The list of errors corresponding to the results.
	 */
	List<Error> getErrorList() {
		List<Error> xList = new ArrayList<Error>();
		// iterate all language
		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
			// iterate all URI
			for (Result aResult : aMapOfURIResult.values()) {
				xList.addAll(aResult.errors);
			}
		}
		return xList;
	}

	/**
	 * 
	 * @return The list of warnings corresponding to the results.
	 */
	List<Warning> getWarningList() {
		List<Warning> xList = new ArrayList<Warning>();
		// iterate all language
		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
			// iterate all URI
			for (Result aResult : aMapOfURIResult.values()) {
				xList.addAll(aResult.warnings);
			}
		}
		return xList;
	}

	/**
	 * 
	 * @return The list of infos corresponding to the results.
	 */
	List<Info> getAllInfo() {
		List<Info> xList = new ArrayList<Info>();
		// iterate all language
		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
			// iterate all URI
			for (Result aResult : aMapOfURIResult.values()) {
				xList.addAll(aResult.infos);
			}
		}
		return xList;
	}

	public void setXml(StringBuilder sb) {
		this.xml = sb;
	}

	public StringBuilder getXml() {
		return this.xml;
	}
}

--- NEW FILE: Warning.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

import org.w3c.unicorn.util.LocalizedString;

/**
 * <p>
 * Java class for warning element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;warning&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;restriction base=&quot;{http://www.w3.org/2001/XMLSchema}anyType&quot;&gt;
 *         &lt;sequence&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}line&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}column&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}context&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}level&quot; minOccurs=&quot;0&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}message&quot; maxOccurs=&quot;unbounded&quot;/&gt;
 *           &lt;element ref=&quot;{http://www.w3.org/unicorn/observationresponse}longmessage&quot; maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot;/&gt;
 *         &lt;/sequence&gt;
 *       &lt;/restriction&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */

public class Warning {

	protected BigInteger line;

	protected BigInteger column;

	protected String context;

	protected Integer level;

	protected List<LocalizedString> message;

	protected List<Longmessage> longmessage;

	/**
	 * Gets the value of the line property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public BigInteger getLine() {
		return line;
	}

	/**
	 * Sets the value of the line property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setLine(BigInteger value) {
		this.line = value;
	}

	/**
	 * Gets the value of the column property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public BigInteger getColumn() {
		return column;
	}

	/**
	 * Sets the value of the column property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setColumn(BigInteger value) {
		this.column = value;
	}

	/**
	 * Gets the value of the context property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getContext() {
		return context;
	}

	/**
	 * Sets the value of the context property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setContext(String value) {
		this.context = value;
	}

	/**
	 * Gets the value of the level property.
	 * 
	 * @return possible object is {@link int }
	 * 
	 */
	public Integer getLevel() {
		return level;
	}

	/**
	 * Sets the value of the level property.
	 * 
	 * @param value
	 *            allowed object is {@link int }
	 * 
	 */
	public void setLevel(Integer value) {
		this.level = value;
	}

	/**
	 * Gets the value of the message property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the message property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getMessage().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list {@link String }
	 * 
	 * 
	 */
	public List<LocalizedString> getMessage() {
		if (message == null) {
			message = new ArrayList<LocalizedString>();
		}
		return this.message;
	}

	/**
	 * Gets the value of the longmessage property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a <CODE>set</CODE>
	 * method for the longmessage property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getLongmessage().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list
	 * {@link Longmessage }
	 * 
	 * 
	 */
	public List<Longmessage> getLongmessage() {
		if (longmessage == null) {
			longmessage = new ArrayList<Longmessage>();
		}
		return this.longmessage;
	}

	public void setMessage(List<LocalizedString> message) {
		this.message = message;
	}

	public void setLongmessage(List<Longmessage> longmessage) {
		this.longmessage = longmessage;
	}

}

--- NEW FILE: Code.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

/**
 * <p>
 * Java class for code element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;code&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;extension base=&quot;{http://www.w3.org/unicorn/observationresponse}Inline&quot;&gt;
 *       &lt;/extension&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */
public class Code extends Inline {
	/*
	 * @Override public String toString() { return "<code>"+super.toString()+"</code>"; }
	 */
}

--- NEW FILE: Result.java ---
package org.w3c.unicorn.response;

import java.util.ArrayList;
import java.util.List;

public class Result {
	protected String uri;

	protected String lang;

	protected List<Error> errors = new ArrayList<Error>();

	protected List<Warning> warnings = new ArrayList<Warning>();

	protected List<Info> infos = new ArrayList<Info>();

	/**
	 * Constructor for Result.
	 * 
	 * @param lang
	 *            The language to consider.
	 * @param uri
	 *            The URI to consider.
	 */
	public Result(String lang, String uri) {
		super();
		this.uri = uri;
		this.lang = lang;
	}

	/**
	 * 
	 * @return The URI of the result.
	 */
	public String getUri() {
		return uri;
	}

	/**
	 * 
	 * @return The list of errors.
	 */
	public List<Error> getErrors() {
		return errors;
	}

	/**
	 * 
	 * @return The list of warnings.
	 */
	public List<Warning> getWarnings() {
		return warnings;
	}

	/**
	 * 
	 * @return The list of infos.
	 */
	public List<Info> getInfos() {
		return infos;
	}

	/**
	 * 
	 * @return The language of the result.
	 */
	public String getLang() {
		return lang;
	}
}

--- NEW FILE: A.java ---
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2006.07.26 at 04:29:37 PM CEST 
//

package org.w3c.unicorn.response;

/**
 * <p>
 * Java class for a element declaration.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;element name=&quot;a&quot;&gt;
 *   &lt;complexType&gt;
 *     &lt;complexContent&gt;
 *       &lt;extension base=&quot;{http://www.w3.org/unicorn/observationresponse}inA&quot;&gt;
 *         &lt;attribute name=&quot;href&quot; type=&quot;{http://www.w3.org/2001/XMLSchema}anyURI&quot; /&gt;
 *       &lt;/extension&gt;
 *     &lt;/complexContent&gt;
 *   &lt;/complexType&gt;
 * &lt;/element&gt;
 * </pre>
 * 
 * 
 */
public class A extends Inline {
	protected String href;

	/**
	 * Gets the value of the href property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getHref() {
		return href;
	}

	/**
	 * Sets the value of the href property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setHref(String value) {
		this.href = value;
	}
	/*
	 * @Override public String toString() { return "<a
	 * href=\""+href+"\">"+super.toString()+"</a>"; }
	 */
}

Received on Tuesday, 11 August 2009 16:08:42 UTC