public class DataGenerator
extends java.lang.Object
Constructor and Description |
---|
DataGenerator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateData(java.lang.String query,
java.lang.String dataName)
Generate data based upon the query and data name
|
RecordAccessor |
getAccessor()
Get the semantic accessor used by this DataGenerator.
|
java.lang.String |
getDefaultData()
Get the default data structure used for this DataGenerator
|
void |
initAccessor(java.io.File configFile)
Initialize the translator.
|
void |
initAccessor(java.net.URL configUrl)
Initialize the translator.
|
java.lang.String |
query(java.lang.String queryString)
Generate data from the given Endeca query string, and format it into the
appropriate format
|
java.lang.String |
query(java.lang.String queryString,
int maxResults)
Generate data from the given query string, and format it into the
appropriate format
|
void |
setAccessor(RecordAccessor semAccessor)
Set the semantic accessor used by this DataGenerator.
|
void |
setDefaultData(java.lang.String defaultData)
Set the default data structure used for this DataGenerator
|
void |
setSemanticWriter(StructureWriter writer)
Set the semantic writer used by this translator
|
void |
setStructureType(DataStructureType structureType)
Set the default structure type.
|
public java.lang.String generateData(java.lang.String query, java.lang.String dataName)
query
- The query stringdataName
- The name of the data to be generated. This corresponds
to data elements within the configuration filepublic RecordAccessor getAccessor()
public java.lang.String getDefaultData()
public void initAccessor(java.io.File configFile) throws java.io.IOException
configFile
- Configuration file for the Endeca Data Accessorjava.io.IOException
- If the configuration file is not availablepublic void initAccessor(java.net.URL configUrl) throws java.io.IOException
configUrl
- Configuration file for the Endeca Data Accessor,
specified as a URLjava.io.IOException
- If the configuration file is not availablepublic java.lang.String query(java.lang.String queryString)
queryString
- an Endeca format querypublic java.lang.String query(java.lang.String queryString, int maxResults)
queryString
- a data querymaxResults
- the maximum number of records that should be returned
for the query.public void setAccessor(RecordAccessor semAccessor)
semAccessor
- the semantic accessorpublic void setDefaultData(java.lang.String defaultData)
defaultData
- the default data structure used for this
DataGeneratorpublic void setSemanticWriter(StructureWriter writer)
writer
- the semantic writerpublic void setStructureType(DataStructureType structureType)
structureType
- the default structure type