Hibernate creating Dynamic Mapping File

Hi All,
I am supposed to create the Mapping Hbm file dynamically at run time. I learnt that this can be acheived from a Java class file using Xdoclets. But in my case i have to do it from a Xml File. Can this done by xdoclets or anything else?
Parsing the xml file and creating the Mapping file would be a good Idea. Is there is any way?
Thanks
Aski

See the First Xml File will have the Requirement Data, It will be on a bunch and it may reside on some other schema. And the Second Xml will be our Mapping Xml File which should be reside on Hibernate standards.
So which will be the best way to transform from one file(xml) to other Xml File(Mapping.xml).
Thanks

Similar Messages

  • Creating external mapping file for C# application

    Hi,
    I'm using Robohelp 7 and producing HTMLHelp files. So far, the programmers have been making internal links in the program to call my help, but I'd like to take this over using an external mapping file.
    Is it possible to use regular map files, using the built-in Map ID functionality, for C# .NET applications? If so, is there something special I have to do? Or do I just create a regular map file?
    Thanks!

    I mean that, in the past, they have hard-coded the link to each help page within the application. But, I'd like to take that over by maintaining a Map file where I specify the link between the topic and the Map ID.
    However, I'm not sure that the map file works for C# .Net applications, and the engineers aren't sure either. I told them I'd go investigate.
    Is there a way to create a Map file, or something that works like a map file, for a C# .Net application? Or do they have to go on hard-coding the links to each topic?

  • Is there an ADOBE plugin for MS Project 2010 to create Dynamic PDF files?

    I wonder if there exist any ADOBE plugin for MS Project 2010 to create Dynamic PDF files?

    We are not going to use form fields. An employee is going to create large projects in MS Project 2010 and want to share his projects with other employees. So the need is just a viewer. So I guess we need to check out all the third part MS Project Viewers which is out there. Thanks for your answers guys!

  • Creating dynamical flat file name in mapping?

    Hi.
    I know about the variations on how to use an input parameter and/or sysdate to create a dynamic output file name in a mapping.
    My challenge is nearly the same, but I cannot make OWB generate the correct code.
    Problem:
    - got a one column table that holds an identifier in a string field
    - got a function that reads and returns said identifier
    - imported function into OWB
    - trying to use the function call in the Flat File Operator's Target Data File Name, e.g. fixedfilename||fn_get_id()||sysdate||'.ext
    OWB creates the code:
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||fn_get_id()||'_'||SYSDATE||'.ext',
    'w',
    32767
    However, when compiling the package code, it returns the warning:
    ORA-06550: PACKAGE BODY, line 2214, column 29: PLS-00201: identifier 'FN_GET_ID' must be declared
    which results in an error when trying to execute the mapping.
    I've tried substituting the function call in the FOPEN call:
    myId := fn_get_id();
    UTL_FILE.FOPEN(
    'my_location',
    'fixedfilename'||myId||'_'||SYSDATE||'.ext',
    'w',
    32767
    and this works fine, the mapping creates a file with the desired filename. But obviously not a good solution rewriting the generated code all the time....
    Anyone solved something similar?
    Could I use an input parameter and the autogenerated function GET_<PARAMETER>?
    But can I set the value of an input parameter inside the very same mapping?
    Regards,
    -Haakon-

    (It always helps writing out one's problems...)
    I managed to get it working :-)
    Added an input parameter to the mapping, and gave the outgroup variable a default value by calling my imported function.
    Then concatenated the implicitly generated function (GET_PARAMETER) in the Target Data flat file name.
    I now have a target file name that changes according to a departement id stored in a parameter table.
    Regards,
    -Haakon-

  • Is anyone know how to create dynamic pdf file from a JSP page or Servlet ?

    Hi
    Is any one know how to create a dynamic PDF file from JSP or servlet. I need to have standard form format needs to be created and want to send the info to that form dynamically.
    Is there any libraries available?
    Thanks

    I posted a link in this thread to a lib that lets you create PDFs from an app. They have a Java version. I have not used it but I know someone who used it with Microsoft ASP and they liked it.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=287285
    -S-

  • Creating Dynamic PDF file

    Hi ,
    I need to create PDF file in my JSP/servlet application. After we do a
    database search , we are supposed to create a PDF file using the search
    result , so that user can print it .
    I understand Apache-cocoon has similar XML API's. But when I looked into
    cocoon's document I found it needs servlet2.x for servlet operation. I
    am using weblogic4.51 which comes with servlet1.x .
    Any suggestion/ideas ?
    Thanks

    http://xml.apache.org/fop/index.html
    "FOP is the world's first print formatter driven by XSL formatting objects.
    It is a Java application that reads a formatting object tree and then turns
    it into a PDF document. The formatting object tree, can be in the form of an
    XML document (output by an XSLT engine like XT or Xalan) or can be passed in
    memory as a DOM Document or (in the case of XT) SAX events."
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Chiranjib Misra" <[email protected]> wrote in message
    news:[email protected]..
    Hi ,
    I need to create PDF file in my JSP/servlet application. After we do a
    database search , we are supposed to create a PDF file using the search
    result , so that user can print it .
    I understand Apache-cocoon has similar XML API's. But when I looked into
    cocoon's document I found it needs servlet2.x for servlet operation. I
    am using weblogic4.51 which comes with servlet1.x .
    Any suggestion/ideas ?
    Thanks

  • Creating dynamic pdf files

    Is it possible to dynamically create pdf files using Java with any Adobe products? Would anyone recommend this? I've also had people suggest pdflib. Any suggestions would be appreciated...
    Thanks!

    http://www.onjava.com/pub/a/onjava/2003/06/18/dynamic_files.html

  • Create dynamically xml file from java.

    Hi all,
    I got class information in java program. I have to put method name and return type into xml. The xml file is like this and i have created this file.
    <method>
    <name></name>
    <returnType></returnType>
    </method>
    Now when I get method information I want to put it in xml, not by writing each method name explicitly in file, mean i have to load this xml into memory for that what should i do?
    Please help me I am new in XML.
    Thanks in advance.
    -regards
    bunty

    If you save your XML file as "methodinfo.xml", you can use the following code:import java.io.File;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    try {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      DocumentBuilder parser = factory.newDocumentBuilder();
      Document doc = parser.parse(new File("methodinfo.xml"));
      Node nameNode = doc.getElementsByTagName("name").item(0);
      Node returnTypeNode = doc.getElementsByTagName("returnType").item(0);
      nameNode.setTextContent("the name of the method");
      returnTypeNode.setTextContent("the return type of the method");
      DOMSource source = new DOMSource(doc);
      StreamResult result = new StreamResult(System.out);
      TransformerFactory transformerFactory = TransformerFactory.newInstance();
      Transformer transformer = transformerFactory.newTransformer();
      System.out.println("This is the content of the XML document:\n");
      transformer.transform(source, result);
    catch (Exception e){
    ...The content of the XML document will be displayed as follows:<?xml version="1.0" encoding="UTF-8" ?>
    <method>
      <name>the name of the method</name>
      <returnType>the return type of the method</returnType>
    </method>

  • How to create dynamic source file path for lumira?

    i have source file for lumira  visualization on  D:\lumira\SourceFiles\sample.xlsx;
    also .lums file in D:\lumira\demo.lums
    But when i use the same Lumira folder in different system i have to again create connection for the datasource for fetching the data.So please suggest me how can i use this file so that i don't need to create a new connection again and i should get the updated data i.e. the data should change according to the change in the datasource file.

    Hi,
    this isn't possible.
    you need to go the Connections window in Lumira home page, and repoint the connection to the new location
    regards,
    H

  • Support for file tag in XSLT to create dynamic pages  - Gallery type 'Flash'

    Based on my understanding, when you export, LR Web engine looks for transformer.xslt by default if the gallery type is HTML. It allows to use <file name="outputfilename.html"> tag in this transformer.xslt to create new files.<br /><br />But to my knowledge I don't see the above defaults working if the gallerytype is Flash. Why? I don't understand why LR is restricting the Flash based galleries from creating dynamic output files via XSLT.<br /><br />I tried setting xmlTransformer file name to transformer.xslt in galleryInfo.lrweb and leaving xmlPath to blank but this doesn't seem to work. If I give some dummy XML name, it creates the xml in that name, but ignores creating new files I mentioned in the <file> tag in xslt.<br /><br />Can someone please explain if there are any alternates or if possibly fixed in the next release ?

    Are you the one who commented out the code you're looking for ?//String desc = StringFactory.getString(attributes.getValue("desc"));You just have to modify you AttributeObject class to hold a new field : String description. And then, it's up to you to create a new constructor or a new setter method.
    Btw, this is not a Swing related question.

  • How to create dynamic properties in java

    Hi All
    Let me give a breif intro of what i am tryng to do.......
    I want to write a jsp page where the data would be coming from JDBC.
    I have abt 18 columns in my oracle table.
    Out of which i am only configured 7 fields on my jsp page.
    I want to create a mapping file which would be like this
    field1 = name
    field10= designation
    field2 = company
    field3 = address
    field4 = pincode
    field7 = mobile
    field8 = salaryNow each field has its own validation. Suppose today i want pincodeto be a string and tomarrow i want it to be number
    the validation shd automatically change
    how can i put these values i meant in what data structure shd i store them
    Please give me some ideas
    thanks
    Diana

    how can i put these values i meant in what data structure shd i store themMeta data.
    You create a "structure" of some sort that has data in it like the following. Figure out how to store it (text file, xml, database, whatever) write code to parse the structure and then build an interpreter that constructs the page.
    I am rather certain that frameworks like this already exist, but if you are new to programming then creating your own is instructive.
    --- Definition
    name: <Display name>
    Oracle: <jdbc position> <oracle type> <size>
    Java: <display position> <java type>
    --- Example
    name: name
    Oracle: 1, varchar 10
    Java: 3, String
    name: Salary
    Oracle: 5, numeric 18,2
    Java: 1, double

  • CDT with external DIAB Linker does not ouput MAP file

    Hi,
    I am trying to get CDT running with an external (DIAB) Toolchain. It works fine so far, but for debug reasons I would like to create the map file. Unfortunately I get the following error Message:
    dld -lc -lm -m6 Objectfiles... Test_Toolchain2.elf -tPPCE200Z4NEG -m31 > link.map
    dld: error: Failed to read file 'link.map': file is empty
    So the operator does not seem to work. Without the > eclipse displays the output on the console.
    Maybe someone knows a quick fix, I would appreciate any help
    Martin

    Hi,
    I am trying to get CDT running with an external (DIAB) Toolchain. It works fine so far, but for debug reasons I would like to create the map file. Unfortunately I get the following error Message:
    dld -lc -lm -m6 Objectfiles... Test_Toolchain2.elf -tPPCE200Z4NEG -m31 > link.map
    dld: error: Failed to read file 'link.map': file is empty
    So the operator does not seem to work. Without the > eclipse displays the output on the console.
    Maybe someone knows a quick fix, I would appreciate any help
    Martin

  • FCP pre-created key mapping for other NLE's?

    The key mapping feature of FCP is handy because you can set up
    a custom keyboard that emulates another NLE editing system that you
    might be more familiar with while learning FCP (i.e. Avid).
    Does anybody know if anyone has created keyboard mapping
    file presets for download or purchase? I'm interested in emulating
    Pinnacle key mapping in FCP. I realize I can manually create it but thought
    perhaps there was a source you could go to where it was already done
    for you.
    Any input would be appreciated.
    Thanks.

    I don't think there's any place to buy them.. you might find a user on here who has emulated something like that and could email it to you. I use a keyboard mapping similar to Avid but it really is the best of both keyboards in one IMHO.
    it's easy to map so with the time spent searching you could probably make it to your liking.

  • How do Map files work with a Windows application?

    I need confirmation on how map files work.
    I have created a map file previously and have updated the HTML help with a few new topics and changed the Title on a handfull of topics.
    The map file setup is done for the new topics, but I am thinking I need to "fix" those topics whose title has changed.
    I have opened the Map.h file I created and looked at the references, for simplicity sake lets say it looks like this:
    #define Dials_Setup 1
    #define Project_Setup 2
    #define Scenario Scenario_Setup 54
    I assume the mapping process goes like this:
    (1) I hand off map file and the CHM help file
    (2) Developer addes the ID of "2" to the Project Setup window form
    (3) When the user is on the Project Setup window, they press F1
    (4) The Project Setup window form gets the ID of "2"
    (5) The Map.h file translates the "2" to "Project_Setup" topic title
    (6) The CHM is opened to the topic with a title of "Project_Setup"
    So, if I changed the title of the topic from "Project_Setup" to "Project_Setup_Window" would I have to update the line item in the Map.h file from "Project_Setup" to "Project_Setup_Window" for the mapping to work and the client to see the correct topic when the press F1?
    I am thinking these all need to be in sync between the Map.h file and the CHM file.
    As always, thanks for any guidance.
    Michael F Weart

    Hi, Michael
    You have it right - basically. I'll just add a few notes.
    Yes. Typically you would give the .h and the .chm file to the developer. However, sometimes the developer will give you a .h file created from their IDE tool (e.g., Visual Studio). In that case, you would Import the .h file into your RoboHelp project and map it that way. Or it can be a combination as long as there are no duplicates of Map #s or Context IDs. Another tip: You can also generate a Map File Report (Tools > Reports > Map IDs) which can be a handy guide for the developer.
    Note: The alphanumeric string for the Context ID (sometimes also called a Topic ID) does not necessarily have to be formed from the Topic Title. The reason it may seem that way is because RoboHelp uses the Topic Title as a matter of convenience to help you keep track of the which topic is being mapped.  The main thing is that there are no duplicates and RoboHelp has a report for that as well. In Microsoft HTML Help (.chm), the actual mapping from the .h Map # to the URL of the actual topic can be found in the .ali (alias) file which can be found in your Project root. The .ali file is compiled into the .chm itself.
    Here is a good Online Help topic with more details:
    http://help.adobe.com/en_US/robohelp/robohtml/WS5b3ccc516d4fbf351e63e3d11aff59c571-7ff9.ht ml
    Rob Chandler has really good documentation for Microsoft HTML Help which you will find here:
    http://helpware.net/htmlhelp/how_to_context.htm
    John Daigle
    Adobe Certified RoboHelp and Captivate Instructor
    Evergreen, Colorado
    www.showmethedemo.com

  • Using XML file in Java script to create Google Map

    Hello,
    I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have had to explore the internet in order to discover various tutorials and examples that have led me on a positive path.
    Right now I am working on a Google Mash-Up that will incorporate over 14,000 records, which will appear as separate markers that will have pop-up info bubbles with additional info inside (using html), once the marker is clicked.
    Here is the XML script example that is used in the tutorial I am following:
    <markers>
    <marker lat="43.65654" lng="-79.90138" html="Some stuff to display in the<br>First Info Window"
    label="Marker One" />
    <marker lat="43.91892" lng="-78.89231" html="Some stuff to display in the<br>Second Info Window"
    label="Marker Two" />
    <marker lat="43.82589" lng="-79.10040" html="Some stuff to display in the<br>Third Info Window"
    label="Marker Three" />
    </markers>
    ...and this is how it looks when the file is retrieved by the java script and mapped: http://econym.googlepages.com/example_map3.htm
    This is the java script that creates the Google Map. I have emboldened the section of the script that retrieves the data and parses it to create the markers:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Google Maps</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA6GoL8P5zqjQlG5A5uM1ETBSUPozAscB0cY3RG8xEGnZyeom4axRySak889rVpvHYRsV4f9OZZzbboA"
    type="text/javascript"></script>
    </head>
    <body onunload="GUnload()">
    <!-- you can use tables or divs for the overall layout -->
    <table border=1>
    <tr>
    <td>
    <div id="map" style="width: 800px; height: 1200px"></div>
    </td>
    <td width = 200 valign="top" style="text-decoration: underline; color: #4444ff;">
    <div id="side_bar"></div>
    </td>
    </tr>
    </table>
    <noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
    However, it seems JavaScript is either disabled or not supported by your browser.
    To view Google Maps, enable JavaScript by changing your browser options, and then
    try again.
    </noscript>
    <script type="text/javascript">
    //<![CDATA[
    if (GBrowserIsCompatible()) {
    // this variable will collect the html which will eventualkly be placed in the side_bar
    var side_bar_html = "";
    // arrays to hold copies of the markers used by the side_bar
    // because the function closure trick doesnt work there
    var gmarkers = [];
    var i = 0;
    // A function to create the marker and set up the event window
    function createMarker(point,name,html) {
    var marker = new GMarker(point);
    GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(html);
    // save the info we need to use later for the side_bar
    gmarkers[i] = marker;
    // add a line to the side_bar html
    side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
    i++;
    return marker;
    // This function picks up the click and opens the corresponding info window
    function myclick(i) {
    GEvent.trigger(gmarkers, "click");
    // create the map
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng( 37.251699,-119.604315), 7);
    *// Read the data from testXML2blackpoolformat.xml*
    var request = GXmlHttp.create();
    request.open("GET", "testXML2blackpoolformat.xml", true);
    *request.onreadystatechange = function() {*
    *if (request.readyState == 4) {*
    var xmlDoc = GXml.parse(request.responseText);
    *// obtain the array of markers and loop through it*
    var markers = xmlDoc.documentElement.getElementsByTagName("ConnectoryRecord");
    *for (var i = 0; i < markers.length; i++) {*
    *// obtain the attribues of each marker*
    *var lat = parseFloat(markers[i].getAttribute("lat"));*
    *var lng = parseFloat(markers[i].getAttribute("lng"));*
    var point = new GLatLng(lat,lng);
    *var html = markers[i].getAttribute("html");*
    *var label = markers[i].getAttribute("label");*
    *// create the marker*
    var marker = createMarker(point,label,html);
    map.addOverlay(marker);
    // put the assembled side_bar_html contents into the side_bar div
    document.getElementById("side_bar").innerHTML = side_bar_html;
    request.send(null);
    else {
    alert("Sorry, the Google Maps API is not compatible with this browser");
    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/
    // http://econym.googlepages.com/index.htm
    //]]>
    </script>
    </body>
    </html>
    Here is my delima--
    This is the xml format that I need to use because it can accept the rest of my excel file and loop it through the 14,000+ records to create a functioning xml file. This is just a sample (2 records) of the larger file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <ConnectoryAug2008>
    <ConnectoryRecord>
         <lng>-117.03683</lng>
         <lat>32.944505</lat>
         <ConnectoryID>1</ConnectoryID>
         <Name>$2.95 Guys</Name>
         <StreetAddress>13750 Stowe Drive</StreetAddress>
         <City>Poway</City>
         <State>CA</State>
         <Zip>92064</Zip>
    <Marker>White</Marker>
         <IndustryGroup>Technical Services</IndustryGroup>
         <ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=1</ConnectoryProfileLink>
    </ConnectoryRecord>
    <ConnectoryRecord>
         <lng>-117.272843</lng>
         <lat>33.13337</lat>
         <ConnectoryID>2</ConnectoryID>
         <Name>(GLDS) Great Lakes Data Systems</Name>
         <StreetAddress>5954 Priestly Drive</StreetAddress>
         <City>Carlsbad</City>
         <State>CA</State>
         <Zip>92008</Zip>
    <Marker>Orange</Marker>
         <IndustryGroup>Technology</IndustryGroup>
         <ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
    </ConnectoryRecord>
    </ConnectoryAug2008>
    This is the tutorial where I found the formatting techniques to successfully create the large xml file that will format/convert my excel file properly: http://www.mrexcel.com/tip064.shtml
    These variables should appear as html in the info bubble:
    <ConnectoryID>2</ConnectoryID>
         <Name>(GLDS) Great Lakes Data Systems</Name>
         <StreetAddress>5954 Priestly Drive</StreetAddress>
         <City>Carlsbad</City>
         <State>CA</State>
         <Zip>92008</Zip>
    <IndustryGroup>Technology</IndustryGroup>
         <ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
    The "Marker" variable instructs Google Maps to label the marker with a particular color. I will be so grateful to the person(s) that helps me get through this wall that I have been hitting for a long time. It's very difficult without having the luxury of peers who know about these types of issues.
    Thank you!!

    Here is the relationship: They both contain geographic coordinates that produce a point on a map. I will use the rest of the information in the second xml file (company name, address, link, etc.) to produce the information for the bubble that will pop up once the marker is clicked.
    My problem is that I need to try to keep the second xml file in a relatively similar format, so the rest of my records will still be accepted. If I had a smaller amount of records I could place them directly into the javascript, but because there are so many records, I need to use an xml file that can be retrieved by the java script. I chose to use the second type of xml file because I can easily copy and past the 14,000+ records that are now in excel document.
    After the xml issue is corrected I need to rework the javascript that is now emboldened so that it will read the new xml file correctly. I included the first xml file so that the readers will understand what type of xml format is currently being used to produce the markers in the tutorial map.

Maybe you are looking for