Package uk.ac.osswatch.simal.model

Examples of uk.ac.osswatch.simal.model.IProject.toXML()


  }
 
  @Test
  public void testProjectToXMLAfterImport() throws SimalRepositoryException {
    IProject project = SimalRepositoryFactory.getProjectService().getProject("http://jisc.ac.uk/project#10");
    String xml = project.toXML();
    assertTrue("There appears to be no project identifer in the returned XML", xml.contains("http://jisc.ac.uk/project#10"));
  }

}
View Full Code Here


  public void testGetProjectsById() throws SimalRepositoryException {
    IProjectService service = SimalRepositoryFactory.getProjectService();
    IProject project = service.getProjectById(testProjectID);
    assertEquals("Got incorect project by ID","Simal DOAP Test", project.getName());
   
    logger.debug("Project RDF is:\n" + project.toXML());
   
    String shortID = testProjectID.substring(testProjectID.lastIndexOf("-") + 1);
    project = service.getProjectById(shortID);
    assertEquals("Got incorect project by ID","Simal DOAP Test", project.getName());
  }
View Full Code Here

        e);
    }
   
    try {
      if (command.isXML()) {
        return project.toXML();
      } else if (command.isJSON()) {
        return project.toJSON();
      } else {
        throw new SimalAPIException("Unkown format requested - " + command);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.