|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.unimo.dbgroup.momis.odli3.MomisObject
it.unimo.dbgroup.momis.odli3.TypeContainer
it.unimo.dbgroup.momis.odli3.Schema
ODL_i3 schema description data strucure entry point.
All the entities, interfaces, rules etc, defined in a odl_i3
are accessible through an istance of this class.
Each istance of this class describes a ODL_I3 schema.
| Field Summary | |
private GlobalSource |
_globalSource
The global class |
private java.lang.String |
_name
The schema name |
private ThesaurusByObject |
_thesarusIndex
Indexing structure for the Thesaurus Relations. |
private TranslationMap |
_tm
Mapping structure for translation in OLCD. |
private TypeContainer |
_tmpTypeContainer
This variable is used to take trace of the highest level types definition returned by a OdlSpecification statement. |
private java.util.TreeMap |
globalClasses
Collection of global classes related to local schemata. |
| 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 | |
Schema()
basic constructor |
|
Schema(java.io.PrintStream logPrintStream,
org.xml.sax.InputSource inputSource,
boolean fgValidate,
SchemaParserXml schemaParserXml)
Create a schema from an XML file, where the "parser" is given by the user. |
|
Schema(java.io.PrintStream logPrintStream,
java.io.InputStream xmlStream,
boolean fgValidate)
Initialize a schema from an XML input stream |
|
Schema(java.io.PrintStream logPrintStream,
java.io.Reader xmlReader,
boolean fgValidate)
Initialize a schema from an XML input Reader |
|
Schema(java.io.PrintStream logPrintStream,
java.lang.String xmlUri,
boolean fgValidate)
Initialize a schema from an URI addressing and XML file Example |
|
| Method Summary | |
void |
alignTypesFromTmpTypeContainer()
At the end of parsing I add the highest level types definition returned by a OdlSpecification statement into the defined types in this schema. |
void |
closeWrapperConnection()
closing the connection |
void |
comupteThesarusIndex()
Re-indexes all thesaurus relations in a indexing data strucutre accessible by the method getThesarusIndex |
java.util.Vector |
getAllInterfaces()
Returns all the interfaces defined in this schema. |
java.util.TreeMap |
getGlobalClasses()
Return a Map object where keys are the global class names and values are GlobalClass objects. |
GlobalSource |
getGlobalSource()
Get the _globalSource value. |
MomisCodeVersion |
getMomisCodeVersion()
|
java.lang.String |
getName()
Returns the name of "this" type container. |
java.lang.Object |
getObject(java.lang.String name)
Given an schema element dotted name Returns the object or null if such object does not exist. |
ThesaurusByObject |
getThesarusIndex()
Returns a indexing data structure that indexes all thesaurus relations. |
TranslationMap |
getTranslationMap()
Gets the translation map; |
private void |
initialize(java.io.PrintStream logPrintStream,
org.xml.sax.InputSource inputSource,
boolean fgValidate)
Initialize a schema from an XML file |
void |
initialize(java.io.PrintStream logPrintStream,
org.xml.sax.InputSource inputSource,
boolean fgValidate,
SchemaParserXml schemaParserXml)
Initialize a schema from an XML file |
void |
loadFromXML(org.xml.sax.Attributes attrib)
Load the object from an xml tag. |
void |
mergeSchema(TypeContainer t)
Insert a new schema into this Schema. |
java.lang.String |
parseVelocityTemplate(java.lang.String velocityMacroTemplateFileName)
Processes a VelocityMacro template with information in this object |
void |
setGlobalClasses(java.util.TreeMap gcs)
Sets the global classes with the ones stored in the TreeMap object where keys are the global class names and values are GlobalClass objects. |
void |
setGlobalSource(GlobalSource newGlobalSource)
Set the _globalSource value. |
void |
setName(java.lang.String name)
Returns the name of "this" type container. |
void |
setTmpTypeContainer(TypeContainer tmpTypeContainer)
I Use the variable _tmpTypeContainer to take trace of the highest level types definition returned by a OdlSpecification statement. |
void |
setTranslationMap(TranslationMap tm)
Set the translation map; |
void |
solveGlobalSource()
Tries to solve unsolved references and for each interfaces builds the attribute list. |
void |
solveUnsolved()
Tries to solve unsolved references and for each interfaces builds the attribute list. |
java.lang.String |
toArtemis()
Generates a list of thesaurus relations for the ARTEMIS module. |
java.lang.String |
toOdl()
Returns the ODLi3 description for this TypeContainer. |
java.lang.String |
toOlcd()
Generates the OLCD representation. |
java.lang.String |
toOlcdOnMap(TranslationMap tm)
Generates the OLCD representation using as translation map the map passed as parameter. |
java.lang.String |
toOlcdSimBOnMap(TranslationMap tm,
java.util.Map attributeMap)
Generates the OLCD representation for the SIM Module using as translation map the map passed as parameter. |
private void |
toOlcdThesRelationsToBeValidated_addUnique(java.util.Map attributes,
java.util.Vector listOfAttributes)
Private method used by toOlcdThesRelationsToBeValidated to add to a Map the object listed in a vector. |
java.lang.String |
toOlcdThesRelationsToBeValidated(TranslationMap tm)
Returns the OLCD representation for VALIDATION of the Thes Relations of this schema, using as translation map the map passed as parameter. |
java.lang.String |
toXml()
Generates the XML through the "vmtemplates/schemaXml.vm" VelocityMacro template |
java.lang.String |
toXml(java.lang.String templateFileName)
Where is the Velocity XML output template |
| 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 |
private TypeContainer _tmpTypeContainer
private TranslationMap _tm
kew:name value:ObjectKinds of objects in this map:
private java.util.TreeMap globalClasses
private java.lang.String _name
private ThesaurusByObject _thesarusIndex
private GlobalSource _globalSource
| Constructor Detail |
public Schema()
public Schema(java.io.PrintStream logPrintStream,
java.io.InputStream xmlStream,
boolean fgValidate)
throws java.lang.Exception
xmlStream -
public Schema(java.io.PrintStream logPrintStream,
java.io.Reader xmlReader,
boolean fgValidate)
throws java.lang.Exception
public Schema(java.io.PrintStream logPrintStream,
org.xml.sax.InputSource inputSource,
boolean fgValidate,
SchemaParserXml schemaParserXml)
throws java.lang.Exception
logPrintStream - where write log and error outputinputSource - the xml data inputfgValidate - true if we want the parser be validating
public Schema(java.io.PrintStream logPrintStream,
java.lang.String xmlUri,
boolean fgValidate)
throws java.lang.Exception
file:/full/path/to/the/xml/file.xml
| Method Detail |
private void initialize(java.io.PrintStream logPrintStream,
org.xml.sax.InputSource inputSource,
boolean fgValidate)
throws java.lang.Exception
logPrintStream - where write log and error outputinputSource - the xml data inputfgValidate - true if we want the parser be validating
java.lang.Exception
public void initialize(java.io.PrintStream logPrintStream,
org.xml.sax.InputSource inputSource,
boolean fgValidate,
SchemaParserXml schemaParserXml)
throws java.lang.Exception
logPrintStream - where write log and error outputinputSource - the xml data inputfgValidate - true if we want the parser be validating
java.lang.Exception
public void mergeSchema(TypeContainer t)
throws OdlException
t - the schema to be merged.
OdlException
public void closeWrapperConnection()
throws java.lang.Exception
java.lang.Exceptionpublic java.util.Vector getAllInterfaces()
public java.lang.String toArtemis()
S1.Class.Att1a ,bt ,S2.Class.Att2b ,0; S2.Class.Att2b ,nt ,S1.Class.Att1b ,1; S1.Class.Att1b ,syn , S3.Class3.Att3b ,0 ; S3.Class3.Att3b ,rt ,S2.Class.Att2b ,1 ; S3.Class3.Att3b ,syn ,S2.Class.Att2a ,1 ; S1.Class ,bt ,S3.Class3 , ; S2.Class ,rt ,S3.Class3 , ;Where an attribute is identified as:
public java.lang.String toOdl()
toOdl in class TypeContainer
public java.lang.String toXml(java.lang.String templateFileName)
throws java.lang.Exception
java.lang.Exception
public java.lang.String toXml()
throws java.lang.Exception
java.lang.Exception
public java.lang.String parseVelocityTemplate(java.lang.String velocityMacroTemplateFileName)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toOlcd()
public void setTranslationMap(TranslationMap tm)
public TranslationMap getTranslationMap()
public java.lang.String toOlcdOnMap(TranslationMap tm)
public java.lang.String toOlcdSimBOnMap(TranslationMap tm,
java.util.Map attributeMap)
tm - Translation MapattributeMap - Attribute Map, describes how to sobstitute
attribute definition according to
thesaurus relations.
This method will return a virtual schema described in OLCD to be passed
to ODB-Tools for Thesaurus Relationships validation and inference.
private void toOlcdThesRelationsToBeValidated_addUnique(java.util.Map attributes,
java.util.Vector listOfAttributes)
attributes - the map to be filled.listOfAttributes - vector of attributes to evenutually add.public java.lang.String toOlcdThesRelationsToBeValidated(TranslationMap tm)
public void setTmpTypeContainer(TypeContainer tmpTypeContainer)
public void alignTypesFromTmpTypeContainer()
throws OdlException
OdlExceptionpublic java.util.TreeMap getGlobalClasses()
public void setGlobalClasses(java.util.TreeMap gcs)
public void comupteThesarusIndex()
public ThesaurusByObject getThesarusIndex()
public java.lang.Object getObject(java.lang.String name)
name - Name of the object in dot notation.
public void solveUnsolved()
throws OdlException
solveUnsolved in class TypeContainerOdlException
public void solveGlobalSource()
throws OdlException
OdlExceptionpublic java.lang.String getName()
getName in class TypeContainerpublic void setName(java.lang.String name)
public void loadFromXML(org.xml.sax.Attributes attrib)
throws java.lang.Exception
java.lang.Exceptionpublic GlobalSource getGlobalSource()
public void setGlobalSource(GlobalSource newGlobalSource)
newGlobalSource - The new _globalSource value.public MomisCodeVersion getMomisCodeVersion()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||