Class ResearchObjectResourceAssembler
- java.lang.Object
-
- uk.org.esciencelab.researchobjectservice.researchobject.ResearchObjectResourceAssembler
-
- All Implemented Interfaces:
org.springframework.hateoas.ResourceAssembler<ResearchObject,org.springframework.hateoas.Resource<ResearchObject>>
@Component public class ResearchObjectResourceAssembler extends java.lang.Object implements org.springframework.hateoas.ResourceAssembler<ResearchObject,org.springframework.hateoas.Resource<ResearchObject>>
An assembler to control how a Research Object is serialized as a HAL+JSON document.
-
-
Constructor Summary
Constructors Constructor Description ResearchObjectResourceAssembler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.hateoas.Resource<ResearchObject>
toResource(ResearchObject researchObject)
Create a Research Object "resource" which consists of a serialized ResearchObject bean, and various links where additional requests can be performed, including a link to the profile, a link to get the content as plain JSON in isolation, and links to each top-level field in the content.
-
-
-
Method Detail
-
toResource
public org.springframework.hateoas.Resource<ResearchObject> toResource(ResearchObject researchObject)
Create a Research Object "resource" which consists of a serialized ResearchObject bean, and various links where additional requests can be performed, including a link to the profile, a link to get the content as plain JSON in isolation, and links to each top-level field in the content.- Specified by:
toResource
in interfaceorg.springframework.hateoas.ResourceAssembler<ResearchObject,org.springframework.hateoas.Resource<ResearchObject>>
- Parameters:
researchObject
-- Returns:
-
-