Class DBaseFileAttributeProvider

    • Constructor Detail

      • DBaseFileAttributeProvider

        DBaseFileAttributeProvider​(DBaseFileAttributeAccessor accessor)
        Constructor.
        Parameters:
        accessor - is the accessor that permits to obtain attributes from a dBase file.
    • 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 the index of the attributes inside the dBase file.
        Returns:
        the index of the attributes inside the dBase file.
      • freeMemory

        public void freeMemory()
        Description copied from interface: AttributeProvider
        Clean the internal memory-storage structures if they exist.

        This function permits to limit the memory usage without removing the attribute value from a hard storage area (database, files...). The attribute which are freed by this method could be reloaded in memory with a call to a getting method.

      • 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.
        Returns:
        the list of all attribute names.
      • getAllAttributes

        @Pure
        public Collection<Attribute> getAllAttributes()
        Description copied from interface: AttributeProvider
        Replies all the attributes.
        Returns:
        the list of all attributes
      • getAllAttributesByType

        @Pure
        public Map<AttributeType,​Collection<Attribute>> getAllAttributesByType()
        Description copied from interface: AttributeProvider
        Replies all the attributes sorted by type.

        The keys of the returned hashtable are the types and the values are array of attributes (Vector).

        Returns:
        the attributes grouped by type.
      • getAttribute

        @Pure
        public AttributeValue getAttribute​(String name)
        Description copied from interface: AttributeProvider
        Replies the value for the given attribute.
        Parameters:
        name - the name.
        Returns:
        the value or null
      • getAttribute

        @Pure
        public AttributeValue getAttribute​(String name,
                                           AttributeValue default_value)
        Description copied from interface: AttributeProvider
        Replies the value for the given attribute.
        Parameters:
        name - the name.
        default_value - is the default value replied if the attribute has no value.
        Returns:
        the value or null
      • getAttributeObject

        @Pure
        public Attribute getAttributeObject​(String name)
        Description copied from interface: AttributeProvider
        Replies the attribute with the given name.
        Parameters:
        name - the name.
        Returns:
        the attribute or null
      • getAttributeObjectFromDBase

        protected final Attribute getAttributeObjectFromDBase​(String name)
        Replies the object directly form the dBase file.
        Parameters:
        name - the name.
        Returns:
        the object directly form the dBase file.
      • hasAttribute

        @Pure
        public boolean hasAttribute​(String name)
        Description copied from interface: AttributeProvider
        Replies if the given attribute exists.
        Parameters:
        name - the name.
        Returns:
        true is an attribute with the given name exists, otherwise false
      • hasAttributeInDBase

        @Pure
        protected final boolean hasAttributeInDBase​(String name)
        Replies if the specified attribute exists inside the dBase file.
        Parameters:
        name - the name.
        Returns:
        true if the given attribute exists inside the dBase file, otherwise false
      • getAttributeCount

        @Pure
        public int getAttributeCount()
        Description copied from interface: AttributeProvider
        Replies the count of attributes.
        Returns:
        the count of attributes.
      • 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, never null.