org.ow2.jonas.webapp.jonasadmin.xml.xs.hardcoded
Class HCAttributeRestrictions

java.lang.Object
  extended by org.ow2.jonas.webapp.jonasadmin.xml.xs.hardcoded.HCAttributeRestrictions
All Implemented Interfaces:
AttributeRestrictions

public class HCAttributeRestrictions
extends Object
implements AttributeRestrictions

An implementation of HCAttributeRestrictions where the restrictions are not retrieved from the schema but hard coded inside the class.

Author:
Gregory Lapouchnian, Patrick Smith

Constructor Summary
HCAttributeRestrictions(String name, boolean optional, String fixed)
          Create a new hardcoded attribute restriction
 
Method Summary
 String getFixed()
          Get the fixed value for this attribute.
 String getName()
          Return the name of the attribute.
 boolean isOptional()
          Returns if this attribute is optional.
 void setFixed(String fixed)
          Sets the fixed value for this attribute.
 void setName(String name)
          Sets the name of this element.
 void setOptional(boolean isOptional)
          Sets if this attribute is optional.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HCAttributeRestrictions

public HCAttributeRestrictions(String name,
                               boolean optional,
                               String fixed)
Create a new hardcoded attribute restriction

Parameters:
name - the name of this attribute
optional - is this attribute optional
fixed - the fixed value for this attribute
Method Detail

getFixed

public String getFixed()
Get the fixed value for this attribute.

Specified by:
getFixed in interface AttributeRestrictions
Returns:
the fixed value for this attribute.

setFixed

public void setFixed(String fixed)
Sets the fixed value for this attribute.

Specified by:
setFixed in interface AttributeRestrictions
Parameters:
fixed - the fixed value for this attribute.

isOptional

public boolean isOptional()
Returns if this attribute is optional.

Specified by:
isOptional in interface AttributeRestrictions
Returns:
if this attribute is optional or not.

setOptional

public void setOptional(boolean isOptional)
Sets if this attribute is optional.

Specified by:
setOptional in interface AttributeRestrictions
Parameters:
isOptional - if this attribute is optional.

getName

public String getName()
Return the name of the attribute.

Specified by:
getName in interface AttributeRestrictions
Returns:
the element of this attribute.

setName

public void setName(String name)
Sets the name of this element.

Specified by:
setName in interface AttributeRestrictions
Parameters:
name - the name of this element.


Copyright © 2010 OW2 Consortium. All Rights Reserved.