Exemple #1
0
 @GET
 public GraphNode overviewPage() {
   MGraph resultGraph = new SimpleMGraph();
   GraphNode result = new GraphNode(new BNode(), resultGraph);
   result.addProperty(RDF.type, BACKUP.BackupAdminPage);
   result.addProperty(RDF.type, PLATFORM.HeadedPage);
   return result;
 }
Exemple #2
0
 public void importFile(File file) throws IOException {
   final FileInputStream fileInputStream = new FileInputStream(file);
   final InputStreamReader inputStreamReader =
       new InputStreamReader(fileInputStream, "iso-8859-1");
   // final FileReader fileReader = new FileReader(file);
   final BufferedReader in = new BufferedReader(inputStreamReader);
   final MGraph dataGraph = getDataGraph();
   // int abortCounter = 0;
   for (String line = in.readLine(); line != null; line = in.readLine()) {
     /*if (abortCounter++ > 10) {
     	break;
     }*/
     final GraphNode entry = new GraphNode(new BNode(), dataGraph);
     entry.addPropertyValue(RDFS.comment, line);
     final String[] tokens = line.replace('|', ';').split(";");
     /* Wey Andreas|Dr. med. Facharzt FMH für Allgemeinmedizin|
      * Bürenstrasse 2, 3296 Arch|[email protected]|be|allgemeinaerzte */
     entry.addPropertyValue(ADDRESSES.name, tokens[0]);
     entry.addPropertyValue(ADDRESSES.description, tokens[1]);
     entry.addPropertyValue(ADDRESSES.address, tokens[2]);
     if (!tokens[3].equals("")) entry.addPropertyValue(ADDRESSES.email, tokens[3]);
     entry.addPropertyValue(ADDRESSES.tel, tokens[4]);
     entry.addPropertyValue(ADDRESSES.fax, tokens[5]);
     entry.addPropertyValue(ADDRESSES.canton, tokens[6]);
     entry.addPropertyValue(ADDRESSES.category, tokens[7]);
     entry.addProperty(RDF.type, ADDRESSES.Address);
     addGeoPos(entry);
   }
 }