You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Michelle Caisse <Mi...@Sun.COM> on 2005/03/10 02:15:03 UTC

referencing jdo 2 dtd

Michael et al.,

I created an orm directory parallel to the new applicationidentity and 
datastoreidentity directories.  To run tests with mapping, I will have 
to edit all of the metadata files to reference a 2.0 dtd.  
Unfortunately, this is a hack until we can actually put the content in 
the repository and create a tck 2.0 directory in which we can make this 
a permanent feature of the metadata files.

-- Michelle

Re: referencing jdo 2 dtd

Posted by Michelle Caisse <Mi...@Sun.COM>.
Michael Bouschen wrote:

> Hi Michelle,
>
>> Michael et al.,
>>
>> I created an orm directory parallel to the new applicationidentity 
>> and datastoreidentity directories.  
>
>
> I propose to have the orm directory parallel to jdo:
>     tck11/test/conf
>               /java
>               /jdo
>               /orm
>
> Then the directory jdo includes JDO metadata stored in .jdo files, where
> the directory orm is for mapping metadata. What do you think?


Yes, that's better.

>
>> To run tests with mapping, I will have
>> to edit all of the metadata files to reference a 2.0 dtd.  
>> Unfortunately, this is a hack until we can actually put the content 
>> in the repository and create a tck 2.0 directory in which we can make 
>> this a permanent feature of the metadata files.
>
>
> Yes this is an issue.
>
> Attached you find a small script changeDoctype.sh that allows you to
> change the metadata files (rather than doing this manually). It takes
> a list of file names as command line arguments. In each file it replaces
> a line starting with <!DOCTYPE by a string specified in variable
> NEWDOCTYPE. Please change the value of NEWDOCTYPE acording to your
> needs. Please note the new value needs to be enclosed in single quotes:
> NEWDOCTYPE='<new doctype>'
> I used the 1.0 doctype as an example. The script save the original file
> with the suffix .orig. It prints out the name of the file it is
> currently processing. You might need to change the permissions of the
> file, before you can execute it: chmod 777 changeDoctype.sh.
> The following line finds the .jdo file under the current directory and
> runs the script: find . -name '*.jdo' | xargs changeDoctype.sh
>
> This is a hack too, but less work compared to the manual change.

Awesome!! Thanks!

-- Michelle

>
> Regards Michael
>
>>
>> -- Michelle
>
>
>------------------------------------------------------------------------
>
>NEWDOCTYPE='<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">'
>
>for i in $*
>do
>   echo $i
>   cp $i $i.orig
>   sed "/^<!DOCTYPE.*$/c \
>${NEWDOCTYPE}" $i.orig > $i
>done
>
>
>  
>


Re: referencing jdo 2 dtd

Posted by Michael Bouschen <mb...@spree.de>.
Hi Michelle,

> Michael et al.,
> 
> I created an orm directory parallel to the new applicationidentity and 
> datastoreidentity directories.  

I propose to have the orm directory parallel to jdo:
     tck11/test/conf
               /java
               /jdo
               /orm

Then the directory jdo includes JDO metadata stored in .jdo files, where
the directory orm is for mapping metadata. What do you think?

> To run tests with mapping, I will have
> to edit all of the metadata files to reference a 2.0 dtd.  
> Unfortunately, this is a hack until we can actually put the content in 
> the repository and create a tck 2.0 directory in which we can make this 
> a permanent feature of the metadata files.

Yes this is an issue.

Attached you find a small script changeDoctype.sh that allows you to
change the metadata files (rather than doing this manually). It takes
a list of file names as command line arguments. In each file it replaces
a line starting with <!DOCTYPE by a string specified in variable
NEWDOCTYPE. Please change the value of NEWDOCTYPE acording to your
needs. Please note the new value needs to be enclosed in single quotes:
NEWDOCTYPE='<new doctype>'
I used the 1.0 doctype as an example. The script save the original file
with the suffix .orig. It prints out the name of the file it is
currently processing. You might need to change the permissions of the
file, before you can execute it: chmod 777 changeDoctype.sh.
The following line finds the .jdo file under the current directory and
runs the script: find . -name '*.jdo' | xargs changeDoctype.sh

This is a hack too, but less work compared to the manual change.

Regards Michael

> 
> -- Michelle

-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin