Top Description Methods
org.eclipse.microprofile.openapi.models.media

public Interface XML

extends Constructible, Extensible<XML>
Imports
org.eclipse.microprofile.openapi.models.Constructible, .Extensible

A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information.
See Also
OpenAPI Specification XML Object

Method Summary

Modifier and TypeMethod and Description
public default XML

Returns:

XML instance with the set attribute property
attribute
(Boolean
a boolean that declares whether the property definition translates to an attribute instead of an element
attribute
)

This method sets the attribute property of XML instance to the given Boolean argument and returns the modified instance.

public Boolean

Returns:

Boolean attribute
getAttribute
()

This method returns the attribute property of XML instance.

public String

Returns:

String name
getName
()

This method returns the name property from XML instance.

public String

Returns:

String namespace
getNamespace
()

This method returns the namespace property of XML instance.

public String

Returns:

String prefix
getPrefix
()

This method returns the prefix property of XML instance.

public Boolean

Returns:

Boolean wrapped
getWrapped
()

This method returns the wrapped property of XML instance.

public default XML

Returns:

XML instance with the set name property
name
(String
the name of this XML instance
name
)

This method sets the name property of XML instance to the given String argument and returns the modified instance.

public default XML

Returns:

XML instance with the set namespace property
namespace
(String
the URI of the namespace definition
namespace
)

This method sets the namespace property of XML instance to the given String argument and returns the modified instance.

public default XML

Returns:

XML instance with the set prefix property
prefix
(String
string prefix to be used with the name
prefix
)

This method sets the prefix property of XML instance to the given String argument and returns the modified instance.

public void
setAttribute(Boolean
a boolean that declares whether the property definition translates to an attribute instead of an element
attribute
)

This method sets the attribute property of XML instance to the given Boolean argument.

public void
setName(String
the name of this XML instance
name
)

This method sets the name property of XML instance to the given String argument.

public void
setNamespace(String
the URI of the namespace definition
namespace
)

This method sets the namespace property of XML instance to the given String argument.

public void
setPrefix(String
string prefix to be used with the name
prefix
)

This method sets the prefix property of XML instance to the given String argument.

public void
setWrapped(Boolean
a boolean that signifies whether the array is wrapped
wrapped
)

This method sets the wrapped property of XML instance to the given Boolean argument.

public default XML

Returns:

XML instance with the set wrapped property
wrapped
(Boolean
a boolean that signifies whether the array is wrapped
wrapped
)

This method sets the wrapped property of XML instance to the given Boolean argument and returns the modified instance.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions

Method Detail

attributeback to summary
public default XML attribute(Boolean attribute)

This method sets the attribute property of XML instance to the given Boolean argument and returns the modified instance.

Attribute property declares whether the property definition translates to an attribute instead of an element. Default value is FALSE.

Parameters
attribute:Boolean

a boolean that declares whether the property definition translates to an attribute instead of an element

Returns:XML

XML instance with the set attribute property

getAttributeback to summary
public Boolean getAttribute()

This method returns the attribute property of XML instance.

Attribute property declares whether the property definition translates to an attribute instead of an element. Default value is FALSE.

Returns:Boolean

Boolean attribute

getNameback to summary
public String getName()

This method returns the name property from XML instance.

The name property replaces the name of the element/attribute used for the described schema property.

Returns:String

String name

getNamespaceback to summary
public String getNamespace()

This method returns the namespace property of XML instance.

The namespace property is the URI of the namespace definition. Value MUST be in the form of an absolute URI.

Returns:String

String namespace

getPrefixback to summary
public String getPrefix()

This method returns the prefix property of XML instance.

This property is a String prefix to be used for the name.

Returns:String

String prefix

getWrappedback to summary
public Boolean getWrapped()

This method returns the wrapped property of XML instance.

Wrapped property MAY be used only for an array definition. Signifies whether the array is wrapped. The definition takes effect only when defined alongside type being array. Default value is FALSE.

Returns:Boolean

Boolean wrapped

nameback to summary
public default XML name(String name)

This method sets the name property of XML instance to the given String argument and returns the modified instance.

The name property replaces the name of the element/attribute used for the described schema property.

Parameters
name:String

the name of this XML instance

Returns:XML

XML instance with the set name property

namespaceback to summary
public default XML namespace(String namespace)

This method sets the namespace property of XML instance to the given String argument and returns the modified instance.

The namespace property is the URI of the namespace definition. Value MUST be in the form of an absolute URI.

Parameters
namespace:String

the URI of the namespace definition

Returns:XML

XML instance with the set namespace property

prefixback to summary
public default XML prefix(String prefix)

This method sets the prefix property of XML instance to the given String argument and returns the modified instance.

This property is a String prefix to be used for the name.

Parameters
prefix:String

string prefix to be used with the name

Returns:XML

XML instance with the set prefix property

setAttributeback to summary
public void setAttribute(Boolean attribute)

This method sets the attribute property of XML instance to the given Boolean argument.

Attribute property declares whether the property definition translates to an attribute instead of an element. Default value is FALSE.

Parameters
attribute:Boolean

a boolean that declares whether the property definition translates to an attribute instead of an element

setNameback to summary
public void setName(String name)

This method sets the name property of XML instance to the given String argument.

The name property replaces the name of the element/attribute used for the described schema property.

Parameters
name:String

the name of this XML instance

setNamespaceback to summary
public void setNamespace(String namespace)

This method sets the namespace property of XML instance to the given String argument.

The namespace property is the URI of the namespace definition. Value MUST be in the form of an absolute URI.

Parameters
namespace:String

the URI of the namespace definition

setPrefixback to summary
public void setPrefix(String prefix)

This method sets the prefix property of XML instance to the given String argument.

This property is a String prefix to be used for the name.

Parameters
prefix:String

string prefix to be used with the name

setWrappedback to summary
public void setWrapped(Boolean wrapped)

This method sets the wrapped property of XML instance to the given Boolean argument.

Wrapped property MAY be used only for an array definition. Signifies whether the array is wrapped. The definition takes effect only when defined alongside type being array. Default value is FALSE.

Parameters
wrapped:Boolean

a boolean that signifies whether the array is wrapped

wrappedback to summary
public default XML wrapped(Boolean wrapped)

This method sets the wrapped property of XML instance to the given Boolean argument and returns the modified instance.

Wrapped property MAY be used only for an array definition. Signifies whether the array is wrapped. The definition takes effect only when defined alongside type being array. Default value is FALSE.

Parameters
wrapped:Boolean

a boolean that signifies whether the array is wrapped

Returns:XML

XML instance with the set wrapped property