com.bonevich.erj.mof.impl
Class ErjRepositoryImplXMIWriter

java.lang.Object
  |
  +--ru.novosoft.mdf.ext.xmi.XMIWriter
        |
        +--ru.novosoft.mdf.impl.XMI11WriterSAX2
              |
              +--com.bonevich.erj.mof.impl.ErjRepositoryImplXMIWriter
All Implemented Interfaces:
javax.jmi.xmi.XmiWriter

public final class ErjRepositoryImplXMIWriter
extends ru.novosoft.mdf.impl.XMI11WriterSAX2


Field Summary
static java.lang.String ErjInfoModel_NAMESPACE_PREFIX
           
static java.lang.String ErjInfoModel_NAMESPACE_URI
           
 
Fields inherited from class ru.novosoft.mdf.impl.XMI11WriterSAX2
ATTR_AS_ATTR, ATTR_AS_ELEMENT, attrKey, IDENT_STEP, repository, xmiIdComparator
 
Constructor Summary
ErjRepositoryImplXMIWriter()
           
 
Method Summary
protected  void collectAttributes(ru.novosoft.mdf.ext.MDFObject me, org.xml.sax.helpers.AttributesImpl xe)
          Perform collecting all element references and attributes.
protected  java.lang.String[][] forceNSInfo()
          Returns element_prefix/element_uri string pair array.
protected  void getElementName(java.lang.Class cls, java.lang.String[] vals)
          Initialize string array 'vals' by two values: class uri and class name.
protected  java.lang.String getValueForEnum(java.lang.Object val)
          Returns string presentation of enumeration value.
protected  void processAssociations()
          Processes associations.
protected  void processContentAsElements(ru.novosoft.mdf.ext.MDFObject me)
          Processes element content and writes it as element.
protected  void processStruct(java.lang.String uri, java.lang.String localName, java.lang.String qName, DefaultValue arg)
          Processes structs.
 
Methods inherited from class ru.novosoft.mdf.impl.XMI11WriterSAX2
booleanValueAsElement, createEndFieldElement, createStartFieldElement, doubleValueAsElement, endLink, enumValueAsElement, fillXMIHeader, floatValueAsElement, forceNS, getXMIId, intValueAsElement, longValueAsElement, prepareAttributes, processBoolean, processDouble, processElement, processEnum, processField, processField, processField, processField, processFloat, processInt, processLong, processModel, processOwnedElement, processOwnedElements, processOwnedElements, processReference, processReferenceList, processString, processStringCollection, refListValuesAsElements, refValueAsElement, setAttrKey, startLink, stringValueAsElement, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ErjInfoModel_NAMESPACE_PREFIX

public static final java.lang.String ErjInfoModel_NAMESPACE_PREFIX
See Also:
Constant Field Values

ErjInfoModel_NAMESPACE_URI

public static final java.lang.String ErjInfoModel_NAMESPACE_URI
See Also:
Constant Field Values
Constructor Detail

ErjRepositoryImplXMIWriter

public ErjRepositoryImplXMIWriter()
Method Detail

processContentAsElements

protected void processContentAsElements(ru.novosoft.mdf.ext.MDFObject me)
                                 throws org.xml.sax.SAXException
Processes element content and writes it as element.

Specified by:
processContentAsElements in class ru.novosoft.mdf.impl.XMI11WriterSAX2
Parameters:
me - mdf element whose content need be processed.
Throws:
org.xml.sax.SAXException

processAssociations

protected void processAssociations()
                            throws org.xml.sax.SAXException
Processes associations. It's invoked only after all model elements was processed.

Specified by:
processAssociations in class ru.novosoft.mdf.impl.XMI11WriterSAX2
Throws:
org.xml.sax.SAXException

getValueForEnum

protected java.lang.String getValueForEnum(java.lang.Object val)
Returns string presentation of enumeration value.

Specified by:
getValueForEnum in class ru.novosoft.mdf.impl.XMI11WriterSAX2
Parameters:
val - enumeration value
Returns:
string presentation of enumeration value

collectAttributes

protected void collectAttributes(ru.novosoft.mdf.ext.MDFObject me,
                                 org.xml.sax.helpers.AttributesImpl xe)
                          throws org.xml.sax.SAXException
Perform collecting all element references and attributes. It's added into 'xe' parameter.

Specified by:
collectAttributes in class ru.novosoft.mdf.impl.XMI11WriterSAX2
Parameters:
me - element whose references and attributes are collecting.
xe - attributes buffer where element references and attributes are added.
Throws:
org.xml.sax.SAXException

getElementName

protected void getElementName(java.lang.Class cls,
                              java.lang.String[] vals)
Initialize string array 'vals' by two values: class uri and class name.

Specified by:
getElementName in class ru.novosoft.mdf.impl.XMI11WriterSAX2
Parameters:
cls - class, information about whose must be contains in 'vals' after method performed.
vals - string array that must be initialized.

processStruct

protected void processStruct(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String qName,
                             DefaultValue arg)
                      throws org.xml.sax.SAXException
Processes structs.

Parameters:
uri - struct owner element uri
localName - struct name in form 'class_name.struct_name'
qName - full struct name in form 'prefix:local_name'
arg - struct value
Throws:
org.xml.sax.SAXException

forceNSInfo

protected java.lang.String[][] forceNSInfo()
Returns element_prefix/element_uri string pair array. This values are given in the config.prp file and read from it as properties.

Specified by:
forceNSInfo in class ru.novosoft.mdf.impl.XMI11WriterSAX2
Returns:
prefix/uri string pair array.


Copyright © 2001-2003 bonevich.com. All Rights Reserved.