Package org.arakhne.afc.io.dbase.attr
Class DBaseFileAttributeAccessor
- java.lang.Object
-
- org.arakhne.afc.attrs.collection.AbstractAttributeProvider
-
- org.arakhne.afc.attrs.collection.AbstractBufferedAttributeProvider
-
- org.arakhne.afc.io.dbase.attr.DBaseFileAttributeAccessor
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Attribute>
,AttributeProvider
,JsonableObject
class DBaseFileAttributeAccessor extends AbstractBufferedAttributeProvider
This class permits to access to the attributes stored inside a dBase file.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:52
- Author:
- Stéphane GALLAND
- See Also:
DBaseFileAttributeProvider
,DBaseFileAttributeProvider
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- dbasefile
-
-
Constructor Summary
Constructors Constructor Description DBaseFileAttributeAccessor(DBaseFileAttributePool pool, int recordNumber)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
getAllAttributeNames()
Replies all the attribute names.int
getAttributeCount()
Replies the count of attributes.int
getRecordNumber()
Replies record number that is red by this container.URL
getResource()
Replies the URL where the dBase file is located.protected AttributeValue
loadValue(String name)
Load a value from the data source.void
toMap(Map<String,Object> mapToFill)
Fill the given map with the values stored in this attribute provider.-
Methods inherited from class org.arakhne.afc.attrs.collection.AbstractBufferedAttributeProvider
clone, freeMemory, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttributeObject, hasAttribute
-
Methods inherited from class org.arakhne.afc.attrs.collection.AbstractAttributeProvider
attributes, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, iterator, protectNull, toJson, toString, unprotectNull
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeProvider
toMap
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DBaseFileAttributeAccessor
DBaseFileAttributeAccessor(DBaseFileAttributePool pool, int recordNumber)
Constructor.- Parameters:
pool
- is the pool associated to this accessor.recordNumber
- is the record index of this accessor.
-
-
Method Detail
-
getResource
@Pure public URL getResource()
Replies the URL where the dBase file is located.- Returns:
- the URL where the dBase file is located.
-
getRecordNumber
@Pure public int getRecordNumber()
Replies record number that is red by this container.This number could changed between two call to this function.
- Returns:
- the record number (
0..recordCount-1
).
-
getAttributeCount
@Pure public int getAttributeCount()
Description copied from interface:AttributeProvider
Replies the count of attributes.- Returns:
- the count of attributes.
-
getAllAttributeNames
@Pure public Collection<String> getAllAttributeNames()
Description copied from interface:AttributeProvider
Replies all the attribute names. This function never load the attribute values even if they are not inside the storage layer.- Specified by:
getAllAttributeNames
in interfaceAttributeProvider
- Specified by:
getAllAttributeNames
in classAbstractBufferedAttributeProvider
- Returns:
- the list of all attribute names.
-
loadValue
protected AttributeValue loadValue(String name) throws AttributeException
Description copied from class:AbstractBufferedAttributeProvider
Load a value from the data source.- Specified by:
loadValue
in classAbstractBufferedAttributeProvider
- Parameters:
name
- is the name of the attribute to load- Returns:
- the value of the attribute.
- Throws:
AttributeException
- on error or when the attribute does not exist
-
toMap
@Pure public void toMap(Map<String,Object> mapToFill)
Description copied from interface:AttributeProvider
Fill the given map with the values stored in this attribute provider.- Parameters:
mapToFill
- is the map to fill, nevernull
.
-
-