예제 #1
0
 /**
  * Command line interface.
  *
  * @param args Does not take any arguments.
  */
 public static void main(String[] args) {
   try {
     Model model = ModelUtils.loadModel(ALL_KNOWN_UAPROF_PROFILES);
     new ProcessUAProfMetadata(model);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
예제 #2
0
  /** Constructor. */
  ProcessUAProfMetadata(Model model) throws IOException {
    this.profiles = new AllProfiles(model);
    createPropertiesFile(model);
    String additionalProfiles =
        FileUtils.readFileToString(new File("config/additionalprofiles.txt"));
    for (String additionalProfile : additionalProfiles.split("\n")) {
      profiles.addDeviceIfNotAlreadyKnown(additionalProfile);
    }
    queryGoogle();
    doWebCrawl();

    log.info("Writing out profile data");
    ModelUtils.writeModel(allProfileData.getModel(), Constants.ALL_PROFILES_RDF, "RDF/XML");
    ModelUtils.writeModel(model, Constants.ALL_KNOWN_UAPROF_PROFILES_OUTPUT, "N3");

    // print a summary statistic of how many UAProf profiles were found
    log.info("Processing statistics:");
    log.info(validProfiles + " valid profiles");
    log.info(invalidProfiles + " invalid profiles");
    log.info(unreachableProfiles + " unreachable profiles");
    log.info(invalidRDF + " profiles which were invalid RDF/XML");
    new CreateHTML(model, results);
  }