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.AttributeDateTypedate(String key, Date date)Creates aAttributeDateTypewith the given key and dateXMLGregorianCalendardateToGregorianCalendar(Date date)Create aXMLGregorianCalendarelement with the same timestamp asDate.science.aist.ocel.model.AttributeListTypelist(String key, Stream<science.aist.ocel.model.AttributeType> elements)Creates aAttributeListTypeand adds all elements from the givenStreamto the elementscience.aist.ocel.model.AttributeStringTypestring(String key, String value)Creates aAttributeStringTypewith the given key and value
-
-
-
Method Detail
-
string
public science.aist.ocel.model.AttributeStringType string(String key, String value)
Creates aAttributeStringTypewith the given key and value- Parameters:
key- the key of theAttributeStringTypeAttributeType.setKey(String)value- the value of theAttributeStringTypeAttributeStringType.setValue(String)- Returns:
- the created
AttributeStringType
-
date
public science.aist.ocel.model.AttributeDateType date(String key, Date date)
Creates aAttributeDateTypewith the given key and date- Parameters:
key- the key of theAttributeDateTypeAttributeType.setKey(String)date- the date of theAttributeDateTypeAttributeDateType.setValue(XMLGregorianCalendar)- Returns:
- the created
AttributeDateType
-
list
public science.aist.ocel.model.AttributeListType list(String key, Stream<science.aist.ocel.model.AttributeType> elements)
Creates aAttributeListTypeand adds all elements from the givenStreamto the element- Parameters:
key- the key of theAttributeListTypeAttributeType.setKey(String)elements- the elements that are addedAttributableType.getStringOrDateOrInt()- Returns:
- the created
AttributeListType
-
dateToGregorianCalendar
public XMLGregorianCalendar dateToGregorianCalendar(Date date)
Create aXMLGregorianCalendarelement with the same timestamp asDate.- Parameters:
date- the data that should be converted- Returns:
- the resulting
XMLGregorianCalendarelement
-
-