How to add a property to BasicPersistence SDK example.

Hi,
I see in the BasicPersistence example that it creates a property call BPIData and persists this in the IDML.  I would like to add another property call MyProperty.  Do you know how to add an additional property to the example which is persisted in the IDML, so now it would persist 2 properties? 
Thanks,
Dave

for example:
javax.jcr.Session session = resourceResolver.adaptTo(Session.class);
String parentPath = "/content/blah"; // or whatever your parent path is
String nodetype = "nt:unstructured"; // or whatever other node type you require
Calendar calendar = Calendar.getInstance(); // or whatever date
Node node = session.getNode(parentPath).addNode("nodename", nodetype);
node.setProperty("myproperty", calendar);
session.save();

Similar Messages

  • How to add the property file..ie(default.properties) to a webdynpro project

    Hi All,
    How to add the property file..ie(default.properties) to a webdynpro project.
    I urgently require the solution. Kindly get it for me.
    Regards
    DK

    Hi DK,
    this is described in the second Web Dynpro Java Tutorial
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b1a3e990-0201-0010-aeb2-a2ef5bc3da8e">creating an Extended Web Dynpro Application</a>
    Regards, Bertram

  • How to add a image in the DocSign example

    Hi,
    I am struggling to add a image to the DocSign example instead of text. If somebody could give me a few hints it would be much appretiated.
    I am currently modifying the CreateN2XObject function.
    My situation is as follows:
    I am drawing a image using the wxWidget library. From this a save the raw pixel data to a file. The pixel data is an array of unsigned chars where the first RGB triplet corresponds to the pixel first pixel of the first row, the second one to the second pixel of the first row and so on until the end of the first row; and so on...
    In the CreateN2XObject I create an ASStm to read this file.
    I create an attribute dictionary for this image
    And then a new cos stream from the ASStm and dictionary
    When I return from the function the plugin says that it is successfully signed, but I see nothing on the screen.
    When I open the 'signed' document in a text editor I see:
    <</Subtype/Form/Length 16038/Name/PROS/BitsPerComponent 8/Matrix[1.00011 0.0 0.0 1.00011 0.0000305176 0.0000305176]/ColorSpace/DeviceRGB/Width 54/Height 99/Type/XObject/BBox[0 76 238 0]/FormType 1>>stream
    the data in the file
    endstream
    Below is the code I use to make the image i.e. CreateN2XObject:
         DSAPXObjEntryRec signRec;
         memset(&signRec, 0, sizeof(DSAPXObjEntryRec));
         signRec.rect = *pBBoxRec;
         signRec.bDestroy = true;
         AVDevRect rcDev = { (int)ASFixedToFloat(pBBoxRec->left), (int)ASFixedToFloat(pBBoxRec->top), (int)ASFixedToFloat(pBBoxRec->right), (int)ASFixedToFloat(pBBoxRec->bottom) };
         const char* baseDirectory = "C:/temp/data";
         ASPathName exampleFilePathName = ASPathFromPlatformPath ((char*)baseDirectory);
         ASFile theFile;
         ASInt32 retVal = ASFileSysOpenFile(NULL,exampleFilePathName, ASFILE_READ, &theFile);
         int len = 16038;
         ASStm inStm = ASFileStmRdOpen(theFile,len);
         char tmpsize[255];
         sprintf(tmpsize,"%d",len);
         AVAlertNote("tmpsize");
         AVAlertNote(tmpsize);
         //sprintf_s(buf, 125, "1 0 0 RG %i %i m %i %i l S", rcDev.left, rcDev.top, rcDev.right, rcDev.bottom);
         //ASArraySize len = strlen(buf);
         //int len = 19758;
         //ASStm inStm = ASMemStmRdOpen(buf, len);
         CosObj attrDict = CosNewDict(cosDoc, false, 1);
         CosDictPutKeyString(attrDict, "Type", CosNewNameFromString(cosDoc, false, "XObject"));
         CosDictPutKeyString(attrDict, "Subtype", CosNewNameFromString(cosDoc, false, "Image"));
         CosDictPutKeyString(attrDict, "Width", CosNewInteger(cosDoc, false, 54));
         CosDictPutKeyString(attrDict, "Height", CosNewInteger(cosDoc, false, 99));
         CosDictPutKeyString(attrDict, "ColorSpace", CosNewNameFromString(cosDoc, false, "DeviceRGB"));
         CosDictPutKeyString(attrDict, "BitsPerComponent", CosNewInteger(cosDoc, false, 8));
         CosDictPutKeyString(attrDict, "Name", CosNewNameFromString(cosDoc, false, "PROS"));
         CosDictPutKeyString(attrDict, "Length", CosNewInteger(cosDoc, false, len));
         CosObj cBBoxObj = CosNewArray(cosDoc, false, 4);
         CosArrayInsert(cBBoxObj, 0, CosNewInteger(cosDoc, false, rcDev.left));
         CosArrayInsert(cBBoxObj, 1, CosNewInteger(cosDoc, false, rcDev.top));
         CosArrayInsert(cBBoxObj, 2, CosNewInteger(cosDoc, false, rcDev.right));
         CosArrayInsert(cBBoxObj, 3, CosNewInteger(cosDoc, false, rcDev.bottom));
         CosDictPutKeyString(attrDict, "BBox", cBBoxObj);
         AVAlertNote("Creating cos stream");
         CosObj cStmObj = CosNewStream(cosDoc, true, inStm, 0, true, attrDict, CosNewNull(), len);
         AVAlertNote("Finished creating cos stream");
         ASStmClose(inStm);
         signRec.xobj = cStmObj;
         AFPDWidgetBorderRec border;
         AFPDWidgetGetBorder(PDAnnotFromCosObj(sigAnnot), &border);
         AVAlertNote("Returning DigSigAPXObjectFromXObjList");
         return DigSigAPXObjectFromXObjList(cosDoc, pBBoxRec, &signRec, 0, 0, &border, kDSMerge);
    Regards,
    Magda

    Thanks!
    So, even though I am spesifically telling it to create an Image type with CosDictPutKeyString(attrDict, "Subtype", CosNewNameFromString(cosDoc, false, "Image"));
    I must still create a Form object around it?

  • How to add custom property to CharacterFormat?

    Hi,
    Is there a way to add the custom property to character format and save in to XML TextFlow without significant changes in TLF?

    Interesting.  Looks like that could maybe be an ASDoc bug or something else going on.  The actual implementation of the contructor for ApplyElementUserStyleOperation in my build of TLF looks like this:
    public function ApplyElementUserStyleOperation(operationState:SelectionState, targetElement:FlowElement, styleName:String, value:*, relativeStart:int = 0, relativeEnd:int = -1)
    I'm not sure how to answer #2, but my first thought is that there's a fairly good chance that whatever you end up using 'user styles' for will not be related to the actual formatting of the text.  It could be some sort of metadata that's completely abstract from how the text is formatted or represented visually, which is where the text layout format applies.  There are more technical reasons why it shouldn't be there also, but they're probably not worth the energy unless you really want to know.   ..and Robin would be a better person to comment on that also.
    I don't know what build of TLF (if any) is included in the Flex 3.4 SDK, but TLF does not have any dependencies on the Flex framework (or any particular version of it).  The only requirement is that you are targetting Flash Player 10 or above.  You can always download the latest (or a very recent) version of the TLF SWC's, RSL's, and source with the Flex 4 SDK from the Flex 4 download site at:
    http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

  • How to add expression property using OMB+

    Hi,
    Is it possible to set the expression property for a attribute in the CONSTANT operator through OMB+ ?
    The following commend does not work
    OMBCREATE MAPPING map_name \
    SET PROPERTIES (BUSINESS_NAME, DESCRIPTION) \
    VALUES ('map name ', 'Mapping to test constant') \
    ADD CONSTANT OPERATOR 'CONST1'\
    ADD ATTRIBUTE 'NULL_DATE' OF GROUP 'OUTGRP1' OF OPERATOR 'CONST1' \
    SET PROPERTIES (EXPRESSION) VALUES ('NULL')
    Can anybody provide an example.
    Thanks,
    Sekar,K

    Thanks mark,
    I am not sure what i did wrong yesterday , today the statement is working ? I am using version 9.2.0.4.
    Yesterday initially i tried without operator name ,
    OMBCREATE MAPPING 'M' \
    ADD CONSTANT OPERATOR \
    ADD ATTRIBUTE 'A' OF GROUP 'OUTGRP1' OF OPERATOR 'CONST'\
    SET PROPERTIES ( EXPRESSION) VALUES ('NULL')
    This statement didn't work, after that i have tried with name i was getting different error.
    I will let you know if i am able to re-create the error..
    Does version 10g supports timestamp datatype ?
    Thanks for your help
    Sekar,K

  • How i add Thai language in Hyphenator.sdk

    I insert
    this->installService(hyphenationServices,
    rPath,
    MakeLanguageID(kLanguageThai, kSubLanguageThai),
    "Thai : Thai",
    "Thai",
    "Thai");
    in HypAdapter.cpp and compile by Xcode. It has Failed and error message is
    "kSubLanguageThai was not declared in this scope"
    How I do it more?
    uhh Before I add new code I compile but it has error message is
    "internal link error "
    How I do it more? I want to add Thai Language in Indesign CS3.
    Thank you for everyone . Sorry about my English.

    Sorry, I wasn't concentrating before, I have been talking about the phone itself - I really don't know if it is possible to add languages to accessories like the keyboard, but even if it is possible it will be only via a Nokia service point.
    I don't know how much more clear I can make this: the manufacturer does not provide a method for the user to add languages to its devices.

  • How to add issue for production using SDK?

    1. Here i am creating a production order
    2 .after release of production order
    3. i wants to "issue component" for production order using SDK
    Please provide solution
    Thanks
    Vijay T
    Edited by: Vinay Kulkarni on Jun 23, 2009 7:57 AM

    HI,
    Issue for Production is an Inventory Exit document (BoObjectTypes.oInventoryGenExit) where the base type is Production Order
    Set the following on Invenroy Exit:
    oPoExit.Lines.BaseType = 202; // production
    oPoExit.Lines.BaseEntry = AbsEntry;
    oPoExit.Lines.BaseLine = LineNumber;
    Where AbsEntry is the Production order DocEntry field
    LineNumber is the line number of Production order.
    Regards,
    J.

  • How to add a property for my class in netbeans 6 update 3

    i want to create a bean. i was read java tutorial but it use netbeans 5. i'm using netbeans 6. i can't folow the tutorial. please help me

    These forums are for Java language topics, and do not provide IDE (NetBeans) support. NB has its own support via mailing lists at its site; you can post your request there.
    The tutorials for NB 5 are mostly applicable to NB 6 - some details are different, but they should still be followable. You can also look for a tutorial written for NB 6.

  • How to add documents to book indesign sdk?

    hi,
        Here,my code is,
         IDFile bookPath(PMString("E:/Book1.indb"));InterfacePtr<ICommand> copyCmd(CmdUtils::CreateCommand(kAddDocToBookCmdBoss));
    copyCmd->SetItemList(UIDList(documentUIDRef));
    InterfacePtr<IBookContentCmdData> bookCmd(copyCmd,UseDefaultIID());
    bookCmd->SetTargetBook(bookPath);
    K2Vector<IDFile> fileList;
    fileList.push_back(IDFile(PMString("E:/web pdf/TOC_Inputs/TOC_Inputs/9780521766661c09.indd")));
    fileList.push_back(IDFile(PMString"E:/web pdf/TOC_Inputs/TOC_Inputs/9780521766661c10.indd")));
    bookCmd->SetContentFile(fileList);
    ErrorCode errorCode=CmdUtils::ProcessCommand(copyCmd);
    This code is not working,i don't know,where the problem is,pls help me to do further process in my project.
    thanks,
    vijay

    Hi Jiro,
    I have never worked with this before, but maybe you can investigate using the DI Server. Search the forum for the DI Server. Herewith an extract from the DI Server help file:
    <i>SAP Business One - Data Interface Server (DI Server) is a Component Object Model (COM) service running on a server that enables multiple clients to access and manipulate SAP Business One company database, using SOAP version 1.1 messages.
    The DI Server uses the DI core to enable the same functionality provided by the DI API with the following advantages:
    - Server architecture.
    - <b>Improved performance.</b>
    - Connection pooling mechanism.
    - Generic interface.
    The DI Server operates with SAP Business One application version 2004.</i>
    Hope it helps,
    Adele

  • Add custom property restrictions in advanced search web part

    hi,
     I am having the default advanced search box web part in my ent.search center site collec. but as per my requirement i need to a  few items in the property restrictions dropdown in my advanced search web part.
    is this possible in sp 2013 e.t serach center  site collection?
    any help is  highly appreciated!

    Hi,
    Check this
    http://technet.microsoft.com/en-us/library/ff621097.aspx
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c25d418d-d4a2-47a3-9abe-c27656764843/how-to-add-custom-property-in-advanced-search-page?forum=sharepointgeneralprevious

  • How to add Two Columns in SQL

    How to add Two Columns in SQL
    For Example
    Jan Feb
    215 NULL
    How to add these two values in SQL

    Anything + NULL is NULL.
    Check this:
    SQL> SELECT 1 + NULL from dual;
        1+NULL
    SQL> You have to do this:
    SQL> with t as (SELECT 235 JAN, NULL FEB FROM dual)
      2  SELECT NVL(JAN,0) + NVL(FEB,0) FROM t;
    NVL(JAN,0)+NVL(FEB,0)
                      235
    SQL>

  • How to add image between two string

    how to add a image between two string .
    example :
    String one <IMG> String two

    grid1 = new GridLayout( 2, 3, 5, 5);
    container = getContentPane();
    container.setLayout(grid1);
    The parameters in GridLayout specifies 2 rows, 3 columns, 5pixels of horizontal gap, 5pixels of vertical gap.
    Did what i could to help, now can somebody help me with JDialog? =(

  • How to Add Time in Date

    hi,
    how to add time in a date for example
    date='01-jan-2005 23:00' [dd-mon-yyyy hh24:mi]
    time (to add)='02:00' [hh24:mi]
    if any one hv any idea about. pls reply

    If you can get the time element into an INTERVAL DAY TO SECOND datatype, you can simply add the interval to the date, e.g:
    yourdate + NUMTODSINTERVAL(2,'HOUR')
    What is tricky is converting a string like '02:00' into an interval or a number. You could generate a numeric offset with something like:
    TO_DATE('02:00','HH24:MI') - TO_DATE('00:00','HH24:MI')
    which can then be added to the date
    SELECT TO_DATE('01-jan-2005 23:00', 'dd-mon-yyyy hh24:mi') +
           (TO_DATE('02:00','HH24:MI') - TO_DATE('00:00','HH24:MI'))
    FROM   dual;

  • Office 365 - sharepoint: In Advanced search Page, How to add custom column under property restrictions

     In Advanced search Page, How to add custom column under property restrictions?

    Hi,
    The Navigation control can be added into your HTML page in the Snippet Gallery:
    The two links below about how to create HTML master page and adding snippets needed into it for your reference:
    http://borderingdotnet.blogspot.jp/2012/12/how-to-create-html-masterpage-for.html
    http://msdn.microsoft.com/en-us/library/office/jj822370(v=office.15).aspx
    Feel free to reply if there still any question.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to add flex SDK to IntelliJ

    how to add flex free SDK to intelliJ6 or any IDE

    I don't have any issues with playing MP4. You must understand that mp4 should meet MP4 format requirements. If your video can't be played - this may be caused by issues with that mp4 video file but not Adobe Air.
    For example this AS3 code succesfully play mp4 video that meet mp4 requirements by format (not Adobe whimsy). Also you may note that StageVideo available on Direct render mode. Auto or CPU will not support native mp4 playing.
    package  {
        import flash.display.Sprite;
        import flash.net.NetConnection;
        import flash.net.NetStream;
        import flash.media.StageVideo;
        import flash.geom.Rectangle;
        public class sv extends Sprite {
            private var nc : NetConnection;
            private var ns : NetStream;
            private var client : Object = {};
            private var StageVideoContainer : StageVideo;
            public function sv() {
                client.onMetaData = onMetaDataCallback;
                nc = new NetConnection();
                nc.connect(null);
                ns = new NetStream(nc);
                ns.client = client;
                StageVideoContainer = stage.stageVideos[0];
                StageVideoContainer.attachNetStream( ns );
                StageVideoContainer.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
                ns.play("162447510.mp4");
            private function onMetaDataCallback(e:Object):void{
    Here is Windows 7 Adobe Air project config from Flash CC. MP4 works prefect!
    In this sample app I use Adobr Air 4.0.0.1390 from latest official release. You can chat to my skype therabbitwindfall and I will support you with my mp4 and Win7 project.
    P.S. this mp4 works fine on iOS also.

Maybe you are looking for

  • Hyperlinks in a PDF document converted from Word 2003

    I have a large document for our state's mathematics vocabulary. It has internal hyperlinks to help someone navigate the document. I created it in Word 2003 and converted it to PDF using the tool in the menu bar. When finished, the PDF document has so

  • Problem with -hg PKGBUILD after pacman update

    After I updated to pacman 4.1.0, my PKGBUILD for sunflower-hg stopped working for me. For some unknown reason makepkg fails to clone the needed mercurial repo and src directory turns out to be empty at the time of the build. What has gone wrong? Last

  • XI Scenario synchronous RFC (ABAP program) over XI to C program Receiver

    Hi experts, I have a synchronous RFC-Call between an SAP System (Sender) and an C-programm (Receiver). But now XI should become a part of this scenario.  Regarding this I have a few problems to include XI. 1. SENDER: I have an abap application which

  • SX50 macro setting, not working??

    I have a SX50 camera that I bought about four months ago. I am not camera savvy at all, so I hope my issue makes sense! I am keen to explore photographing close-ups of flowers but cannot get the camera to focus for this. I am trying to use the macro

  • TM stuck on preparing [number] items

    Hey. My Time Machine usually works fine with my MBP, OS X 10.6.3 and my WD MyStudio harddrive. But for the last couple of days TM has been stuck in "preparing files" mode, where it's supposed to prepare all files before it makes the back up. It's bee