Is there a Java API for Tree data structure?

I am wondering is there any Java API to work on Tree based data structure.
I could read in some forums / sites that teach me how to create tree based objects using collection.
But I wanted to know is there any core java API that can be used directly for tree based operations. (like binary tree or other type of trees)
Please comment on this doubt.

Headed using google and other stuff not found one.
Suggestion: Why not start building the one, its a good idea to do that, isn't it.

Similar Messages

  • Any Java API for dumping database?

    As far as I know, the normal way to dump a database is to execute some command on the console.
    Is there any Java API for dumping a database, so that the operation can be wrapped in the code?
    The database system that I'm using is MySQL. Please help. Thanks!

    By "dumping a database" I mean exporting data in the database into a text file, as a backup, that can be used when restoring the database. For example, in MySQL, I can run "mysqldump" on the command line to dump the database into a file.
    So far I still have no idea how to do this using JDBC or any other Java API. Please help!

  • Trees Data Structures in Java

    Hi all !
    Currently I�m developing a Java software that requires a Tree data structure. Searching through Java API I�ve found classes like TreeMap and TreeSet, but although these classes seens to use tree structure behind what they really provide are linear data structure, not a tree data structure. My question is if there is a public and free Java tree data structure that permits to do activities such as:
    - Search for a particular node (efficiently)
    - Insert children to any node
    - Maintain one Object in each node
    Simple like this ! It must have something like this in Java, but I just can�t find it and I�m just too lazy to implement it :) ! Anyone can help me ?
    Thanks in advance !

    I�ve seen javax.swing.tree.TreeModel and its seens more like an implementation of Control in swing MVC (Model Vision Control) swing paradigm for JTree. It has listeners generated for manipulation events for example. It uses javax.swing.tree.DefaultMutableTreeNode for its nodes, and maybe I could use this class for the nodes of my tree since it has many useful operations. However still I miss a node searching operation that this class doesn�t have.
    Yes my problem is a simple Tree, but it is simple now and it might become much more complex, demanding more operations on the tree and specially efficient searching algorithms. Thats why I�m looking for a complete solution and I prefer something that is already done and well tested :) !
    Thanks for your tip !

  • What Tree Data Structures does Java Include?

    I have been reading about several tree data structures like a binary search tree, self-balancing bst, minimum spanning tree, red-black tree, AVL tree, etc... Are there data structures in Java represent the various trees, or is implementation of the ds left to user?

    "Java" can be termed the "Java Language". The language does not have trees.
    In more general usage "Java" can refer to a standard, desktop, delivered VM which includes the standard Java API. The types that you are asking about would be found in the following package.
    "Java" could also refer to any other commonly available implementations. In that case probably anything that can be implemented has been implemented somewhere. Googling works.

  • Java API for running entire ".sql" files on a remote DB ( mySQL or Oracle)?

    Would anyone happen to know if there's a java API for executing entire ".sql" files (containing several different SQL commands), on a remote database server ?
    It's enough if the API works with MySQL and/or Oracle.
    Just to demonstrate what i'm looking for:
    Suppose you've created sql file "c:/test.sql" with several script lines:
    -- test.sql:
    insert into TABLE1 values(3,3);
    insert into TABLE1 values(5,5);
    create table TABLE2 (name VARCHER) ENGINE innoDB; -- MYSQL specific
    Then the java API should look something like:
    // Dummy java code:
    String driver="com.mysql.jdbc.Driver";
    String url= "jdbc:mysql://localhost:3306/myDb";
    SomeAPI.executeScriptFile( "c:/test.sql", driver, url);

    No such a API, but it's easy to parse all sqls in a file, then run those command:
    For instance:
    import java.sql.*;
    import java.util.Properties;
    /* A demo show how to load some sql statements. */
    public class testSQL {
    private final static Object[] getSQLStatements(java.util.Vector v) {
    Object[] statements = new Object[v.size()];
    Object temp;
    for (int i = 0; i < v.size(); i++) {
    temp = v.elementAt(i);
    if (temp instanceof java.util.Vector)
    statements[i] = getSQLStatements( (java.util.Vector) temp);
    statements[i] = temp;
    return statements;
    public final static Object[] getSQLStatements(String sqlFile) throws java.
    io.IOException {
    java.util.Vector v = new java.util.Vector(1000);
    try { br = new
    java.util.Vector batchs = new java.util.Vector(10);
    String temp;
    while ( (temp = br.readLine()) != null) {
    temp = temp.trim();
    if (temp.length() == 0)
    switch (temp.charAt(0)) {
    case '*':
    case '"':
    case '\'':
    // System.out.println(temp);
    break; //Ignore any line which begin with the above character
    case '#': //Used to begin a new sql statement
    if (batchs.size() > 0) {
    case 'S':
    case 's':
    case '?':
    if (batchs.size() > 0) {
    case '!': //Use it to get a large number of simple update statements
    if (batchs.size() > 0) {
    String part1 = temp.substring(1);
    String part2 = br.readLine();
    for (int i = -2890; i < 1388; i += 39)
    batchs.addElement(part1 + i + part2);
    for (int i = 1890; i < 2388; i += 53) {
    batchs.addElement(part1 + i + part2);
    batchs.addElement(part1 + i + part2);
    for (int i = 4320; i > 4268; i--) {
    batchs.addElement(part1 + i + part2);
    batchs.addElement(part1 + i + part2);
    for (int i = 9389; i > 7388; i -= 83)
    batchs.addElement(part1 + i + part2);
    if (batchs.size() > 0) {
    br = null;
    catch ( fnfe) {
    v.addElement(sqlFile); //sqlFile is a sql command, not a file Name
    Object[] statements = new Object[v.size()];
    for (int i = 0; i < v.size(); i++)
    statements[i] = v.elementAt(i);
    return statements;
    public static void main(String argv[]) {
    try {
    String url;
    Object[] statements;
    switch (argv.length) {
    case 0: //Use it for the simplest test
    case 1:
    url = "jdbc:dbf:/.";
    if (argv.length == 0) {
    statements = new String[1];
    statements[0] = "select * from test";
    statements = argv;
    case 2:
    url = argv[0];
    statements = getSQLStatements(argv[1]);
    throw new Exception(
    "Syntax Error: java testSQL url sqlfile");
    //Please see Connecting to the Database section of Chapter 2. Installation in Development Document
    Properties properties = new Properties();
    Connection con = DriverManager.getConnection(url, properties);
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    //Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    // stmt.setMaxRows(0);
    final boolean serializeFlag = false;//A test switch to serialize/deserialize the resultSet
    ResultSet rs;
    for (int i = 0; i < statements.length; i++) {
    if (statements[i] instanceof java.lang.String) {
    String temp = (java.lang.String) statements;
    switch (temp.charAt(0)) {
    case 'S':
    case 's':
    case '?':
    rs = stmt.executeQuery(temp);
    if (serializeFlag) {
    // serialize the resultSet
    try { fileOutputStream = new"testrs.tmp");
    objectOutputStream = new
    catch (Exception e) {
    rs.close(); //Let the CONCUR_UPDATABLE resultSet release its open files at once.
    rs = null;
    // deserialize the resultSet
    try { fileInputStream = new"testrs.tmp"); objectInputStream = new
    rs = (ResultSet) objectInputStream.
    catch (Exception e) {
    ResultSetMetaData resultSetMetaData = rs.
    int iNumCols = resultSetMetaData.getColumnCount();
    for (int j = 1; j <= iNumCols; j++) {
    // System.out.println(resultSetMetaData.getColumnName(j));
    /* System.out.println(resultSetMetaData.getColumnType(j));
    + " " +
    Object colval;
    long ncount = 0;
    while ( {
    // System.out.print(rs.rowDeleted()+" ");
    for (int j = 1; j <= iNumCols; j++) {
    colval = rs.getObject(j);
    System.out.print(colval + " ");
    rs.close(); //Let the resultSet release its open tables at once.
    rs = null;
    "The total row number of resultset: " + ncount);
    int updateCount = stmt.executeUpdate(temp);
    System.out.println(temp + " : " + updateCount);
    else if (statements[i] instanceof java.lang.Object[]) {
    int[] updateCounts;
    Object[] temp = (java.lang.Object[]) statements[i];
    try {
    for (int j = 0; j < temp.length; j++){
    System.out.println( temp[j]);
    stmt.addBatch( (java.lang.String) temp[j]);
    updateCounts = stmt.executeBatch();
    for (int j = 0; j < temp.length; j++)
    for (int j = 0; j < updateCounts.length; j++)
    System.out.println((j+1)+":" +updateCounts[j]);
    catch (java.sql.BatchUpdateException e) {
    updateCounts = e.getUpdateCounts();
    for (int j = 0; j < updateCounts.length; j++)
    java.sql.SQLException sqle = e;
    do {
    System.out.println("Error Code:" +
    System.out.println("SQL State:" + sqle.getSQLState());
    while ( (sqle = sqle.getNextException()) != null);
    catch (java.sql.SQLException sqle) {
    do {
    System.out.println("Error Code:" +
    System.out.println("SQL State:" + sqle.getSQLState());
    while ( (sqle = sqle.getNextException()) != null);
    catch (SQLException sqle) {
    do {
    System.out.println("Error Code:" + sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    while ( (sqle = sqle.getNextException()) != null);
    catch (Exception e) {

  • Java API for working with digital signature.

         I have to check whether a pdf form is modified since it is digitally signed, using a java program.
         Are there any java APIs(provided by SAP) available for that?
         Can I use IWDPDFDocument API in java program? I tried it but I am getting 'classnotfoundexception'.

    may i know what service pack of SAP NetWeaver  Developer Studio version are you using?
    as the "IWDPDFDocument" is only available on SAP NetWeaver 2004S SPS 10 and above
    and you just need to import either this two class 
    hope this information could help you
    Jia Jun

  • Image not displayed in pdf generated using Java API for Forms service

    I am creating a pdf document using Java API for Forms Service.
    I am able to generate the pdf but the images are not visible in the generated pdf.
    The image relative path is coming in the xml as defined below. The images are stored dynamically in the Livecycle repository each time a request is fired with unique name before the xml is generated.
    <imageURI xfa:contentType="image/png" href="../Images/logo.png"></imageURI>
    Not sure if I need to specify specify specific URI values that are required to render a form with image.
    The same thing is working when I generate pdf document using Java API for Output Service.
    As, I need to generate interactive form, I have to use Forms service to generate pdfs.
    Any help will be highly appreciated.

    Below is the code snippet:
                //Create a FormsServiceClient object
                FormsServiceClient formsClient = new FormsServiceClient(myFactory);
                //Specify URI values that are required to render a form
                URLSpec uriValues = new URLSpec();
                                  // Template location contains the whole rpository path for the form
               // The base URL where form resources such as images and scripts are located.  Whole Image path is passed in BaseUrl in the http format.
                      String baseLocation = repositoryPath.concat(serviceName).concat(imagesPath);   
                // Set run-time options using a PDFFormRenderSpec instance
                PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec();
                pdfFormRenderSpec.setCacheEnabled(new Boolean(true));           
                pdfFormRenderSpec.setAcrobatVersion(com.adobe.livecycle.formsservice.client.AcrobatVersio n.Acrobat_8);
                                  //Invoke the renderPDFForm method and write the
                //results to a client web browser
                String tempTemplateName =templateName;
                FormsResult formOut = formsClient.renderPDFForm(tempTemplateName,
                //Create a Document object that stores form data
                Document outputDocument = formOut.getOutputContent();
                InputStream inputStream = outputDocument.getInputStream();

  • EWS JAVA API for availability is giving only 10 suggested times in a particular day

    I'm using EWS JAVA API for seeing the availability of contacts who had shared their calender with me. Here in the suggested timings, I can able to see only 10 suggested timings even though there can be more than 10 suggested slots. 
    I would like to check is there any limit  on suggested times ? 
    API is also giving quality of timing like "Good", "Excellent" on what basis this is decided ?

    You can specify the maximum number of suggestions per day using the MaximumResultsByDay parameter (
    The quality is determined based on how many attendees are available and is influenced by the GoodThreshold:

  • How to use java api for function activity in embed oracle workflow?

    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

    The Java Function Activity Agent is not certified for Oracle Workflow embedded in Oracle Applications. Installing standalone workflow should be a lot easier than what you have found, although it looks like you did hit a Pentium 4 issue with the Oracle Universal Installer. I suggest you contact Oracle Support or Oracle Consulting for assistance.
    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

  • Java API for reading/writing word/excell file

    Hello Friends,
    Is there any Java API available for Microsoft word and excell product?

    Start your search here

  • Java API for Webchannel 7.0

    for the ISA 4.0 we had the API of the java classes. Is there something like this for CRM 7.0.
    Best regards,

    Hi Nils,
    Follow below steps.
    Yes you can get it from service market place.
    Follow below steps.
    1) Log in to service market place.
    2) Click on "Download" Tab
    3) On Left side click on SAP Software Distribution Center -->Download > Support Packages and Patches> Entry By Application Group.
    4) On Right side. Support Packages and Patches>SAP Application Components> SAP CRM> SAP CRM 2007> Entry by Component--> CRM Application Server Java
    6) From Below screen click on "Download" tab and Download "SAPSHRJAVxx_x-xxxxxxxx.SCA" file.
    7) Open "SAPSHRJAVxx_x-xxxxxxxx.SCA" file by "WINRAR" and unzip on your local laptop.
    8) After unzip you will get several zip files under folder "BUILDARCHIVES"
    9) Find "crmshrjavadoc" file inside folder "BUILDARCHIVES"
    10) Unzip "crmshrjavadoc" file and you will get "javadoc.ppa" file
    11) Rename "Javadoc.ppa" file to ""
    12) Unzip "" file which we just rename in step 11.
    13) you will get folder "Docs". This folder contain actual "" file
    14) Unzip above file and you will get Java API Documents for ISA 5.0 or ISA 6.0 or ISA 7.0 depends on "SAPSHRJAVxx_x-xxxxxxxx.SCA" version and SP level.
    I just got ISA Java Doc by following above steps. It looks 14 step but once you download SCA file it will take only 2-3 minutes.
    I am sure you will get Standard Java API for ISA just like ISA 4.0
    Please let me know if you face any problem.
    Also Visit this ECmmerce 6.0 Java API needed
    Let me know if you face any error or problem.
    Ecommerce Developer.

  • Reg: Java API for MDM work flow

    I am using MDM java API (Version: 5.5 SP 06 Patch 2) for webdynpro. I am creating a record in MDM using MDM java API. Once the record gets created in MDM i need to call the MDM workflow. Is there any java API available to call the MDM workflow into webdynpro. If that is not possible, what is the alternative to call the MDM workflow into webdynpro.
    Kindly suggest.

    Hi Prasanthi,
    You need to use the three main classes to work with MDM Workflows
    1. RetrieveWorkflowTasksCommand
    2. WorkflowTask
    Both of the above classes are used to retrieve the current workflow tasks.
    3. WorkflowTaskAction
    4. WorkflowActionMenuNode
    Above classes tells the possible actions of the workflow task.
    You will find more information about the above classes in the Java docs
    I would still suggest to use UWL if you dont need any customization.
    Jitesh Talreja

  • Newbie who want to use Java API for OLAP

    Hi all,
    I'm trying to learn how to use Java API for Oracle 10.2 OLAP. I went through the Java OLAP API user guide and I'm getting even more confused. Can somebody guide me to some good online materials?
    Many thanks!
    - Andrew

    Hi there,
    Did you see the examples in the Reference doc? :-
    Stuart Bunby
    OLAP Blog:
    OLAP Wiki:
    OLAP on OTN:
    DW on OTN :

  • Question about Java API for XML schema?

    Hello, everyone!
    I am looking for a java api for XML schema. I hope the API is capable for parsing the structure of element
    or complextype declarations in XML schema. So for example, if I specify a name of an element or
    complextype defined in a schema, the name, dataype and other constraints of contained child elements can be returned.
    Does anyone know if there exists such a paser?
    Thanks very much!

    An implementation of DOM Level 3.

  • Is there a Java SDK for Siebel Analytics/Oracle BI

    Hi, I want to integrate with Siebel Analytics (now known as Oracle Business Intelligence, right?) to our product. Is there a JAVA SDK for Siebel Analytics/Oracle BI? If so, can anyone point me to the right place to get them. Much appreciated.

    There is currently no JDK or any other API to work with OBI EE (formerly Siebel Analytics).
    The presentation component exposes some functionality via web services.
    You can interact with the BI Server via NQCMD so you could build your own application that executes NQCMDs but this is not well documented other than typing NQCMD ? at the command line.
    The OBI Metadata is captured in a .rpd file which can be manipulated via UDML but this is not supported - do a search on Google for UDML (which is a proprietary format) for some examples on using this. OWB recently rolled out with some integration with OBI - it accomplishes this by manipulating the .rpd file using UDML.
    The Oracle folks monitor this forum. If you can reply with some specifics as to what you want to accomplish, I'm sure they will consider your needs if they decide to publish an API.

Maybe you are looking for

  • MaxL - Import File from DB with &

    Hi, I have Essbase application with DB name contain "&". I'm running the next Command to import file: import database WD.P&L data from server text data_file 'WD_Exp.txt' using server rules_file 'WD_Rev' on error write to 'C:\errorFile.err'; I get the

  • 'User did not respond' - Has something changed with ichat?

    This seems to be an issue for nearly everyone. I have been using ichat video succesfully for over a year now. For some reason, in the last month or so, the video has stopped working on all three of my macs (powerbook G4 Tit, new mbpro, and imac g5 at

  • Typing IPA font into Word document

    Is anyone familiar with some convenient way of typing the IPA (International Phonetic Alphabet) font in a Word document. Word doesn't even recognize the IPA font I have installed. The only thing I have been successful with is painfully inserting the

  • CC files won't open on CS6

    My students say they can't open files they worked on under CC at home when the try to work on them here at the college under our CS6 (non-Creative Cloud) apps.

  • After last updating for OS 10.7.2 problems with digital certificate

    Hi everybody, Im having problems with lion after last updating yesterday... The digital certificates dont more work!!! In time: the same certificates still work in to snow leopard... I exported from snow leopard and imported on lion, but nothing. Unt