How can I set Array field which reside in a Structure field?

I use Adobe java XMP toolkit.
There are a few methods for setting structure and array items.
setStructField() and appendArrayItem().
However ducu stated that member of Structure may be array or structure, moreover array items also may be arrays or structures.
So how can I set Array field in Structure or Structure field in Array???
Thanks
Andrey

OK, it worked first time (without exception) as I tried to set value of EXISTING field.
The trick is to add array or struct BEFORE setting their values.
This short example shows how it works:
XMPSchemaRegistry registry = XMPMetaFactory.getSchemaRegistry();
    registry.registerNamespace(extNS, "pdfaExtension");
    registry.registerNamespace(shemaNS, "pdfaSchema");
    registry.registerNamespace(propertyNS, "pdfaProperty");
    XMPMeta m = XMPMetaFactory.create();
    m.appendArrayItem(extNS, "pdfaExtension:schemas", new PropertyOptions().setArray(true), "", new PropertyOptions().setStruct(true));
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:prefix", "dc");
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:namespaceURI", "http://purl.org/dc/elements/1.1/");
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:schema", "Dublin Core Schema");
    m.appendArrayItem(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property", new PropertyOptions().setArrayOrdered(true), null, new PropertyOptions()
        .setStruct(true));
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[1]/pdfaProperty:name", "contributor", null);
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[1]/pdfaProperty:category", "external", null);
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[1]/pdfaProperty:description",
        "Contributors to the resource (other than the authors).", null);
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[1]/pdfaProperty:valueType", "bag ProperName", null);
    m.appendArrayItem(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property", new PropertyOptions().setArrayOrdered(true), null, new PropertyOptions()
        .setStruct(true));
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[2]/pdfaProperty:name", "coverage", null);
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[2]/pdfaProperty:category", "external", null);
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[2]/pdfaProperty:description", "The extent or scope of the resource.", null);
    m.setProperty(extNS, "pdfaExtension:schemas[1]/pdfaSchema:property[2]/pdfaProperty:valueType", "Text", null);
Above code creates following XMP:
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.1.1">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about=""
        xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
        xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
        xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
      <pdfaExtension:schemas>
        <rdf:Bag>
          <rdf:li rdf:parseType="Resource">
            <pdfaSchema:prefix>dc</pdfaSchema:prefix>
            <pdfaSchema:namespaceURI>http://purl.org/dc/elements/1.1/</pdfaSchema:namespaceURI>
            <pdfaSchema:schema>Dublin Core Schema</pdfaSchema:schema>
            <pdfaSchema:property>
              <rdf:Seq>
                <rdf:li rdf:parseType="Resource">
                  <pdfaProperty:name>contributor</pdfaProperty:name>
                  <pdfaProperty:category>external</pdfaProperty:category>
                  <pdfaProperty:description>Contributors to the resource (other than the authors).</pdfaProperty:description>
                  <pdfaProperty:valueType>bag ProperName</pdfaProperty:valueType>
                </rdf:li>
                <rdf:li rdf:parseType="Resource">
                  <pdfaProperty:name>coverage</pdfaProperty:name>
                  <pdfaProperty:category>external</pdfaProperty:category>
                  <pdfaProperty:description>The extent or scope of the resource.</pdfaProperty:description>
                  <pdfaProperty:valueType>Text</pdfaProperty:valueType>
                </rdf:li>
              </rdf:Seq>
            </pdfaSchema:property>
          </rdf:li>
        </rdf:Bag>
      </pdfaExtension:schemas>
    </rdf:Description>
  </rdf:RDF>
</x:xmpmeta>

Similar Messages

  • How can i set a column which would show me the name of the user

    how can i write a trigger which would show me the name of the user now make changes in the table.

    872959 wrote:
    how can i write a trigger which would show me the name of the user now make changes in the table.I think what sb is trying to say is: if you mean the database user, you can use the USER session variable to identify the database user:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions227.htm#SQLRF06156
    you would write a before each row trigger to update an "updated_by" column on your table to be USER.
    e.g.:
    :new.updated_by := USER;

  • How can I set a date range for a Date/Time Field in LiveCycle ES2?

    I need to set a specific date range for a form set up in LiveCycle ES2. Cannot see where i allows me to do that without a code entered.

    Hi,
    You can't set a start and end date for the date/time field, the best you can do is validate the range after the user has selected it.
    An alternate is to make your own date / time field, like this sample http://adobelivecycledesignercookbookbybr001.blogspot.com.au/2013/05/an-alternative-date-p icker-for.html
    Regards
    Bruce

  • How can I set a value in a field before create when a New button is clicked

    Hi,
    I am using
    JDeveloper 10.1.3.1.0.3984 and
    JHeadstart 10.1.3.1 release 10.1.3.1.26
    I have one group and there is a detail group under that group.
    From main group to detail group there are 3 field relating those groups.
    field1
    field2
    fieldSEQ (auto-generated by database trigger)
    These 3 fields are PK.
    In the detail group, there is a New button. So, when the New button is clicked, it tries to create the record with those 3 fields value as those are coming from main group. As a result it's giving the duplicate error as that record already exists in the table.
    But I don't want to create the record with that SEQ as that will be created in the trigger.
    How can I set the SEQ temporarily any no. (-1) before create when the New button is clicked?
    Can anybody help?
    Thanks
    Syed Jabbar
    University of Windsor
    Windsor, ON, Canada

    Hello Syad,
    What I would suggest is setting the sequence number at the creation of the entity object (so in the create() method) by using the database sequence. This way it will always be unique.
    So something like:
    protected void create(AttributeList AttributeList) {
    super.create(AttributeList);
    SequenceImpl sequence =
    new SequenceImpl("KCP_SEQ", getDBTransaction());
    setFieldSeq( sequence.getSequenceNumber());
    If this still does not solve it: please go to the ADF Forum since this problem is an ADF problem, not a JHeadstart problem.
    Regards,
    Evert-Jan de Bruin
    JHeadstart Team.

  • How can i set a long String to a xmltype field in oracle9i use PHP?

    i can set xml String to xmltype field with:
    $sql_insert_sql = "insert into g_province (p_id,p_regionid,p_provincenameobj,solt)
    values (g_province_q.nextval,'".$_GET['region_id']."',sys.XMLTYPE.createXML('".$xml_con."'),0)";
    but if $xml_con too long,i can not set this content into xmltype fields.
    then , i use :
    <?
    //(tabel_name:articles)DDL; //just for test;
    //create table articles (id number(11),content sys.xmltype);
    //----------This is insert test----------------------------------
    $conn = @OCILogon("in_user","user_in","bigfish");
    $stmt = @OCIParse($conn,"insert into articles (id,content) values(1,xmltype(EMPTY_CLOB())) RETURNING content INTO:CONTENT");
    $clob = @OCINewDescriptor($conn,OCI_D_LOB);
    OCIBindByName($stmt,':CONTENT',&$clob,"1",OCI_B_CLOB);
    OCIExecute($stmt,OCI_DEFAULT);
    if ($clob->save("<root><a>JUST TEST</a></root>")){
    OCICommit($conn);
    echo "Insert succes!";
    else{
    echo "Insert default!";
    //---------------Insert end-----------------------------------------
    //---------------Select start---------------------------------------
    $sql = "select content from articles order by id desc";
    $stmt = @OCIParse($conn,$sql);
    @OCIExecute($stmt,OCI_DEFAULT);
    @OCIFetchInto($stmt,&$rows,OCI_RETURN_LOBS);
    echo "<br>Content is:\"".$rows[0]."\"";
    //---------------Select end-----------------------------------------
    ?>
    run it ,display these errors:
    Warning: ociexecute(): OCIStmtExecute: ORA-22816: unsupported feature with RETURNING clause in /home/www/bigfish/sgtest/testclob.php on line 12
    Warning: save(): OCILobWrite: OCI_INVALID_HANDLE in /home/www/bigfish/sgtest/testclob.php on line 13
    Insert default!
    Content is:""
    Warning: Unknown(): ociclose_session: OCISessionEnd: ORA-00600: internal error code, arguments: [729], [28], [space leak], [], [], [], [], [] in Unknown on line 0
    how can i set long content to xmltype fields??

    geng sun,
    Ora-00600 is an internal Oracle error. You will need to open a tar with Oracle.

  • How can i set a long String to a xmltype field use PHP?

    i can set xml String to xmltype field with:
    $sql_insert_sql = "insert into g_province (p_id,p_regionid,p_provincenameobj,solt)
         values (g_province_q.nextval,'".$_GET['region_id']."',sys.XMLTYPE.createXML('".$xml_con."'),0)";
    but if $xml_con too long,i can not set this content into xmltype fields.
    then , i use :
    <?
    //(tabel_name:articles)DDL; //just for test;
    //create table articles (id number(11),content sys.xmltype);
    //----------This is insert test----------------------------------
    $conn = @OCILogon("in_user","user_in","bigfish");
    $stmt = @OCIParse($conn,"insert into articles (id,content) values(1,xmltype(EMPTY_CLOB())) RETURNING content INTO:CONTENT");
    $clob = @OCINewDescriptor($conn,OCI_D_LOB);
    OCIBindByName($stmt,':CONTENT',&$clob,"1",OCI_B_CLOB);
    OCIExecute($stmt,OCI_DEFAULT);
    if ($clob->save("<root><a>JUST TEST</a></root>")){
    OCICommit($conn);
    echo "Insert succes!";
    else{
    echo "Insert default!";
    //---------------Insert end-----------------------------------------
    //---------------Select start---------------------------------------
    $sql = "select content from articles order by id desc";
    $stmt = @OCIParse($conn,$sql);
    @OCIExecute($stmt,OCI_DEFAULT);
    @OCIFetchInto($stmt,&$rows,OCI_RETURN_LOBS);
    echo "<br>Content is:\"".$rows[0]."\"";
    //---------------Select end-----------------------------------------
    ?>
    run it ,display these errors:
    Warning: ociexecute(): OCIStmtExecute: ORA-22816: unsupported feature with RETURNING clause in /home/www/bigfish/sgtest/testclob.php on line 12
    Warning: save(): OCILobWrite: OCI_INVALID_HANDLE in /home/www/bigfish/sgtest/testclob.php on line 13
    Insert default!
    Content is:""
    Warning: Unknown(): ociclose_session: OCISessionEnd: ORA-00600: internal error code, arguments: [729], [28], [space leak], [], [], [], [], [] in Unknown on line 0
    how can i set long content to xmltype fields??

    geng sun,
    Ora-00600 is an internal Oracle error. You will need to open a tar with Oracle.

  • How can I set the field ICt in component table of the Tasklist as "Input" ?

    Hi experts,
    How can I set the field ICt (BOM's Item Category (POSTP)) in component table of the Tasklist as "Input" Status (The system is in gray now).
    I can define the different Category value by IB01 or IB02,then I can select them at the Tasklist's component table.But sometimes I need batch input such as LSMW,so pls kindly tell me how to setup it,thanks!
    Yinjun

    Hi,
    BOM is created with some component and item category.
    In task list when you go to component, in normal case one selects and copies BOM over there by clicking component selection button.
    Once BOM is copied over there the BOM item category will get copied. As it is BOM item category in Task list it is greyed and it will get copied automatically from BOM.
    You specify item category required by you in IB01 or IB02 and then use that BOM in task list. Go to componenet tab and click component selection button. Once BOM is copied over there the BOM item category will get copied

  • How Can I Set the Search Field in iTunes?

    In applescript...
    In another app - I have copied a song title to the clipboard...
    Q: Now - How Can I Set the Search Field in iTunes to the clipboard contents?
    Q: Also how can I also open the main library itunes window?

    Hi Rev Dave,
    Q: Now - How Can I Set the Search Field in iTunes to
    the clipboard contents?
    Unfortunately the only way I can think to achieve this involves the use of "UI Scripting". The other previous posters have given you the preferred method you should consider using. If you want to script iTunes so that you visually see the search take place in iTunes you'll need to use the method shown in the script I've posted below.
    Q: Also how can I also open the main library itunes
    window?
    Cyclosaurus has given you the answer to this part of your question already.
    Here is a script that (though ugly IMHO) should achieve what you are asking for:set theSearch to (the clipboard) as string
    tell application "iTunes"
    activate
    set allPlaylists to playlists
    repeat with aList in allPlaylists
    if name of aList is not "Library" then
    set view of front browser window to aList
    exit repeat
    end if
    end repeat
    set LibList to playlist "Library"
    set view of front browser window to LibList
    end tell
    tell application "System Events"
    tell process "iTunes"
    if "iTunes" is not in name of windows or ¬
    focused of window "iTunes" is false then ¬
    keystroke "1" using command down
    keystroke tab
    keystroke theSearch
    end tell
    end tellIn order for the above script to work you need to have "Enable access for assistive devices" enabled in the "Universal Access" section of the "System Preferences" application.
    If you have any further questions about the above script feel free to ask.
    Hope this helps...
    iBook G4 1GHz   Mac OS X (10.4.3)   640 MB RAM

  • OIM-How can i set a password policy which does not contain any space?

    How can i set a password policy which does not contain any space?
    I put space at Characters not allowed but it is not working.
    Can anyone help me out?

    You can go to Settings>Messages and turn off Messages. Then go to Settings>General>Restrictions and turn on the the Restriction that prevent changing accounts.
    I just verified that it works.

  • How can I set screen saver clock which show time and date when all screen is black. Other phones have this option but I didn't find on iphone. Pl guide.

    How can I set screen saver clock which show time and date when all screen is black. Other phones have this option but I didn't find on iphone. Pl guide.

    HA!  I figured the find my iphone out!!!!! You can have more than one icloud account in "Mail, Contacts and Calendars".  So my husband's & kids' phone icloud account under "settings, icloud "is their individual @me.com account.  Set it to everything you want EXCEPT Find My Iphone.  Then under "settings, mail/contacts/calendars" you set up both accounts (your @me.com which may already be there), then add another with the main appleID and enable ONLY Find My Iphone.  Now when any of us log into Find My Iphone from any device with our main apple ID for the app store, all the devices show up!!!! YIPPEE.  I made my own day!
    I think the message I got previously was because I hadn't disabled the find my iphone on the @me.com account first.

  • How can I set up a preferred printer so I don't have to pick the printer each and every time I print something out?  At the moment, even immediately after printing one thing, it prompts me to pick a printer, which is very time consuming.

    How can I set up a preferred printer so I don't have to pick the printer each and every time I print something out?  At the moment, even immediately after printing one thing, it prompts me to pick a printer, which is very time consuming.

    Compass Health Systems wrote:
    How can I set up a preferred printer so I don't have to pick the printer each and every time I print something out?  At the moment, even immediately after printing one thing, it prompts me to pick a printer, which is very time consuming.
    No, there is not setting for a default printer.The system scans for available airprint printers each time you print.

  • How can i set a path for my deployment files in weblogic server 10.3

    Hi
    How can i set the path for my WAR ,JAR files while deploying.i am using the wls10.3 version.
    is there any scripts for this ,please provide me.
    my Application is ADF 11g application.

    By "path", I assume you mean "classpath".
    The simplest way is simply to include the jars you need inside the web application or web module's WEB-INF/lib directory, EJB module's META-INF/lib directory, or EAR lib directory.
    If that's not practical, if you use NodeManager to start your servers, you can go to the "Server Start" tab in the server definition in the WebLogic console and edit the "Classpath" field, which defaults to no value. You can specify a classpath value there. Note that if you specify a value there, it REPLACES the default classpath for the server, it doesn't add to it. If you need to just add to it (a much more likely scenario), if the value references the value "$CLASSPATH" in it, that will reference the original classpath value that the server would have had.
    So, for instance, if you wanted to include the MQ jars in the server classpath, you could set a value like this:
    /usr/java/mq/lib/mq.jar:/usr/java/mq/lib/mqstuff.jar:$CLASSPATH

  • How can i set dynamice for week on Selection screen..pls help me..Urgent

    Hi..All
    please Help me .. i am very  confused..
    i need to set a varient for week which is dynamic on selection screen.
    b) Week from current week to current week + 2. (<b>Dynamic selection)</b>how can i set dynamice for week on Selection screen,,
    how can i do this..i am alrady set dynamice variant for Date.. there is option for D.. but in case of week there is a no option.
    pls help me..urgent
    thamks in advance.
    mayukh

    Hi,
    I think the way out is use the dynamic select option while setting up the varinat and use sy-datum to sy-datum+9 which should essentially serve the purpose.
    While saving the variant, for that particular date field check the Selection variable checkbox, then Choose D
    option and then choose current days + or - option from there.
    Rgds,
    HR

  • How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance

    How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance, As it is shown in the figure below. and enter this signal in a daq.
    Solved!
    Go to Solution.

    By the time you spend for the nice diadram you might have done the vi
    Your DAQ like to have a waveform (array of values and dt ak 1/samplerate)
    If you set the samplerate you know the array length , create a array of zeros, and set the values of both amplitudes ... 
    Since I don't want to wire others homework here are some pictures
    And there are some drawbacks is room for improvement in my solution, just think of rounding errors ... and what might happen if the arrays get bigger ....
    Spoiler (Highlight to read)
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • How can I set the tab order in a form?

    How can I set the tab order in a form?

    Sorry. I don't mean page tabs, but the order in which form fields are selected by the tab key. In simple html there is a value called tabindex and I was just wondering if there is a way to assign this order within a portal form. I have basically recreated the form with a custom layout and adjusted the table structure to force the order I was looking for, but it would be a nice add for future versions.

Maybe you are looking for