openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dian...@apache.org
Subject svn commit: r1229541 - in /openjpa/trunk/openjpa-project: assembly.xml src/doc/manual/ref_guide_meta.xml upload.xml
Date Tue, 10 Jan 2012 13:53:53 GMT
Author: dianner
Date: Tue Jan 10 13:53:53 2012
New Revision: 1229541

URL: http://svn.apache.org/viewvc?rev=1229541&view=rev
Log:
OPENJPA-2082 Documentation changes and upload schema

Modified:
    openjpa/trunk/openjpa-project/assembly.xml
    openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml
    openjpa/trunk/openjpa-project/upload.xml

Modified: openjpa/trunk/openjpa-project/assembly.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/assembly.xml?rev=1229541&r1=1229540&r2=1229541&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/assembly.xml (original)
+++ openjpa/trunk/openjpa-project/assembly.xml Tue Jan 10 13:53:53 2012
@@ -67,6 +67,14 @@
             <outputDirectory>docs/javadoc</outputDirectory>
         </fileSet>
         <fileSet>
+        	<directory>../openjpa-persistence/target/classes/org/apache/openjpa/persistence</directory>
+        	<outputDirectory>docs/schema</outputDirectory>
+        	<includes>
+        		<include>extendable-orm.xsd</include>
+        		<include>openjpa-orm.xsd</include>
+        	</includes>
+        </fileSet>        
+        <fileSet>
             <directory>../openjpa-examples/image-gallery</directory>
             <outputDirectory>examples/image-gallery</outputDirectory>
             <excludes>

Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml?rev=1229541&r1=1229540&r2=1229541&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml Tue Jan 10 13:53:53 2012
@@ -980,5 +980,65 @@ public class Magazine
 </programlisting>
             </example>
         </section>
+                <section id="ref_guide_meta_xml">
+        	<title>
+        		XML extensions
+        	</title>
+        	<para>
+OpenJPA has extended the JPA 2.0 schema to include elements and attributes corresponding
+to OpenJPA extended metadata and mapping annotations. The schema are contained in 2
+files: <ulink url="http://openjpa.apache.org/builds/latest/docs/schema/extendable-orm.xsd">
+extendable-orm.xsd</ulink> and
+<ulink url="http://openjpa.apache.org/builds/latest/docs/schema/openjpa-orm.xsd">openjpa-orm.xsd</ulink>.
+The extendable-orm.xsd file provides copies of some of the JPA 2.0 schema elements with additional
schema to make it 
+extendable.
+The openjpa-orm.xsd file extends the extendable-orm.xsd with OpenJPA specific elements and
attributes representing
+OpenJPA annotations. Currently, only a subset of annotations have actually been implemented,
and some of those
+have been partially tested. The current status can be found by comments in the
+<ulink url="http://openjpa.apache.org/builds/latest/docs/schema/openjpa-orm.xsd">openjpa-orm.xsd</ulink>
+schema file.    	
+        	</para>
+        	<para>
+In order to use the OpenJPA extensions in your mapping file you must include the namespaces
for these 2 new
+schemas as well as for the schema for JPA 2.0, as shown in the following example:       
	
+        	</para>
+        	<example id="ref_guide_schema_ex">
+        		<title>
+        			OpenJPA Schema Extensions
+        		</title>
+<programlisting>
+&lt;entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable" 
+    xmlns:openjpa="http://www.apache.org/openjpa/ns/orm" 
+    xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    version="2.0"&gt;
+
+    &lt;entity class="org.apache.openjpa.persistence.jdbc.annotations.MultiColumnVersionPC"
+        metadata-complete="true"&gt;
+        &lt;table name="MCV"/&gt;
+        &lt;attributes&gt;
+            &lt;id name="id"&gt;
+                &lt;orm:generated-value/&gt;
+            &lt;/id&gt;
+            &lt;basic name="id"/&gt;
+            &lt;basic name="name"/&gt;
+        &lt;/attributes&gt;
+        &lt;openjpa:entity version-strategy="version-numbers"&gt;
+            &lt;openjpa:version-columns&gt;
+                &lt;openjpa:version-column name="v1"/&gt;
+                &lt;openjpa:version-column name="v2"/&gt;
+                &lt;openjpa:version-column name="v3"
+                    column-definition="FLOAT"
+                    scale="3"
+                    precision="10"/&gt;
+            &lt;/openjpa:version-columns&gt;	
+        &lt;/openjpa:entity&gt;
+    &lt;/entity&gt;
+    
+&lt;/entity-mappings&gt;    
+
+</programlisting>
+        	</example>
+        </section>
     </section>
 </chapter>

Modified: openjpa/trunk/openjpa-project/upload.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/upload.xml?rev=1229541&r1=1229540&r2=1229541&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/upload.xml (original)
+++ openjpa/trunk/openjpa-project/upload.xml Tue Jan 10 13:53:53 2012
@@ -34,6 +34,7 @@
             <patternset>
                 <include name="**/javadoc/**" />
                 <include name="**/docbook/**" />
+            	<include name="**/schema/**"/>
             </patternset>
         </unzip>
     	
@@ -41,6 +42,7 @@
             <fileset dir="target/site/tempDocs">
                 <include name="**/javadoc/**"/>
                 <include name="**/docbook/**"/>
+            	<include name="**/schema/**"/>
                 <exclude name="docs/**"/>
             </fileset>
         </zip>



Mime
View raw message