@Retention(value=RUNTIME)
@Target(value=METHOD)
public static @interface Vocabulary.Field
This annotation has attributes to customize the schema URL (schema.org by default) and the field description (in the case of a custom field).
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
value
Returns the field's name.
|
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
description
Returns the field description, if the field is a custom field;
otherwise returns an empty string.
|
FieldMode |
mode
Returns the mode of the field
|
boolean |
readOnly
Deprecated.
use
mode() instead |
java.lang.String |
schemaURL
Returns the field's schema URL.
|
boolean |
writeOnly
Deprecated.
use
mode() instead |
public abstract java.lang.String value
public abstract java.lang.String description
public abstract FieldMode mode
@Deprecated public abstract boolean readOnly
mode()
insteadtrue
if a field should only be used when representing
the type. If this attribute is true
, it will be ignored when
instantiating the interface from the HTTP request body. This
attribute is the opposite of writeOnly()
.
If this attribute is true
, it will be ignored when
instantiating the interface out of the HTTP request body.
Opposite attribute to writeOnly()
()}.
writeOnly()
public abstract java.lang.String schemaURL
@Deprecated public abstract boolean writeOnly
mode()
insteadtrue
if a field should only be used when
instantiating the interface from the HTTP request body. If this
attribute is true
, it will be ignored when representing the
type in any format. This attribute is the opposite of readOnly()
.
If this attribute is true
, it will be ignored when
representing the type in any format.
Opposite attribute to readOnly()
.
readOnly()