public class BasicBeanDefMapper extends Object implements BeanDefMapper
BeanDefMapper
interface.
IDs are created by calling Class.getSimpleName()
.
URIs are constructed using the pattern
Modifier | Constructor and Description |
---|---|
|
BasicBeanDefMapper()
Default constructor.
|
protected |
BasicBeanDefMapper(String uriPattern)
Constructor that allows you to override the URI pattern.
|
Modifier and Type | Method and Description |
---|---|
String |
getId(ClassMeta<?> cm)
Returns the ID for the specified class.
|
URI |
getURI(ClassMeta<?> cm)
Returns the URI for the specified class.
|
URI |
getURI(String id)
Returns the URI for the specified class by its ID.
|
public BasicBeanDefMapper()
protected BasicBeanDefMapper(String uriPattern)
uriPattern
- The URI pattern using MessageFormat
-style arguments.public String getId(ClassMeta<?> cm)
BeanDefMapper
getId
in interface BeanDefMapper
cm
- The class.public URI getURI(ClassMeta<?> cm)
BeanDefMapper
getURI
in interface BeanDefMapper
cm
- The class.public URI getURI(String id)
BeanDefMapper
getURI
in interface BeanDefMapper
id
- The class ID.Copyright © 2018 Apache. All rights reserved.