@OslcNamespace(value="http://open-services.net/ns/core#") @OslcResourceShape(title="OSLC Property Resource Shape", describes="http://open-services.net/ns/core#Property") public final class Property extends org.eclipse.lyo.oslc4j.core.model.AbstractResource implements Comparable<Property>
Property
, except that
it does not have an oslc:propertyDefinition field. This class is intended to
only be used for OSLC automation plans.Constructor and Description |
---|
Property() |
Property(String name,
org.eclipse.lyo.oslc4j.core.model.Occurs occurs,
org.eclipse.lyo.oslc4j.core.model.ValueType valueType) |
Modifier and Type | Method and Description |
---|---|
void |
addAllowedValue(String allowedValue)
Deprecated.
Use
setAllowedValuesCollection(Collection) , which allows for values other than String |
void |
addRange(URI range) |
int |
compareTo(Property o) |
String[] |
getAllowedValues()
Deprecated.
Use
getAllowedValuesCollection() , which allows for values other than String |
Collection<?> |
getAllowedValuesCollection() |
URI |
getAllowedValuesRef() |
String |
getDefaultValue()
Deprecated.
Use
getDefaultValueObject() , which supports types other than String |
Object |
getDefaultValueObject() |
String |
getDescription() |
Integer |
getMaxSize() |
String |
getName() |
URI |
getOccurs() |
URI[] |
getRange() |
URI |
getRepresentation() |
String |
getTitle() |
URI |
getValueShape() |
URI |
getValueType() |
Boolean |
isHidden() |
Boolean |
isMemberProperty() |
Boolean |
isReadOnly() |
void |
setAllowedValues(String[] allowedValues)
Deprecated.
Use
setAllowedValuesCollection(Collection) , which allows for values other than String |
void |
setAllowedValuesCollection(Collection<?> values) |
void |
setAllowedValuesRef(URI allowedValuesRef) |
void |
setDefaultValue(Object defaultValue) |
void |
setDescription(String description) |
void |
setHidden(Boolean hidden) |
void |
setMaxSize(Integer maxSize) |
void |
setMemberProperty(Boolean memberProperty) |
void |
setName(String name) |
void |
setOccurs(org.eclipse.lyo.oslc4j.core.model.Occurs occurs) |
void |
setOccurs(URI occurs) |
void |
setRange(URI[] ranges) |
void |
setReadOnly(Boolean readOnly) |
void |
setRepresentation(org.eclipse.lyo.oslc4j.core.model.Representation representation) |
void |
setRepresentation(URI representation) |
void |
setTitle(String title) |
void |
setValueShape(URI valueShape) |
void |
setValueType(URI valueType) |
void |
setValueType(org.eclipse.lyo.oslc4j.core.model.ValueType valueType) |
public Property()
public Property(String name, org.eclipse.lyo.oslc4j.core.model.Occurs occurs, org.eclipse.lyo.oslc4j.core.model.ValueType valueType)
public void addRange(URI range)
public int compareTo(Property o)
compareTo
in interface Comparable<Property>
@OslcDescription(value="Resource with allowed values for the property being defined") @OslcName(value="allowedValues") @OslcPropertyDefinition(value="http://open-services.net/ns/core#allowedValues") @OslcRange(value="http://open-services.net/ns/core#AllowedValues") @OslcReadOnly @OslcTitle(value="Allowed Value Reference") @OslcValueShape(value="resourceShapes/allowedValues") public URI getAllowedValuesRef()
public Object getDefaultValueObject()
@Deprecated public String getDefaultValue()
getDefaultValueObject()
, which supports types other than String@OslcDescription(value="Description of the property. SHOULD include only content that is valid and suitable inside an XHTML <div> element") @OslcPropertyDefinition(value="http://purl.org/dc/terms/description") @OslcReadOnly @OslcTitle(value="Description") @OslcValueType(value=XMLLiteral) public String getDescription()
@OslcDescription(value="For String properties only, specifies maximum characters allowed. If not set, then there is no maximum or maximum is specified elsewhere") @OslcPropertyDefinition(value="http://open-services.net/ns/core#maxSize") @OslcReadOnly @OslcTitle(value="Maximum Size") public Integer getMaxSize()
@OslcDescription(value="Name of property being defined, i.e. second part of property\'s Prefixed Name") @OslcOccurs(value=ExactlyOne) @OslcPropertyDefinition(value="http://open-services.net/ns/core#name") @OslcReadOnly @OslcTitle(value="Name") public String getName()
@OslcAllowedValue(value={"http://open-services.net/ns/core#Exactly-one","http://open-services.net/ns/core#Zero-or-one","http://open-services.net/ns/core#Zero-or-many","http://open-services.net/ns/core#One-or-many"}) @OslcDescription(value="MUST be either http://open-services.net/ns/core#Exactly-one, http://open-services.net/ns/core#Zero-or-one, http://open-services.net/ns/core#Zero-or-many or http://open-services.net/ns/core#One-or-many") @OslcOccurs(value=ExactlyOne) @OslcPropertyDefinition(value="http://open-services.net/ns/core#occurs") @OslcReadOnly @OslcTitle(value="Occurs") public URI getOccurs()
@OslcDescription(value="For properties with a resource value-type, Providers MAY also specify the range of possible resource classes allowed, each specified by URI. The default range is http://open-services.net/ns/core#Any") @OslcPropertyDefinition(value="http://open-services.net/ns/core#range") @OslcReadOnly @OslcTitle(value="Ranges") public URI[] getRange()
@OslcAllowedValue(value={"http://open-services.net/ns/core#Reference","http://open-services.net/ns/core#Inline","http://open-services.net/ns/core#Either"}) @OslcDescription(value="Should be http://open-services.net/ns/core#Reference, http://open-services.net/ns/core#Inline or http://open-services.net/ns/core#Either") @OslcPropertyDefinition(value="http://open-services.net/ns/core#representation") @OslcReadOnly @OslcTitle(value="Representation") public URI getRepresentation()
@OslcDescription(value="Title of the property. SHOULD include only content that is valid and suitable inside an XHTML <div> element") @OslcPropertyDefinition(value="http://purl.org/dc/terms/title") @OslcReadOnly @OslcTitle(value="Title") @OslcValueType(value=XMLLiteral) public String getTitle()
@OslcDescription(value="if the value-type is a resource type, then Property MAY provide a shape value to indicate the Resource Shape that applies to the resource") @OslcPropertyDefinition(value="http://open-services.net/ns/core#valueShape") @OslcRange(value="http://open-services.net/ns/core#ResourceShape") @OslcReadOnly @OslcTitle(value="Value Shape") public URI getValueShape()
@OslcAllowedValue(value={"http://www.w3.org/2001/XMLSchema#boolean","http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#float","http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral","http://open-services.net/ns/core#Resource","http://open-services.net/ns/core#LocalResource","http://open-services.net/ns/core#AnyResource"}) @OslcDescription(value="See list of allowed values for oslc:valueType") @OslcOccurs(value=ExactlyOne) @OslcPropertyDefinition(value="http://open-services.net/ns/core#valueType") @OslcReadOnly @OslcTitle(value="Value Type") public URI getValueType()
@OslcDescription(value="A hint that indicates that property MAY be hidden when presented in a user interface") @OslcPropertyDefinition(value="http://open-services.net/ns/core#hidden") @OslcReadOnly @OslcTitle(value="Hidden") public Boolean isHidden()
@OslcDescription(value="If set to true, this indicates that the property is a membership property, as described in the Query Syntax Specification: Member List Patterns. This is useful when the resource whose shape is being defined is viewed as a container of other resources. For example, look at the last example in Appendix B\'s RDF/XML Representation Examples: Specifying the shape of a query result, where blog:comment is defined as a membership property and comment that matches the query is returned as value of that property.") @OslcName(value="isMemberProperty") @OslcPropertyDefinition(value="http://open-services.net/ns/core#isMemberProperty") @OslcReadOnly @OslcTitle(value="Is Member Property") public Boolean isMemberProperty()
@OslcDescription(value="true if the property is read-only. If not set, or set to false, then the property is writable. Providers SHOULD declare a property read-only when changes to the value of that property will not be accepted on PUT. Consumers should note that the converse does not apply: Providers MAY reject a change to the value of a writable property.") @OslcPropertyDefinition(value="http://open-services.net/ns/core#readOnly") @OslcReadOnly @OslcTitle(value="Read Only") public Boolean isReadOnly()
public void setAllowedValuesRef(URI allowedValuesRef)
public void setDefaultValue(Object defaultValue)
public void setDescription(String description)
public void setHidden(Boolean hidden)
public void setMaxSize(Integer maxSize)
public void setMemberProperty(Boolean memberProperty)
public void setName(String name)
public void setOccurs(org.eclipse.lyo.oslc4j.core.model.Occurs occurs)
public void setOccurs(URI occurs)
public void setRange(URI[] ranges)
public void setReadOnly(Boolean readOnly)
public void setRepresentation(org.eclipse.lyo.oslc4j.core.model.Representation representation)
public void setRepresentation(URI representation)
public void setTitle(String title)
public void setValueShape(URI valueShape)
public void setValueType(org.eclipse.lyo.oslc4j.core.model.ValueType valueType)
public void setValueType(URI valueType)
public Collection<?> getAllowedValuesCollection()
public void setAllowedValuesCollection(Collection<?> values)
@Deprecated public void addAllowedValue(String allowedValue)
setAllowedValuesCollection(Collection)
, which allows for values other than String@Deprecated public String[] getAllowedValues()
getAllowedValuesCollection()
, which allows for values other than String@Deprecated public void setAllowedValues(String[] allowedValues)
setAllowedValuesCollection(Collection)
, which allows for values other than StringCopyright © 2020. All Rights Reserved.