COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.repository.internal.core
Class MetadataFileHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.eclipse.cosmos.rm.repository.internal.core.MetadataFileHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class MetadataFileHandler
extends org.xml.sax.helpers.DefaultHandler

SAX Handler for parsing a metadata file to determined saved alias, rule binding, and document identity information. This allows no loss of information when a set of documents that have just been imported is exported.


Constructor Summary
MetadataFileHandler()
           
 
Method Summary
 void addAlias(java.lang.String id, java.lang.String[] aliases)
           
 void addRuleBinding(java.lang.String alias, java.lang.String[] rules)
           
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 java.util.Map getAliasFileMap()
           
 java.util.Map getAliasRuleBinding()
           
 java.lang.String getBaseURI()
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 java.util.Map getFileAliasMap()
           
 java.lang.String getName()
           
 java.util.Map getRuleAliasBinding()
           
 java.lang.String getVersion()
           
 boolean isDirty()
           
 void setField(byte field, java.lang.String value)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
           
 void write(java.io.PrintStream printStream)
          Writes the meta information to the print stream passed in
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataFileHandler

public MetadataFileHandler()
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

getAliasFileMap

public java.util.Map getAliasFileMap()

getFileAliasMap

public java.util.Map getFileAliasMap()

getRuleAliasBinding

public java.util.Map getRuleAliasBinding()

getAliasRuleBinding

public java.util.Map getAliasRuleBinding()

getBaseURI

public java.lang.String getBaseURI()

getDescription

public java.lang.String getDescription()

getName

public java.lang.String getName()

getDisplayName

public java.lang.String getDisplayName()

getVersion

public java.lang.String getVersion()

addAlias

public void addAlias(java.lang.String id,
                     java.lang.String[] aliases)

addRuleBinding

public void addRuleBinding(java.lang.String alias,
                           java.lang.String[] rules)

write

public void write(java.io.PrintStream printStream)
Writes the meta information to the print stream passed in

Parameters:
printStream - The print stream used to write the meta information

isDirty

public boolean isDirty()

setField

public void setField(byte field,
                     java.lang.String value)

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification