ilog.views.maps.format.shapefile
Class IlvDBFAttributeInfo

java.lang.Object
  extended by ilog.views.maps.format.shapefile.IlvDBFAttributeInfo

public class IlvDBFAttributeInfo
extends Object

This class describes the records for .dbf files.

Records in a .dbf file are described by the following information:

The name and type of attributes are computed from the IlvAttributeInfoProperty associated to the attributes to write. The size of each field can be set. The default sizes corresponding to the attributes of each fields are:

Since:
JViews 5.0
See Also:
IlvDBFWriter

Constructor Summary
IlvDBFAttributeInfo(IlvAttributeInfoProperty info)
          Constructs a new IlvDBFAttributeInfo.
 
Method Summary
 Class getAttributeClass(int i)
          Returns the attribute class of the i-th attribute.
 IlvAttributeInfoProperty getAttributeInfoProperty()
          Returns the attribute info property used at construct time.
 String getAttributeName(int i)
          Returns the name of the i-th attribute.
 int getAttributesCount()
          Returns the number of attributes (or fields) of one record.
 int getAttributeSize(int i)
          Returns the size of the i-th attribute.
 void setAttributeSize(int index, int size)
          Sets the size for the field whose index is specified.
 void setAttributeSize(String name, int size)
          Sets the size for the field whose name is specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDBFAttributeInfo

public IlvDBFAttributeInfo(IlvAttributeInfoProperty info)
Constructs a new IlvDBFAttributeInfo.

Parameters:
info - The attribute info that describes the records.
Method Detail

getAttributeInfoProperty

public IlvAttributeInfoProperty getAttributeInfoProperty()
Returns the attribute info property used at construct time.

Returns:
The attribute info property.

getAttributesCount

public int getAttributesCount()
Returns the number of attributes (or fields) of one record.

Returns:
The number of fields.

getAttributeName

public String getAttributeName(int i)
Returns the name of the i-th attribute.

Parameters:
i - The index of the name to retrieve.
Returns:
The name of the attribute.

getAttributeClass

public Class getAttributeClass(int i)
Returns the attribute class of the i-th attribute.

Parameters:
i - The index of the class to retrieve.
Returns:
The class of the attribute.

getAttributeSize

public int getAttributeSize(int i)
Returns the size of the i-th attribute.

Parameters:
i - The index of the size to retrieve.
Returns:
The size of the attribute.

setAttributeSize

public void setAttributeSize(String name,
                             int size)
Sets the size for the field whose name is specified.

Parameters:
name - The name of the field.
size - The new size. This size cannot exceed 255.

setAttributeSize

public void setAttributeSize(int index,
                             int size)
Sets the size for the field whose index is specified.

Parameters:
index - The index of the field.
size - The new size. This size cannot exceed 255.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.