Class AttributeTypeHelper
- java.lang.Object
-
- science.aist.fhirauditeventtoocel.AttributeTypeHelper
-
public class AttributeTypeHelper extends Object
Utility class which helps creating sub types of
AttributeType
- Since:
- 1.0
- Author:
- Andreas Pointner
-
-
Constructor Summary
Constructors Constructor Description AttributeTypeHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description science.aist.ocel.model.AttributeDateType
date(String key, Date date)
Creates aAttributeDateType
with the given key and dateXMLGregorianCalendar
dateToGregorianCalendar(Date date)
Create aXMLGregorianCalendar
element with the same timestamp asDate
.science.aist.ocel.model.AttributeListType
list(String key, Stream<science.aist.ocel.model.AttributeType> elements)
Creates aAttributeListType
and adds all elements from the givenStream
to the elementscience.aist.ocel.model.AttributeStringType
string(String key, String value)
Creates aAttributeStringType
with the given key and value
-
-
-
Method Detail
-
string
public science.aist.ocel.model.AttributeStringType string(String key, String value)
Creates aAttributeStringType
with the given key and value- Parameters:
key
- the key of theAttributeStringType
AttributeType.setKey(String)
value
- the value of theAttributeStringType
AttributeStringType.setValue(String)
- Returns:
- the created
AttributeStringType
-
date
public science.aist.ocel.model.AttributeDateType date(String key, Date date)
Creates aAttributeDateType
with the given key and date- Parameters:
key
- the key of theAttributeDateType
AttributeType.setKey(String)
date
- the date of theAttributeDateType
AttributeDateType.setValue(XMLGregorianCalendar)
- Returns:
- the created
AttributeDateType
-
list
public science.aist.ocel.model.AttributeListType list(String key, Stream<science.aist.ocel.model.AttributeType> elements)
Creates aAttributeListType
and adds all elements from the givenStream
to the element- Parameters:
key
- the key of theAttributeListType
AttributeType.setKey(String)
elements
- the elements that are addedAttributableType.getStringOrDateOrInt()
- Returns:
- the created
AttributeListType
-
dateToGregorianCalendar
public XMLGregorianCalendar dateToGregorianCalendar(Date date)
Create aXMLGregorianCalendar
element with the same timestamp asDate
.- Parameters:
date
- the data that should be converted- Returns:
- the resulting
XMLGregorianCalendar
element
-
-