public class StreamLink extends DataValue
Represents a link to the value of a media entity resource or a stream-typed property.
Constructor and Description |
---|
StreamLink() |
Modifier and Type | Method and Description |
---|---|
StreamLink |
copyLink()
Return a copy of this stream link.
|
static boolean |
equal(StreamLink a,
StreamLink b)
Return
true if two stream links have equal read/edit links. |
DataType |
getDataType()
Return the type BasicType.STREAM_LINK.
|
java.lang.String |
getEditLink()
Return (nullable) The edit link for this value, preferably relative to the service root URL.
|
EntitySet |
getEntitySet()
Return (nullable) Which entity set does this stream link belong to?
|
java.lang.String |
getEntityTag()
Return (nullable) Server-generated entity tag for this entity.
|
byte[] |
getInlineData()
Return (nullable) Inline binary content if known, otherwise
null . |
java.lang.String |
getInlineText()
Return (nullable) Inline string content if known, otherwise
null . |
java.lang.String |
getMediaType()
Return (nullable) Media type if known, otherwise
null . |
StructureType |
getOwningType()
Return which structure type does this stream link belong to?
|
java.lang.String |
getReadLink()
Return (nullable) The read link for this value, preferably relative to the service root URL.
|
StreamProperty |
getStreamProperty()
Return which stream property does this stream link belong to?
|
int |
getTypeCode()
Return data type code of the wrapped value, equivalent to
dataType.code . |
java.lang.String |
getValuePath()
Return (nullable) The canonical path of this value relative to the parent entity URL.
|
boolean |
isDeleted()
Return if the stream content has been (or is being) deleted, then
true , otherwise false . |
boolean |
isOffline()
Return if the stream content is available offline, then
true , otherwise false . |
void |
setDeleted(boolean value)
Set if the stream content has been (or is being) deleted, then
true , otherwise false . |
void |
setEditLink(java.lang.String value)
Set the edit link for this value, preferably relative to the service root URL.
|
void |
setEntitySet(EntitySet value)
Set which entity set does this stream link belong to?
|
void |
setEntityTag(java.lang.String value)
Set server-generated entity tag for this entity.
|
void |
setInlineData(byte[] value)
Set inline binary content if known, otherwise
null . |
void |
setInlineText(java.lang.String value)
Set inline string content if known, otherwise
null . |
void |
setMediaType(java.lang.String value)
Set media type if known, otherwise
null . |
void |
setOffline(boolean value)
Set if the stream content is available offline, then
true , otherwise false . |
void |
setOwningType(StructureType value)
Set which structure type does this stream link belong to?
|
void |
setReadLink(java.lang.String value)
Set the read link for this value, preferably relative to the service root URL.
|
void |
setStreamProperty(StreamProperty value)
Set which stream property does this stream link belong to?
|
void |
setValuePath(java.lang.String value)
Set the canonical path of this value relative to the parent entity URL.
|
java.lang.String |
toString()
Convert this data value to a string.
|
cloneMutable, equals, hashCode
public StreamLink copyLink()
Return a copy of this stream link.
public static boolean equal(StreamLink a, StreamLink b)
Return true
if two stream links have equal read/edit links.
a
- (nullable) First stream link.b
- (nullable) Second stream link.true
if two stream links have equal read/edit links.public DataType getDataType()
Return the type BasicType.STREAM_LINK.
getDataType
in class DataValue
public java.lang.String getEditLink()
Return (nullable) The edit link for this value, preferably relative to the service root URL.
If a stream does not have an explicit edit link, then writers should use the StreamLink.valuePath
,
or if that is not set, then a canonical URL (refer to the OData specification).
public EntitySet getEntitySet()
Return (nullable) Which entity set does this stream link belong to?
public java.lang.String getEntityTag()
Return (nullable) Server-generated entity tag for this entity.
If non-null, it is used for conflict detection during
DataService.uploadMedia
and DataService.uploadStream
calls.
public byte[] getInlineData()
Return (nullable) Inline binary content if known, otherwise null
.
null
.public java.lang.String getInlineText()
Return (nullable) Inline string content if known, otherwise null
.
null
.public java.lang.String getMediaType()
Return (nullable) Media type if known, otherwise null
.
public StructureType getOwningType()
Return which structure type does this stream link belong to?
public java.lang.String getReadLink()
Return (nullable) The read link for this value, preferably relative to the service root URL.
If a stream does not have an explicit read link, then readers should use the StreamLink.valuePath
,
or if that is not set, then a canonical URL (refer to the OData specification).
public StreamProperty getStreamProperty()
Return which stream property does this stream link belong to?
public int getTypeCode()
Return data type code of the wrapped value, equivalent to dataType.code
.
getTypeCode
in class DataValue
dataType.code
.public java.lang.String getValuePath()
Return (nullable) The canonical path of this value relative to the parent entity URL.
public boolean isDeleted()
Return if the stream content has been (or is being) deleted, then true
, otherwise false
.
true
, otherwise false
.public boolean isOffline()
Return if the stream content is available offline, then true
, otherwise false
.
true
, otherwise false
.public void setDeleted(boolean value)
Set if the stream content has been (or is being) deleted, then true
, otherwise false
.
value
- If the stream content has been (or is being) deleted, then true
, otherwise false
.public void setEditLink(java.lang.String value)
Set the edit link for this value, preferably relative to the service root URL.
If a stream does not have an explicit edit link, then writers should use the StreamLink.valuePath
,
or if that is not set, then a canonical URL (refer to the OData specification).
value
- The edit link for this value, preferably relative to the service root URL.public void setEntitySet(EntitySet value)
Set which entity set does this stream link belong to?
value
- Which entity set does this stream link belong to?public void setEntityTag(java.lang.String value)
Set server-generated entity tag for this entity.
If non-null, it is used for conflict detection during
DataService.uploadMedia
and DataService.uploadStream
calls.
value
- Server-generated entity tag for this entity.public void setInlineData(byte[] value)
Set inline binary content if known, otherwise null
.
value
- Inline binary content if known, otherwise null
.public void setInlineText(java.lang.String value)
Set inline string content if known, otherwise null
.
value
- Inline string content if known, otherwise null
.public void setMediaType(java.lang.String value)
Set media type if known, otherwise null
.
value
- Media type if known, otherwise `null`.public void setOffline(boolean value)
Set if the stream content is available offline, then true
, otherwise false
.
value
- If the stream content is available offline, then true
, otherwise false
.public void setOwningType(StructureType value)
Set which structure type does this stream link belong to?
value
- Which structure type does this stream link belong to?public void setReadLink(java.lang.String value)
Set the read link for this value, preferably relative to the service root URL.
If a stream does not have an explicit read link, then readers should use the StreamLink.valuePath
,
or if that is not set, then a canonical URL (refer to the OData specification).
value
- The read link for this value, preferably relative to the service root URL.public void setStreamProperty(StreamProperty value)
Set which stream property does this stream link belong to?
value
- Which stream property does this stream link belong to?public void setValuePath(java.lang.String value)
Set the canonical path of this value relative to the parent entity URL.
value
- The canonical path of this value relative to the parent entity URL.public java.lang.String toString()
Convert this data value to a string.
If the StreamLink.dataType
is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used.
JSON format is used for structured values (arrays and objects).