It's clear now how can I connect section-types with generated metadata tags , and how to use proprietary as a namespace
but what I need is to generate proprietary metadata such as frbrwork, expression, man with no relation to section-types...
how can I implement this?
On Thursday, December 6, 2012 10:02:44 AM UTC+2, Ashok Hariharan wrote:I have added preliminary support for proprietary metadata setup via configuration.
These 2 pages on the wiki describe the changes :
http://code.google.com/p/bungeni-editor/wiki/DocTypeDefinition
http://code.google.com/p/bungeni-editor/wiki/SectionTypeDefinition
You will need to change the doc_types configuration and the section_types configuration appropriately for these updates to work .
There have also been various changes to the structure of the configuration folders ...what will perhaps affect you is the change of structure within config/system where I have reogranized the shipped XSLTs which are used by the middleware generator.. if you compare this structure :
http://bungeni-editor.googlecode.com/svn/BungeniEditor_configs/development_configs/system/
with your config folder you will get an idea of the changes. Importantly, the external imports within system/transformer/xsl have been remapped (and the XSLTs in there have been updated with various bug fixes ) .
There are still a couple of bugs in the proprietary metadata generation (no way to specify a @source , nor does it support nested metadata setting .. but i will fix both today ) .
Ashok
--
You received this message because you are subscribed to the Google Groups "bungeni-editor" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/LaCxyCbLafUJ.
To post to this group, send email to bungeni...@googlegroups.com.
To unsubscribe from this group, send email to bungeni-edito...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bungeni-editor?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/xSjYgidDE-UJ.
<outputs>
<namespace prefix="an" type="main" desc="Akoma Ntoso" uri="http://www.akomantoso.org/2.0" />
<namespace prefix="muqid" type="proprietary" desc="Proprietary" uri="http://www.proprietary.org" />
</outputs>To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/xSjYgidDE-UJ.

To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/G3q4YoaZp-sJ.
To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/G3q4YoaZp-sJ.
try now .. the problem may be with .rar file .On Tue, Jan 8, 2013 at 10:28 AM, <as...@parliaments.info> wrote:
Hi Samar -- didnt get it again ! your email system seems to remove attachments ... can you upload it to google docs and share the file , i can download it that way
On 8 January 2013 11:13, <say...@birzeit.edu> wrote:
here it is ..On Mon, Jan 7, 2013 at 11:49 PM, <as...@parliaments.info> wrote:
Hi Samar --
I didnt get the attachment - i got this message below (can you send it as a zip file ) :This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "birzeit_configs.rar" is on the list of unacceptable attachments for this site and has been replaced by this warning message. If you wish to receive a copy of the original attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Mon Jan 7 23:35:35 2013 the virus scanner said: MailScanner: Attempt to hide real filename extension (externals.txt.tmp) Note to Help Desk: Look on the BZU (mailgw) MailScanner in /var/spool/MailScanner/quarantine/20130107 (message 9D2FB31AEED.A83C3). -- Postmaster Birzeit University www.birzeit.eduOn 8 January 2013 00:35, <say...@birzeit.edu> wrote:
Happy New Year Ashok ..
attached birzeit_configs.rar
but I tried sectionTypes from development_configs folder that have to set metadata related to AN namespace but they didn't work !
<?xml version="1.0" encoding="UTF-8"?> <inlineTypes for="act" xmlns:an="http://www.akomantos.org/2.0"> <!-- ASHOK old wrong configuration --> <!--<inlineType name="ref"> <output> <metadatas> <metadata name="BungeniRefURI" /> </metadatas> <meta> <TLCPerson id="$BungeniRefURI" /> </meta> <content> <an:ref href="$BungeniRefURI" /> </content> </output> </inlineType> --> <!-- ASHOK correct configuration --> <inlineType name="refPerson"> <metadatas> <metadata name="BungeniPersonURI" /> <metadata name="BungeniPersonID" /> <metadata name="BungeniPersonFullName" /> </metadatas> <output> <meta> <references> <an:TLCPerson id="$BungeniPersonID" href="$BungeniPersonURI" as="$BungeniPersonFullName" /> </references> </meta> <content> <an:ref href="#$BungeniPersonID" /> </content> </output> </inlineType>
If you notice the commented configuration above -- you will see :
Which in turn invokes our implemented DIalog (selector_dialogs.xml) :<output> <metadatas> <metadata name="BungeniRefURI" /> </metadatas> <meta> <TLCPerson id="$BungeniRefURI" /> </meta> <content> <an:ref href="$BungeniRefURI" /> </content> </output>Instead it should have been as specified in the second part (the <metadatas> element out of the <output> element, and TLCPerson needs to be wrapped in <references> element ).. I need to document this better on the wiki - and also add some checks via a schema validator on the configuration .I have also implemented an example connector dialog that is loaded which sets the metadata on the inline :http://bungeni-editor.googlecode.com/svn/BungeniEditor/trunk/BungeniEditorClient/src/org/bungeni/editor/selectors/act/PersonRefInline.javathe key part here is :class Person { String name; String uri; String id; public Person(String name, String uri, String id){ this.name = name; this.uri = uri; this.id = id; } @Override public String toString(){ return name; } } List<Person> persons = new ArrayList<Person>(){ { add(new Person("Samar Ayesh", "/ontology/Person/pl/Birzeit/2013", "unique-id-2013")); add(new Person("John Smith", "/ontology/Person/pl/SmithLand/2014", "unique-id-2014")); add(new Person("James Mango", "/ontology/Person/pl/MangoLand/2015", "unique-id-2015")); } }; @Override public void commonInitFields(){ DefaultComboBoxModel model = new DefaultComboBoxModel(persons.toArray()); this.cboPersons.setModel(model); }Which loads the combobox with some metadata that the user can select , and the processSelectInsert() API implementation that applies the selected metadata into the document :@Override public boolean processSelectInsert() { // this gets you the container section name OOComponentHelper ooDoc = getContainerPanel().getOoDocument(); Person aPerson = (Person) cboPersons.getSelectedItem(); CommonRouterActions.TypeCreationState tcs = getContainerPanel().initInlineType(); if (tcs.propsMap != null ) { tcs.propsMap.put("BungeniPersonURI", aPerson.uri ); tcs.propsMap.put("BungeniPersonID", aPerson.id ); tcs.propsMap.put("BungeniPersonFullName", aPerson.name ); ooDoc.setSelectedTextAttributes(tcs.propsMap); } return true; }.This dialog is invoked via the toolbar action :
http://bungeni-editor.googlecode.com/svn/BungeniEditor_configs/bz_configs/actions/toolbar_actions/act.xmlI have implemented a dummy action in the preface :<blockAction title="PREFACE"> <subaction tooltip="CREATE_PREFACE_FROM_SELECTION" target="make_act_preface" condition="textSelected:true" title="CREATE_PREFACE_FROM_SELECTION" > </subaction> <subaction tooltip="LONGTITLE" target="make_preface_longTitle" condition="cursorInSection:preface :and: textSelected:true :and: sectionNotExists:longTitle" title="LONGTITLE"> </subaction> <!--ASHOK to to test adding dialog metadata setter to reference --> <subaction tooltipe="MARK_REF_PERSON" target="mark_refperson" condition="cursorInSection:preface :and: textSelected:true" title="MARK_REF_PERSON" />The target action router --<action name="mark_refperson" source="inlineType" metadata="refPerson"> <router class="org.bungeni.editor.actions.routers.routerInputReference" dialog="refperson" /> </action>
<dialog id="refperson" class="org.bungeni.editor.selectors.act.Main" >
<dialog
class="org.bungeni.editor.selectors.act.PersonRefInline"
/>
</dialog>Thanks alot Ashok , ref inlineType and it's metadata is working correctly now ...
but I need to add all my metadata fields as proprietary into meta section ..
I tried to edit on section_types/act.xml for meta section ...
<sectionType name="meta"
prefix="meta"
numstyle="single">
<metadatas>
<metadata name="ActSourceNo" />
</metadatas>
<output>
<meta>
<proprietary source="#muq" xmlns:muqid="http://muqtafi.birzeit.edu/proprietary">
<muqid:AdditionalInfo>
<muqid:SourceNo>$ActSourceNo</muqid:SourceNo>
</muqid:AdditionalInfo>
</proprietary>
</meta>
<content>
<an:meta/>
</content>
</output>
</sectionType>
I have those lines in doc_types.xml
<outputs>
<namespace prefix="an" type="main" desc="Akoma Ntoso" uri="http://www.akomantoso.org/2.0" />
<namespace prefix="muqid" type="proprietary" desc="Proprietary" uri="http://www.proprietary.org" />
</outputs>
when I did that exporting to xml failed !!
how can fix this problem and have what I want ?
Thanks alot Ashok , ref inlineType and it's metadata is working correctly now ...
but I need to add all my metadata fields as proprietary into meta section ..
I tried to edit on section_types/act.xml for meta section ...
<sectionType name="meta"
prefix="meta"
numstyle="single">
<metadatas>
<metadata name="ActSourceNo" />
</metadatas>
<output>
<meta>
<proprietary source="#muq" xmlns:muqid="http://muqtafi.birzeit.edu/proprietary">
<muqid:AdditionalInfo>
<muqid:SourceNo>$ActSourceNo</muqid:SourceNo>
</muqid:AdditionalInfo>
</proprietary>
</meta>
<content>
<an:meta/>
</content>
</output>
</sectionType>
I have those lines in doc_types.xml
<outputs>
<namespace prefix="an" type="main" desc="Akoma Ntoso" uri="http://www.akomantoso.org/2.0" />
<namespace prefix="muqid" type="proprietary" desc="Proprietary" uri="http://www.proprietary.org" />
</outputs>
when I did that exporting to xml failed !!
how can fix this problem and have what I want ?
On Wed, Jan 9, 2013 at 4:46 PM, Ashok Hariharan <as...@parliaments.info> wrote:
--
You received this message because you are subscribed to the Google Groups "bungeni-editor" group.
To post to this group, send email to bungeni...@googlegroups.com.
To unsubscribe from this group, send email to bungeni-edito...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bungeni-editor?hl=en.
aha I know that it is possible with ref ..or any other inlineType, but what about if i needed it to appear every time ...
This the case:
I have my metadata fields filled at the beginning when bungeni starts, when metadata panels appear ..
I need those metadata fields to be present into meta section every time as proprietary tags as shown above for "SourceNo".. with no relation to any sectionType or inlineType.
On 11 January 2013 19:12, Samar Ayesh <smr....@gmail.com> wrote:
aha I know that it is possible with ref ..or any other inlineType, but what about if i needed it to appear every time ...
This the case:
I have my metadata fields filled at the beginning when bungeni starts, when metadata panels appear ..
I need those metadata fields to be present into meta section every time as proprietary tags as shown above for "SourceNo".. with no relation to any sectionType or inlineType.
OK -- I see what you mean -- let me see how it can be done. One way I know it can be done even now is to do it the way I described - via a inlineType or SectionType action - since in the router class you have access to all the metadata (even from the document level not just inline or section level ) - so you could via an extended router class, map the doc level metadata to the section metadata - and that will get output as proprietary header metadata.
However - i think there is a easier way to implement this in the middleware - let me get back to you ...
Aha .. You mean that by this configuration, metadata will be pulled out from metadata panels into xml generated AN file automatically ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The University is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~