|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.http.representation.Property
public class Property
Represents a property for an entity (along with the value). If an entity has multiple properties with the same name, it has multiple Property objects.
Field Summary | |
---|---|
private int |
maxCardinality
The maximum cardinality restriction for this property. |
private int |
minCardinality
The minimum cardinality restriction for this property. |
private java.lang.String |
name
The name of the property (URI) |
private Value |
value
The value for this property. |
Constructor Summary | |
---|---|
Property(java.lang.String name)
Creates a property with a specified name, no value, and default cardinality restrictions. |
|
Property(java.lang.String name,
int minCardinality,
int maxCardinality,
Value value)
Creates a property with specified name, value, and cardinality restrictions |
|
Property(java.lang.String name,
Value value)
Creates a property with a specified name and value, and default cardinality restrictions. |
Method Summary | |
---|---|
int |
getMaxCardinality()
Returns the maximum cardinality of the property. |
int |
getMinCardinality()
Gets the minimum cardinality of the property |
java.lang.String |
getName()
Gets the name of the property (URI) |
Value |
getValue()
Gets the value of the property |
void |
setMaxCardinality(int maxCardinality)
Sets the maximum cardinality of the property |
void |
setMinCardinality(int minCardinality)
Sets the minimum cardinality of the property |
void |
setName(java.lang.String name)
Sets the name of the property |
void |
setValue(Value value)
Sets the value of the property |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String name
private int minCardinality
private int maxCardinality
private Value value
Constructor Detail |
---|
public Property(java.lang.String name)
name
- the name of the property (URI)public Property(java.lang.String name, Value value)
name
- the name of the property (URI)value
- the value for the property (may be null)public Property(java.lang.String name, int minCardinality, int maxCardinality, Value value)
name
- the name of the property (URI)minCardinality
- minimum cardinality restriction. Must be a non-negative integer.maxCardinality
- maximum cardinality restriction. Must be a non-negative integer. For unbounded maximum cardinality
restriction, use Integer.MAX_VALUE.value
- the value of the property (may be null)Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to set (URI)public int getMinCardinality()
public void setMinCardinality(int minCardinality)
minCardinality
- the minimum cardinality to setpublic int getMaxCardinality()
public void setMaxCardinality(int maxCardinality)
maxCardinality
- the maximum cardinality of the propertypublic Value getValue()
public void setValue(Value value)
value
- the value to set or null, if there is no value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |