it.unipd.dei.ims.nestor.experiment.parser
Class NestorCompleteDataStructuresBuilder

java.lang.Object
  extended by it.unipd.dei.ims.nestor.experiment.parser.NestorCompleteDataStructuresBuilder

public class NestorCompleteDataStructuresBuilder
extends java.lang.Object

This class builds the DDS or the IDS or the HDS data structures. It allows us to create complete data structure comprehensive of elements, content, attributes and tags of the XML starting files.

Since:
0.1
Version:
0.3
Author:
Gianmaria Silvello

Constructor Summary
NestorCompleteDataStructuresBuilder()
           
 
Method Summary
 NestorSetAndElementTables buildInverseNSMStructureAndContent(javax.xml.stream.XMLStreamReader reader)
          This class parses the XML and create all the dictionaries for the sets plus the INS-M dictionary of materialized sets.
 NestorCompleteDirectTables DDSDirectCompleteStructureInit(java.io.File file)
          This class sets the file which contains the XML file we are going to parse and from which we create the collections of subsets (sets and elements).
 NestorCompleteInvertedTables DDSInvertedCompleteStructureInit(java.io.File file)
          This class sets the file which contains the XML file we are going to parse and from which we create the collections of subsets (sets and elements).
 NestorSetAndElementTables inverseNSMDataStructureAndElementsInit(java.io.File file)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestorCompleteDataStructuresBuilder

public NestorCompleteDataStructuresBuilder()
Method Detail

DDSDirectCompleteStructureInit

public NestorCompleteDirectTables DDSDirectCompleteStructureInit(java.io.File file)
                                                          throws java.io.FileNotFoundException,
                                                                 javax.xml.stream.XMLStreamException
This class sets the file which contains the XML file we are going to parse and from which we create the collections of subsets (sets and elements).

Parameters:
file - The XMl file containing the dataset.
Returns:
The NS-M dictionary-based data structure.
Throws:
java.io.FileNotFoundException - The file is not found.
javax.xml.stream.XMLStreamException - The XML stream generated an exception.

DDSInvertedCompleteStructureInit

public NestorCompleteInvertedTables DDSInvertedCompleteStructureInit(java.io.File file)
                                                              throws java.io.FileNotFoundException,
                                                                     javax.xml.stream.XMLStreamException
This class sets the file which contains the XML file we are going to parse and from which we create the collections of subsets (sets and elements). Tags and attribute tables are built like an inverted index.

Parameters:
file - The XMl file containing the dataset.
Returns:
The NS-M dictionary-based data structure.
Throws:
java.io.FileNotFoundException - The file is not found.
javax.xml.stream.XMLStreamException - The XML stream generated an exception.

inverseNSMDataStructureAndElementsInit

public NestorSetAndElementTables inverseNSMDataStructureAndElementsInit(java.io.File file)
                                                                 throws java.io.FileNotFoundException,
                                                                        javax.xml.stream.XMLStreamException
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException

buildInverseNSMStructureAndContent

public NestorSetAndElementTables buildInverseNSMStructureAndContent(javax.xml.stream.XMLStreamReader reader)
                                                             throws javax.xml.stream.XMLStreamException
This class parses the XML and create all the dictionaries for the sets plus the INS-M dictionary of materialized sets.

Parameters:
reader - The reader catching the stream from the XML file.
Returns:
The INS-M dictionary tables.
Throws:
javax.xml.stream.XMLStreamException