RIDC code reading Contributor data files

Hi experts,
Please share me a sample RIDC code for reading contributors data file, with following all the best practices. Any sample application/code will be highly appreciated.
Thanks

You can refer Jonathan's Blog - http://jonathanhult.com/blog/2012/12/ridc-examples/
- Anand

Similar Messages

  • Programmatically creating Contributor Data Files

    In WebCenter Portal 11g PS5 and WebCenter Content PS5, doing something similar to Yannick's great tutorial here:
    http://www.yonaweb.be/webcenter_tutorial/using_content_presenter_templates
    A customer using a WebCenter Portal is not very enthousiastic about switching to the Site Studio Contributor to create and edit Contributor Data Files.
    Is there a way to programatically create these files from within our portal (via, say, a custom task flow and RIDC) or a custom service in UCM?
    Seems like Site Studio is doing a LOT in the background (SS_CHECKIN_WEB_ASSET, SS_GET_CONTRIBUTOR_STRINGS, then SS_CHECKIN_NEW) and not just checking in a new file which adheres to the Region Definition.

    Thanks Jonathan, below provided information was useful. Now I have further queries:
    Below is the code that I got from net but having some doubt about some classes like "TextCustomElement", "Field ", "CustomDataElement ". Are these classes available in RIDC APIs or not because I was not able to find out? Also let me clarify the steps that need to perform for updating the values of CDF file are mentioned below:
    First CheckOut the CDF file
    Execute the service "SS_SET_ELEMENT_DATA" by setting the element values
    CheckIn back with new revision of this CDF file
    Are these steps correct?
    Is it possible for you to correct the below code and paste again in forum or send me the corrected file at [email protected]?
    Thanks a ton for your help.
    DataBinder oldBinder = clientConfig.getIdcClient().createBinder();
                   oldBinder.putLocal("IdcService", "SS_SET_ELEMENT_DATA");
                   oldBinder.putLocal("dDocName", oldBinder.getLocal("dDocName"));
                   oldBinder.putLocal("dID", oldBinder.getLocal("dID"));
                   DataResultSet columnResultSet = new DataResultSetImpl();
                   Field elem = new Field("element");
                   Field value= new Field("value");
                   Field isList = new Field("isList");
                   columnResultSet.addField(elem, "element");
                   columnResultSet.addField(value, "value");
                   columnResultSet.addField(isList, "isList");
    for( CustomDataElement e : elementi)
                        DataObject valueList = new DataObjectImpl();
                        if( e instanceof ListCustomElement)
                             ListCustomElement listel = (ListCustomElement) e;
                             valueList.put("element", "cpsAttachmentIdList");
    //                         valueList.put("value", "");
                             valueList.put("isList", "1");
                             List<CustomListRow> listRow = listel.getListRow();
                             DataResultSet listResultSet = new DataResultSetImpl();
                             Field idAttNode = new Field("ATTACHMENT_ID");
                             listResultSet.addField(idAttNode, "ATTACHMENT_ID");
                             for( CustomListRow r : listRow)
    //                         list sub-elements
                                  DataObject valueElement = new DataObjectImpl();
                                  Set<String> keySet = r.keySet();
                                  for(String k :keySet)
                                       TextCustomElement textCustomElement = r.get(k);
                                       valueElement.put("ATTACHMENT_ID", textCustomElement.getValue());
                                       listResultSet.addRow(valueElement);
    //                         name of the element
                             oldBinder.addResultSet("sub-elements", listResultSet);
                        if( e instanceof TextCustomElement)
                             TextCustomElement textel = (TextCustomElement) e;
                             valueList.put("element", textel.getName());
                             valueList.put("value", textel.getValue());
                             valueList.put("isList", "0");
                        columnResultSet.addRow(valueList);
                   oldBinder.addResultSet("SSElementData", columnResultSet);
                   response = executeService( oldBinder);

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • Any one noticed issues when UCM contributor data files indexing in GSA

    Hi Guys,
    We are using Google search appliance to crawl UCM content (native documents).
    We don't have any issues with search results in this way. We are using dynamic converters to convert these documents into HTML in site studio web sites.
    But we have plans to move to site studio contributor data files (XML format).
    From your experience, any one noticed any issues in search results with UCM site studio contributor data files indexed by GSA.
    Thank you in advance.
    Edited by: 958795 on Oct 8, 2012 10:50 AM

    Hi Don,
    Thanks for the reply. I would discard the first one, because
    I already built the whole site using XML Data Sets, and the idea
    from the start was to use my own Atom feed to update the site. But
    the second one seems like a good choice, but I'm a bit puzzled. I
    was already using Spry:content for the pages that don't index
    correctly, putting them on an empty <span> tag so that they
    hid unloaded references... could you elaborate on that second
    choice, then, please?
    Here's a sample of the code:
    <!--start main content-->
    <div id="secondary-content" spry:detailregion="dsBase"
    class="wrapper">
    <div id="leftnav" class="frontpage">
    <div spry:state="loading">Loading content. Please
    wait...</div>
    <ul spry:repeatchildren="dsBase">
    <li class="Frontpage"><span
    spry:content="{title}"></span></li>
    <li class="subtitleFront">Posted on <span
    spry:content="{simpleDate}"></span></li>
    <li class="post"><span
    spry:content="{content}"></span></li>
    </ul>
    <p align="left"><br />
    Click <a href="archive.html">here</a> to see
    older posts.</p>
    </div>
    <div id="content-right" class="frontpage">
    <div class="wrapper">
    <h4 align="center">Featured art :</h4>
    <p align="center"> </p>
    <p align="center"><a
    href="gallery.html?row=4"><img
    src="images/tns/tn-AgainstAllOdds.gif" alt="Against All Odds"
    width="81" height="160"/></a></p>
    <p align="center">&quot;Against All
    Odds&quot;<br />
    Tobías Bartolomé</p>
    <p align="center"><a
    href="gallery.html?row=4">See more art at the
    gallery!</a></p>
    </div>
    </div>
    <div style="clear: both"></div>
    </div>
    And here's the link for the main page and Google's index for
    the site:
    http://www.cosmicollective.org/
    http://www.google.com/search?q=site:www.cosmicollective.org&hl=en
    Thanks again!
    Tomas

  • Converting Contributor Data File to PDF

    Hi,
    I have a requirement where end users should be able to download the content from a website(created using sitestudio) as PDF. I have configured the IBR,created Provider in Content server,I am able to convert xml to PDF. But it is showing raw content in pdf. How can I convert Contributor data file to PDF along with the rich content.
    Any pointers would be helpful.
    Thanks in advance.

    In that case, can you please tel me,how it can be done? Is it converting xml to HTML & then the HTML to pdf??
    I am new to UCM. Request you to elaborate more.
    Is this possible using any UCM provided components for conversion. If yes,which component would be suitable?
    Thanks
    Edited by: RR on Jul 25, 2011 4:08 AM

  • Reading Bulk Data File

    what Class is used to read bulk data File to improve the performance?

    That one is common, i was asking about 1Gb files like
    that....the performace is degraded in my
    application... can u give any good sugestion 4 thatYepp. FileInputStream with an optimized buffer size, I'd say. You need to test a little which works best for you. 8KB, 16KB...

  • How can I read/write data files (text file) from PL/SQL Script

    I had an oracle forms pl/sql program to read/write a data file (text file). When this code is run on a command line as a PL/SQL script using the SQL*Plus I am getting an error:
    -- sample.sql
    DECLARE
      vLocation                 VARCHAR2(50)  := 'r:\';
      vFilename                 VARCHAR2(100) := 'sample.dat';
      vTio                   TEXT_IO.FILE_TYPE;
      vLinebuf               VARCHAR2(2000);
      vRownum               NUMBER        := 0;
      -- use array to store data FROM each line of the text file     
      TYPE           array_type IS VARRAY(15) OF VARCHAR2(100);
      vColumn      array_type := array_type('');
      PROCEDURE prc_open_file(p_filename IN VARCHAR, p_access IN VARCHAR2) is
      BEGIN
        vTio := TEXT_IO.FOPEN(vLocation||p_filename,p_access);
      EXCEPTION
        WHEN OTHERS then
          --  raise_application_error(-20000,'Unable to open '||p_filename);
          message(sqlerrm);pause;
      END;
      PROCEDURE prc_close_file is
      BEGIN
        IF TEXT_IO.IS_OPEN(vTio) then
           TEXT_IO.FCLOSE(vTio);
        END IF;
      END;
    BEGIN
      --extend AND initialize the array to 4 columns
      vColumn.EXTEND(4,1);
      prc_open_file(vFilename,'r');
      LOOP
          LTEXT_IO.GET_LINE(vTio,vLinebuf);
          vColumn(1)  := SUBSTR(vLineBuf, 1, 3);
          vColumn(2)  := SUBSTR(vLineBuf, 5, 8);
          vColumn(3)  := SUBSTR(vLineBuf,10,14);     
          Insert Into MySampleTable
          Values
            (vColumn(1), vColumn(2), vColumn(3));
          EXIT WHEN vLinebuf IS NULL;
       END LOOP;
       prc_close_file;
    END;
    SQL> @c:\myworkspace\sql\scripts\sample.sql;
    PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declaredIt works on the oracle forms but not on the SQL*Plus. Is there an alternative method using a PL/SQL script? A simple sample would help. Thanks.

    Did you ever noticed the search box at the right side of the forum?
    A quick search (limited to this years entries) brought up this thread for example
    Re: UTL_FILE Examples

  • How to read multiple dat files.

    Hello Everyone!
    I am working on a project that requires one file that creates a JFrame with a current file title, JTextFields that accesses two .dat files and a JButton.
    The user clicks a JButton to cycle through the first sequential .dat file. When the end of the first file is reached the file is closed, the JFrame title is changed to the second file title as the user continues to click the JButton to continue on viewing the second file?s records, until the second reaches the end of file.
    The project requires using Try-Catches to catch the EOF exceptions and IOExceptions and Thread or Runnable.
    I have been able to get one file to read and display its records; however, researching back through my text on how to read/write to files I haven?t been able to determine how to get to the end of the file and proceed to the next file without triggering the EOFException. I have even tried multiple Try-Catches (one for each file within the actionPerformed method) and that ends up ignoring the first file records and only displays the second files records.
    This is a school project and we have only covered just the bare basics of Java over the last two months. So, any hints that anyone can provide can only be of what type of procedure will be needed or what procedure won?t help to complete the task, without giving away the solution.
    I have spent approximately 40 hours of study time on this project and believe that I have definitely run into a major snag.
    The following is the code I have so far:
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class StudentRead extends JFrame implements ActionListener
       private JLabel gradStudentList = new JLabel("GRADUATE Student List");
       private JLabel undergradStudentList = new JLabel("UNDERGRADUATE Student List"); 
       private Font bigFont = new Font("Helvetica", Font.ITALIC, 24);
       private JLabel userprompt = new JLabel("View the students");
       private JTextField idNumText = new JTextField(4); 
       private JTextField lastNameText = new JTextField(15);
       private JTextField firstNameText = new JTextField(15);
       private JButton viewRecordButton = new JButton("View Record");
       private JLabel idNumberLabel = new JLabel("ID Number"); 
       private JLabel lastNameLabel = new JLabel("Last name"); 
       private JLabel firstNameLabel = new JLabel("First name");
       private Container con = getContentPane();
       DataInputStream gradStudentInStream;
       DataInputStream undergradStudentInStream;
       public StudentRead()
          super("Read Student Records");
          try
             gradStudentInStream = new DataInputStream(new FileInputStream("GradStudents.dat"));
             undergradStudentInStream = new DataInputStream(new FileInputStream("UndergradStudents.dat"));
          catch(IOException e)
             System.err.println("File not opened");
             System.exit(1);
          setSize(325, 200);
          con.setLayout(new FlowLayout());
          gradStudentList.setFont(bigFont);
          con.add(gradStudentList);
          con.add(userprompt);
          con.add(idNumberLabel);
          con.add(idNumText);
          con.add(lastNameLabel);
          con.add(lastNameText);
          con.add(firstNameLabel);
          con.add(firstNameText);
          con.add(viewRecordButton);
          viewRecordButton.addActionListener(this);
          setVisible(true);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       public void actionPerformed(ActionEvent e1)
          String lastName, firstName;     
          int IdNum;
          try
             IdNum = gradStudentInStream.readInt();      
             lastName = gradStudentInStream.readUTF();
             firstName = gradStudentInStream.readUTF();
             idNumText.setText(String.valueOf(IdNum));
             lastNameText.setText(lastName);
             firstNameText.setText(firstName);
          catch(EOFException e2)
             closeFile();
             System.exit(0);
          catch(IOException e3)
             System.err.println("Error reading file");
             System.out.println("out");      
             System.exit(1);
       public void closeFile()
          try
             gradStudentInStream.close();
             System.exit(0);
          catch(IOException e)
             System.err.println("Error closing file");
             System.exit(1);
       public static void main(String[] args)
          StudentRead rsr = new StudentRead();
    }

    deepak_1your.com wrote:
    hi,
    If you want to read a file guarding yourself agianst exceptions....
    check this article.... the code presented in this article might suit your needs...
    [http://1your.com/fusion/infusions/articles/readarticle.php?article_id=17|http://1your.com/fusion/infusions/articles/readarticle.php?article_id=17]
    And how does that help with a DataInputStream?

  • Reading Large data files from client machine ( urgent)

    Hi,
    I want to know the best way for reading large data at about 75MB file from client machine and insert to the database.
    Can anybody provide sample code for it.
    Loading the file should be done at client machine and inserting into the database should be done at server side.
    How should i load the file?
    How should i transfer this file or data to server ?
    How should i insert into the database ?
    Thanks in advance.
    regards
    Kalyan

    Like I said before you should be using your application server to serve files >from the server off the filesystem. The database should not store files this big >and should instead just have a reference to this file. I think u have not understood the problem corectly.
    I will make it clear.
    The requirement is as follows.
    This is a j2ee based application.
    Application server is oracle application server.
    Database is oracle9i
    it is thick client (swing based application)
    User enters datasource like c:\turkey.data
    This turkey.data file contains data
    1@1@20050131@1@4306286000113@D00@32000002005511069941@@P@10@0@1@0@0@0@DK@70059420@4330654016574@1@51881100@51881100@@99@D@40235@0@0@1@430441800000000@@11@D@42389@20050201@28483@15@@@[email protected]@@20050208@20050307@0@@@@@@@@@0@@0@0@0@430443400000800@0@0@@0@@@29@0@@@EUR
    like wise we may have more than 3 lacs rows in it.
    We need to read this file and transfer this to the application server. Which are EJBS.
    There we read this file each row in file is one row in the database for a table.
    Like wise we need to insert 3 lacs records in the database.
    We can use Jdbc to insert the data which is not a problem.
    Only problem is how to transfer this data to server.
    I can do it in one way. This is only a example
    I can read all the data in StringBuffer and pass to server.
    There again i get the data from StringBuffer and insert into database using jdbc.
    This way if u do it. It is performance issue and takes long time to insert into the database.It even may give MemoryOutofBond exception.
    just iam looking for the better way of doing this which may get good performace issue.
    Hope u have understood the problem.

  • How to read the data file and write into the same file without a temp table

    Hi,
    I have a requirement as below:
    We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined.
    This is a 10.7 to 11.10 migration. In 10.7 the users are using a custom table into which they are first loading the raw data and writing a pl/sql validation on that and loading it into a new flat file and then running the lockbox process.
    But in 11.10 we want to restrict using temp table how can we achieve this.
    Can we read the file first and then do validations accordingly and then write to the same file and process the lockbox.
    Any inputs are highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hello Gurus,
    Let me tell you about my requirement clearly with an example.
    Problem:
    i am receiving a dat file from bank in below format
    105A371273020563007 07030415509174REF3178503 001367423860020015E129045
    in this detail 1 record starting from 38th character to next 15 characters is merchant reference number
    REF3178503 --- REF denotes it as Sales Order
    ACC denotes it as Customer No
    INV denotes it as Transaction Number
    based on this 15 characters......my validation comes.
    If i see REF i need to pick that complete record and then fill that record with the SO details as per my system and then submit the file for lockbox processing.
    In 10.7 they created a temporary table into which they are loading the data using a control file....once the data is loaded into the temporary table then they are doing a validation and updating the record exactly as required and then creating one another file and then submitting the file for lockbox processing.
    Where as in 11.10 they want to bypass these temporary tables and writing it into a different file.
    Can this be handled by writing a pl/sql procedure ??
    My findings:
    May be i am wrong.......but i think .......if we first get the data into ar_payments_interface_all table and then do the validations and then complete the lockbox process may help.
    Any suggestions from Oracle GURUS is highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

  • My SWF is not reading a data file when off my machine

    I have done a build out of Flash Builder 4.5.
    My app reads an external XML in the local dir and displays a pie chart and then a bar chart for each of the selected pie wedges.
    Works great for me.
    But when I share the SWF and XML with co workers the SWF does not seem to read the XML for them.
    Is there another file I need to provide them?
    Or is there a build setting I have not set?

    Thank you.
    I tried this and it seems to work.
    But a total standalone app is not what I am looking for.
    I am producing this for researchers that would then want to add these visualizations
      to their presentations and reports.
    So the product needs to be able to be embeded into Word docs, Power Point and the like.
    My goal is to produce an SWF that reads an external XML file for data to
      then visualize on charts.
    I have found that if I embed the data in the original mxml file it seems to work fine.
    I only am having trouble when I start trying to read external data.
    I guess I will resort to hard wiring the data into the SWF but it seems to not be right.

  • How to read a data file combining strings and data

    Hello,
    I'm having a data file combining strings and datas to read. I'm trying to read the filename, time, constants and comments into four seperate string indicators (the lines for the comments varies for different files). And read the data into a 2-D numeric array. How can I do this? Is there any function that can serch special characters in the spreadsheet file so I can exactly locate where I should start reading the specific data. The following is how the data file appears. Thank you very much.
    Best,
    Richard
    filename.dat
    14:59:00 12/31/2009
    Sample = 2451
    Frequency = 300, Wait time = 2500
    Temperature = 20
    some comments
    some comments
    some comments
    some comments
    some comments
    7.0000E+2    1.5810E-5
    7.0050E+2    1.5400E-5
    7.0100E+2    1.5500E-5
    7.0150E+2    1.5180E-5
    Message Edited by Richard1017 on 10-02-2009 03:10 PM
    Solved!
    Go to Solution.

    Hi,
         I'm fairly new to the NI forums too and I think you just have to wait longer.  Your post was done right.  I do a similiar function as to what you are talking about except I read in numbers from a file.  I create an ini file (just a notepad file of type *.ini) that is is set up with sections inside brackets [] and keys with whatever name followed by an = sign.  You may be able to use a *.dat file too, I just haven't.  Then the vi attached goes to that file and reads the keys from those sections.  You just repeat for the different sections and keys you want to read.  You can use similar provide VI's to write to that same file or create it.  Let me know how that works. 
    Attachments:
    Help1.ini ‏1 KB
    Help1.vi ‏10 KB

  • Reading a .dat file

    hey,
    i have several dat files i want to read in. the files all contain different kind of types like int, double, strings ... it looks kind of like that:
       1     0.00     1.22    2    3.33    test1
       2     8.00     2.00    3    4.00    test2
       .     ...     ...     .     ...     ...so its like a matrix. i know how to read a file and everything. i was just wondering if anybody has a good idea to read the lines in and store it in a matrix or something. or what would be the best way to read it in and store it?!

    I would:
    1) Iterate through entire lines and keep track of the lines with a variable
    2) create the matrix
    Object[][] data = new Object[numOfLines][5];3) Use a nested for loop to iterate through all the data and add it to the matrix
    for(int r)
        for(int c)
            data[r][c] = data.next();

  • Site studio contributor data files with sections

    Is it possible to have sections with in site studio contribution data files and display list of section titles as hyper links in site studio site and show only that section content on click of section title.
    Number of sections are vary from document to document (So we can't use one element as a single section).
    Thanks...

    I am not aware that out-of-the-box Site Studio would have such an options.
    You do have sections (defined in Region Definition), so most likely you'd have to customize your user experience (so that only sections defined on the fly are shown). Note that Region Definition corresponds to a logical "object" (you may abstract that sections are object's attributes), so rather than show/hide sections you might also want to select a different region definition. I also remember that some time ago Site Studio was able to do "lazy load" (display a section only if user asked for it - this requirement tried to address slow loading times of the page); unfortunately, I'm not sure how this feature can be turned on.

  • Opening and reading a dat file

    I have a .dat file on disk that I want to read. Is there a way I can open the file without giving the whole path starting c:/dsfsd/dfs/df/sdfsdf/....

    feel slightly wierd asking this since i feel i shud
    be knowing but whats "relative path" ???a relative path is the path from where the program is running. For example, let's say you are running in c:\java\bin and your prorgram is in there, and your file is there as well, then the relative path would just be \ thats it.
    A better way to understand this is when dealing with HTML Lets say you want to make a link to a picture. Your page is located here : /site/dir1/dir2/index.html and your pictures are stored in /site/pictures/ a way to that without naming the whole site is with relative path. Therefore if you ever wanted to move your site around to another server you wouldn't need to change anything. So for this example, the relative path to, let's say pic.jpg would be ../../pictures/pic.jpg I dont know if this clears anything up. But basically the ../ is telling the computer to go up a folder everytime.
    Good luck

Maybe you are looking for

  • Data don't pass from one server to the other ???

    Hello, I have a big problem. I have define all the data server from all the technologies I want. All the tests are good. I have created interfaces all the first work well But..... When in my interface the Source and the target are not physicaly on th

  • Multiple ICloud calendar issues?

    I have multiple iCloud calendars for my many  jobs and when I get a calendar invite It doesn't go to my default calendar and I cannot modify it. Any suggestions?

  • Photoshop CS6 crashing on startup

    Hi there, I just downloaded CS6 on Windows 7 32bit, however whenever the program starts up, it will load up completely to the Photoshop interface and then a popup will appear stating that Photoshop has encountered an error and must close. The only op

  • Delete an item listed in Finder underneath places

    I have a dmg file listed in my "places". When i click on it, it tells me it can't be used because it is in the trash and to drag it out. I don't want to use it, I want to delete from my "places". Do i just need to drag it to the desktop and then clic

  • How can I make those little rectangular images appear of places I've been?

    when I used to pull up Mozilla, there were 6-8 little rectangular boxes picturing where I had been in the past, how do make those re-appear?