|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.property.ValueTypeSystem
public class ValueTypeSystem
Nested Class Summary | |
---|---|
protected class |
ValueTypeSystem.Factory<T>
|
Nested classes/interfaces inherited from interface org.modeshape.graph.query.model.TypeSystem |
---|
TypeSystem.TypeFactory<T> |
Field Summary | |
---|---|
protected ValueFactory<String> |
stringValueFactory
|
protected ValueFactories |
valueFactories
|
Constructor Summary | |
---|---|
ValueTypeSystem(ValueFactories valueFactories)
Create a type system using the supplied value factories. |
Method Summary | |
---|---|
String |
asString(Object value)
Get the string representation of the supplied value, using the most appropriate factory given the value. |
TypeSystem.TypeFactory<?> |
getBinaryFactory()
Get the type factory for binary objects. |
TypeSystem.TypeFactory<Boolean> |
getBooleanFactory()
Get the type factory for boolean types. |
String |
getCompatibleType(String type1,
String type2)
Get the type that is compatible with both of the supplied types. |
TypeSystem.TypeFactory<?> |
getDateTimeFactory()
Get the type factory for date-time objects. |
TypeSystem.TypeFactory<BigDecimal> |
getDecimalFactory()
Get the type factory for decimal types. |
Comparator<Object> |
getDefaultComparator()
Get the comparator that should be used by default. |
String |
getDefaultType()
Get the name of the type that is used by default. |
TypeSystem.TypeFactory<Double> |
getDoubleFactory()
Get the type factory for double types. |
TypeSystem.TypeFactory<Long> |
getLongFactory()
Get the type factory for long types. |
TypeSystem.TypeFactory<?> |
getPathFactory()
Get the type factory for path objects. |
TypeSystem.TypeFactory<?> |
getReferenceFactory()
Get the type factory for references objects. |
TypeSystem.TypeFactory<String> |
getStringFactory()
Get the type factory for string types. |
TypeSystem.TypeFactory<?> |
getTypeFactory(Object prototype)
Get the type factory for the type denoted by the supplied prototype value. |
TypeSystem.TypeFactory<?> |
getTypeFactory(String typeName)
Get the type factory given the name of the type. |
Set<String> |
getTypeNames()
Get the names of the supported types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ValueFactories valueFactories
protected final ValueFactory<String> stringValueFactory
Constructor Detail |
---|
public ValueTypeSystem(ValueFactories valueFactories)
valueFactories
- the value factories;
IllegalArgumentException
- if the value factories are nullMethod Detail |
---|
public String asString(Object value)
asString
in interface TypeSystem
value
- the value
TypeSystem.asString(java.lang.Object)
public TypeSystem.TypeFactory<Boolean> getBooleanFactory()
getBooleanFactory
in interface TypeSystem
TypeSystem.getBooleanFactory()
public TypeSystem.TypeFactory<String> getStringFactory()
getStringFactory
in interface TypeSystem
TypeSystem.getStringFactory()
public TypeSystem.TypeFactory<?> getDateTimeFactory()
getDateTimeFactory
in interface TypeSystem
TypeSystem.getDateTimeFactory()
public String getDefaultType()
getDefaultType
in interface TypeSystem
TypeSystem.getDefaultType()
public Comparator<Object> getDefaultComparator()
getDefaultComparator
in interface TypeSystem
TypeSystem.getDefaultComparator()
public TypeSystem.TypeFactory<Double> getDoubleFactory()
getDoubleFactory
in interface TypeSystem
TypeSystem.getDoubleFactory()
public TypeSystem.TypeFactory<BigDecimal> getDecimalFactory()
getDecimalFactory
in interface TypeSystem
TypeSystem.getDecimalFactory()
public TypeSystem.TypeFactory<Long> getLongFactory()
getLongFactory
in interface TypeSystem
TypeSystem.getLongFactory()
public TypeSystem.TypeFactory<?> getPathFactory()
getPathFactory
in interface TypeSystem
TypeSystem.getPathFactory()
public TypeSystem.TypeFactory<?> getReferenceFactory()
getReferenceFactory
in interface TypeSystem
TypeSystem.getReferenceFactory()
public TypeSystem.TypeFactory<?> getBinaryFactory()
getBinaryFactory
in interface TypeSystem
TypeSystem.getBinaryFactory()
public TypeSystem.TypeFactory<?> getTypeFactory(String typeName)
getTypeFactory
in interface TypeSystem
typeName
- the name of the type
TypeSystem.getTypeFactory(java.lang.String)
public TypeSystem.TypeFactory<?> getTypeFactory(Object prototype)
getTypeFactory
in interface TypeSystem
prototype
- the value whose type is to be identified
TypeSystem.getTypeFactory(java.lang.Object)
public Set<String> getTypeNames()
getTypeNames
in interface TypeSystem
TypeSystem.getTypeNames()
public String getCompatibleType(String type1, String type2)
getCompatibleType
in interface TypeSystem
type1
- the first type; may be nulltype2
- the second type; may be null
TypeSystem.getCompatibleType(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |