incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r225705 - in /incubator/graffito/trunk/components/src: schema/graffitostore-schema.xml sql/GraffitoServer/delete-db.sql sql/GraffitoServer/hsql/drop-db.sql sql/GraffitoServer/insert-db.sql sql/GraffitoServer/mysql/drop-db.sql
Date Thu, 28 Jul 2005 05:44:53 GMT
Author: clombart
Date: Wed Jul 27 22:44:47 2005
New Revision: 225705

URL: http://svn.apache.org/viewcvs?rev=225705&view=rev
Log:
Review object model (see GRFT-25)

Modified:
    incubator/graffito/trunk/components/src/schema/graffitostore-schema.xml
    incubator/graffito/trunk/components/src/sql/GraffitoServer/delete-db.sql
    incubator/graffito/trunk/components/src/sql/GraffitoServer/hsql/drop-db.sql
    incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-db.sql
    incubator/graffito/trunk/components/src/sql/GraffitoServer/mysql/drop-db.sql

Modified: incubator/graffito/trunk/components/src/schema/graffitostore-schema.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/schema/graffitostore-schema.xml?rev=225705&r1=225704&r2=225705&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/schema/graffitostore-schema.xml (original)
+++ incubator/graffito/trunk/components/src/schema/graffitostore-schema.xml Wed Jul 27 22:44:47
2005
@@ -79,46 +79,71 @@
 	</table>
 	
 	
-	<table name="CONTENT">
-		<column name="CONTENT_ID" primaryKey="true" required="true" type="INTEGER"/>
+	<table name="DOCUMENT_STREAM">
+		<column name="DOCUMENT_STREAM_ID" primaryKey="true" required="true" type="INTEGER"/>
 		<column name="CONTENT" type="BLOB"/>
+		<column name="ISO_CODE" size="5" type="VARCHAR"/>				
 		<column name="ENCODING" size="30" type="VARCHAR"/>
 	</table>
+	
 	<table name="CMS_OBJECT">
+		
+		<!-- The table contains all attributes used for CmsObject, Folder, Content, Link, VersionnedContent
and Documents -->
+		
+		<!-- Commons attributes (defined in CmsObject) -->	
 		<column name="OBJECT_ID" primaryKey="true" required="true" type="INTEGER"/>
 		<column name="PARENT_ID" type="INTEGER"/>			
 		<column name="NAME" required="true" size="254" type="VARCHAR"/>
 		<column name="URI" required="true" size="254" type="VARCHAR"/>
 		<column name="CREATION_DATE" required="true" type="DATE"/>
 		<column name="DELTA" required="true" type="DATE"/>
-		<column name="DESCRIPTION" size="255" type="VARCHAR"/>
-		<column name="TITLE" size="255" type="VARCHAR"/>
+		
+		<!-- Link object -->
 		<column name="LINK_TARGET_ID" type="INTEGER"/>
+		
+		<!-- Versionned Content & its descendants -->
 		<column name="VERSION_NUM" size="10" type="VARCHAR"/>
 		<column name="IS_LAST_VERSION" type="INTEGER"/>
-		<column name="CONTENT_ID" type="INTEGER"/>
+
+        <!-- Document object --> 
+		<column name="DOCUMENT_STREAM_ID" type="INTEGER"/>
 		<column name="CONTENT_SIZE" type="INTEGER"/>
-		<column name="LANGUAGE" required="true" size="254" type="VARCHAR"/>
-		<column name="OWNER" required="true" size="254" type="VARCHAR"/>
+		<column name="ISO_CODE" required="true" size="254" type="VARCHAR"/>
 		<column name="CONTENT_TYPE" size="254" type="VARCHAR"/>
-		<column name="CLASS_NAME" required="true" size="254" type="VARCHAR"/>
+
+		<column name="CLASS_NAME" required="true" size="254" type="VARCHAR"/>		
+				
 		<foreign-key foreignTable="CMS_OBJECT" onDelete="cascade">
 			<reference foreign="OBJECT_ID" local="PARENT_ID"/>
 		</foreign-key>
-		<foreign-key foreignTable="CONTENT" onDelete="cascade">
-			<reference foreign="CONTENT_ID" local="CONTENT_ID"/>
+		<foreign-key foreignTable="DOCUMENT_STREAM" onDelete="cascade">
+			<reference foreign="DOCUMENT_STREAM_ID" local="DOCUMENT_STREAM_ID"/>
 		</foreign-key>
 		<index name="CMS_OBJECT_IDX1">
 			<index-column name="PARENT_ID" />
 		</index >
 		<index name="CMS_OBJECT_IDX2">
-			<index-column name="CONTENT_ID" />
+			<index-column name="DOCUMENT_STREAM_ID" />
 		</index>
 		<unique name="URI_VERSION_NUM">
 			<unique-column name="URI" />
 			<unique-column name="VERSION_NUM" />
 		</unique>
 	</table>
+
+	<table name="PROPERTY">
+		<column name="PROPERTY_ID" primaryKey="true" required="true" type="INTEGER"/>
+		<column name="OBJECT_ID" type="INTEGER"/>			
+		<column name="NAME" required="true" size="254" type="VARCHAR"/>
+		<column name="VALUE" required="true" size="254" type="VARCHAR"/>
+		<foreign-key foreignTable="CMS_OBJECT" >
+			<reference foreign="OBJECT_ID" local="OBJECT_ID"/>
+		</foreign-key>
+		<index name="PROPERTY_IDX1">
+			<index-column name="OBJECT_ID" />
+		</index >
+	</table>
+	
 	<table name="VERSION_HISTORY">
 		<column name="HISTORY_ID" primaryKey="true" required="true" type="INTEGER"/>
 		<column name="OBJECT_ID" required="true" type="INTEGER"/>

Modified: incubator/graffito/trunk/components/src/sql/GraffitoServer/delete-db.sql
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/sql/GraffitoServer/delete-db.sql?rev=225705&r1=225704&r2=225705&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/sql/GraffitoServer/delete-db.sql (original)
+++ incubator/graffito/trunk/components/src/sql/GraffitoServer/delete-db.sql Wed Jul 27 22:44:47
2005
@@ -14,8 +14,9 @@
 -- limitations under the License.
 -----------------------------------------------------------------------------
 delete from VERSION_HISTORY;
+delete from PROPERTY;
 delete from CMS_OBJECT;
-delete from CONTENT;
+delete from DOCUMENT_STREAM;
 delete from WEBDAV_SERVER;
 delete from GRAFFITO_DB_SERVER; 
 delete from GRAFITTO_FS_SERVER;

Modified: incubator/graffito/trunk/components/src/sql/GraffitoServer/hsql/drop-db.sql
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/sql/GraffitoServer/hsql/drop-db.sql?rev=225705&r1=225704&r2=225705&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/sql/GraffitoServer/hsql/drop-db.sql (original)
+++ incubator/graffito/trunk/components/src/sql/GraffitoServer/hsql/drop-db.sql Wed Jul 27
22:44:47 2005
@@ -14,8 +14,9 @@
 -- limitations under the License.
 -----------------------------------------------------------------------------
 drop table VERSION_HISTORY IF EXISTS;
+drop table PROPERTY IF EXISTS;
 drop table CMS_OBJECT IF EXISTS;
-drop table CONTENT IF EXISTS;
+drop table DOCUMENT_STREAM IF EXISTS;
 drop table SYS_CMS_CLASSES IF EXISTS;
 drop table WEBDAV_SERVER IF EXISTS;
 drop table GRAFFITO_DB_SERVER IF EXISTS; 

Modified: incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-db.sql
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-db.sql?rev=225705&r1=225704&r2=225705&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-db.sql (original)
+++ incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-db.sql Wed Jul 27 22:44:47
2005
@@ -12,12 +12,14 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
------------------------------------------------------------------------------
-INSERT INTO SYS_CMS_CLASSES VALUES('Folder','org.apache.portals.graffito.model.impl.FolderImpl');
-INSERT INTO SYS_CMS_CLASSES VALUES('Document','org.apache.portals.graffito.model.impl.DocumentImpl');
-INSERT INTO SYS_CMS_CLASSES VALUES('Link','org.apache.portals.graffito.model.impl.LinkImpl');
-INSERT INTO SYS_CMS_CLASSES VALUES('WebdavServer','org.apache.portals.graffito.model.impl.WebdavServerImpl');
-INSERT INTO SYS_CMS_CLASSES VALUES('GraffitoServer','org.apache.portals.graffito.model.impl.GraffitoServerImpl');
-INSERT INTO SYS_CMS_CLASSES VALUES('FileSystemServer','org.apache.portals.graffito.model.impl.FileSystemServerImpl');
-INSERT INTO SYS_CMS_CLASSES VALUES('HistoryElement','org.apache.portals.graffito.model.impl.HistoryElementImpl');
+-----------------------------------------------------------------------------           
                                 
+INSERT INTO SYS_CMS_CLASSES VALUES('Folder','org.apache.portals.graffito.model.core.impl.FolderImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('Content','org.apache.portals.graffito.model.core.impl.ContentImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('VersionnedContent','org.apache.portals.graffito.model.core.impl.VersionnedContentImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('Link','org.apache.portals.graffito.model.core.impl.LinkImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('Document','org.apache.portals.graffito.model.dm.impl.DocumentImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('WebdavServer','org.apache.portals.graffito.model.server.impl.WebdavServerImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('GraffitoServer','org.apache.portals.graffito.model.server.impl.GraffitoServerImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('FileSystemServer','org.apache.portals.graffito.model.server.impl.FileSystemServerImpl');
+INSERT INTO SYS_CMS_CLASSES VALUES('HistoryElement','org.apache.portals.graffito.model.core.impl.HistoryElementImpl');
 

Modified: incubator/graffito/trunk/components/src/sql/GraffitoServer/mysql/drop-db.sql
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/sql/GraffitoServer/mysql/drop-db.sql?rev=225705&r1=225704&r2=225705&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/sql/GraffitoServer/mysql/drop-db.sql (original)
+++ incubator/graffito/trunk/components/src/sql/GraffitoServer/mysql/drop-db.sql Wed Jul 27
22:44:47 2005
@@ -14,6 +14,7 @@
 -- limitations under the License.
 -----------------------------------------------------------------------------
 drop table if exists VERSION_HISTORY;
+drop table if exists PROPERTY;
 drop table if exists CMS_OBJECT;
 drop table if exists CONTENT;
 drop table if exists SYS_CMS_CLASSES;



Mime
View raw message