function [ output_args ] = Tutorial5( input_args )
%TUTORIAL5 How to connect to the omero server and perform data management.

%create the JAVA object
omero = omeroconnect.Main;

%connect to the server as user X
omero.initConnectionDetails('cmpdartsvr1.cmp.uea.ac.uk', 'avondoj', 'avondo');

%now create a new Project
newproject = omero.createProject('A new Project', 'some text describing it');

%and a new Dataset
newdataset = omero.createDataset('A new Dataset', 'some text describing it');

%now attach the dataset to the project.
omero.attachDatasetToProject(newproject, newdataset);

%find some images to associate to the dataset
images = omero.getObjectsByTag('Image', 'Arabidopsis');

%attach the images
omero.attachImagesToDataset(newdataset, images);