Package org.vast.data
Class DataBlockProxy
java.lang.Object
org.vast.data.DataBlockProxy
- All Implemented Interfaces:
 InvocationHandler,IDataAccessor
This class dynamically generates an accessor with Java Dynamic Proxy Classes using a data component schema and an interface with annotations that maps get/set methods to component paths.
 The SweComponent annotation must be used. When omitted, the
 generator will try to infer the name of the component from the get/set method
 name and look for a corresponding component at the root of the record. 
 
The following data types are supported in get/set methods: - All primitive types - java.time.Instant - java.lang.Date - JTS geometries - SWE vector, quaternion, matrix, etc. - primitive arrays?
TODO more efficient implementation based on generated methods compiled in memory with Janino or equivalent.- Since:
 - Jan 20, 2025
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.vast.data.IDataAccessor
IDataAccessor.SweMapping - 
Method Summary
Modifier and TypeMethodDescriptionprotected DataArrayassertDataArray(Method m, DataComponent comp) protected InstantconvertToInstant(DataBlock data) protected Collection<IDataAccessor>createCollection(Class<IDataAccessor> clazz, DataArray array) protected IDataAccessorcreateElementProxy(Class<IDataAccessor> clazz, DataComponent arrayElt) protected DataComponentstatic <T extends IDataAccessor>
Tgenerate(DataComponent recordSchema, Class<T> targetInterface) protected booleanprotected booleanprotected booleanprotected booleanprotected voidsetFromInstant(DataBlock data, Instant ts) toString()void 
- 
Method Details
- 
generate
public static <T extends IDataAccessor> T generate(DataComponent recordSchema, Class<T> targetInterface)  - 
invoke
- Specified by:
 invokein interfaceInvocationHandler
 - 
findComponentData
 - 
isGetMethod
 - 
isSetMethod
 - 
isAddMethod
 - 
isSetNumMethod
 - 
convertToInstant
 - 
setFromInstant
 - 
createElementProxy
 - 
createCollection
 - 
assertDataArray
 - 
wrap
- Specified by:
 wrapin interfaceIDataAccessor
 - 
toString
 
 -