[CS3 JS] How To Access Custom Metadata?

I have InCopy documents that contain custom XMP metadata in two namespaces, Dublin Core and PRISM, e.g.:<br /><br />    ...<br />    <rdf:Description<br />      rdf:about=""><br />      <dc:format<br />        xmlns:dc="http://purl.org/dc/elements/1.1/">application/x-incopy</dc:format><br />      <dc:title>Chickens and You</dc:title><br />    </rdf:Description><br />    <rdf:Description<br />      rdf:about=""><br />      <prism:publicationName<br />        xmlns:prism="http://prismstandard.org/namespaces/basic/1.2/"<br />        >Poultry Daily</prism:publicationName><br />    </rdf:Description><br />    ...<br /><br />In my JavaScript, I can access the Dublin core values but cannot access the PRISM values and I'm not sure why not.<br /><br />For example, I have this:<br /><br />doc = app.activeDocument;<br />metadata = doc.metadataPreferences;<br /><br />namespaces["dc"] = "http://purl.org/dc/elements/1.1/";<br />namespaces["prism"] = "http://prismstandard.org/namespaces/basic/1.2/";<br /><br />$.writeln("dc:title=" + <br />     metadata.getProperty(namespaces["dc"], <br />          "title/*[1]"))<br />// Returns expected result "Chickens and You"<br /><br />$.writeln("prism:publicationName=" + <br />     metadata.getProperty(namespaces["prism"], <br />          "publicationName/*[1]"))<br />// Returns unexpected empty result, should be "Poultry Daily".<br /><br />If I do metadata.save() I see the PRISM metadata in the saved result:<br /><br />     <rdf:Description rdf:about=""<br />            xmlns:prism="http://prismstandard.org/namespaces/basic/1.2/"><br />         <prism:publicationName>Poultry Daily</prism:publicationName><br />     </rdf:Description><br /><br />So I'm sort of at a loss but I suspect that I don't really understand what the path value should be--I haven't been able to find any clear documentation on what the path is addressing or how its actually interpreted.<br /><br />What am I missing or doing wrong?<br /><br />Thanks,<br /><br />Eliot

[email protected] wrote:
> Dude, I started that thread :-)
Missed that. It's been a long week.
The problem is this line (probably).
metadata.getProperty(namespaces["prism"], "publicationName/*[1]")
You apparently copied the syntax from dc:title in the previous line. dc:title is
an 'Lang Alt' kind of property which is, effectively, an array. Your
prism:publicationName is a simple value property. I suspect that the "[1]"
syntax (and possible the "/*" before it) are what's causing problems.
I don't recall seeing docs for this either.
-X

Similar Messages

  • How to hide custom metadata field in custom profies ??

    hi,
    how to hide custom metadata dropdown list in a custom profile based on choosing the security group.
    ex: if i choose xxx security group, custom metadata dropdown should not appeared, for remaining security groups it should be visible.
    so, Based on criteria, custom metadata should be hidden in custom profiles..
    how to achieve it ?? where and how to configure ??
    Detail guidance should be required
    Thanks in advance

    You cannot do this through profiles alone if I understand you correctly.
    If I load a check in page, choose a security group and at this moment want a custom metadata field to disappear then you are beyond what profiles offers.
    Rules evaluation can only be based on information that is know at the time the page is requested. That means in order for this to work you would need to make security group an non editable field and have a set of profiles for each security group.
    The alternative is to customize the UI with soem DHTML or AJAX
    Tim

  • Adobe CQ5.5 Digital Asset - Delete default metadata and how to create custom metadata

    Hi
    I am trying to create custom metadata for all format of assets (PDF, DOC, TXT, etc.,). I have created the dam folder under apps node as below:-
    Step 1:  /apps/dam/content/asseteditors/formitems
    Step 2:  Included the four property as textfield and selection according to our requirement under formitems
    Step 3:  I changed the cq:allowedTemplates from /content/dam/jcr:content
    Step 4:  I tried to upload the asset, I could get the custom metadata for Txt, Doc, PPT, XLSX
    Step 5:  But for JPG, PNG and PDF I am getting the default metadata which is huge list.
    How to control this one? I want my custom metadata only displayed for creation assets. Find the attached.
    CRX - Custom Template Configured
    CRX - Custom Metadata populated for ZIP format
    CRX - Custom Metadata not populated for PDF format

    Hi,
    If you read the description under section http://dev.day.com/docs/en/cq/current/dam/how_to_edit_metadata.html#Creating New Metadata Property for Assets you will find yout the format for images and its different format stores at different location. So to deal with image metadata plz try below
    1. Create a "image" node under "/apps/dam/content/asseteditors" as sling folder and configure it similar to "/apps/dam/content/asseteditors"
    2. under this folder again copy paste the "/libs/dam/content/asseteditors/formitems" and customize it accordingly
    Above will help you to manage with all types of images. Now if you want to have separate group of property for different image types then similar to above you have to create format node inside image folder for example jpg file type create a node with name "jpeg" under "image" node & configure similarly as you did for image.
    I hope it will help you to proceed. Please let me know for more information.
    Thanks,
    Pawan

  • How To Set Custom Metadata Programmatically?

    I could have sworn there was a way, but I sure can't figure it out right now - anybody know if or how?
    PS - I thought at first catalog:setPropertyForPlugin would do it, but it seems to just set some invisible property, not the viewable, filterable, custom metadata kind.
    Thanks,
    Rob

    To build on John's reply, double-check that the metadata definition declares the field browsable and searchable, e.g.
        metadataFieldsForPhotos = {
            {id = 'type',
             title = "Type",
             dataType = 'string',
             browsable = true,
             searchable = true},

  • How to rename Custom Metadata Field?

    I have some pics with custom metadata field "gadget brand", i with to rename the field name to "brand", how can i do that? I tried to rename in the custom metadata manager, but it doesn't apply the change.

    Don't believe you it will allow you to rename it.
    You're going to have to create a new field with the name you want and copy the data over. Unfortunately Aperture doesn't have any built in means of copying metadata from one field to another. Applescript however could do it fairly easily.

  • How to export custom metadata fields

    How do I export custom metadata fields (or even the DATE) to a text or spreadsheet? Why does Aperture have dozens of metadata choices, but only allows a few to be exported?

    You can try Automator which must be installed already in your computer. Create a new workflow, on the left pane select Aperture to see a list of actions, select "get selected items" and "extract metadata", and drag both to the right most pane. there you'll choose the Tag names to extract from the images already selected inside aperture and choose an output method, tabbed text should work fine for a spreadsheet. Hope it works.

  • How to access Custom controller

    Hi all,
    How can i access custom controller objects in my other controllers.Can i call custom controller objects from component controller .

    Hi,
    I hope you mean the Custom Controller the same way we understand as defined here
    [http://wiki.sdn.sap.com/wiki/display/WDABAP/Introductiontocontrollers|http://wiki.sdn.sap.com/wiki/display/WDABAP/Introductiontocontrollers]
    To access custom controller from the component controller you have to do the following.
    1. Component controller->properties->use insert button to select the custom controller.
    2. Use the code generator (CTRL+F7) -second tab(general)->method call in used controller->select your custom controller->method.
    This will generate code like this
    DATA lo_zzsbn_cust_cc1 TYPE REF TO ig_zzsbn_cust_cc1 .
    lo_zzsbn_cust_cc1 =   wd_this->get_zzsbn_cust_cc1_ctr( ).
      lo_zzsbn_cust_cc1->test(

  • How to Access Custom Event using AS3?

    Hi All,
    Maybe it's that its Monday morning and my brain is still foggy, but I can't seem to figure out how to set custom events using AS3.
    I have a custom GridRow itemRenderer, and have declared the event using the appropriate metatags.
    Then I create the GR item dynamically using AS3 instantiation, but the event is not available for selection in the intellisense drop-down.
    Let's take the following as an example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Grid
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:renderers="com.brassworks.renderers.*"
         creationComplete="componentInit();"
    >
         <mx:Script>
              <![CDATA[
                   private function componentInit():void
                        newRow     :MyRow     = new MyRow();
                        //newRow.myEvent is not an available option to set
              ]]>
         </mx:Script>
    </mx:Grid>
    Then the itemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <GridRow
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:classes="com.brassworks.components.classes.*"
         creationComplete="componentInit();"
    >
         <mx:Metadata>
              [Event(name="myEvent", type="flash.events.Event")]
         </mx:Metadata>
         <mx:Script>
              <![CDATA[
                   private function itemChanged(event:Event):void
                   Alert.show("test");
                   this.dispatchEvent(new Event("myEvent"));
              ]]>
         </mx:Script>
         <mx:GridItem>
              <mx:TextInput
                   change="itemChanged"
              />
         </mx:GridItem>
    </GridRow>
    How do I go about setting the handler method for custom events on instantiated items? Do I need to do this via the AddEventListener() method? Does this mean that events aren't exposed in ActionScript like they are in MXML? (In MXML all I have to do is <MyRow myEvent="handler(event)" />.)
    Thanks!
    -Mike

    Yes, I you need to do this via the addEventListener() method.
    myRow.addEventListener( "myEvent", myHandler );
    I hope that helps.
    Ben Edwards

  • How to access custom attribute value on the timecard at runtime

    I have created 2 attributes; Project and Task.
    Once a employee selects the Project from the Projects custom LOV I want the Task LOV to display only the tasks related to that particular project.
    How to access the PROJECT_ID during runtime which the user selects from Projects LOV?

    Hi
    I have added the below text in the ldt file.
    But its not working? Any suggestions?
    What may be going wrong?
    # CSR Project List
    BEGIN HXC_LAYOUT_COMPONENTS "XXCSR1 Payroll Timecard Layout - Project"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "XXCSRPROJECT"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXCSR_HXC_TIMECARD_PROJECT"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "211"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT =
    "XXCSR1 Payroll Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCSR1 Payroll Timecard Layout - Project"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom1VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE5 = "15"
    QUALIFIER_ATTRIBUTE6 =
    "XxcsrProjectId|Projects List|RESULT|N"
    QUALIFIER_ATTRIBUTE10 =
    "oracle.apps.hxc.selfservice.timecard.server.Custom1VO"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Projects List"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "Projects List"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    # CSR Project List
    # CSR Task List
    BEGIN HXC_LAYOUT_COMPONENTS "XXCSR1 Payroll Timecard Layout - Task"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "XXCSRTASK"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXCSR_HXC_TIMECARD_TASK"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "212"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT =
    "XXCSR1 Payroll Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCSR1 Payroll Timecard Layout - Task"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom2VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE5 = "15"
    QUALIFIER_ATTRIBUTE10 =
    "oracle.apps.hxc.selfservice.timecard.server.Custom2VO"
    QUALIFIER_ATTRIBUTE14 =
    "HxcCuiTaskProjectId|PROJECT|Y"
    QUALIFIER_ATTRIBUTE15 =
    "pro_id = ::XxcsrProjectId"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Projects List"
    QUALIFIER_ATTRIBUTE27 = "Attribute2"
    QUALIFIER_ATTRIBUTE28 = "Task List"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    # CSR Task List
    ###########################################################

  • How to access custom property for attribute and control in .vm file?

    Hi,
    I have created custom properties in OPM for attribute and apply also that properties to attribute.
    But if how to access that value in .vm file?
    I accessed using
    $attribute.getProperty("ScreenProp", "default value")
    but it's not working but same is worked for screen custom property

    $control.getProperties().get("PropertyName") works for custom properties on a control
    If you output $control and $control.getProperties() to the html you can lookup the API for the used classes.
    I can't give an example of the html because it's stripped in this forum
    Edited by: Peter van de Riet on 20-mei-2011 14:18

  • How to access custom properties in .vm file

    Hi,
    I have created custom property for screen using File -> Project Properties.
    This property apply to one of my screen.
    If I want to access the value of the custom property in .vm.
    How to access that value. I tried using screen.getTest() but it doesn't return anything for me.

    Hi Peter,
    I followed the steps.
    1)created custom property
    2)assign that custom property using right click on screen and assign some value
    eg. custom property name - Test
    and value as "abc"
    i need abc in vm file.following my vm file
    it's not working
    <input type="text" id="a1" name="a1" value="${screen.getProperties().get("Test")}" tabindex="6" size="30" >
    #set ( $value = $screen.getProperties().get("Test") )
    <input type="text" id="a1" name="a1" value="$value" tabindex="6" size="30" >
    #if( ${control.isVisible()})
         #if( ${control.getButtonClass().equals("submit")} )
              <input class="btn" type="button" value="Back" tabindex="#tabIndex()" onclick="javascript:back()">
         #end
         #if( ${screen.getProperties().get("Test").equals("mahesh")} )
         <input class="submit" id="submit" name="submit" type="submit" value="Submit" alt="Submit" tabindex="12">
         #else
    <input class="${control.getButtonClass()}" id="${control.getEncodedID()}" name="${control.getId()}" type="submit" value="${control.getText()}" alt="${control.getText()}" tabindex="#tabIndex()">
         #end
    #end
    #if( ${control.getButtonClass().equals("submit")} )
    </div>
    #end
    Edited by: 848231 on May 18, 2011 3:00 AM

  • Access custom metadata from another plugin

    I was wondering if it would be possible to access the custom metadata from one plugin from another plugin.
    I know you use the _PLUGIN object when you read or write the metadata with a plugin.Is there any way to pass the varible to another plugin, maybe stored in a xml or text file in the modules folder? I also see where you can use the "unique identifying string" or plugin.id. Is this id differant for every installation of Lightroom?

    Allen, I'm pretty sure the answer is no - you can't access another plug-in's custom fields.
    I'm sure I have read this limitation somewhere - even if I can't now see it stated explicitly in the documentation. If anything, the docs imply getPropertyForPlugin can do so by specifying the LrToolkitIdentifier value (which you may be able to pass as a preference). So this doesn't work:
         getData = photo:getPropertyForPlugin("uk.co.beardsworth.missing", jbMissing )
    It is an important point though that one plug-in should be able to access another's custom fields. Obviously one can think of many ordinary circumstances where it would be handy, but I'm more worried about the longer term DAM viability of custom metadata. Let's say I decided to release a plug-in based around custom fields and users entered metadata which had some value to them - whether that's just input time or business data (eg client or agency account number). Now move on to LR3 and the plug-in no longer works - I've disappeared, driven mad by SDK changes, or you're unwilling to pay my extortionate plug-in upgrade fee.
    Now what happens to that valuable metadata? The data is still in the database but you can't read it because the original plug-in's unavailable, and Adobe's built-in "All" Plugin Metadata panel only shows data from enabled plug-ins. It's not in the XMP either. You're stuffed - unless you're resourceful enough to reverse engineer chunks of the plug-in. Assuming that I encrypted my plug-in's code, that means you're going to have to dig around the SQL to figure out my plug-in's ID and its field names. Only then can you create a plug-in to rescue your custom data. And you've got to hope to hell that my plug-in didn't encrypt or obscure the values you entered.
    For me what this shows is
    1) You're taking a big risk if you store valuable custom metadata - if you can't sort it out yourself, should you do it?
    2) You should ensure any plug-in with custom metadata stores its field definitions in unencrypted files
    3) The All Plug-in Metadata panel needs to show all plug-in metadata
    4) The SDK should allow you to get custom metadata from other plug-ins
    4) Custom fields should be mapped to XMP
    Short answer - No.
    John

  • How to access custom JAVA webdynpro application from an iPad?

    Hi,
    We are trying to access custom JAVA webdynpro application from an iPad, but nothing is opening up from the iPad browser.
    What can be the possible reasons for this? Any kind of SICF enablement or opening up of ports in the network?
    Any inputs are welcome!!
    TIA,
    Regards
    Deepthi

    Hi,
    it is possible to show Java Web Dynpro applications on a mobile device in general, but the controls and the ui should be optimized for the mobile device.
    Safari devices are not officially supported so far for Mobile Web Dynpro.
    Supported are Windows Mobile devices and Blackberry devices. I also got some good results with Symbian devices.
    You can find more inforamtion on Mobile Always Connected at:
    ht[http://help.sap.com/saphelp_nwce711core/helpdata/en/7d/28fa3e7cb1d861e10000000a114084/content.htm|http://help.sap.com/saphelp_nwce711core/helpdata/en/7d/28fa3e7cb1d861e10000000a114084/content.htm]
    Best Regards,
    Stefan

  • [CS3 JS] How to force XMP metadata update for a thumbnail?

    Hi Folks,
    In a JavaScript in Bridge CS3, I'm updating a value in the XMP metadata for a Thumbnail. Later in the script I want to read the updated XMP metadata information from the Thumbnail, but often Bridge hasn't updated the metadata by the time I read it. In other words, my script reads the value prior to the update. I'm guessing there's a caching issue going on.
    I'm new to Bridge scripting, and I am hoping someone here can offer suggestions on how I can (or, even *if* I can) force Bridge to update the XMP metadata cache for a file so that when I read it later in the script it will reflect the recent changes. I've tried using Thumbnail.refresh(), but that doesn't seem to do the trick. I don't mind a slower script, I just want to be able to read the correct value.
    Thanks in advance for any help!
    -- Jim

    Hi David,
    I'm running this script on a MacBook Pro, 2.5GHz, 4GB RAM.
    Here is a sample JSX that shows the issue I'm having:
    #target "bridge-2.0"
    main();
    function main() {
        if( xmpLib == undefined ) {
            var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
            var libfile = new File( pathToLib );
            var xmpLib = new ExternalObject("lib:" + pathToLib );
        var myValue = "Headline Test";
        var myFilePath = "~/Desktop/TestFile.tif";
        var curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
        XMPWriteHeadline(myFilePath, myValue);
        // *** I would like to refresh the cache here ***
        curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
    function XMPGetHeadline(theFilePath) {
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        return myHeadlineXMPProp;
    function XMPWriteHeadline(theFilePath, theTextStr){
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myOrigHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Headline");
        xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", theTextStr, 0, XMPConst.STRING);
        var updatedPacket = xmp.serialize
            (XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
    To run this script, in main(), set the myFilePath variable to the path of a file that has an "IPTC Code" "Headline" property.
    This script, when run, sets the "Headline" property value to the value of myValue. After runing the script for the first time, take a look at the console log. You should see that Headline value displayed does not change between the two console entries. My log looks like this after the first run:
      Headline value: "undefined"
      Headline value: "undefined"
    The thing is, the second entry in the console listing, above, was created after the Headline value was set by XMPWriteHeadline(). The two values should be different between the two console entries.
    If you run the script a second time against the same file, you will see that the Headline value does contain the value that was written in the first run of the script--it just took some time to update the cache, I'm guessing. Here's the second run's log:
      Headline value: "Headline Test"
       Headline value: "Headline Test"
    So, what I'm looking for is a way to insert code (where the comment line "//*** I would like to refresh the cache here ***" appears), to force Bridge CS3 to refresh its cache so that when I call XMPGetHeadline() after calling XMPWriteHeadline(), the Headline value will return the value that was just written.
    I hope this is clear enough...
    Thanks!!!!
    -- Jim

  • How to access custom labels in Table?

    In IDML I have set up custom lables inside Table element. How can I access those labels?
    Thx!

    Hi Michael,
    If you just want to retrieve the data, you could use the following code.
    //Get the node which the table is bound to
    IWDNode node = wdContext.nodeTable();
    //iterate thru the elements
    for(int i = 0 ; i<node.size();i++)
      IWDNodeElement ne = node.getElementAt(i);
      Object value = ne.getAttributeValue("<column name>");
      //Here you have the data in the value variable
      //and you can manipulate this now
    Regards,
    Sudeep

Maybe you are looking for