T
- the type of values that the content type is used forpublic class ContentType<T> extends Object implements IType<T>
Data values of the same content type should be able share a single axis in a graph.
Modifier and Type | Field and Description |
---|---|
protected String |
m_identifier |
Constructor and Description |
---|
ContentType(String identifier,
String localizedName) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFormatter(DisplayFormatter<T> formatter) |
<M> IMemberAccessor<M,T> |
getAccessor(IAccessorKey<M> attribute)
Internal low-level mechanism for retrieving a member accessor for a type, or null if not
available.
|
Map<IAccessorKey<?>,? extends IDescribable> |
getAccessorKeys()
Get keys for the accessors that this type knows of.
|
List<IAttribute<?>> |
getAttributes() |
IFormatter<T> |
getDefaultFormatter() |
String |
getDescription() |
IFormatter<T> |
getFormatter(String formatterIdentifier) |
List<DisplayFormatter<T>> |
getFormatters() |
String |
getIdentifier()
String identifying the type.
|
String |
getName() |
IPersister<T> |
getPersister() |
boolean |
hasAttribute(ICanonicalAccessorFactory<?> attribute)
|
protected static String |
lookupNameFor(String typeIdentifier) |
String |
toString() |
protected final String m_identifier
protected void addFormatter(DisplayFormatter<T> formatter)
public List<DisplayFormatter<T>> getFormatters()
public IFormatter<T> getDefaultFormatter()
public String getName()
getName
in interface IDescribable
public String getIdentifier()
IType
getIdentifier
in interface IType<T>
public IPersister<T> getPersister()
public IFormatter<T> getFormatter(String formatterIdentifier)
public String getDescription()
getDescription
in interface IDescribable
public List<IAttribute<?>> getAttributes()
getAttributes
in interface IType<T>
public Map<IAccessorKey<?>,? extends IDescribable> getAccessorKeys()
IType
Should only be used for low level type inspection. Iterators etc. should use a collection of
predefined attributes
.
getAccessorKeys
in interface IType<T>
public boolean hasAttribute(ICanonicalAccessorFactory<?> attribute)
IType
attribute
can return an accessor
for this type
. This method is semantically equivalent to
attribute.getAccessor(type)
!= null
,
but may be cheaper.hasAttribute
in interface IType<T>
attribute
- attribute to checktrue
if the attribute can return an accessor for this type, false
if
notpublic <M> IMemberAccessor<M,T> getAccessor(IAccessorKey<M> attribute)
IType
This is only intended to be used by implementors of IAccessorFactory
. All other usage
should be replaced with ICanonicalAccessorFactory.getAccessor(IType)
call to pre-defined accessors.
getAccessor
in interface IType<T>
M
- accessor value typeattribute
- the identifier for the fieldCopyright © 2020. All rights reserved.