W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2008

2006/unicorn/org/w3c/unicorn/contract CallParameter.java,1.2,1.3

From: Denis Tea via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 19 Feb 2008 12:49:10 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JRRuI-0008Gv-OO@lionel-hutz.w3.org>

Update of /sources/public/2006/unicorn/org/w3c/unicorn/contract
In directory hutz:/tmp/cvs-serv31777/org/w3c/unicorn/contract

Modified Files:
	CallParameter.java 
Log Message:
New contrat (WADL only).

Index: CallParameter.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/contract/CallParameter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CallParameter.java	1 Sep 2006 14:30:17 -0000	1.2
+++ CallParameter.java	19 Feb 2008 12:49:08 -0000	1.3
@@ -18,21 +18,20 @@
 
 	private static final Log logger = LogFactory.getLog("org.w3c.unicorn.contract");
 
-	// Name of this parameter     
-	private String sName = null;    
-	
+	// Attributes of the parameter  
+	private String sName = null;    	
+	private String sStyle = null;
+	private String sID = null;
+	private String sType = null;
+	private String sDefaultValue;
+	private boolean bRequired; // Is this parameter mandatory 
+	private boolean bRepeating; // Can this parameter be repeated
+	private String sFixed = null; // Indicates if the parameter can be manually set or not
+	private String sPath = null;
+
 	// Possible values for this parameter    
 	private List<String> listOfPossibleValue = null;        
 	
-	// Indicates wheter the parameter can be manually set or not
-	private String sFixed = null;
-	
-	// Is this parameter mandatory     
-	private boolean bRequired;
-	
-	// Can this parameter be repeated
-	private boolean bRepeating;
-	
 	/**
 	 * @param sName
 	 * @param listOfPossibleValue
@@ -60,11 +59,8 @@
 		this.sFixed = sFixed;
 		this.bRequired = bRequired;
 		this.bRepeating = bRepeating;
-	}	
+	}
 	
-	/**
-	 * @param sName
-	 */
 	public CallParameter (final String sName) {
 		this(sName, new ArrayList<String>(), null, false, false);
 		CallParameter.logger.trace("Constructor(String)");
@@ -75,103 +71,150 @@
 		CallParameter.logger.trace("Constructor()");
 	}
 
+	
+	//===================
+	//===== GETTERS =====
+	//===================
 	public String getName() {
 		return this.sName;
 	}
-
-	public void setName (final String sName) {
-		this.sName = sName;
+	
+	public String getStyle() {
+		return this.sStyle;
+	}
+	
+	public String getID() {
+		return this.sID;
+	}
+	
+	public String getType() {
+		return this.sType;
+	}
+	
+	public String getDefaultValue() {
+		return this.sDefaultValue;
+	}
+	
+	public boolean isRequired() {
+		return this.bRequired;
+	}
+	
+	public boolean isRepeating() {
+		return this.bRepeating;
 	}
 
+	public boolean isFixed() {
+		return this.sFixed != null;
+	}
+	
+	public String getFixed() {
+		return this.sFixed;
+	}
+	
+	public String getPath() {
+		return this.sPath;
+	}	
+	
 	public List<String> getListOfPossibleValue () {
 		return listOfPossibleValue;
 	}
 
-	public void setPossibleValues (final List<String> listOfValue) {
-		this.listOfPossibleValue = listOfValue;
+	
+	//==================
+	//===== SETTERS ====
+	//==================
+	public void setName (final String sName) {
+		this.sName = sName;
+	}
+
+	public void setStyle(String style) {
+		this.sStyle = style;
 	}
 	
-	public void addValue (final String sValue) {
-		if (this.listOfPossibleValue == null) {
-			this.listOfPossibleValue = new ArrayList<String>();
-		}
-		this.listOfPossibleValue.add(sValue);
+	public void setID(String sid) {
+		this.sID = sid;
 	}
 	
-	public Object getValue (final int iPosition) {
-		return this.listOfPossibleValue.get(iPosition);
+	public void setType(String type) {
+		this.sType = type;
 	}
 	
-	public boolean contains (final String sValue) {
-		return this.listOfPossibleValue.contains(sValue) ||
-			(this.listOfPossibleValue.size() == 1 && this.listOfPossibleValue.contains(""));
+	public void setDefaultValue(String defaultValue) {
+		this.sDefaultValue = defaultValue;
 	}
 	
-	/**
-	 * @return Returns the fixed.
-	 */
-	public boolean isFixed() {
-		return this.sFixed != null;
+	public void setRequired (final boolean bRequired) {
+		this.bRequired = bRequired;
 	}
 	
-	public String getFixed() {
-		return this.sFixed;
+	public void setRepeating (final boolean bRepeating) {
+		this.bRepeating = bRepeating;
 	}
 	
-	/**
-	 * @param sFixed The fixed to set.
-	 */
 	public void setFixed (final String sFixed) {
 		this.sFixed = sFixed;
 	}
 	
-	/**
-	 * @return Returns the repeating.
-	 */
-	public boolean isRepeating() {
-		return this.bRepeating;
+	public void setPath (final String sPath) {
+		this.sPath = sPath;
 	}
 	
-	/**
-	 * @param bRepeating The repeating to set.
-	 */
-	public void setRepeating(final boolean bRepeating) {
-		this.bRepeating = bRepeating;
+	
+	
+	public void setPossibleValues (final List<String> listOfValue) {
+		this.listOfPossibleValue = listOfValue;
 	}
 	
-	/**
-	 * @return Returns the required.
-	 */
-	public boolean isRequired() {
-		return this.bRequired;
+	public void addValue (final String sValue) {
+		if (this.listOfPossibleValue == null) {
+			this.listOfPossibleValue = new ArrayList<String>();
+		}
+		this.listOfPossibleValue.add(sValue);
 	}
 	
-	/**
-	 * @param bRequired The required to set.
-	 */
-	public void setRequired (final boolean bRequired) {
-		this.bRequired = bRequired;
+	public Object getValue (final int iPosition) {
+		return this.listOfPossibleValue.get(iPosition);
+	}
+	
+	public boolean contains (final String sValue) {
+		return this.listOfPossibleValue.contains(sValue) ||
+			(this.listOfPossibleValue.size() == 1 && this.listOfPossibleValue.contains(""));
 	}
 	
+	
 	/**
 	 * {@inheritDoc}
 	 */
 	public String toString() {
 		final int iSize = 1000;
-		final String sVariableSeparator = "  ";
+		final String sVariableSeparator = "\n";
 		final StringBuffer aStringBuffer = new StringBuffer(iSize);
 		
-		aStringBuffer.append("name=").append(sName);
+		aStringBuffer.append("[begin CallParameter]\n");
+		aStringBuffer.append("name:=").append(sName);
 		aStringBuffer.append(sVariableSeparator);
-		aStringBuffer.append("possibleValues=").append(listOfPossibleValue);
+		aStringBuffer.append("id:=").append(sID);
 		aStringBuffer.append(sVariableSeparator);
-		aStringBuffer.append("fixed=").append(sFixed);
+		aStringBuffer.append("possibleValues:=").append(listOfPossibleValue);
 		aStringBuffer.append(sVariableSeparator);
-		aStringBuffer.append("required=").append(bRequired);
+		aStringBuffer.append("fixed:=").append(sFixed);
 		aStringBuffer.append(sVariableSeparator);
-		aStringBuffer.append("repeating=").append(bRepeating);
+		aStringBuffer.append("required:=").append(bRequired);
+		aStringBuffer.append(sVariableSeparator);
+		aStringBuffer.append("repeating:=").append(bRepeating);
+		aStringBuffer.append(sVariableSeparator);
+		aStringBuffer.append("style:=").append(sStyle);
+		aStringBuffer.append(sVariableSeparator);
+		aStringBuffer.append("path:=").append(sPath);
+		aStringBuffer.append(sVariableSeparator);
+		aStringBuffer.append("style:=").append(sStyle);
+		aStringBuffer.append(sVariableSeparator);
+		aStringBuffer.append("default:=").append(sDefaultValue);
+		aStringBuffer.append("[end CallParameter]\n");
 		
 		return aStringBuffer.toString();
 	}
 	
 }
+
+
Received on Tuesday, 19 February 2008 12:49:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:00 GMT