Blog

Robotic 2-axis Plotter

Posted by on Jul 6, 2012 in Blog, Technical | 0 comments

Team Spundhan celebrated at ‘Panchamrut’, Belgaum for the successful completion of internship by Harisha, Vishal and others from Maratha Mandal Engg. College Belgaum. The interns were working with Spundhan and have developed a Robot-Plotter as a part of their final year engineering project. The ‘Robot-Plotter’ with 3 axis and 2 dimensions has a lot of practical industry applicability and can be used for various factory-automation and process-automation projects. The team had a very good time with lots of fun and also serious thoughts about IT industry. Team Spundhan wishes Harisha, Vishal, Jyoti and others a very ‘Good Luck’ for their future careers and hope they will do some great contributions to the IT...

Read More

Creating XSD in Eclipse

Posted by on Jul 6, 2012 in Blog, Technical | 0 comments

Steps to create Xml Schema Definition (XSD). Create new project Right click on project .Goto New -> other Click on Xml and select Xml schema and click “Next” Select parent folder and enter file name and click “Finish” Open xsd file which you have created Right click on title “Elements” box ->Add Element Enter the element name Right click on “NewElement” – > set Type -> New A “Complex Type” element is an XML element that contains other elements and/or attributes. The “Simple Type” element is an XML element that specifies the constraints and information about the values of attributes Right click on Element type -> Add Element Enter element name . In the same way ,you can add multiple elements Right Click on Element type -> Add Attribute Right Click on Element and set multiplicity. Add new Elements, Attribute, Multiplicity in same...

Read More

EMF Modelling in Eclipse

Posted by on Jul 6, 2012 in Blog, Technical | 0 comments

Installation In Eclipse Update manager select “Modeling -> EMF-Eclipse Modeling Framework SDK” and “Modeling -> Ecore Tools”. Create Emf Model File / New / Project / Eclipse Modeling Framework / Empty EMF project Create Ecore Diagram File / New / Other / Ecore Tools / Ecore Diagram Name your “Domain File Name” Click on Eclass and click into the editor to create new class Click Eattribute to assign each object the attributes Select Ereferences to create reference between objects View Ecore diagram Close the dialog and open the file “name.ecore” Create EMF Generator Model Select “name.ecore” New / Other / Eclipse Modeling Framework / EMF Generator Model In Select a Model Importer -> Select “Ecore model” Select your model and press load Set the package Right-click on the root node of the genmodel and select “Generate Model Code” This will create the java implementation of the EMF model in project....

Read More

XML Parsing in Java

Posted by on Jun 25, 2012 in Blog, Technical | 0 comments

Parsing a xml file can be done easily by following the below explained Steps: Xml parsing using jdom Download “jdom-1.0.jar” Right click on “project”->Bulid Path-> Configure build path->Libraries ->Add External jar -> select “jdom-1.0.jar”. JDOM : JDOM is used for parsing, creating, manipulating, and serialising XML documents, it is a tree based Java api. JDOM represents an XML document as a tree composed of elements, attributes, comments, processing instructions, text nodes. SAXBuilder : SAXBuilder is class that builds a JDOM Document from file,stream,reader etc. Create a SAXBuilder object which is used to Build a JDOM document from files. SAXBuilder builder = new SAXBuilder(); File xml = new File(“sample.xml”); Document document = builder.build(xml); In JDOM, most navigation takes place through the methods of the Element class getRootElement() method is used to get root element of sample.xml file. Element rootElement = document.getRootElement(); The child elements of each Element are available in a “list”, returned by the getChildren() method List rootChild = rootNode.getChildren(); getChild() method is used to get single child element. rootElement.getChild(“first”);// specify name of a child element A List containing Attribute objects, one for each of the element’s attributes.The list is accessible through the getAttributes(). List attributeList = childElement.getAttributes(); getName() method is used to get attribute name and getValue() method is used to get attribute value. Iterator iterator = attributeList.iterator(); while (iterator.hasNext()) { Attribute attribute = (Attribute) iterator.next(); String name = attribute.getName(); String value =...

Read More