@Bean(properties="name,namespace,prefix,attribute,wrapped,*") public class Xml extends SwaggerElement
When using arrays, XML element names are not inferred (for singular/plural forms) and the name property should be used to add that information.
Constructor and Description |
---|
Xml() |
Modifier and Type | Method and Description |
---|---|
Xml |
attribute(Object value)
Same as
setAttribute(Boolean) . |
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
Boolean |
getAttribute()
Bean property getter:
|
String |
getName()
Bean property getter:
|
String |
getNamespace()
Bean property getter:
|
String |
getPrefix()
Bean property getter:
|
Boolean |
getWrapped()
Bean property getter:
|
Xml |
name(Object value)
Same as
setName(String) . |
Xml |
namespace(Object value)
Same as
setNamespace(String) . |
Xml |
prefix(Object value)
Same as
setPrefix(String) . |
Xml |
set(String property,
Object value)
Generic property setter.
|
Xml |
setAttribute(Boolean value)
Bean property setter:
|
Xml |
setName(String value)
Bean property setter:
|
Xml |
setNamespace(String value)
Bean property setter:
|
Xml |
setPrefix(String value)
Bean property setter:
|
Xml |
setWrapped(Boolean value)
Bean property setter:
|
Xml |
wrapped(Object value)
Same as
setWrapped(Boolean) . |
getExtraProperties, isStrict, strict, strict, toString
public Xml()
public String getName()
Replaces the name of the element/attribute used for the described schema property.
When defined within the Items Object (items
), it will affect the name of the individual XML elements
within the list.
When defined alongside type
being array (outside the items
), it will affect the
wrapping element and only if wrapped is
If wrapped is
public Xml setName(String value)
Replaces the name of the element/attribute used for the described schema property.
When defined within the Items Object (items
), it will affect the name of the individual XML elements
within the list.
When defined alongside type
being array (outside the items
), it will affect the
wrapping element and only if wrapped is
If wrapped is
value
- The new value for this property.
public Xml name(Object value)
setName(String)
.value
- The new value for this property.
toString()
.
public String getNamespace()
The URL of the namespace definition. Value SHOULD be in the form of a URL.
public Xml setNamespace(String value)
The URL of the namespace definition. Value SHOULD be in the form of a URL.
value
- The new value for this property.
public Xml namespace(Object value)
setNamespace(String)
.value
- The new value for this property.
toString()
.
public String getPrefix()
The prefix to be used for the name.
public Xml setPrefix(String value)
The prefix to be used for the name.
value
- The new value for this property.
public Xml prefix(Object value)
setPrefix(String)
.value
- The new value for this property.
toString()
.
public Boolean getAttribute()
Declares whether the property definition translates to an attribute instead of an element.
public Xml setAttribute(Boolean value)
Declares whether the property definition translates to an attribute instead of an element.
value
- The new value for this property.
public Xml attribute(Object value)
setAttribute(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public Boolean getWrapped()
MAY be used only for an array definition.
Signifies whether the array is wrapped (for example,
<books><book/><book/><books>
) or unwrapped
(<book/><book/>
).
The definition takes effect only when defined alongside type
being array
(outside the items
).
public Xml setWrapped(Boolean value)
MAY be used only for an array definition.
Signifies whether the array is wrapped (for example,
<books><book/><book/><books>
) or unwrapped
(<book/><book/>
).
The definition takes effect only when defined alongside type
being array
(outside the items
).
value
- The new value for this property.
public Xml wrapped(Object value)
setWrapped(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public <T> T get(String property, Class<T> type)
SwaggerElement
Can be used to retrieve non-standard Swagger fields such as
get
in class SwaggerElement
property
- The property name to retrieve.type
- The datatype to cast the value to.public Xml set(String property, Object value)
SwaggerElement
Can be used to set non-standard Swagger fields such as
set
in class SwaggerElement
property
- The property name to set.value
- The new value for the property.Copyright © 2018 Apache. All rights reserved.