dke.smwp.serialize
Class SerializeIncrementalImpl

java.lang.Object
  |
  +--dke.smwp.serialize.SerializeTupleModification
        |
        +--dke.smwp.serialize.SerializeIncrementalImpl

public class SerializeIncrementalImpl
extends SerializeTupleModification

implementation of serialization strategy "coreSMWP". triggeredFragmentDeletion / -insertion / -modification

The TColumnTable object parameters represent tuples which where inserted / deleted / updated in the Fragmentation Relation of a Fragment Class. There tuples represent the fragmentation parameter of a fragment.

If the Fragment Class - whose Fragmentation Relation was modified - is mapped to a Page Class a new page (xml document) will be created for every Page Class it is mapped to, while the old pages will be deleted. If the Fragment Class is not mapped to any Page Class nothing happens.

triggeredSerializeFragmentDeletion /- insertion / -modification

If the Fragment Class whose relation was modified - is mapped to a Page Class its pages (designated by the fragmentation parameter values of the tuple) are to be updated.

Version:
1.0
Author:
Martin Bernauer, Werner Enser

Field Summary
static java.lang.String MAINTENANCE_MODE
           
 
Fields inherited from class dke.smwp.serialize.SerializeTupleModification
_instance, DEBUG
 
Constructor Summary
protected SerializeIncrementalImpl()
          default constructor
 
Method Summary
protected  void modifyPagesIncr(java.sql.Connection con, PageSer[] pages, TupleModificationDescr mod)
          modifies pages (xml documents) which are to be modified
 void serializeFragmentDeletion(java.sql.Connection con, java.lang.String fc_longName, TColumnTable oldTuple)
          deletes published pages (xml documents)
 void serializeFragmentInsertion(java.sql.Connection con, java.lang.String fc_longName, TColumnTable newTuple)
          creates new Page Class/pages as xml documents
 void serializeFragmentModification(java.sql.Connection con, java.lang.String fc_longName, TColumnTable oldTuple, TColumnTable newTuple)
          updates published Page Class/pages (xml documents) by deleting old pages designated by fragmentation parameter values of oldTuple and creating new pages designated by newTuple
 void serializeTupleDeletion(java.sql.Connection con, java.lang.String fcName, java.lang.String rowId, TColumnTable oldTuple)
          deletes tuple data from affected page
 void serializeTupleInsertion(java.sql.Connection con, java.lang.String fcName, java.lang.String rowId, TColumnTable newTuple)
          inserts tuple data into affected page
 void serializeTupleModification(java.sql.Connection con, java.lang.String fcName, java.lang.String rowId, TColumnTable oldTuple, TColumnTable newTuple)
          updates Page Class/pages (xml documents)
 
Methods inherited from class dke.smwp.serialize.SerializeTupleModification
buildModificationDescrObj, getFragmentParameters, getInstance, tupleAsXMLTuple
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

MAINTENANCE_MODE

public static final java.lang.String MAINTENANCE_MODE
Constructor Detail

SerializeIncrementalImpl

protected SerializeIncrementalImpl()
default constructor
Method Detail

modifyPagesIncr

protected void modifyPagesIncr(java.sql.Connection con,
                               PageSer[] pages,
                               TupleModificationDescr mod)
                        throws org.xml.sax.SAXException,
                               java.sql.SQLException,
                               java.io.IOException
modifies pages (xml documents) which are to be modified
Parameters:
con - Connection handle
pages - Page Class-pages which are to be modified
mod - modification description
Throws:
org.xml.sax.SAXException - creating / parsing xml documents failed
java.sql.SQLException - fetching data failed
java.io.IOException - reading / writing xml documents failed

serializeFragmentDeletion

public void serializeFragmentDeletion(java.sql.Connection con,
                                      java.lang.String fc_longName,
                                      TColumnTable oldTuple)
                               throws java.io.IOException,
                                      java.sql.SQLException,
                                      org.xml.sax.SAXException
deletes published pages (xml documents)
Overrides:
serializeFragmentDeletion in class SerializeTupleModification
Parameters:
con - Connection handle
fc_longName - name of Fragment Class where a fragment is being deleted
oldTuple - fragmentation parameters for fragment, which is to be deleted
Throws:
java.io.IOException - reading / writing xml document failed
java.sql.SQLException - fetching data failed
org.xml.sax.SAXException - generating / parsing xml document(s) failed

serializeFragmentInsertion

public void serializeFragmentInsertion(java.sql.Connection con,
                                       java.lang.String fc_longName,
                                       TColumnTable newTuple)
                                throws java.sql.SQLException,
                                       java.io.IOException,
                                       org.xml.sax.SAXException
creates new Page Class/pages as xml documents
Overrides:
serializeFragmentInsertion in class SerializeTupleModification
Parameters:
con - Connection handle
fc_longName - name of Fragment Class which gains a new fragment
newTuple - fragmentation parmeters of new fragment
Throws:
java.sql.SQLException - fetching data failed
java.io.IOException - writing xml document failed
org.xml.sax.SAXException - creating xml document failed

serializeFragmentModification

public void serializeFragmentModification(java.sql.Connection con,
                                          java.lang.String fc_longName,
                                          TColumnTable oldTuple,
                                          TColumnTable newTuple)
                                   throws java.io.IOException,
                                          java.sql.SQLException,
                                          org.xml.sax.SAXException
updates published Page Class/pages (xml documents) by deleting old pages designated by fragmentation parameter values of oldTuple and creating new pages designated by newTuple
Overrides:
serializeFragmentModification in class SerializeTupleModification
Parameters:
con - Connection handle
fc_longName - name of Fragment Class in which a fragment is updated
oldTuple - fragmentation parameters of old tuple
newTuple - fragmentation parameters of new tuple
Throws:
java.sql.SQLException - fetching data failed
java.io.IOException - writing xml document failed
org.xml.sax.SAXException - creating xml document failed

serializeTupleModification

public void serializeTupleModification(java.sql.Connection con,
                                       java.lang.String fcName,
                                       java.lang.String rowId,
                                       TColumnTable oldTuple,
                                       TColumnTable newTuple)
                                throws java.io.IOException,
                                       java.sql.SQLException,
                                       org.xml.sax.SAXException
updates Page Class/pages (xml documents)
Overrides:
serializeTupleModification in class SerializeTupleModification
Parameters:
con - Connection object
fcName - fragment class name (whose Fragment Class relation was updated)
rowId - row id from the updated tuple
oldTuple - tuple whose data is replaced by the new tuple
newTuple - tuple whose data replaces the old tuple
Throws:
java.io.IOException - reading / writing xml document failed
java.sql.SQLException - fetching data failed
org.xml.sax.SAXException - generating / parsing xml document(s) failed

serializeTupleInsertion

public void serializeTupleInsertion(java.sql.Connection con,
                                    java.lang.String fcName,
                                    java.lang.String rowId,
                                    TColumnTable newTuple)
                             throws java.io.IOException,
                                    java.sql.SQLException,
                                    org.xml.sax.SAXException
inserts tuple data into affected page
Overrides:
serializeTupleInsertion in class SerializeTupleModification
Parameters:
con - Connection object
fcName - fragment class realtion which was updated
rowId - row id of the inserted tuple
newTuple - data of inserted tuple
Throws:
java.io.IOException - reading / writing xml document failed
java.sql.SQLException - fetching data failed
org.xml.sax.SAXException - generating / parsing xml document(s) failed

serializeTupleDeletion

public void serializeTupleDeletion(java.sql.Connection con,
                                   java.lang.String fcName,
                                   java.lang.String rowId,
                                   TColumnTable oldTuple)
                            throws java.io.IOException,
                                   java.sql.SQLException,
                                   org.xml.sax.SAXException
deletes tuple data from affected page
Overrides:
serializeTupleDeletion in class SerializeTupleModification
Parameters:
con - Connection handle
fcName - name of fragment class, where the tuple was deleted
rowId - rowid of deleted tuple
oldTuple - data of deleted tuple
Throws:
java.io.IOException - reading / writing xml document failed
java.sql.SQLException - fetching data failed
org.xml.sax.SAXException - generating / parsing xml document(s) failed