it.unimo.dbgroup.momis.odli3
Class AttributeRel

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

public class AttributeRel
extends ThesRelation
implements java.io.Serializable

Descrive una relazione terminologica tra due attributi.

See Also:
Serialized Form

Field Summary
private  java.lang.String _aName1
          nome del primo attributo.
private  java.lang.String _aName2
          nome del secondo attributo.
 java.util.Vector _attribute1
          Vector di tutti gli attributi con lo stesso nome, esistenti nelle diverse implementazioni della prima classe.
 java.util.Vector _attribute2
          Vector di tutti gli attributi con lo stesso nome, esistenti nelle diverse implementazioni della seconda classe.
 
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
AttributeRel()
          Basic constructor
AttributeRel(int producerId, java.lang.String rel, java.lang.String sName1, java.lang.String iName1, java.lang.String aName1, java.lang.String sName2, java.lang.String iName2, java.lang.String aName2)
          see initAttributeRel
AttributeRel(int producerId, java.lang.String rel, java.util.Vector a1, java.util.Vector a2)
          Il costruttore specifica Gli attributi (due liste) e il tipo di relazione che li lega.
 
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 Attributi, 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 getAName1()
          Returns name of the first attribute.
 java.lang.String getAName2()
          Returns name of the second attribute.
 java.util.Vector getAttributes1()
          Returns the First Vector of Attributes of the relation.
 java.util.Vector getAttributes2()
          Returns the Second Vector of Attributes of the relation.
 java.lang.String getDottedName1()
          Returns the dotted name for the first attribute.
 java.lang.String getDottedName2()
          Returns the dotted name for the second attribute.
 java.lang.String getIName1()
          Returns name of the first Interface.
 java.lang.String getIName2()
          Returns name of the second Interface.
 java.lang.String getSName1()
          Returns name of the first Source.
 java.lang.String getSName2()
          Returns name of the second Source.
 boolean getValidated()
          Returns the validation status for this relation.
private  void initAttributeRel(int producerId, java.lang.String rel, java.lang.String sName1, java.lang.String iName1, java.lang.String aName1, java.lang.String sName2, java.lang.String iName2, java.lang.String aName2)
          Builds a relation given the full-path-name of the attributes.
 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, getRelType, 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

_aName1

private java.lang.String _aName1
nome del primo attributo.


_aName2

private java.lang.String _aName2
nome del secondo attributo.


_attribute1

public java.util.Vector _attribute1
Vector di tutti gli attributi con lo stesso nome, esistenti nelle diverse implementazioni della prima classe.


_attribute2

public java.util.Vector _attribute2
Vector di tutti gli attributi con lo stesso nome, esistenti nelle diverse implementazioni della seconda classe.

Constructor Detail

AttributeRel

public AttributeRel()
Basic constructor


AttributeRel

public AttributeRel(int producerId,
                    java.lang.String rel,
                    java.util.Vector a1,
                    java.util.Vector a2)
             throws OdlException
Il costruttore specifica Gli attributi (due liste) e il tipo di relazione che li lega. The relation must be read as:
      a1 rel a2
  

Parameters:
producerId - MOMIS module that produced this object
rel - relation type (bt, nt, syn, rt).
a1 - rappresenta la lista dei primi attributi che appaiono nella relazione (quelli contenuti nelle interfaces).
a2 - rappresenta la lista dei secondi attributi che appaiono nella relazione (quelli contenuti nelle interfaces).

AttributeRel

public AttributeRel(int producerId,
                    java.lang.String rel,
                    java.lang.String sName1,
                    java.lang.String iName1,
                    java.lang.String aName1,
                    java.lang.String sName2,
                    java.lang.String iName2,
                    java.lang.String aName2)
             throws OdlException
see initAttributeRel

Method Detail

clone

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

Overrides:
clone in class ThesRelation

initAttributeRel

private void initAttributeRel(int producerId,
                              java.lang.String rel,
                              java.lang.String sName1,
                              java.lang.String iName1,
                              java.lang.String aName1,
                              java.lang.String sName2,
                              java.lang.String iName2,
                              java.lang.String aName2)
                       throws OdlException
Builds a relation given the full-path-name of the attributes. The relation must be read as:
      a1 rel a2
  
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
     AttributeRel a;
     a = new AttributeRel(MomisObject.mod_SIDes_SLIM,
                          "rt",
                          "s1", "i1", "a1",
                          "s2", "i2", "a2");
     try {
        a.control(schema);
     } catch (OdlException ex) {
        // problems
     }
     schema.addThesRelation(a);
  
Instead of using this constructor use the following:
    AttributeRel(int producerId, String rt,Vector a1,Vector a2)
  
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

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

control

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

Overrides:
control in class ThesRelation
Throws:
OdlException

getValidated

public boolean getValidated()
Returns the validation status for this relation.

Overrides:
getValidated in class ThesRelation

getAttributes1

public java.util.Vector getAttributes1()
Returns the First Vector of Attributes of the relation.


getAttributes2

public java.util.Vector getAttributes2()
Returns the Second Vector of Attributes of the relation.


getDottedName1

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

Overrides:
getDottedName1 in class ThesRelation

getDottedName2

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

Overrides:
getDottedName2 in class ThesRelation

getAName1

public java.lang.String getAName1()
Returns name of the first attribute.


getIName1

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


getSName1

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


getAName2

public java.lang.String getAName2()
Returns name of the second attribute.


getIName2

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


getSName2

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


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

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


Universita' di Modena e Reggio Emilia