Class Property
java.lang.Object
org.eclipse.lyo.oslc4j.core.model.AbstractResource
org.eclipse.lyo.oslc4j.core.model.Property
- All Implemented Interfaces:
Comparable<Property>,IExtendedResource,IResource
@OslcNamespace("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 AbstractResource
implements Comparable<Property>
OSLC Property attributes
See https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/core-vocab.html
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllowedValue(String allowedValue) Deprecated.voidintString[]Deprecated.UsegetAllowedValuesCollection(), which allows for values other than StringCollection<?> Resource with allowed values for the property being definedDeprecated.UsegetDefaultValueObject(), which supports types other than StringDescription of the property.For String properties only, specifies maximum characters allowed.getName()Name of property being defined, i.e. second part of property's Prefixed NameMUST 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-manyURI of the property whose usage is being describedURI[]getRange()For properties with a resource value-type, Providers MAY also specify the range of possible resource classes allowed, each specified by URI.Should be http://open-services.net/ns/core#Reference, http://open-services.net/ns/core#Inline or http://open-services.net/ns/core#EithergetTitle()Title of the property.if the value-type is a resource type, then Property MAY provide a shape value to indicate the Resource Shape that applies to the resourceSee list of allowed values for oslc:valueTypeisHidden()A hint that indicates that property MAY be hidden when presented in a user interfaceIf set to true, this indicates that the property is a membership property, as described in the Query Syntax Specification: Member List Patterns.true if the property is read-only.voidsetAllowedValues(String[] allowedValues) Deprecated.UsesetAllowedValuesCollection(Collection), which allows for values other than StringvoidsetAllowedValuesCollection(Collection<?> values) voidsetAllowedValuesRef(URI allowedValuesRef) voidsetDefaultValue(Object defaultValue) voidsetDescription(String description) voidvoidsetMaxSize(Integer maxSize) voidsetMemberProperty(Boolean memberProperty) voidvoidvoidvoidsetPropertyDefinition(URI propertyDefinition) voidvoidsetReadOnly(Boolean readOnly) voidsetRepresentation(URI representation) voidsetRepresentation(Representation representation) voidvoidsetValueShape(URI valueShape) voidsetValueType(URI valueType) voidsetValueType(ValueType valueType) Methods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes
-
Constructor Details
-
Property
public Property() -
Property
-
-
Method Details
-
addRange
-
compareTo
- Specified by:
compareToin interfaceComparable<Property>
-
getAllowedValuesRef
@OslcDescription("Resource with allowed values for the property being defined") @OslcName("allowedValues") @OslcPropertyDefinition("http://open-services.net/ns/core#allowedValues") @OslcRange("http://open-services.net/ns/core#AllowedValues") @OslcReadOnly @OslcTitle("Allowed Value Reference") @OslcValueShape("resourceShapes/allowedValues") public URI getAllowedValuesRef()Resource with allowed values for the property being defined- Returns:
- allowedValuesRef
-
getDefaultValueObject
-
getDefaultValue
Deprecated.UsegetDefaultValueObject(), which supports types other than String -
getDescription
@OslcDescription("Description of the property. SHOULD include only content that is valid and suitable inside an XHTML <div> element") @OslcPropertyDefinition("http://purl.org/dc/terms/description") @OslcReadOnly @OslcTitle("Description") @OslcValueType(XMLLiteral) public String getDescription()Description of the property. SHOULD include only content that is valid and suitable inside an XHTML <div> element- Returns:
- description
-
getMaxSize
@OslcDescription("For String properties only, specifies maximum characters allowed. If not set, then there is no maximum or maximum is specified elsewhere") @OslcPropertyDefinition("http://open-services.net/ns/core#maxSize") @OslcReadOnly @OslcTitle("Maximum Size") public Integer getMaxSize()For String properties only, specifies maximum characters allowed. If not set, then there is no maximum or maximum is specified elsewhere- Returns:
- maxSize
-
getName
@OslcDescription("Name of property being defined, i.e. second part of property\'s Prefixed Name") @OslcOccurs(ExactlyOne) @OslcPropertyDefinition("http://open-services.net/ns/core#name") @OslcReadOnly @OslcTitle("Name") public String getName()Name of property being defined, i.e. second part of property's Prefixed Name- Returns:
- name
-
getOccurs
@OslcAllowedValue({"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("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(ExactlyOne) @OslcPropertyDefinition("http://open-services.net/ns/core#occurs") @OslcReadOnly @OslcTitle("Occurs") public URI getOccurs()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- Returns:
- occurs
-
getPropertyDefinition
@OslcDescription("URI of the property whose usage is being described") @OslcOccurs(ExactlyOne) @OslcPropertyDefinition("http://open-services.net/ns/core#propertyDefinition") @OslcReadOnly @OslcTitle("Property Definition") public URI getPropertyDefinition()URI of the property whose usage is being described- Returns:
- propertyDefinition
-
getRange
@OslcDescription("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("http://open-services.net/ns/core#range") @OslcReadOnly @OslcTitle("Ranges") public URI[] getRange()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- Returns:
- range
-
getRepresentation
@OslcAllowedValue({"http://open-services.net/ns/core#Reference","http://open-services.net/ns/core#Inline","http://open-services.net/ns/core#Either"}) @OslcDescription("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("http://open-services.net/ns/core#representation") @OslcReadOnly @OslcTitle("Representation") public URI getRepresentation()Should be http://open-services.net/ns/core#Reference, http://open-services.net/ns/core#Inline or http://open-services.net/ns/core#Either- Returns:
- representation
-
getTitle
@OslcDescription("Title of the property. SHOULD include only content that is valid and suitable inside an XHTML <div> element") @OslcPropertyDefinition("http://purl.org/dc/terms/title") @OslcReadOnly @OslcTitle("Title") @OslcValueType(XMLLiteral) public String getTitle()Title of the property. SHOULD include only content that is valid and suitable inside an XHTML <div> element- Returns:
- title
-
getValueShape
@OslcDescription("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("http://open-services.net/ns/core#valueShape") @OslcRange("http://open-services.net/ns/core#ResourceShape") @OslcReadOnly @OslcTitle("Value Shape") public URI getValueShape()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- Returns:
- valueShape
-
getValueType
@OslcAllowedValue({"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("See list of allowed values for oslc:valueType") @OslcOccurs(ExactlyOne) @OslcPropertyDefinition("http://open-services.net/ns/core#valueType") @OslcReadOnly @OslcTitle("Value Type") public URI getValueType()See list of allowed values for oslc:valueType- Returns:
- valueType
-
isHidden
@OslcDescription("A hint that indicates that property MAY be hidden when presented in a user interface") @OslcPropertyDefinition("http://open-services.net/ns/core#hidden") @OslcReadOnly @OslcTitle("Hidden") public Boolean isHidden()A hint that indicates that property MAY be hidden when presented in a user interface- Returns:
- hidden
-
isMemberProperty
@OslcDescription("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("isMemberProperty") @OslcPropertyDefinition("http://open-services.net/ns/core#isMemberProperty") @OslcReadOnly @OslcTitle("Is Member Property") public Boolean isMemberProperty()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.- Returns:
- isMemberProperty
-
isReadOnly
@OslcDescription("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("http://open-services.net/ns/core#readOnly") @OslcReadOnly @OslcTitle("Read Only") public Boolean isReadOnly()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.- Returns:
- readOnly
-
setAllowedValuesRef
-
setDefaultValue
-
setDescription
-
setHidden
-
setMaxSize
-
setMemberProperty
-
setName
-
setOccurs
-
setOccurs
-
setPropertyDefinition
-
setRange
-
setReadOnly
-
setRepresentation
-
setRepresentation
-
setTitle
-
setValueShape
-
setValueType
-
setValueType
-
getAllowedValuesCollection
-
setAllowedValuesCollection
-
addAllowedValue
Deprecated.UsesetAllowedValuesCollection(Collection), which allows for values other than String -
getAllowedValues
Deprecated.UsegetAllowedValuesCollection(), which allows for values other than String -
setAllowedValues
Deprecated.UsesetAllowedValuesCollection(Collection), which allows for values other than String
-
setAllowedValuesCollection(Collection), which allows for values other than String