it.unimo.dbgroup.momis.odli3
Class IntBody

java.lang.Object
  extended byit.unimo.dbgroup.momis.odli3.MomisObject
      extended byit.unimo.dbgroup.momis.odli3.TypeContainer
          extended byit.unimo.dbgroup.momis.odli3.IntBody
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GlobalIntBody

public class IntBody
extends TypeContainer
implements java.io.Serializable

Descrive una possibile implementazione dell'interfaccia relativa dell'interfaccia relativa

See Also:
Serialized Form

Field Summary
private  java.util.HashMap _attributes
          lista degli attributi, e' un HashMap con:
key nome dell'attributo
value oggetto Attribute
private  java.lang.String _identifier
          Identificatore dell'interface body (quello che segue interface se e' il primo body oppure quello che segue union se e' un body in union con altri).
static java.util.Comparator COMPARE_ON_NAME
          Comparator used to Sort arrays.
 java.util.HashMap operations
          lista delle operazioni: e' un HashMap con:
key nome dell'operazione
value oggetto Operation
 
Fields inherited from class it.unimo.dbgroup.momis.odli3.TypeContainer
_constants, _interfaces, _sources, _structs, _thesRelations
 
Fields inherited from class it.unimo.dbgroup.momis.odli3.MomisObject
mod_GenericODLParser, mod_GlobalSchema, mod_QueryManger, mod_SIDes_ARM, mod_SIDes_ARTEMIS, mod_SIDes_EXTM, mod_SIDes_JoinMap, mod_SIDes_main, mod_SIDes_SAM, mod_SIDes_SIM, mod_SIDes_SIM2, mod_SIDes_SLIM, mod_SIDes_TREdit, mod_SIDes_TUNIM
 
Constructor Summary
IntBody()
          Constructor.
IntBody(java.lang.String name)
          Constructor.
 
Method Summary
 void addAttribute(AttributeInterface a)
          aggiunge un attributo alla corrente implementazione di interfaccia
 void addOperation(Operation o)
          aggiunge un'operazione alla corrente implementazione di interfaccia
 void aggiornaAttributes()
          this method forces the generation of the attributes Map
private  void aggiornaAttributes(boolean forceExecution)
          Initialize the attributes hashmap as postprocessing operation.
 void control()
          Consistency check routine.
 void delAttribute(AttributeInterface a)
          elimina un attributo dalla corrente implementazione di interfaccia
 Attribute getAttribute(java.lang.String n)
          cerca un attributo con un determinato nome
 java.lang.Object[] getAttributes()
          Returns the array of all the defined Attributes.
 java.util.Collection getAttributesAsCollection()
          Returns all the defined Attributes.
 java.lang.Object[] getAttributesOrderByName()
          Returns the array of all the defined Attributes types order by attribute name.
 java.lang.String getName()
          Gets the name (identifier) for this IntBody.
 void loadFromXML(org.xml.sax.Attributes attrib)
          Load the object from an xml tag.
 void setName(java.lang.String name)
          Sets the name (identifier) for this IntBody.
 java.lang.String toOdl()
          Returns the Odl description for a IntBody.
 java.lang.String toOlcdAttributes(TranslationMap tm, TranslationMap tmName)
          Returns the OLCD description Of the attriubtes contained in this IntBody.
 java.lang.String toString()
          String representation for the TypeContainer.
 
Methods inherited from class it.unimo.dbgroup.momis.odli3.TypeContainer
addConstant, addConstants, addDefined, addDefineds, addEnum, addEnums, addExtRule, addIntBodies, addIntBody, addIntBodyForceNewName, addInterface, addInterfaces, addModule, addModules, addRule, addRules, addSource, addSources, addStruct, addStructs, addThesRelation, addThesRelations, addThesRelationWithControl, addThesRelationWithControlIgnoreWeaker, addThesRelationWithControlIgnoreWeaker, addTypes, addTypesToSolve, addTypeToSolve, addUnion, addUnions, cloneAllThesRelations, delAllThesRelations, delRule, delRuleByName, delThesRelation, delThesRelationsForProducer, getConstant, getConstants, getDefined, getDefineds, getEnum, getEnums, getExtRule, getIntBodies, getIntBodiesAsCollection, getIntBodiesOrderByName, getIntBody, getInterface, getInterface, getInterfaces, getInterfacesAsCollection, getInterfacesOrderByName, getModule, getModules, getParent, getRule, getRuleByName, getRules, getSchema, getSource, getSources, getSourcesAsCollection, getSourcesOrderByName, getStruct, getStructs, getThesRelations, getTopParent, getTypesToSolve, getUnion, getUnions, retrieveAttribute, retrieveInterface, retrieveSource, setParent, setSource, solveUnsolved, solveUnsolvedForeignKeys, toOlcd, toOlcdSimB
 
Methods inherited from class it.unimo.dbgroup.momis.odli3.MomisObject
getAdditionalInfo, getAdditionalInfos, getGenericProducerDescription, getProducerDescription, getProducerId, putAdditionalInfo, setProducerId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPARE_ON_NAME

public static final java.util.Comparator COMPARE_ON_NAME
Comparator used to Sort arrays.


_identifier

private java.lang.String _identifier
Identificatore dell'interface body (quello che segue interface se e' il primo body oppure quello che segue union se e' un body in union con altri).


_attributes

private java.util.HashMap _attributes
lista degli attributi, e' un HashMap con:
key nome dell'attributo
value oggetto Attribute


operations

public java.util.HashMap operations
lista delle operazioni: e' un HashMap con:
key nome dell'operazione
value oggetto Operation

Constructor Detail

IntBody

public IntBody()
Constructor.


IntBody

public IntBody(java.lang.String name)
Constructor.

Parameters:
name - this interface-body name
Method Detail

setName

public void setName(java.lang.String name)
Sets the name (identifier) for this IntBody.


getName

public java.lang.String getName()
Gets the name (identifier) for this IntBody.

Overrides:
getName in class TypeContainer

control

public void control()
             throws OdlException
Consistency check routine.
Per ogni attributo lancia un controllo di consistenza riguardante in particolare le relationships e le mapping rule

Throws:
OdlException

getAttribute

public Attribute getAttribute(java.lang.String n)
cerca un attributo con un determinato nome

Parameters:
n - nome dell'attributo da cercare
Returns:
oggetto Attribute trovato oppure null

getAttributes

public java.lang.Object[] getAttributes()
Returns the array of all the defined Attributes.


getAttributesOrderByName

public java.lang.Object[] getAttributesOrderByName()
Returns the array of all the defined Attributes types order by attribute name.


getAttributesAsCollection

public java.util.Collection getAttributesAsCollection()
Returns all the defined Attributes.


addAttribute

public void addAttribute(AttributeInterface a)
                  throws OdlException
aggiunge un attributo alla corrente implementazione di interfaccia

Parameters:
a - attributo da aggiungere
Throws:
OdlException

delAttribute

public void delAttribute(AttributeInterface a)
                  throws OdlException
elimina un attributo dalla corrente implementazione di interfaccia

Parameters:
a - attributo da eliminare
Throws:
OdlException

aggiornaAttributes

private void aggiornaAttributes(boolean forceExecution)
Initialize the attributes hashmap as postprocessing operation.
Sometime I use the getAttribute during parsing (before running the post-processing routine) so, I have to initialize the hashmap.
Anyway, the "control" routine will force the execution!


aggiornaAttributes

public void aggiornaAttributes()
this method forces the generation of the attributes Map


addOperation

public void addOperation(Operation o)
aggiunge un'operazione alla corrente implementazione di interfaccia

Parameters:
o - operazione da aggiungere

toOdl

public java.lang.String toOdl()
Returns the Odl description for a IntBody.

Overrides:
toOdl in class TypeContainer

toOlcdAttributes

public java.lang.String toOlcdAttributes(TranslationMap tm,
                                         TranslationMap tmName)
Returns the OLCD description Of the attriubtes contained in this IntBody.


loadFromXML

public void loadFromXML(org.xml.sax.Attributes attrib)
                 throws java.lang.Exception
Load the object from an xml tag.

Throws:
java.lang.Exception

toString

public java.lang.String toString()
String representation for the TypeContainer.

Overrides:
toString in class TypeContainer


Universita' di Modena e Reggio Emilia