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

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

public class NestorDataStructureBuilder
extends java.lang.Object

This class builds the NS-M or the INS-M data structures.

Since:
0.1
Version:
0.3
Author:
Gianmaria Silvello

Constructor Summary
NestorDataStructureBuilder()
           
 
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.
 NestorSetAndElementTables inverseNSMDataStructureAndElementsInit(java.io.File file)
           
 NestorSetTables inverseNSMDataStructureInit(java.io.File file)
           
 NestorSetAndElementTables NSMDataStructureAndElementsInit(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).
 NestorSetTables NSMDataStructureInit(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 (only sets, not elements).
 NestorSetTables NSMSubsetsTableInit(java.io.File file)
           
 NestorSetTables NSMSupersetsTableInit(java.io.File file)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestorDataStructureBuilder

public NestorDataStructureBuilder()
Method Detail

NSMDataStructureInit

public NestorSetTables NSMDataStructureInit(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 (only sets, not 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.

NSMDataStructureAndElementsInit

public NestorSetAndElementTables NSMDataStructureAndElementsInit(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.

NSMSubsetsTableInit

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

NSMSupersetsTableInit

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

inverseNSMDataStructureInit

public NestorSetTables inverseNSMDataStructureInit(java.io.File file)
                                            throws java.io.FileNotFoundException,
                                                   javax.xml.stream.XMLStreamException
Parameters:
file -
Returns:
Throws:
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException

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