public List<ResourceLink> getLinks() {
List<ResourceLink> links = super.getLinks();
if (getUriInfo() != null) {
if(doesNotContainRel("self") && id != null) {
links.add(
new ResourceLink(
"self",
getUriInfo().getBaseUriBuilder()
.path(SessionResource.class)
.segment("{id}")
.build(id),
SessionResource.SESSION_XML_MEDIA_TYPE));
}
if(doesNotContainRel("parent") && parentId != null) {
links.add(
new ResourceLink(
"parent",
getUriInfo().getBaseUriBuilder()
.path(ConferenceResource.class)
.segment("{id}")
.build(parentId),