Package co.ecg.alpaca.core.model
Class XMLMessage
java.lang.Object
co.ecg.alpaca.core.model.XMLMessage
- All Implemented Interfaces:
Serializable
A model for an XML message. Comes with utility methods for parsing the XML content.
- Version:
- $Id: $Id
- Author:
- Matthew Keathley on 2/15/17.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for XMLMessage.XMLMessage
(String content) Constructor for XMLMessage. -
Method Summary
Modifier and TypeMethodDescriptiongetBoolean
(String xPathExpression) Get a Boolean element by XPath ExpressionGetter for the fieldcontent
.Returns theLocalDate
given the XML Date.getDateTime
(String xPathExpression) Returns theOffsetDateTime
given the XML DateTime.getFloat.getInteger
(String xPathExpression) getInteger.Integer[]
getIntegerArray
(String xPathExpression) Get an array of Integer elements by XPath ExpressiongetLong.Get a Node element by XPath ExpressionNode[]
getNodeArray
(String xPathExpression) Get an array of Node elements by XPath ExpressionGet a Double element by XPath ExpressionGet a String element by XPath ExpressionString[]
getStringArray
(String xPathExpression) Get an array of String elements by XPath ExpressionReturns theOffsetTime
given the XML Time.void
setContent
(String content) Setter for the fieldcontent
.
-
Field Details
-
-
xPath
-
-
Constructor Details
-
XMLMessage
public XMLMessage()Constructor for XMLMessage.
-
XMLMessage
Constructor for XMLMessage.
- Parameters:
content
- aString
object.
-
-
Method Details
-
getContent
Getter for the field
content
.- Returns:
- a
String
object.
-
setContent
Setter for the field
content
.- Parameters:
content
- aString
object.
-
getBoolean
Get a Boolean element by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The Boolean determined by the XPath expression or NULL if not found.
-
getTime
Returns theOffsetTime
given the XML Time.- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The parsed OffsetTime.
-
getDate
Returns theLocalDate
given the XML Date.- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The parsed MonthDay.
-
getDateTime
Returns theOffsetDateTime
given the XML DateTime.- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The parsed OffsetDateTime.
-
getFloat
getFloat.
-
getInteger
getInteger.
-
getIntegerArray
Get an array of Integer elements by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The array of Integer determined by the XPath expression or NULL if not found
-
getLong
getLong.
-
getNode
Get a Node element by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The Node determined by the XPath expression of NULL if not found
-
getNodeArray
Get an array of Node elements by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The array of Strings determined by the XPath expression or NULL if not found
-
getNumber
Get a Double element by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The Double value of the XPath String
-
getString
Get a String element by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The String determined by the XPath expression or NULL if not found
-
getStringArray
Get an array of String elements by XPath Expression- Parameters:
xPathExpression
- The expression to retrieve.- Returns:
- The array of Strings determined by the XPath expression or NULL if not found
-