[Modeling-cvs] ProjectModeling/Modeling/doc/UserGuide DefiningaModel.tex,1.27,1.28
Status: Abandoned
Brought to you by:
sbigaret
|
From: <sbi...@us...> - 2003-08-30 12:24:29
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide
In directory sc8-pr-cvs1:/tmp/cvs-serv715/ProjectModeling/Modeling/doc/UserGuide
Modified Files:
DefiningaModel.tex
Log Message:
Updated doc. for XML model
Index: DefiningaModel.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/DefiningaModel.tex,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** DefiningaModel.tex 26 Aug 2003 20:25:45 -0000 1.27
--- DefiningaModel.tex 30 Aug 2003 12:24:24 -0000 1.28
***************
*** 1078,1081 ****
--- 1078,1082 ----
</entity>
</model>
+
\end{verbatim}
***************
*** 1083,1090 ****
section~\ref{full-xml-format}.
! Each of the xml elements \code{<model>}, \code{<entity>} etc. has its own set of
! attributes, as indicated by the ellipses found in the xml elements above. The
! following subsections describe each element in detail.
\subsection{Model \label{xml-model-props}}
--- 1084,1094 ----
section~\ref{full-xml-format}.
+ Each of the xml elements \code{<model>}, \code{<entity>} etc. has its own
+ set of attributes, as indicated by the ellipses found in the xml elements
+ above. The following subsections describe each element in detail.
! \begin{notice}
! Please note that every value associated to a xml attribute should be a string.
! \end{notice}
\subsection{Model \label{xml-model-props}}
***************
*** 1093,1098 ****
is, hence, the root element of the model.
! The \code{<model>} element may have the following attributes:
The connection dictionary should be a valid python expression for
--- 1097,1113 ----
is, hence, the root element of the model.
! The \code{<model>} element has the following attributes:
!
! \begin{verbatim}
! <model
! name = '' -- unique per model set
! packageName = '' -- generate classes into, and import from, this package
! adaptorName = ( MySQL | Oracle | Postgresql | SQLite ) : Postgresql -- a supported database adaptor
! comment = '' -- a comment
! connectionDictionary = "{}" -- string representation of a python dictionary
! >
! \end{verbatim}
+ All these attributes are described in section~\ref{model-props}.
The connection dictionary should be a valid python expression for
***************
*** 1134,1142 ****
--- 1149,1219 ----
\end{verbatim}
+ \subsubsection{Definition of an entity\label{xml-entity-props-entity}}
+
+ The \code{<entity>} element is a child of the \code{<model>} element. It has
+ the following attributes:
+
+ \begin{verbatim}
+ <entity
+ name = '' -- relates class to db table
+ className = '' -- python class name for this entity
+ moduleName = '' -- class is generated into, and accessed from, this module
+ externalName = '' -- db table name
+ parentEntity = '' -- name of entity to "inherit" from
+ typeName = '' -- not yet used
+ isAbstract = '0' -- not yet used
+ isReadOnly = '0' -- not yet used
+ comment = '' -- a comment
+ >
+ \end{verbatim}
+
+ All these attributes are described in section~\ref{entity-props}.
\subsection{Attribute\label{xml-attributes-props}}
+ The \code{<attribute>} element is a child of the \code{<entity>} element. It
+ may have the following attributes:
+
+ \begin{verbatim}
+ <attribute
+ name = '' -- class attribute name
+ type = ( string | int | float | DateTime ) : string -- python type
+ isClassProperty = '1' -- '0' or '1'; attribute is also a class property
+ isRequired = '1' -- '0' or '1'; cannot be null
+ columnName = '' -- database table column name
+ externalType = '' -- database type
+ width = '' -- qualifier for some values of externalType
+ precision = '' -- qualifier for some values of externalType
+ scale = '' -- qualifier for some values of externalType
+ defaultValue = '' -- class attribute default value
+ displayLabel = '' -- text label to use in applications
+ comment = '' -- a comment
+ />
+ \end{verbatim}
+ All these attributes are described in section~\ref{attributes-props}.
+
\subsection{Relationship\label{xml-relationships-props}}
+ The \code{<relationship>} element is a child of the \code{<entity>}
+ element. It has the following attributes:
+
+ \begin{verbatim}
+ <relation
+ name = '' -- relation name
+ deleteRule = ( 0,DELETE_NULLIFY | 1,DELETE_DENY | 2,DELETE_CASCADE |
+ 3,DELETE_NOACTION ) : 0 -- behaviour when object is deleted
+ isClassProperty = '1' -- '0' or '1'; relation is also a class property
+ multiplicityLowerBound = ( int > -1 ) : 0
+ multiplicityUpperBound = ( int > -1 | -1,* ) : 1
+ -- -1 or * indicate unconstrained upper bound
+ destinationEntity = '' -- name of destination entity
+ joinSemantic = ( 0,Inner | 1,FullOuter | 2,LeftOuter | 3,Right Outer ) : 0
+ displayLabel = '' -- text label to use in applications
+ comment = '' -- a comment
+ >
+ </relation>
+ \end{verbatim}
+
+ All these attributes are described in section~\ref{relationships-props}.
Possible values for delete rules are:
***************
*** 1217,1220 ****
--- 1294,1313 ----
\end{description}
+ It is formatted this way:
+
+ \begin{verbatim}
+ <relation
+ name = '' -- relation name
+ ...
+ destinationEntity = '' -- name of destination entity
+ >
+ <!-- unordered content: (join) -->
+ <join
+ sourceAttribute = '' -- name of source attribute, in enclosing entity
+ destinationAttribute = '' -- name of target attribute, in ../@destinationEntity
+ />
+ </relation>
+ \end{verbatim}
+
\subsection{Full format of an xml-model\label{full-xml-format}}
\makeatletter
***************
*** 1256,1262 ****
columnName = '' -- database table column name
externalType = '' -- database type
! width = '' -- qualifer for some values of externalType
! precision = '' -- qualifer for some values of externalType
! scale = '' -- qualifer for some values of externalType
defaultValue = '' -- class attribute default value
displayLabel = '' -- text label to use in applications
--- 1349,1355 ----
columnName = '' -- database table column name
externalType = '' -- database type
! width = '' -- qualifier for some values of externalType
! precision = '' -- qualifier for some values of externalType
! scale = '' -- qualifier for some values of externalType
defaultValue = '' -- class attribute default value
displayLabel = '' -- text label to use in applications
***************
*** 1264,1268 ****
/>
<relation
! name = '' -- class attribute name
deleteRule = ( 0,DELETE_NULLIFY | 1,DELETE_DENY | 2,DELETE_CASCADE |
3,DELETE_NOACTION ) : 0 -- behaviour when object is deleted
--- 1357,1361 ----
/>
<relation
! name = '' -- relation name
deleteRule = ( 0,DELETE_NULLIFY | 1,DELETE_DENY | 2,DELETE_CASCADE |
3,DELETE_NOACTION ) : 0 -- behaviour when object is deleted
|