Vedam - Analysis & Review


The most expected and awaiting movie for me; first time I saw the movie just a little bit ahead from the second half; but second time able to see the full length. overall movie is up to my expectation and it was again a touching story like Krish's debut movie "Gamyam". Many people say "it is experimental" ,"it is a good movie" and "It is challenging" but my feeling is that it is just director's gut feelings and his moral reasons out his life learnings to educate people. The major scenes which moves any of the audience are "Allu arjun trying to rob the money from the old man", "When old man find his money the expressions and the music" and the final scene "When old man pays back the interest amount and patel leaving the kid". Through out the movie I never see Allu arjun, Anushka, Old man or Manchu manoj but just the characters cable raju, Saroja, Ramulu and Vivek(A Typical aspiring rock star) what else as a director krish wants, its purely a directors movie and its a honest success for him.

The noble intention to re-invent the human in all of us by Krish with his "VEDAM" is great. By looking at the trailer it self many wise people predicted the story;  and yes they are correct ! It was a story of five typical different Indians aspiring for different ways in some other way money is the need for most  of them. But I was seriously thinking about Krish; How he manages to score a hit as it is just second movie. Any body by seeing the Anushka in the trailers thinks that movie is fully commercial but krish never gave up his sensitivity to humanism. Prior to the movie release itself people started gossiping about "Vedam"; that the theme behind the movie was terrorism as like "Gamyam" takes theme of Naxalism. But my feeling is "Vedam" is a movie to re-invent the humanism in humans so theme is "Humanism". The patriotism attached to the climax is to high-light the humanism in my feeling. After watching the Prasthanam my only expectation was on "Vedam" and it will be really great if people really watch this movie with true sense of humanism.

Don't know what life lessons impacted krish in his past? the way he pictures the differences between rich and poor in his movies is simply clear and true reflecting the reality. The dialogues about the death people funeral by Allu arjun clarifies the differences between rich and poor.
And many other dialogues are thought provoking ones.
"Perugu vada lo perugu undi kada ani Pulihora lo puli untadaa ??" this dialogue by arjun to Sage(krish was in that role) sound funny but the meaning behind that has so much depth.

"Basti lo pothe ganta lo ettu taaru ; ade akkada chaste rendu rojulu frig lo unchutaaru, manchi gaa chaavalanna dabbu lo puttali ra .."
And coming to songs, all are good Keeravaani surprised me by writing four songs in this movie, and as usual Seetaa rama sastry sirs songs is having so much depth in his lyrics and it is also good.
"Neetho nuvvu kalahisthu
nityam ninu nuvve gelipisthu
samayam pai chirakalam cheragani santakanni pettu "
........

Again hats-off to Sastry sir.

Kudos to krish and his crew.
Special thanks to Allu arjun and Manchu manoj to make it happen ...
P.S : A guest appearance role can have fights, songs and scenes through out the movie and it has impact on climax scene as well. Then what does a real Guest appearance role means. May be manoj did not even tell his name at climax to arjun as his role is guest role.

Read more


Java code to connect DB2 Type 4 driver db2jcc.jar

JAVA sample code to connect to DB2 Database using Type 4 Driver

The below sample code shows the simple way of making connection to a DB2 Server Database exists on a remote machine with out installing any db2 client on your machine. But all we need to have is Type 4 drivers to make this connection which we can use by pointing to the db2jcc.jar and db2jcc_license_cu.jar.
All we need to do is point the java class path to find this jars, in case of eclipse users configure the build path and these 2 jars as external jars from the path they located to the project.   change the Host name, port, user name and password like details in the below program and run accordingly.

Syntax for the connection string : 
 DriverManager.getConnection
                 ("jdbc:db2j:net://<HOSTNAME>:<Port>/<Database name>,"<User name>","<Password>");

Sample connection string :
 DriverManager.getConnection
                 ("jdbc:db2j:net://nc184120.tivlab.austin.ibm.com:50001/CDSDB","db2inst1","db2inst1");

The following is the sample code.... 

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Java2DB2 {
public static void main(String[] args)
{
try
{
// load the DB2 Driver
Class.forName("com.ibm.db2.jcc.DB2Driver");
// establish a connection to DB2
Connection db2Conn =
DriverManager.getConnection
("jdbc:db2j:net://nc184120.tivlab.austin.ibm.com:50001/CDSDB","db2inst1","db2inst1");
// use a statement to gather data from the database
Statement st = db2Conn.createStatement();
String myQuery = "SELECT * FROM CDSSCHEMA.ACL_ADMIN";
// execute the query
ResultSet resultSet = st.executeQuery(myQuery);
// cycle through the resulSet and display what was grabbed
while (resultSet.next())
{
String name = resultSet.getString("USER_NAME");
String id = resultSet.getString("USER_ID");
System.out.println("User Name: " + name);
System.out.println("User ID: " + id);
System.out.println("-------------------------------");
}
// clean up resources
resultSet.close();
st.close();
db2Conn.close();
}
catch (ClassNotFoundException cnfe)
{
cnfe.printStackTrace();
}
catch (SQLException sqle)
{
sqle.printStackTrace();
}
}
}


Happy DB2 connectivity :)
Reference : [1]

Read more


XML data to objects/classes JAVA parsing (Data binding - JIBX)

XML file parsing using JIBX tool - XML Data binding to Objects

Some times we may require to parse a given XML file to populate the data in objects.
So here the only source we have is a sample XML file, nothing else not even a xsd file available.
Requirement description :
You are given just one sample XML file which needs to be parsed and populate the data from XML file to java class objects.
There is no XSD (XML schema definition) file available.
Sample XML file contents :

Solution :
 The solution I followed for this is using the jibx tool to reduce the code burden.
 JIBX is one of the best xml parsing tool for xml data binding.

So all we need to do; to use jibx tool we have to do the below mentioned 5 steps.
1. Analyze the sample.xml
2. write the binding.xml.
3. Write the classes identified.
4. Compile using build.xml.
5. Write main method to parse the xml file and show the data.

Analyze the sample.xml :
Read carefully and observe the pattern of data it contains.
Example below
<?xml version="1.0" encoding="UTF-8"?>
<results
        xmlns="urn:www-collation-com:1.0"
        xmlns:coll="urn:www-collation-com:1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:www-collation-com:1.0
              urn:www-collation-com:1.0/results.xsd">

    <ComputerSystem array="1" guid="0A59DB143A8B3B0F9385FE6A3E0BE095" xsi:type="coll:com.collation.platform.model.topology.sys.sun.SunSPARCUnitaryComputerSystem">
        <fqdn>islrpbssn03.in.ibm.com</fqdn>
        <type>ComputerSystem</type>
        <OSRunning guid="8B9EF833438F3F769DF1C6B6F8EB6704" xsi:type="coll:com.collation.platform.model.topology.sys.sun.Solaris">
            <OSConfidence>100</OSConfidence>
            <OSName>SunOS</OSName>
            <OSVersion>5.10</OSVersion>
            <OSMode>64-bit sparcv9 applications,    vis2 vis ,32-bit sparc applications,    vis2 vis v8plus div32 mul32</OSMode>
        </OSRunning>
        <ipInterfaces array="1"
            guid="B0DB02C0C1D03E248FCCF97D3744EFDF"
            lastModified="1270881893121"
            parent="0A59DB143A8B3B0F9385FE6A3E0BE095" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="0188E1E8633E3F5C849E2454ED7F92A2" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="3856A334B3D6306E9A2C5CEC97357808" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="1FF6C43DFD7A3D658939894CD2840FBB" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>9.126.85.190</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="2"
            guid="4CE10626AD1F35879F2BFEFB911C0596"
            lastModified="1270881893058"
            parent="0A59DB143A8B3B0F9385FE6A3E0BE095" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="A5B55BF06F4F3568B0A3A08566776E34" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="C8538176AA8435568BAE99C81BDEFADE" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>127.0.0.1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
    </ComputerSystem>


    <ComputerSystem array="2" guid="1AE1BAE9EA5F37E3891BA093962E80D2" xsi:type="coll:com.collation.platform.model.topology.sys.linux.LinuxUnitaryComputerSystem">
        <fqdn>islrpbeixn50.in.ibm.com</fqdn>
        <type>ComputerSystem</type>
        <OSRunning guid="70081092A0FB3F3CBF28A93850781F8B" xsi:type="coll:com.collation.platform.model.topology.sys.linux.Linux">
            <OSConfidence>100</OSConfidence>
            <OSName>Linux</OSName>
            <OSVersion>SUSE Linux Enterprise Server 10 (i586)</OSVersion>
            <OSMode>64-bit</OSMode>
        </OSRunning>
        <ipInterfaces array="1"
            guid="C1E26AF496CB3E6898D4C681E7D4890F"
            lastModified="1271145535996"
            parent="1AE1BAE9EA5F37E3891BA093962E80D2" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="BBF92BDB2A9333B999AA5D1F3D2D7DB2" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="29D627F80C0635BD9FAD32842E97EC4B" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>0:0:0:0:0:0:0:1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="2"
            guid="364EF12203853318BCAF2BE2DB279B67"
            lastModified="1271145535918"
            parent="1AE1BAE9EA5F37E3891BA093962E80D2" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="A5B55BF06F4F3568B0A3A08566776E34" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="29D627F80C0635BD9FAD32842E97EC4B" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>127.0.0.1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="3"
            guid="99FE67EE21B733D18D730D9EB9668D9C"
            lastModified="1271145535964"
            parent="1AE1BAE9EA5F37E3891BA093962E80D2" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="8ABCC5879A4532DFAE9E8341D10F01B6" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="802D599BA72A3C84A78B2123F0E6DBB2" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>fe80:0:0:0:20e:cff:fe67:5433</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="4"
            guid="BA733238179833AD91D43E542B9F93CC"
            lastModified="1271145535980"
            parent="1AE1BAE9EA5F37E3891BA093962E80D2" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="DB0FFF95E752314596831ACC9A0FC100" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="802D599BA72A3C84A78B2123F0E6DBB2" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>9.184.66.239</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
    </ComputerSystem>


    <ComputerSystem array="3" guid="5DB5CC25116C39C484C69F4330FEFF86" xsi:type="coll:com.collation.platform.model.topology.sys.aix.AixUnitaryComputerSystem">
        <fqdn>islrpbixv06.in.ibm.com</fqdn>
        <type>ComputerSystem</type>
        <OSRunning guid="6CD3AF45BE603572ABF97B4B1D261D96" xsi:type="coll:com.collation.platform.model.topology.sys.aix.Aix">
            <OSConfidence>100</OSConfidence>
            <OSName>AIX</OSName>
            <OSVersion>5.3.0.0</OSVersion>
            <OSMode>64-bit</OSMode>
        </OSRunning>
        <ipInterfaces array="1"
            guid="E518A4B9197138D0AB7A5671A7897A77"
            lastModified="1270881954418"
            parent="5DB5CC25116C39C484C69F4330FEFF86" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="A5B55BF06F4F3568B0A3A08566776E34" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="2038D4670E123063A7668E8AB92761C2" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>127.0.0.1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="2"
            guid="ADDB51DDC2B73109ACD8374768D17BBE"
            lastModified="1270881954214"
            parent="5DB5CC25116C39C484C69F4330FEFF86" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="1832ABD3CD2D31E586A8FA14542B5C44" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="3FE22AF17C5F309CAB28E4C3FDBACB76" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="D8AC8F9F2A8433149A5CA169F466AAE4" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>9.122.166.118</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="3"
            guid="529EED8B732333188CFD3490DA1922C5"
            lastModified="1270881953980"
            parent="5DB5CC25116C39C484C69F4330FEFF86" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="BBF92BDB2A9333B999AA5D1F3D2D7DB2" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="2038D4670E123063A7668E8AB92761C2" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>0:0:0:0:0:0:0:1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
    </ComputerSystem>


    <ComputerSystem array="4" guid="6E4C78F0B9463420ADBC21A2658AA22A" xsi:type="coll:com.collation.platform.model.topology.sys.linux.LinuxUnitaryComputerSystem">
        <fqdn>rt4.in.ibm.com</fqdn>
        <type>ComputerSystem</type>
        <OSRunning guid="41693E27B5123A56B946B3DAA7153246" xsi:type="coll:com.collation.platform.model.topology.sys.linux.Linux">
            <OSConfidence>100</OSConfidence>
            <OSName>Linux</OSName>
            <OSVersion>Red Hat Enterprise Linux Server release 5.2 (Tikanga)</OSVersion>
            <OSMode>64-bit</OSMode>
        </OSRunning>
        <ipInterfaces array="1"
            guid="BD81B78B00F431F28E45B9903C673FE4"
            lastModified="1270881834871"
            parent="6E4C78F0B9463420ADBC21A2658AA22A" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="A5B55BF06F4F3568B0A3A08566776E34" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="18F19B1E5BCF33D8B294658B89623E3A" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>127.0.0.1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="2"
            guid="361035ED31F73386A96E01DB59CF2377"
            lastModified="1270881834761"
            parent="6E4C78F0B9463420ADBC21A2658AA22A" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="D4B04242C8063DD0A15FC4FA539C2886" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="C729C2ED74793124B410B3E08FC4F366" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="F9307994411B350DBCA8C2BD4C983BC8" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>9.184.64.244</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="3"
            guid="618CE77DCA1630728FE9F975F5D92E34"
            lastModified="1270881834839"
            parent="6E4C78F0B9463420ADBC21A2658AA22A" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="BBF92BDB2A9333B999AA5D1F3D2D7DB2" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="18F19B1E5BCF33D8B294658B89623E3A" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>0:0:0:0:0:0:0:1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="4"
            guid="D0C5FD62F70D39D79517C5957A08C012"
            lastModified="1270881835058"
            parent="6E4C78F0B9463420ADBC21A2658AA22A" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="D4E59986D65530F49E2882A857002FF3" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="F9307994411B350DBCA8C2BD4C983BC8" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>fe80:0:0:0:250:56ff:feac:255f</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
    </ComputerSystem>


    <ComputerSystem array="5" guid="9AB5DEF9F5FD3DADA2616230B605A250" xsi:type="coll:com.collation.platform.model.topology.sys.linux.LinuxUnitaryComputerSystem">
        <fqdn>rt3.in.ibm.com</fqdn>
        <type>ComputerSystem</type>
        <OSRunning guid="C75FD5FBA18D31C0ADD033BB84254600" xsi:type="coll:com.collation.platform.model.topology.sys.linux.Linux">
            <OSConfidence>100</OSConfidence>
            <OSName>Linux</OSName>
            <OSVersion>Red Hat Enterprise Linux Server release 5.2 (Tikanga)</OSVersion>
            <OSMode>64-bit</OSMode>
        </OSRunning>
        <ipInterfaces array="1"
            guid="006D494967D035D4BE14AB9BA9B35535"
            lastModified="1270881877402"
            parent="9AB5DEF9F5FD3DADA2616230B605A250" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="EDC5FDD18141344E8C38D0634DB3384E" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="F739F58377043960813E3F1DFFEF9F79" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>fe80:0:0:0:250:56ff:feac:3d65</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="2"
            guid="934DDB05B9873AE696C77F8AFE6E52A7"
            lastModified="1270881877668"
            parent="9AB5DEF9F5FD3DADA2616230B605A250" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="BBF92BDB2A9333B999AA5D1F3D2D7DB2" xsi:type="coll:com.collation.platform.model.topology.net.IpV6Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="693C859D351830E1AE777C9025B500A6" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>0:0:0:0:0:0:0:1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="3"
            guid="7A0CAE72A3663716AB1232D870D80EDE"
            lastModified="1270881877589"
            parent="9AB5DEF9F5FD3DADA2616230B605A250" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="A5B55BF06F4F3568B0A3A08566776E34" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="91E4DC01B2B93F1C9733720535C3250A" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="693C859D351830E1AE777C9025B500A6" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>127.0.0.1</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
        <ipInterfaces array="4"
            guid="91CD76C8B641385B97EFA94772ABB624"
            lastModified="1270881877652"
            parent="9AB5DEF9F5FD3DADA2616230B605A250" xsi:type="coll:com.collation.platform.model.topology.net.IpInterface">
            <ipAddress guid="5F42ACC1D9363EB6920C240A4FC1ACE2" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Address"/>
            <ipNetwork guid="C729C2ED74793124B410B3E08FC4F366" xsi:type="coll:com.collation.platform.model.topology.net.IpV4Network"/>
            <l2Interface guid="F739F58377043960813E3F1DFFEF9F79" xsi:type="coll:com.collation.platform.model.topology.net.L2Interface"/>
            <displayName>9.184.64.243</displayName>
            <bidiFlag>3</bidiFlag>
        </ipInterfaces>
    </ComputerSystem>
</results>


binding.xml :
Create binding.xml file by analyzing the given xml file is the crucial part of this solution.
The documentation provided will help in writing binding.xml file for your requirement. see below binding.xml for the above sample.xml. If at all we have xsd file as well it would be easy to write the binding.xml. And we can understand the ways of writing this binding.xml by looking at most possible examples explained in jibx site.

<binding>
    <mapping name="results" class="com.ibm.xmlbind.Results">
        <collection field="computerSystems"
            item-type="com.ibm.xmlbind.ComputerSystem" />
    </mapping>
    <mapping name="ComputerSystem"
        class="com.ibm.xmlbind.ComputerSystem">
        <value name="fqdn" field="fqdn" />
        <value name="type" field="type" />
        <value name="guid" style="attribute" field="guid" />
        <structure name="OSRunning" field="osRunning" usage="optional">
            <value name="OSConfidence" field="osConfidence" usage="optional"/>
            <value name="OSName" field="osName" usage="optional"/>
            <value name="OSVersion" field="osVersion" usage="optional"/>
            <value name="OSMode" field="osMode" usage="optional"/>
        </structure>
        <collection field="ipInterfaces"
            item-type="com.ibm.xmlbind.IPInterfaces" />
    </mapping>
    <mapping name="ipInterfaces" class="com.ibm.xmlbind.IPInterfaces">
        <value name="ipAddress" field="ipAddress" usage="optional"/>
        <value name="ipNetwork" field="ipNetwork" usage="optional"/>
        <value name="l2Interface" field="l2Interface" usage="optional"/>
        <value name="displayName" field="displayName" usage="optional"/>
        <value name="bidiFlag" field="bidiFlag" usage="optional"/>
    </mapping>
</binding>

Creating the classes :
By closely observing the xml file we have to write the classes and their setter and getter methods.
See the classes identified for the above sample.xml below ...

ComputerSystems.java :
package com.ibm.xmlbind;

import java.util.ArrayList;

public class ComputerSystem {

    private String fqdn;

    private String type;

    private String guid;

    private OSRunning osRunning;

    private ArrayList ipInterfaces;

    public String getFqdn() {
        return fqdn;
    }

    public void setFqdn(String fqdn) {
        this.fqdn = fqdn;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public OSRunning getOsRunning() {
        return osRunning;
    }

    public void setOsRunning(OSRunning osRunning) {
        this.osRunning = osRunning;
    }

    public ArrayList getIpInterfaces() {
        return ipInterfaces;
    }

    public void setIpInterfaces(ArrayList ipInterfaces) {
        this.ipInterfaces = ipInterfaces;
    }

    public String getGuid() {
        return guid;
    }

    public void setGuid(String guid) {
        this.guid = guid;
    }

}
IPinterfaces.java:
package com.ibm.xmlbind;

public class IPInterfaces {

    private String ipAddress;

    private String ipNetwork;

    private String l2Interface;

    private String displayName;

    private String bidiFlag;

    public String getBidiFlag() {
        return bidiFlag;
    }

    public void setBidiFlag(String bidiFlag) {
        this.bidiFlag = bidiFlag;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getL2Interface() {
        return l2Interface;
    }

    public void setL2Interface(String interface1) {
        l2Interface = interface1;
    }

    public String getIpNetwork() {
        return ipNetwork;
    }

    public void setIpNetwork(String ipNetwork) {
        this.ipNetwork = ipNetwork;
    }

}
OSRunning.java:
package com.ibm.xmlbind;

public class OSRunning {
    private String osConfidence;

    private String osName;

    private String osVersion;
   
    private String osMode;

    public String getOsMode() {
        return osMode;
    }

    public void setOsMode(String osMode) {
        this.osMode = osMode;
    }

    public String getOsConfidence() {
        return osConfidence;
    }

    public void setOsConfidence(String osConfidence) {
        this.osConfidence = osConfidence;
    }

    public String getOsName() {
        return osName;
    }

    public void setOsName(String osName) {
        this.osName = osName;
    }

    public String getOsVersion() {
        return osVersion;
    }

    public void setOsVersion(String osVersion) {
        this.osVersion = osVersion;
    }

    @Override
    public String toString() {
        return "OSConfidence : " + osConfidence + " -- " +
        "OSName : " + osName + " -- " +
        "OSVersion : " + osVersion + " -- " +
        "OSMode : " + osMode;       
    }
   
   

}
Results.java :
package com.ibm.xmlbind;

import java.util.ArrayList;

public class Results {
   
    private ArrayList computerSystems;

    public ArrayList getComputerSystems() {
        return computerSystems;
    }

    public void setComputerSystems(ArrayList computerSystems) {
        this.computerSystems = computerSystems;
    }
   
   
}

Compiling :
once binding.xml and the classes are ready it is required to compile those to map the classes and XML tags.
For compiling this we can use the sample build.xml shown below.
build.xml :
<?xml version="1.0"?>
<project name="xmlbind" default="compile" basedir="..">
    <property name="root-dir" value="${basedir}/Build" />
    <property name="lib" value="${root-dir}/lib" />
    <property name="binding-file" value="${basedir}/binding.xml" />
    <target name="setclasspath">
        <path id="bindpath">
            <pathelement location="${root-dir}" />
            <pathelement location="${basedir}/bin" />
            <pathelement location="${lib}/jibx-bind.jar" />
            <pathelement location="${lib}/bcel.jar" />
            <pathelement location="${basedir}/lib/jibx-run.jar" />
            <pathelement location="${basedir}/lib/xpp3.jar" />
        </path>
    </target>
    <!-- Delete class files for a single example -->
    <target name="clean">
        <delete quiet="true">
            <fileset dir="${basedir}/bin" includes="**/JiBX_*.class" />
        </delete>
    </target>

    <!-- Create Binding classes -->
    <target name="compile" depends="clean,setclasspath">
        <java classname="org.jibx.binding.Compile" fork="yes" dir="${root-dir}" failonerror="true">
            <classpath refid="bindpath" />
            <arg value="${binding-file}" />
        </java>
    </target>
    <!-- Generate classes and binding.xml for given xsd file -->
    <target name="run-bind" depends="setclasspath">
        <java classname="" fork="yes" dir="${root-dir}" failonerror="true">
            <classpath refid="bindpath" />
            <arg value="${binding-file}" />
        </java>
    </target>
</project>


 
Main methods to parse XML file:
The below sample code parses the given XML file and prints the data in the objects.
package com.ibm.test;

import java.io.FileInputStream;

import org.jibx.runtime.*;

import com.ibm.util.Utils;
import com.ibm.xmlbind.*;

public class BindTest {
    public static void main(String[] args) throws Exception {
        IBindingFactory bfact = BindingDirectory.getFactory(Results.class);
        IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
        Results obj = (Results) uctx.unmarshalDocument(new FileInputStream(
                Utils.removeXMLNamespaces("sample.xml")), null);
        for (int i = 0; i < obj.getComputerSystems().size(); i++) {           
            System.out.println("ComputerSystem : " + (i+1));
            System.out.println("--------------------------------------------");
            print((ComputerSystem) obj.getComputerSystems().get(i));
        }
        }
       
   
    private static void print(ComputerSystem sys) {
        System.out.println("  GUID of this Computer system: " + sys.getGuid());
        System.out.println("  fqdn : " + sys.getFqdn());
        System.out.println("  type : " + sys.getFqdn());
        System.out.println("  OSRunning : " + sys.getOsRunning());
       
    }
}
Folder structure in the Eclipse workspace:

Read more


Telugu Film stars Twitter updates on single page Tollywood

Tollywood / Telugu Film stars on Twitter ...Their updates on single page ... Enjoy 


Telugu film celebrity feeds on Twitter

Nagarjuna Akkineni


    follow Nagarjuna on Twitter

    Mahesh Babu

      follow Mahesh Babu on Twitter


      Siddharth

        follow Siddharth on Twitter

        Sumanth

          follow Sumanth on Twitter

          Vishnu Manchu

            follow Vishnu Manchu on Twitter


            RaNa Daggubati

              follow RaNa Daggubati on Twitter


              Nikhil

                follow Nikhil on Twitter

                Rahul (Tyson)

                  follow Rahul (Tyson) on Twitter

                  Trisha

                    follow Trisha on Twitter


                    Genelia

                      follow Genelia on Twitter


                      Swati

                        follow Swati on Twitter

                        Richa Gangopadhyay

                          follow Richa Gangopadhyay on Twitter

                          Priya Anand

                            follow Priya Anand on Twitter


                            Lakshmi Manchu

                              follow Lakshmi Manchu on Twitter


                              Smita

                                follow Smita on Twitter

                                Allu Sirish

                                  follow Allu Sirish on Twitter

                                  Idlebrain.com updates (Jeevi)

                                    follow Jeevi on Twitter


                                    Courtesy : http://www.idlebrain.com/twitter/index.html

                                    Read more


                                    Sekhar Kammula - A Soothing director

                                    Sekhar Kammula- A Soothing director
                                    Sekhar Kammula C/O Simple and Kool movies


                                    The day I saw Sekhar kammula in my life for the first time was on TV, that day I never forget for sure.I think that was for a success interview for his debut movie "Anand". During his interview one line told by him was the only reason for my admiration for his movies.The line he told was "I was born and brought up in a good family with just good thoughts for around 25 years, I don't think I can make bad out of it".I struck dumb for a movement;  our elders say "The way you brought up in childhood makes your next years in life".  During the close shots in that interview I observed Sekhar's erected ears; it immediately reminded me our Mahatma Gandhi. So my expectations and admiration has meaning; sure he will stand for good movies and good cause.That was the  movement I started believing Sekhar as one of the best directors we are going to see. And Yes; now we are the luckiest people to see his Simple and Kool movies from an adept director like Sekhar Kammula.

                                    The admiration for his movies has became almost like a free medicine for me, When I ever I see his movies I feel some kinda solace; may be it soothes the disturbances in mind/heart. He is not just a revolutionary director for Telugu Film industry (Tollywood) but he created a new era for all simple and cool movies. He has become a brand ambassador for feel good movies. People started calling those feel good movies as Sekhar kammula brand movies. What else is required for his efforts ? The way of picturising the scenes with decency and politeness is the unique formula which he knows and which he implements, for which we applaud. He has proved that the movie success rate do not just depend only on commercial values of the film at box office for each of his ventures including his first trial "Dollar Dreams". Nevertheless he changed the whole perspective of Telugu audience.

                                    When first time I heard that he was a Engineering graduate who has finished his MS from US and also a little stint in IT , I realized his passion for movies. I heard many times from my friends who closely move in Telugu film industry about the honesty, simplicity and the way how he leads his life. His commitment and passion is just for making movies not for making money. Many times Sekhar refuses or ready to cut his remuneration when ever the movie budget increases; are you stupefied ? but it is fact that his passion for movies is infinite. He feels happy in making a good movie nothing else.


                                    Sekhar made us think about society, he gave us confidence that we can still expect movies with fine comedy and romance without sleaze, emotions without bloodshed, simple and soothing music without high number of high beats, messages which are not too long but are possible to implement and change the way they are. What else you are expecting in a good movie ?  At least once you might have imagine your behavior in any of Sekhar's movies/characters. Isn't it ? It is just because, he is keen in picturising the real life characters and situations in his movies and hence you will definitely see yourself in those characters.
                                    "Purity with clarity and decency with complacency is nothing but a Sekhar Kammula movie, These are simply console for souls "
                                    I think I need not say much more about Sekhar at this point ..I want to confess one thing here that I have all these kammula movies on my laptop and I regularly see them.
                                    Let me talk some thing about these fabulous movies
                                    2000     Dollar Dreams     - Director, writer and Producer     - National Award – Best First film Director
                                    2004     Anand             - Director, writer and Producer        - Nandi Awards – 6
                                    2006     Godavari         - Director and writer               - Nandi Awards – 5
                                    2007     Happy Days      - Director, writer and Producer        - Nandi Awards - 4,
                                                                                                                                 - Film-fare Awards South - 6
                                                                                                                                 - Dasari Best Film Director Award2007
                                    2010     Leader          - Director and writer                 - Yet to announce
                                     
                                    All of them are really deserving honors for Sekhar.
                                    Finally I have a Big wish to request all this article readers; "I would like to meet Sekhar Kammula in person at least once in life", So please help me to fulfill my dream. Don't know when my dream comes true.
                                    Cont ... PART - 2 More about his movies and the feelings

                                    Sekhar Kammula known for his magic to extract tenderness in his movies ...



                                    More references :
                                    http://shekarkammula.com/
                                    http://wapedia.mobi/en/Sekhar_Kammula
                                    http://en.wikipedia.org/wiki/Sekhar_Kammula
                                    http://www.hinduonnet.com/thehindu/thscrip/print.pl?file=2007082350180400.htm&date=2007/08/23/&prd=mp&
                                    Photos curtsey : http://oniondosa.blogspot.com/2007/08/sekhar-kammula-happy-days-photos.html
                                    http://www.ragalahari.com/stars/interviews/184/sekhar-kammula-talks-about-anand.aspx
                                    http://www.idlebrain.com/celeb/interview/sekharkammula2.html
                                    http://www.idlebrain.com/celeb/interview/sekharkammula-leader.html

                                    Read more


                                    ETV Dhee 4 - D4 Ladies special - Keep dancing

                                    Ladies special reality dance show ETV Dhee 4.
                                    Dhee 4 - Keep Dancing
                                    ETV's prestigious reality dance show Dhee is successful since 3 years, ETV now launching it's 4th venture ETV Dhee 4 - which is completely ladies special. Specials for this show are going to be so many specials, but the biggest mania for this show is going to be "Shreya" as brand ambassador for this show.
                                    Rambha as one among the judges. As usual there is going to be six choreographers and six contestants in this show as well. All going to be very exciting to entertain the small screen lovers. The best part of this episode is that the logo designed for this Dhee 4 show. The 4 number turned into Telugu letter dhee is simply cool looking with good colors and it is so attractive.
                                    And importantly anchor Undhaya Bhanu is continuing as anchor for this show which I feel a must for this show. I can't imagine any body else in place of lovely Bhanu. Keep rocking Bhanu !! For ETV Dhee 1, 2 and 3 titles Prabhu Deva was brand ambassador and people were happy to see him on all the finals of these shows.  Now people will get a chance to see Shreya and all his glamor in their favorite show for sure and I myself so much excited to see this show.  Since these days after Dhee 3 is over, "Malle maala" production is conducting so many meets with people to know their interest and bests to make this show a mark-able one among the other competitive reality dance shows on the small screen.
                                    So be ready to watch the glamorous queens dance hungama !!
                                    BTW punch line for this Ladies special is "Keep Dancing ... "
                                    Let's wait till 28th April 2010 to watch the spectacular introductions for glamorous queens ...
                                    Old posts on ETV Dhee 1, 2, 3 << Click this

                                    July 7 2010 - ETV D4 Ladies special :
                                    Don't know why I lost interest on this show since some time, but this week I see; I felt so good about the show again. It was back to form. Rocking performances by contestants again.
                                    S.No         Masters           Contestants
                                    1.              Sujatha             Monika
                                    2.              Uma                  Anusha
                                    3.              Poppy                Mounika
                                    4.              Selvi                  Bhavya, Sail Pallavi
                                    5.              Santhi               Eshwari
                                    6.              Sendamalai         Anita

                                    Reference : [1] [2]

                                    Read more

                                    Popular Posts

                                    Enter your email address:

                                    Buffs ...

                                    Tags


                                    Powered by WidgetsForFree