ArrayList<Project> projectsList = new ArrayList<Project>();
DocData[] docType = context.getRegistryClient().findOGCEResource("",
ResourceType.Project.toString(), null);
for (DocData docData : docType) {
Project project = new Project();
if(docData.resourceID != null){
project.setId(docData.resourceID.toString());
}else{
project.setId(docData.resourcename);
}
project.setName(docData.resourcename);
project.setDescription(docData.resourcedesc);
project.setCreationDate(docData.created.toString());
projectsList.add(project);
}
if (projectsList.size() > 0) {
projects = projectsList.toArray(new Project[0]);