wt.ixb.handlers.forattributes
Class ExpImpForIBAAttr

java.lang.Object
  extended bywt.ixb.publicforhandlers.AttributeExporterImporterTemplate
      extended bywt.ixb.handlers.forattributes.ExpImpForIBAAttr
All Implemented Interfaces:
AttributeExporterImporter

public class ExpImpForIBAAttr
extends AttributeExporterImporterTemplate


Nested Class Summary
private static class ExpImpForIBAAttr.AttrDefInfo
           
private  class ExpImpForIBAAttr.AttrValueInfo
           
 
Field Summary
private static String IBA_ATTR_DEF_INFO
           
private  ExpImpForIBADefinition ibaDefHandler
           
 
Fields inherited from class wt.ixb.publicforhandlers.AttributeExporterImporterTemplate
CONFLICT_RESOURCE
 
Constructor Summary
ExpImpForIBAAttr()
           
 
Method Summary
 void addIBAttribute(IBAHolder holder, String attrPath, String attrType, String attrValueImage, Importer importer)
           
 void checkConflictForAttribute(Object existingOb, IxbElement fileXML, Importer importer)
          Check conflicts for iba values.
 void exportAttribute(Object obj, IxbElement fileXML, Exporter exporter)
          Export the IBA values of the obj.
static void exportIBAReferenceable(String objectID, Exporter exporter)
          Export the IBAReferenceable object.
private  Enumeration getAllIbas(IxbElement fileXML, Importer importer)
           
private static ExpImpForIBAAttr.AttrDefInfo getAttrDefInfo(String path, ExpImporter expImporter)
           
private  ExpImpForIBAAttr.AttrDefInfo getAttrDefInfoByPathAndType(String name, String type, Importer importer)
           
private  Vector getExcludedIBAs(IBAHolder existingOb, IxbElement fileXML, Importer importer)
           
static AbstractAttributeDefinition getIBADefOfHierarchyID(String hierarchyID)
          Get AbstractAttributeDefinition instance by hierarchyID.
static String getIbaDefOid(String path, ExpImporter expImporter)
           
static String getIbaDefType(String name, ExpImporter expImporter)
          Get the IBA type given the IBA name or path.
private  Hashtable getIBAttributes(IBAHolder holder)
           
static String getPathOfAttribute_DefinitionOrOrganizer(AttributeHierarchyParent ad, boolean withOrganizer)
          Get the IBA definition path with or without the information of the path of the associated AttributeOrganizer instance.
static String getPathOfAttributeDefinition_WithoutOrganizer(AttributeHierarchyParent ad)
          Get the IBA definition path without the information of the path of the associated AttributeOrganizer instance.
 Object importAttribute(Object obj, IxbElement fileXML, Importer importer)
          Import the IBA values into the attribute container.
private  IBAHolder importIBA(IBAHolder holder, IxbElement fileXML, Importer importer)
           
private static void PP(String s)
           
 IBAHolder prepareForImportOfIBA(IBAHolder holder)
           
private  void storeExcludedIbasFromTypeDef(IxbElement fileXML, Exporter exporter, Vector typeIbas)
           
private  void storeInXMLFile_IBAttributes(IBAHolder holder, IxbElement fileXML, Exporter exporter)
           
 
Methods inherited from class wt.ixb.publicforhandlers.AttributeExporterImporterTemplate
finalizeCheckConflicts, finalizeExport, finalizeImport, prepareForCheckConflicts, prepareForImport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IBA_ATTR_DEF_INFO

private static final String IBA_ATTR_DEF_INFO
See Also:
Constant Field Values

ibaDefHandler

private ExpImpForIBADefinition ibaDefHandler
Constructor Detail

ExpImpForIBAAttr

public ExpImpForIBAAttr()
Method Detail

exportAttribute

public void exportAttribute(Object obj,
                            IxbElement fileXML,
                            Exporter exporter)
                     throws WTException
Export the IBA values of the obj. The parameter obj must be an IBAHolder instance. Also since obj as an IBAHolder instance, if it is Typed, then it may not contain all IBA values from its associated soft type or hard type; in this case those IBAs will be explicitly written into the XML file under the tag <
Specified by:
exportAttribute in interface AttributeExporterImporter
Specified by:
exportAttribute in class AttributeExporterImporterTemplate
Parameters:
obj -
fileXML -
exporter -
Throws:
WTException -

Supported API: true

storeInXMLFile_IBAttributes

private void storeInXMLFile_IBAttributes(IBAHolder holder,
                                         IxbElement fileXML,
                                         Exporter exporter)
                                  throws WTException
Throws:
WTException

exportIBAReferenceable

public static void exportIBAReferenceable(String objectID,
                                          Exporter exporter)
                                   throws WTException
Export the IBAReferenceable object.

Parameters:
objectID - Object Identifier of the IBAReferenceable object
exporter -
Throws:
WTException -

Supported API: true

storeExcludedIbasFromTypeDef

private void storeExcludedIbasFromTypeDef(IxbElement fileXML,
                                          Exporter exporter,
                                          Vector typeIbas)
                                   throws WTException
Throws:
WTException

checkConflictForAttribute

public void checkConflictForAttribute(Object existingOb,
                                      IxbElement fileXML,
                                      Importer importer)
                               throws WTException
Check conflicts for iba values.
The IBA value conflicts are not overridable for the default action and import non-versioned attribute actions, otherwise they are overrideable by issueing appropriate warnings.
The existing object and XML file are supposed to have the same set of IBA values. Two IBA values are considered the same if they are of the same IBA type have the same value.

Specified by:
checkConflictForAttribute in interface AttributeExporterImporter
Overrides:
checkConflictForAttribute in class AttributeExporterImporterTemplate
Parameters:
existingOb -
fileXML -
importer -
Throws:
WTException -

Supported API: true

importAttribute

public Object importAttribute(Object obj,
                              IxbElement fileXML,
                              Importer importer)
                       throws WTException
Import the IBA values into the attribute container. The parameter obj must be an instance of IBAHolder.

Specified by:
importAttribute in interface AttributeExporterImporter
Specified by:
importAttribute in class AttributeExporterImporterTemplate
Parameters:
obj -
fileXML -
importer -
Returns:
Throws:
WTException -

Supported API: true

prepareForImportOfIBA

public IBAHolder prepareForImportOfIBA(IBAHolder holder)
                                throws WTException
Parameters:
holder -
Returns:
Throws:
WTException -

Supported API: false

addIBAttribute

public void addIBAttribute(IBAHolder holder,
                           String attrPath,
                           String attrType,
                           String attrValueImage,
                           Importer importer)
                    throws WTException
Parameters:
holder -
attrPath -
attrType -
attrValueImage -
importer -
Throws:
WTException -

Supported API: false

importIBA

private IBAHolder importIBA(IBAHolder holder,
                            IxbElement fileXML,
                            Importer importer)
                     throws WTException
Throws:
WTException

getIBADefOfHierarchyID

public static AbstractAttributeDefinition getIBADefOfHierarchyID(String hierarchyID)
                                                          throws WTException
Get AbstractAttributeDefinition instance by hierarchyID.

Parameters:
hierarchyID -
Returns:
Throws:
WTException

getPathOfAttributeDefinition_WithoutOrganizer

public static String getPathOfAttributeDefinition_WithoutOrganizer(AttributeHierarchyParent ad)
                                                            throws WTException
Get the IBA definition path without the information of the path of the associated AttributeOrganizer instance.

Parameters:
ad -
Returns:
Throws:
WTException -

Supported API: true

getPathOfAttribute_DefinitionOrOrganizer

public static String getPathOfAttribute_DefinitionOrOrganizer(AttributeHierarchyParent ad,
                                                              boolean withOrganizer)
                                                       throws WTException
Get the IBA definition path with or without the information of the path of the associated AttributeOrganizer instance.

Parameters:
ad -
Returns:
Throws:
WTException -

Supported API: true

getIBAttributes

private Hashtable getIBAttributes(IBAHolder holder)
                           throws WTException
Throws:
WTException

getIbaDefType

public static String getIbaDefType(String name,
                                   ExpImporter expImporter)
                            throws WTException
Get the IBA type given the IBA name or path.

Parameters:
name -
expImporter -
Returns:
Throws:
WTException -

Supported API: false

getIbaDefOid

public static String getIbaDefOid(String path,
                                  ExpImporter expImporter)
                           throws WTException
Throws:
WTException

getAttrDefInfo

private static ExpImpForIBAAttr.AttrDefInfo getAttrDefInfo(String path,
                                                           ExpImporter expImporter)
                                                    throws WTException
Throws:
WTException

getAttrDefInfoByPathAndType

private ExpImpForIBAAttr.AttrDefInfo getAttrDefInfoByPathAndType(String name,
                                                                 String type,
                                                                 Importer importer)
                                                          throws WTException
Throws:
WTException

getAllIbas

private Enumeration getAllIbas(IxbElement fileXML,
                               Importer importer)
                        throws WTException
Throws:
WTException

PP

private static void PP(String s)

getExcludedIBAs

private Vector getExcludedIBAs(IBAHolder existingOb,
                               IxbElement fileXML,
                               Importer importer)
                        throws WTException
Throws:
WTException