Changeset 319


Ignore:
Timestamp:
01/31/2011 11:37:49 PM (2 years ago)
Author:
qoncept
Message:

Eclipse is puking, I need to re-check out the whole project. I think.

Location:
branches/dev_xmlmerge
Files:
7 added
7 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/dev_xmlmerge/src/com/romraider/maps/Rom.java

    r282 r319  
    2222import com.romraider.editor.ecu.ECUEditor; 
    2323import com.romraider.logger.ecu.ui.handler.table.TableUpdateHandler; 
     24import com.romraider.metadata.exception.TableNotFoundException; 
    2425import com.romraider.swing.JProgressPane; 
    25 import com.romraider.xml.TableNotFoundException; 
    2626import org.apache.log4j.Logger; 
    2727import javax.swing.JOptionPane; 
  • branches/dev_xmlmerge/src/com/romraider/metadata/AbstractTableMetadata.java

    r316 r319  
    33public abstract class AbstractTableMetadata { 
    44 
     5        private String name; 
     6         
     7        public String getName() { 
     8                return this.name; 
     9        } 
     10         
     11        public void setName(String name) { 
     12                this.name = name; 
     13        } 
    514} 
  • branches/dev_xmlmerge/src/com/romraider/metadata/RomMetadataHandler.java

    r316 r319  
    1010import org.xml.sax.InputSource; 
    1111import org.xml.sax.SAXException; 
     12 
     13import com.romraider.metadata.exception.RomNotFoundException; 
    1214import com.romraider.xml.DOMRomMetadataRefactorUtil; 
    1315import com.romraider.xml.DOMRomMetadataUnmarshaller; 
  • branches/dev_xmlmerge/src/com/romraider/metadata/RomMetadataIndex.java

    r316 r319  
    11package com.romraider.metadata; 
     2 
     3import com.romraider.metadata.exception.RomNotFoundException; 
    24 
    35 
  • branches/dev_xmlmerge/src/com/romraider/metadata/RomMetadataIndexBuilder.java

    r316 r319  
    11package com.romraider.metadata; 
    22 
    3 import java.io.BufferedWriter; 
    4  
    5 import com.sun.org.apache.xml.internal.serialize.OutputFormat; 
    6 import com.sun.org.apache.xml.internal.serialize.XMLSerializer; 
    73import java.io.File; 
    8 import java.io.FileInputStream; 
    94import java.io.FileNotFoundException; 
    105import java.io.FileOutputStream; 
    11 import java.io.FileWriter; 
    12 import java.util.Iterator; 
    136import java.util.List; 
    147import java.util.Vector; 
    15 import javax.management.modelmbean.XMLParseException; 
    168import javax.xml.transform.Transformer; 
    179import javax.xml.transform.TransformerFactory; 
    18  
    19 import org.w3c.dom.Document; 
    20 import org.w3c.dom.Node; 
    21 import org.xml.sax.InputSource; 
    22 import ch.elca.el4j.services.xmlmerge.XmlMerge; 
    23 import ch.elca.el4j.services.xmlmerge.merge.DefaultXmlMerge; 
    24 import com.romraider.maps.Rom; 
    25 import com.romraider.swing.JProgressPane; 
    2610import com.romraider.util.FileListing; 
    2711import com.romraider.xml.DOMRomMetadataUnmarshaller; 
     
    4024                                                         
    4125                                try { 
    42                                         romVector.addAll(DOMRomMetadataUnmarshaller.unmarshallRomIDIndex(f)); 
     26                                        //romVector.addAll(DOMRomMetadataUnmarshaller.unmarshallRomIDIndex(f)); 
    4327                                         
    4428                                } catch (Exception x) { 
     
    6751                 
    6852                 
    69                 /*long time1 = System.currentTimeMillis(); 
     53                long time1 = System.currentTimeMillis(); 
    7054                try { 
    7155                         
     
    7660                        System.out.println(romIndex.size() + " index built in " + (time2 - time1) + "ms"); 
    7761                                 
    78                         RomMetadataHandler.getMetadata(input, romIndex);*/ 
    79                          
    80                          
    81                          
    82                         /*InputSource src1 = new InputSource(new FileInputStream(new File("c:\\users\\owner\\desktop\\16BITBASE.xml"))); 
    83                         DOMParser parser = new DOMParser(); 
    84                         parser.parse(src1); 
    85                         Document root1 = parser.getDocument(); 
    86                          
    87                         InputSource src2 = new InputSource(new FileInputStream(new File("c:\\users\\owner\\desktop\\A4TF400E.xml"))); 
    88                         parser.parse(src2);      
    89                         Document root2 = parser.getDocument(); 
    90                          
    91                         Document[] docs = new Document[] {root1, root2}; 
    92                          
    93                         XmlMerge merge = new DefaultXmlMerge(); 
    94                         Document mergedDoc = merge.merge(docs); 
    95  
    96                     File output = new File("c:\\users\\owner\\desktop\\new.xml");        
    97                 FileOutputStream fos = new FileOutputStream(output); 
    98                 OutputFormat of = new OutputFormat("XML", "ISO-8859-1", true); 
    99                 of.setIndent(1); 
    100                 of.setIndenting(true); 
    101                  
    102                 try { 
    103                     XMLSerializer serializer = new XMLSerializer(fos, of); 
    104                     serializer.serialize(mergedDoc); 
    105                     fos.flush(); 
    106                 } finally { 
    107                     fos.close(); 
    108                 } 
    109  
     62                        RomMetadataHandler.getMetadata(input, romIndex); 
    11063 
    11164 
    11265                } catch (Exception e) { 
    11366                        e.printStackTrace(); 
    114                 }*/ 
     67                } 
    11568                 
    11669        } 
  • branches/dev_xmlmerge/src/com/romraider/metadata/exception/RomNotFoundException.java

    r318 r319  
    1 package com.romraider.metadata; 
     1package com.romraider.metadata.exception; 
    22 
    33public class RomNotFoundException extends Exception { 
  • branches/dev_xmlmerge/src/com/romraider/metadata/exception/TableNotFoundException.java

    r318 r319  
    1818 */ 
    1919 
    20 package com.romraider.xml; 
     20package com.romraider.metadata.exception; 
    2121 
    2222public final class TableNotFoundException extends Exception { 
  • branches/dev_xmlmerge/src/com/romraider/xml/DOMRomMetadataUnmarshaller.java

    r316 r319  
    1313import org.xml.sax.SAXException; 
    1414import com.romraider.metadata.RomIndexID; 
     15import com.romraider.metadata.RomMetadata; 
    1516import com.sun.org.apache.xerces.internal.parsers.DOMParser; 
    1617 
    1718public class DOMRomMetadataUnmarshaller { 
     19         
     20        private RomMetadata r; 
     21         
     22        public DOMRomMetadataUnmarshaller() { 
     23                r = new RomMetadata(); 
     24        } 
    1825 
    19         public static Vector<RomIndexID> unmarshallRomIDIndex(File file) throws SAXException, IOException { 
     26        public Vector<RomIndexID> unmarshallRomIDIndex(File file) throws SAXException, IOException { 
    2027                 
    2128                Vector<RomIndexID> romVector = new Vector<RomIndexID>(); 
  • branches/dev_xmlmerge/src/com/romraider/xml/DOMRomUnmarshaller.java

    r306 r319  
    3333import com.romraider.maps.Table3D; 
    3434import com.romraider.maps.TableSwitch; 
     35import com.romraider.metadata.exception.TableNotFoundException; 
    3536import com.romraider.swing.DebugPanel; 
    3637import com.romraider.swing.JProgressPane; 
Note: See TracChangeset for help on using the changeset viewer.