Package repository.relsys.domainmodel.ltool.pojos

Examples of repository.relsys.domainmodel.ltool.pojos.LearningToolCls


public class RelsysTest {

  public static void testEx() {

    LearningToolCls ltool = new LearningToolCls();
    ltool.setTitle("WordPress");

    GeneralInformation gi = new GeneralInformationCls();

    gi.setDescription("WordPress is ...");
    gi.setToolURL("http://www.wordpress.com");
    gi.setToolCost(ToolCostCls.FREE);
    gi.setToolAvailability(ToolAvailabilityCls.HOSTED);

    ltool.setGeneralInfo(gi);

    TechnicalInformation ti = new TechnicalInformationCls();
    ti.setLaunchedTime("12-01-2001");
    ti.setVersion("2.9");
    ti.registration(true);
    ti.isOpenSource(false);
    ti.addMD(MobileDeviceCls.BLACKBERRY);
    ti.addMD(MobileDeviceCls.ANDROID);
    ti.addMD(MobileDeviceCls.IPHONE);
    ti.addOS(OperetingSystemCls.LINUX);
    ti.addOS(OperetingSystemCls.WINDOWS);
    ti.addOS(OperetingSystemCls.MAC);

    ltool.setTechnicalInfo(ti);

    Collection<Feature> features = new LinkedList<Feature>();
    Blog blog = new BlogCls();
    ContactList folowers = new ContactListCls();
    features.add(blog);
    features.add(folowers);

    ltool.setFeatures(features);

    RelsysExportImport.export(ltool, "exportedXML.rdf", "RDF/XML");

    // RelsysExportImport.export(ltool, "exportedTURTLE.rdf", "TURTLE");
View Full Code Here


  }

  public static void testIm() {
    // LearningToolCls lt = RelsysExportImport.importLT("LTontology.rdf",
    // "RDF/XML");
    LearningToolCls lt = RelsysExportImport.importLT("exportedXML.rdf",
        "RDF/XML");
    RelsysExportImport.export(lt, "ImportedXML.rdf", "RDF/XML");
  }
View Full Code Here

  }

  public static void testJsonEx() {
    Collection<LearningTool> ltools = new LinkedList<LearningTool>();

    LearningToolCls ltool1 = new LearningToolCls();
    ltool1.setTitle("WordPress");

    GeneralInformation gi1 = new GeneralInformationCls();

    gi1.setDescription("WordPress is ...");
    gi1.setToolURL("http://www.wordpress.com");
    gi1.setToolCost(ToolCostCls.FREE);
    gi1.setToolAvailability(ToolAvailabilityCls.HOSTED);

    ltool1.setGeneralInfo(gi1);

    TechnicalInformation ti1 = new TechnicalInformationCls();
    ti1.setLaunchedTime("12-01-2001");
    ti1.setVersion("2.9");
    ti1.registration(true);
    ti1.isOpenSource(false);
    ti1.addMD(MobileDeviceCls.BLACKBERRY);
    ti1.addMD(MobileDeviceCls.ANDROID);
    ti1.addMD(MobileDeviceCls.IPHONE);
    ti1.addOS(OperetingSystemCls.LINUX);
    ti1.addOS(OperetingSystemCls.WINDOWS);
    ti1.addOS(OperetingSystemCls.MAC);

    ltool1.setTechnicalInfo(ti1);

    Collection<Feature> features = new LinkedList<Feature>();
    Blog blog = new BlogCls();
    ContactList folowers = new ContactListCls();
    features.add(blog);
    features.add(folowers);

    ltool1.setFeatures(features);

    LearningToolCls ltool2 = new LearningToolCls();
    ltool2.setTitle("Facebook");

    GeneralInformation gi2 = new GeneralInformationCls();

    gi2.setDescription("Facebook is ...");
    gi2.setToolURL("http://www.facebook.com");
    gi2.setToolCost(ToolCostCls.FREE);
    gi2.setToolAvailability(ToolAvailabilityCls.HOSTED);

    ltool2.setGeneralInfo(gi2);

    TechnicalInformation ti2 = new TechnicalInformationCls();
    ti2.setLaunchedTime("12-01-2001");
    ti2.setVersion("2.9");
    ti2.registration(true);
    ti2.isOpenSource(false);
    ti2.addMD(MobileDeviceCls.BLACKBERRY);
    ti2.addMD(MobileDeviceCls.ANDROID);
    ti2.addMD(MobileDeviceCls.IPHONE);
    ti2.addOS(OperetingSystemCls.LINUX);
    ti2.addOS(OperetingSystemCls.WINDOWS);
    ti2.addOS(OperetingSystemCls.MAC);

    ltool2.setTechnicalInfo(ti2);

    Collection<Feature> facefeatures = new LinkedList<Feature>();
    UserProfileManagement upm = new UserProfileManagementCls();
    SocialNetworking sn = new SocialNetworkingCls();
    SiteSearch ss = new SiteSearchCls();
    MultimediaHosting mh = new MultimediaHostingCls();
    InstantMessaging im = new InstantMessagingCls();
    CollaborativeTagging ct = new CollaborativeTaggingCls();

    facefeatures.add(upm);
    facefeatures.add(sn);
    facefeatures.add(ss);
    facefeatures.add(mh);
    facefeatures.add(im);
    facefeatures.add(ct);
    ltool2.setFeatures(facefeatures);

    ltools.add(ltool1);
    ltools.add(ltool2);

    try {
View Full Code Here

    try {
      Model m = ModelFactory.createDefaultModel();
      m.setNsPrefix("lt", "http://diplomski.nelakolundzija.org/LTontology.rdf#");
      Bean2RDF writer = new Bean2RDF(m);

      LearningToolCls lt = new LearningToolCls();
      lt.setTitle("WordPress");

      GeneralInformation gi = new GeneralInformationCls();
      gi.setDescription("WordPress is ...");
      gi.setToolURL("http://www.wordpress.com");

      TechnicalInformation ti = new TechnicalInformationCls();
      ti.setLaunchedTime("12-01-2001");
      ti.setVersion("2.9");
      ti.registration(true);
      ti.isOpenSource(false);

      Collection<Feature> features = new LinkedList<Feature>();
      Blog blog = new BlogCls();
      ContactList folowers = new ContactListCls();
      features.add(blog);
      features.add(folowers);

      lt.setFeatures(features);
      lt.setGeneralInfo(gi);
      lt.setTechnicalInfo(ti);

      writer.save(lt);

      m.write(new FileOutputStream("LearningTools.rdf"), "RDF/XML");
      m.write(System.out, "RDF/XML");
View Full Code Here

    }
  }
 
  public static LearningToolCls importLT(String fileName, String syntax){
   
    LearningToolCls ltool =null;
   
try
     
      InputStream is = new BufferedInputStream(new FileInputStream(fileName));
      Model m  = ModelFactory.createDefaultModel().
View Full Code Here

TOP

Related Classes of repository.relsys.domainmodel.ltool.pojos.LearningToolCls

Copyright © 2018 www.massapicom. 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.