[ 
https://issues.apache.org/jira/browse/ODFTOOLKIT-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404920#comment-13404920
 ] 

Svante Schubert commented on ODFTOOLKIT-50:
-------------------------------------------

Currently the metadata are being extracted by the GRDDL XSLT I had been once 
written for OASIS.
We discussed prior use the GRDDL XSLT file to test the metadata extracted by 
your Java implementation in odfdom.
XSLT shall not be used as implementation of run-time extraction as it does not 
scale to be called quickly multiple times on large documents, e.g. the metadata 
has only slightly been changed and is re-accssed by the user.
Because it always requires a total serialization of the internal model to XML 
to be able to apply the XSLT.

You need to access directly the ODF XML DOM Model via Java to manipulate the 
state of the RDF.
Be aware that the Java packages of
org.odftoolkit.odfdom.dom.element.*
org.odftoolkit.odfdom.dom.attribute.*
are being generated. If you want to change something in those you need to 
adjust the templates from 
odfdom\src\codegen\resources
It should be able to apply metadata to arbitrary text and existing ODF 
components.

You might think about to create the RDF model during the import of the XML, 
intercepting the SAX events and create the JSON model in
src\main\java\org\odftoolkit\odfdom\pkg\OdfFileSaxHandler.java (for 
content.xml, styles.xml, meta.xml and settings.xml) and
src\main\java\org\odftoolkit\odfdom\pkg\OdfManifestSaxHandler.java (for 
meta.xml)

Furthermore be careful. There is a problem to use classes meant as helper for 
testing as
odfdom\src\test\java\org\odftoolkit\odfdom\utils\ResourceUtilities.java
because they are not bundled into the odfdom.jar meant for deployment at the 
customer.
I am using Netbeans and the project is shown as not compilable.

Be certain all your public classes and methods do have JavaDoc.
Can you give an update of your latest work, please?
                
> [gsoc2012] Add ODF 1.2 RDF metadata support to ODF Toolkit
> ----------------------------------------------------------
>
>                 Key: ODFTOOLKIT-50
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-50
>             Project: ODF Toolkit
>          Issue Type: New Feature
>          Components: generator
>    Affects Versions: 0.7.5
>         Environment: Operating System: All
> Platform: All
>            Reporter: Svante Schubert
>              Labels: gsoc, gsoc2012, mentor
>             Fix For: 0.8.6
>
>         Attachments: grddl_test_patch.txt, patch.txt, patch_20120618.txt, 
> test_rdfmeta.odt, test_rdfmeta.odt
>
>
> This is one of the greatest features for ODF 1.2 to allow the usage of RDF 
> metadata on the document and the most important elements. 
> As a co-editor of this spec, I got a special interest in making this feature 
> come alive. In addition it has a positive side affect to the new OOo API, 
> when scenarios are not even tested in the office, but as well from a 
> different ODF library.
> Before creating a convenient API, the basic package feature has to be 
> supported.
> Still I believe the usage of an RDF parser is still optional to keep ODFDOM 
> small and give the user only what he really wants.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to