it.unimo.dbgroup.momis.odli3
Class Relationship

java.lang.Object
  extended byit.unimo.dbgroup.momis.odli3.MomisObject
      extended byit.unimo.dbgroup.momis.odli3.Attribute
          extended byit.unimo.dbgroup.momis.odli3.Relationship
All Implemented Interfaces:
AttributeInterface, OntologyAnnotableElement, java.io.Serializable
Direct Known Subclasses:
GlobalRelationship

public class Relationship
extends Attribute
implements java.io.Serializable

Descrive un'attributo complesso (aggregazione binaria o relationship)

See Also:
Serialized Form

Field Summary
 java.util.Vector inverse
          insieme di oggetti Relationship che rappresentano le relazioni inverse
private  java.lang.String invName
          Nome della relazione inversa
 java.util.Vector orderBy
           
 Interface target
          Interfaccia di appartenenza dell'oggetto puntato dalla relationship
private  java.lang.String targName
          nome dell'interface di appartenenza dell'oggetto puntato dalla relationship
 Type type
          se e' TypeToSolve indica che l'aggregazione e' semplice, non collezione
se non e' null indica il tipo di collezione: set, list, bag o array
 
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
Relationship(java.lang.String nome, java.lang.String targetName, java.lang.String inverseRelationName, Type typeNew)
          Constructor.
 
Method Summary
 boolean compare(Relationship r)
          analizza la Relationship passata e controlla se e' l'inversa della corrente
 void control()
          controlla a posteriori che esista la classe dell'inversa e l'inversa stessa, nonche' il fatto che entrambe si invochino a vicenda come relazioni inverse.
 Type getType()
          Returns the Type of this relationship attribute.
 java.lang.String toOdl()
          Odl Representation.
 java.lang.String toOlcdAttributes(TranslationMap tm, TranslationMap tmName)
          OLCD Representation.
 java.lang.String toString()
          Returns a short description.
 
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
 

Field Detail

inverse

public java.util.Vector inverse
insieme di oggetti Relationship che rappresentano le relazioni inverse

(possono essere piu' di una perche' ogni interfaccia ha piu' implementazioni)


target

public Interface target
Interfaccia di appartenenza dell'oggetto puntato dalla relationship


type

public Type type
se e' TypeToSolve indica che l'aggregazione e' semplice, non collezione
se non e' null indica il tipo di collezione: set, list, bag o array


orderBy

public java.util.Vector orderBy

invName

private java.lang.String invName
Nome della relazione inversa


targName

private java.lang.String targName
nome dell'interface di appartenenza dell'oggetto puntato dalla relationship

Constructor Detail

Relationship

public Relationship(java.lang.String nome,
                    java.lang.String targetName,
                    java.lang.String inverseRelationName,
                    Type typeNew)
Constructor. il costruttore specifica il nome, il nome dell'inversa e della sua classe

Parameters:
nome - nome della relationship
targetName - nome della classe dell'inversa
inverseRelationName - nome della relationship inversa
Method Detail

control

public void control()
             throws OdlException
controlla a posteriori che esista la classe dell'inversa e l'inversa stessa, nonche' il fatto che entrambe si invochino a vicenda come relazioni inverse.

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

compare

public boolean compare(Relationship r)
analizza la Relationship passata e controlla se e' l'inversa della corrente

Parameters:
r - relationship da controllare
Returns:
true se la relazione passata e' inversa di questa

getType

public Type getType()
Returns the Type of this relationship attribute.

Specified by:
getType in interface AttributeInterface
Overrides:
getType in class Attribute

toOdl

public java.lang.String toOdl()
Odl Representation.

Specified by:
toOdl in interface AttributeInterface
Overrides:
toOdl in class Attribute

toString

public java.lang.String toString()
Returns a short description.


toOlcdAttributes

public java.lang.String toOlcdAttributes(TranslationMap tm,
                                         TranslationMap tmName)
OLCD Representation.

Specified by:
toOlcdAttributes in interface AttributeInterface
Overrides:
toOlcdAttributes in class Attribute


Universita' di Modena e Reggio Emilia