Repository Interface

Tuesday, November 21, 2006

Project progress

We posted our final report in moodle.

We also uploaded the report in subversoin server.

The URL of the subversoin repository is :

svn://192.168.0.2/courses/2006/itm112-webtech-project/repositoryinterface
/releases/Repository Interface-final.pdf

We installed smartdraw and drew Use case diagram and activity diagram.

We completed the project report.

Monday, November 20, 2006

Project Report (15/11/06 to 19/11/06) update

We made an overall outline of our report.The rational rose software in our institute is not working.So we are trying to draw the Use case diagram and Activity diagrams using some other tools.

Yesterday(20/11/06) we submitted a draft to our guide.

Tuesday, November 14, 2006

Project progress

We have successfully connected to the svn server and browsed through the repositories.We also list the versions of directories and files and also displayed the details of authors who created the rep0sitories.We deployed our jsp and servlet files into apache tomcat server and tested it.We made a powerpoint presentation today.

Monday, November 13, 2006

Project Progress...

we are trying to connect the interface with the repository. Trying with a stand alone application program to connect the svn.

Friday, November 10, 2006

What we have done ......?

Project started during the end of september.

The problem was to develop a web based repository interface for browsing. Currently there are web based interfaces for browsing but they dont allow other users to have admin privilages, so that they can add and remove repositories. Our proposed system has these functionalities.

We started the work after some priliminary discussions with the guide. During the first phase we made a template for the web page. We are using XML as backend for storing the data and jdom API as XML parser.

Now we are working to connect the interface with the repository.

Wednesday, November 08, 2006

The following program will show you how to extract xml elements from an existing xml file.



import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;
import java.util.*;
import java.io.*;

public class repos
{


public static void main(String[] args) throws IOException{
repos b = new repos();
b.buildAndListDocument(args[0]);
}

public void buildAndListDocument(String filename) throws IOException{
try {
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(filename);
listElements(doc.getRootElement());
} catch (JDOMException e) {
e.printStackTrace();
}
}

private void listElements(Element e) {
System.out.println(e.getText()) ;

List c = e.getChildren();
for (Iterator i = c.iterator();i.hasNext();) {
Element n = (Element)i.next();
listElements(n);
}
}

}

Tuesday, November 07, 2006

The following program will create a XML file and write it intto disk.

import org.jdom.*;
import org.jdom.output.XMLOutputter;
import java.util.*;
import java.io.*;


public class repository
{

public static void main(String[] args)
{
Element root = new Element("repositories");
Document doc = new Document(root);


Element foo = new Element("repository1");
foo.setText("www.iiitmk.ac.in");
root.addContent(foo);

Element bar = new Element("repository2");
bar.setText("www.rajiv.com.");
root.addContent(bar);

try{
XMLOutputter outputter = new XMLOutputter();
FileOutputStream out = new FileOutputStream("repository.xml");

outputter.output(doc, out);
out.flush();
out.close();
}
catch (java.io.IOException e){
e.printStackTrace();
}
}
}

Project Progress

We had a meeting with our guide at 3pm.
According to his suggestions, we are making necessary changes.
Designed rest of the pages of repository interface.
The coding of repository.xml and user.xml is progressing.

Wednesday, November 01, 2006

The following program shows creating a xml document using JDOM API

import org.jdom.*;

public class example1
{
public static void main(String[] args)
{
Element root = new Element("myRootElement");
Document doc = new Document(root);
root.setText("This is a root element");
System.out.println(doc);
}
}


The file begins with the import of the JDOM package. Inside the main method, the code declares a variable of type Element (a JDOM class), and instantiates it by calling the Element constructor.

The Element class has multiple constructors. The simplest one takes a single String that becomes the name of the element.

constructor, passing in the new After creating an Element, a Document object is instantiate by calling the DocumentElement.Once the Document is created, the code sets some text content for the root element. Finally, the code prints out the Document object.

If you compile and run this code you should see these results:

[Document: No DOCTYPE declaration, Root is [Element: ]]

Doesn't it look like XML?

The reason is that when a document object is used in a String context ,the toString() method is called by default.For a document,this emits a somewhat verbose delineation of the object,which can be handy during debugging.