it.unimo.dbgroup.momis.odli3
Class InterfaceRel

java.lang.Object
  extended byit.unimo.dbgroup.momis.odli3.MomisObject
      extended byit.unimo.dbgroup.momis.odli3.ThesRelation
          extended byit.unimo.dbgroup.momis.odli3.InterfaceRel
All Implemented Interfaces:
java.io.Serializable

public class InterfaceRel
extends ThesRelation
implements java.io.Serializable

Descrive una relazione terminologica TRA DUE CLASSI.

See Also:
Serialized Form

Field Summary
private  Interface _interface1
          oggetto relativo alla prima interface.
private  Interface _interface2
          oggetto relativo alla seconda interface.
 
Fields inherited from class it.unimo.dbgroup.momis.odli3.ThesRelation
_extensionalRelation, _iName1, _iName2, _relType, _sName1, _sName2, _validated
 
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
InterfaceRel()
          Basic constructor
InterfaceRel(int producerId, java.lang.String rel, Interface i1, Interface i2)
          il costruttore specifica Gli attributi (due liste) e il tipo di relazione che li lega.
InterfaceRel(int producerId, java.lang.String rel, java.lang.String sName1, java.lang.String iName1, java.lang.String sName2, java.lang.String iName2)
          see initInterfaceRel
 
Method Summary
 java.lang.Object clone()
          method to clone the current object.
 void control(TypeContainer container)
          effettua a posteriori un controllo su tutte le relazioni tra interfacce, verificando che realmente esistano ed aggiornando i collegamenti
 boolean equalElements(java.lang.Object relat)
          Return True if two thesRelations are defined between the same two elements.
 boolean equals(java.lang.Object relat)
          Return True if two thesRelations represents the same information.
 java.lang.String getDottedName1()
          Returns the dotted name for the first interface.
 java.lang.String getDottedName2()
          Returns the dotted name for the second interface.
 Interface getFirstElement()
          Returns The first Interface involved by the thesaurus relation
 java.lang.String getIName1()
          Returns name of the first Interface.
 java.lang.String getIName2()
          Returns name of the second Interface.
 Interface getInterface1()
          Returns the First Interface of the relation.
 Interface getInterface2()
          Returns the Second Interface of the relation.
 java.lang.String getRelType()
          Returns relation type.
 Interface getSecondElement()
          Returns The second Interface involved by the thesaurus relation
 java.lang.String getSName1()
          Returns name of the first Source.
 java.lang.String getSName2()
          Returns name of the second Source.
private  void initInterfaceRel(int producerId, java.lang.String rel, java.lang.String sName1, java.lang.String iName1, java.lang.String sName2, java.lang.String iName2)
          Builds a relation given the full-path-name of the interfaces.
The relation must be read as:
 void loadFromXML(org.xml.sax.Attributes attrib)
          Load the object from an xml tag.
 java.lang.String toArtemis()
          Generates a list of thesaurus relations for the ARTEMIS module.
 java.lang.String toOdl()
          Returns the ODLi3 description.
 
Methods inherited from class it.unimo.dbgroup.momis.odli3.ThesRelation
getIsExtensionalRelation, getParent, getValidated, setIsExtensionalRelation, setParent, setValidated, setValidated, toString
 
Methods inherited from class it.unimo.dbgroup.momis.odli3.MomisObject
getAdditionalInfo, getAdditionalInfos, getGenericProducerDescription, getProducerDescription, getProducerId, putAdditionalInfo, setProducerId
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_interface1

private Interface _interface1
oggetto relativo alla prima interface.


_interface2

private Interface _interface2
oggetto relativo alla seconda interface.

Constructor Detail

InterfaceRel

public InterfaceRel()
Basic constructor


InterfaceRel

public InterfaceRel(int producerId,
                    java.lang.String rel,
                    Interface i1,
                    Interface i2)
             throws OdlException
il costruttore specifica Gli attributi (due liste) e il tipo di relazione che li lega.
The relation mus be read as:
      i1 rel i2
  

Parameters:
producerId - MOMIS module that produced this object
rel - relation type (bt, nt, syn, rt).
i1 - First interface in the relation. che appaiono nella relazione (quelli contenuti nelle interfaces).
i2 - rappresenta la lista dei secondi attributi che appaiono nella relazione (quelli contenuti nelle interfaces).

InterfaceRel

public InterfaceRel(int producerId,
                    java.lang.String rel,
                    java.lang.String sName1,
                    java.lang.String iName1,
                    java.lang.String sName2,
                    java.lang.String iName2)
             throws OdlException
see initInterfaceRel

Method Detail

clone

public java.lang.Object clone()
method to clone the current object.

Overrides:
clone in class ThesRelation

initInterfaceRel

private void initInterfaceRel(int producerId,
                              java.lang.String rel,
                              java.lang.String sName1,
                              java.lang.String iName1,
                              java.lang.String sName2,
                              java.lang.String iName2)
                       throws OdlException
Builds a relation given the full-path-name of the interfaces.
The relation must be read as:
      i1 rel i2
  
CONSTRUCTOR TO USE IN PARSING.
You can use this constructor only if you call the method control on the new instantiated object.
Example:
     Schema schema = new Schema();   // main schema
     InterfaceRel ir;
     ir = new InterfaceRel(MomisObject.mod_SIDes_SLIM,
                           "rt",
                           "s1", "i1",
                           "s2", "i2");
     try {
        ir.control(schema);
     } catch (OdlException ex) {
        // problems
     }
     schema.addThesRelation(ir);
  
Instead of using this constructor use the following:
    InterfaceRel(int producerId, String rt, Interface i1, Interface i2)
  
il costruttore specifica il nome dei due attributi e il tipo di relazione che li lega.

Parameters:
producerId - MOMIS module that produced this object
rel - relation type (BT, NT, SYN, RT).
Throws:
OdlException

toArtemis

public java.lang.String toArtemis()
Generates a list of thesaurus relations for the ARTEMIS module. Returns a string in the follwing format:
 S1.Class.Att1a  ,bt   ,S2.Class.Att2b            ,0;
 
Where an attribute is identified as:
SOURCEname.INTERFACEname.ATTRIBUTEname
the last number, null, 0 or 1, means
null: relation between interfaces
0: attribute relation not validated
1: attribute relation validated

Overrides:
toArtemis in class ThesRelation

toOdl

public java.lang.String toOdl()
Returns the ODLi3 description.

Overrides:
toOdl in class ThesRelation

control

public void control(TypeContainer container)
             throws OdlException
effettua a posteriori un controllo su tutte le relazioni tra interfacce, verificando che realmente esistano ed aggiornando i collegamenti

Overrides:
control in class ThesRelation
Throws:
OdlException

loadFromXML

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

Overrides:
loadFromXML in class ThesRelation
Throws:
java.lang.Exception

getInterface1

public Interface getInterface1()
Returns the First Interface of the relation.


getInterface2

public Interface getInterface2()
Returns the Second Interface of the relation.


getDottedName1

public java.lang.String getDottedName1()
Returns the dotted name for the first interface.

Overrides:
getDottedName1 in class ThesRelation

getDottedName2

public java.lang.String getDottedName2()
Returns the dotted name for the second interface.

Overrides:
getDottedName2 in class ThesRelation

getIName1

public java.lang.String getIName1()
Returns name of the first Interface.


getSName1

public java.lang.String getSName1()
Returns name of the first Source.


getIName2

public java.lang.String getIName2()
Returns name of the second Interface.


getSName2

public java.lang.String getSName2()
Returns name of the second Source.


getRelType

public java.lang.String getRelType()
Returns relation type.

Overrides:
getRelType in class ThesRelation

equals

public boolean equals(java.lang.Object relat)
Return True if two thesRelations represents the same information.


equalElements

public boolean equalElements(java.lang.Object relat)
Return True if two thesRelations are defined between the same two elements.

Overrides:
equalElements in class ThesRelation

getFirstElement

public Interface getFirstElement()
Returns The first Interface involved by the thesaurus relation


getSecondElement

public Interface getSecondElement()
Returns The second Interface involved by the thesaurus relation



Universita' di Modena e Reggio Emilia