it.unimo.dbgroup.momis.odli3
Class GlobalSimpleAttribute

java.lang.Object
  extended byit.unimo.dbgroup.momis.odli3.MomisObject
      extended byit.unimo.dbgroup.momis.odli3.Attribute
          extended byit.unimo.dbgroup.momis.odli3.SimpleAttribute
              extended byit.unimo.dbgroup.momis.odli3.GlobalSimpleAttribute
All Implemented Interfaces:
AttributeInterface, GlobalAttribute, OntologyAnnotableElement, java.io.Serializable

public class GlobalSimpleAttribute
extends SimpleAttribute
implements GlobalAttribute

This class describes a "Global SimpleAttribute".

See Also:
Serialized Form

Field Summary
private  MappingElement _mappingElement
           
private  SimpleAttribute _mostGeneralLocalAttribute
           
 
Fields inherited from class it.unimo.dbgroup.momis.odli3.SimpleAttribute
 
Fields inherited from class it.unimo.dbgroup.momis.odli3.Attribute
COMPARE_ON_DOTTED_NAME, COMPARE_ON_NAME
 
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
GlobalSimpleAttribute()
           
 
Method Summary
 void control()
          Controlla a posteriori la coerenza del contenuto degli attributi
 GlobalInterface getGlobalInterface()
          Retrieve the Interface this is Body for
 MappingElement getMappingElement()
          Get the _mappingElement value.
 SimpleAttribute getMostGeneralLocalAttribute()
          getter for _mostGeneralLocalAttribute variable
 java.lang.String getNameFromMapping(Schema schema)
          this method retrieves the name of this global attribute from the mapping.
private  java.lang.String resolveGlobalAttrDuplicateNames(GlobalIntBody giBody, java.lang.String nameToControl)
          method that relolve duplicates global attribute names into the same globalIntBody.
 void setMappingElement(MappingElement mappingElement)
          Set the _mappingElement value.
 void setMostGeneralLocalAttribute(Schema schema)
          this method retrieves the name of this global attribute from the mapping.
 void setTypeFromMapping()
          method that sets the type of this global attribute.
 
Methods inherited from class it.unimo.dbgroup.momis.odli3.SimpleAttribute
getFixArraySize, getFlagReadonly, getType, loadFromXML, setFixArraySize, setFlagReadonly, setType, toOdl, toOlcdAttributes, toString
 
Methods inherited from class it.unimo.dbgroup.momis.odli3.Attribute
getDottedName, getIntBody, getInterface, getMatchingAttribute, getName, getOntologyAnnotation, getOptionality, getSchema, setIntBody, setName, setOntologyAnnotation, setOptionality
 
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
 
Methods inherited from interface it.unimo.dbgroup.momis.odli3.GlobalAttribute
getSchema
 
Methods inherited from interface it.unimo.dbgroup.momis.odli3.AttributeInterface
getDottedName, getIntBody, getInterface, getName, getOptionality, getType, setIntBody, setName, setOptionality, toOdl, toOlcdAttributes
 

Field Detail

_mappingElement

private MappingElement _mappingElement

_mostGeneralLocalAttribute

private SimpleAttribute _mostGeneralLocalAttribute
Constructor Detail

GlobalSimpleAttribute

public GlobalSimpleAttribute()
Method Detail

getMappingElement

public MappingElement getMappingElement()
Get the _mappingElement value.

Specified by:
getMappingElement in interface GlobalAttribute
Returns:
the _mappingElement value.

getGlobalInterface

public GlobalInterface getGlobalInterface()
Retrieve the Interface this is Body for

Specified by:
getGlobalInterface in interface GlobalAttribute

setMappingElement

public void setMappingElement(MappingElement mappingElement)
Set the _mappingElement value.

Specified by:
setMappingElement in interface GlobalAttribute
Parameters:
mappingElement - The new _mappingElement value.

getNameFromMapping

public java.lang.String getNameFromMapping(Schema schema)
this method retrieves the name of this global attribute from the mapping. It retrieves the name of the most general attribute involved into mapping

Returns:
String: the name selected

setMostGeneralLocalAttribute

public void setMostGeneralLocalAttribute(Schema schema)
this method retrieves the name of this global attribute from the mapping. It retrieves the name of the most general attribute involved into mapping


resolveGlobalAttrDuplicateNames

private java.lang.String resolveGlobalAttrDuplicateNames(GlobalIntBody giBody,
                                                         java.lang.String nameToControl)
method that relolve duplicates global attribute names into the same globalIntBody. If there is a dublicate, the second name is renamed into oldName_n

Returns:
String: the name resolved

control

public void control()
             throws OdlException
Controlla a posteriori la coerenza del contenuto degli attributi

Specified by:
control in interface GlobalAttribute
Overrides:
control in class Attribute
Throws:
OdlException

setTypeFromMapping

public void setTypeFromMapping()
method that sets the type of this global attribute. The type is the one of the attribute selected for setting its name.


getMostGeneralLocalAttribute

public SimpleAttribute getMostGeneralLocalAttribute()
getter for _mostGeneralLocalAttribute variable

Returns:
SimpleAttribute, the most general attribute of this mapping


Universita' di Modena e Reggio Emilia