public abstract class AbstractSirenConverter extends java.lang.Object implements ResourceConverter<Entity>
AbtractConverter
is a base implementation of ResourceConverter
. ResourceConverter implementations
are encouraged to extend from this abstract base class.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX_SRN
SIREN properties prefix
|
static java.lang.String |
REL_CHILD
Relation attribute name "child".
|
static java.lang.String |
REL_CONTENT
Relation attribute name "content".
|
static java.lang.String |
REL_NEXT
Relation attribute name "next".
|
static java.lang.String |
REL_PARENT
Relation attribute name "parent".
|
static java.lang.String |
REL_PREV
Relation attribute name "prev".
|
static java.lang.String |
REL_SELF
Relation attribute name "self".
|
Constructor and Description |
---|
AbstractSirenConverter(Resource resource) |
Modifier and Type | Method and Description |
---|---|
Entity |
toEntity(ResourceConverterContext context)
Converts a
resource into an object of type T to represent
an entity. |
Entity |
toSubEntity(ResourceConverterContext context)
Converts a
resource to an object of type T to represent a
sub-entity. |
public static final java.lang.String PREFIX_SRN
public static final java.lang.String REL_SELF
public static final java.lang.String REL_CHILD
public static final java.lang.String REL_CONTENT
public static final java.lang.String REL_NEXT
public static final java.lang.String REL_PREV
public static final java.lang.String REL_PARENT
public AbstractSirenConverter(Resource resource)
public Entity toEntity(ResourceConverterContext context) throws ResourceConverterException
resource
into an object of type T
to represent
an entity.toEntity
in interface ResourceConverter<Entity>
context
- Converter contextResourceConverterException
- if an error occurs during conversionpublic Entity toSubEntity(ResourceConverterContext context) throws ResourceConverterException
ResourceConverter
resource
to an object of type T
to represent a
sub-entity. The sub-entity might only contain a subset of information and
might be used to represent child elements of a collection.toSubEntity
in interface ResourceConverter<Entity>
context
- Converter contextResourceConverterException
- if an error occurs during conversionCopyright © 2010 - 2020 Adobe. All Rights Reserved