javax.datamining.data
Interface TaxonomyFactory

All Superinterfaces:
Factory

public interface TaxonomyFactory
extends Factory

A factory class that creates instances of TaxonomyTable and TaxonomyObject. The method supportsCapability must be used before creating any taxonomy object. An attempt to create an unsupported taxonomy object results in an exception.

Author:
JSR-73 Java Data Mining Expert Group
See Also:
Factory

Method Summary
 TaxonomyObject createObject()
          Creates an empty instance of TaxonomyObject.
 TaxonomyTable createTable(java.lang.String physicalDataName)
          Creates an instance of TaxonomyTable from a table or file.
 boolean supportsCapability(TaxonomyCapability capability)
          Returns true if the specified taxonomy type is supported through tables.
 

Method Detail

createObject

public TaxonomyObject createObject()
                            throws JDMException
Creates an empty instance of TaxonomyObject.

Returns:
TaxonomyObject
Throws:
JDMException

createTable

public TaxonomyTable createTable(java.lang.String physicalDataName)
                          throws JDMException
Creates an instance of TaxonomyTable from a table or file. The physical attributes contained in the source data represent the columns of the table or the fields in the file. If a vendor does not support table representation of taxonomies, an exception is thrown.

The source data contains attributes with roles taxonomyChild and taxonomyParent. Refer to PhysicalAttributeRole.

Parameters:
physicalDataName - The name of the physical data from which a taxonomy object is created.
Returns:
TaxonomyTable
Throws:
JDMException

supportsCapability

public boolean supportsCapability(TaxonomyCapability capability)
                           throws JDMException
Returns true if the specified taxonomy type is supported through tables. Returns false otherwise.

Parameters:
capability -
Returns:
boolean
Throws:
JDMException