Import of RDF-Triple - HOW?

Hello,
i have some problem:
I have just installed Oracle 11g. Now, i want to upgrade the database so that I can import RDF-Triple of the type "N3" into my Database. My questions now are:
1. What do I have to do, to be able to import these triples? Is there any tutorial, that explaines, how I can upgrade for RDF-Import?
2. When I successfully upgraded my database, how can I import my triples? Can I import N3-TRIPLES or do I have to convert them?
It would be nice, if anyone can help me.
Chris

Hello guys,
I am trying to Import some N3-Triple to my Database.
I opened SQL*PLUS and logged in with user: 'SYSTEM'
First, I installed the RDF-stuff with SQL'PLUS by typing @catsem11i.sql;
Then, i did the following steps:
1) CREATE TABLESPACE rdf_tablespace
DATAFILE '/local/oracle/app/oracle/oradata/THESEUSDl/rdf_tablespace.dat' SIZE 1024M REUSE
AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED
SEGMENT SPACE MANAGEMENT AUTO;
2) EXECUTE SDO_RDF.CREATE_RDF_NETWORK('rdf_tablespace');
3) GRANT EXECUTE ON MDSYS.RDF_APIS_INTERNAL TO SYS;
4) CREATE TABLE RDF_DATA (id NUMBER, triple SDO_RDF_TRIPLE_S);
5) EXECUTE SDO_RDF.CREATE_RDF_MODEL('RDF', 'RDF_DATA', 'TRIPLE');
Well, then I took my littel Java-file for importing the triples:
here is my code:
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.sql.SQLException;
import oracle.spatial.rdf.client.jena.GraphOracleSem;
import oracle.spatial.rdf.client.jena.ModelOracleSem;
import oracle.spatial.rdf.client.jena.Oracle;
import oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler;
import com.hp.hpl.jena.graph.GraphUtil;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.util.FileManager;
public class Import {
     * @param args
     * @throws ClassNotFoundException
     * @throws SQLException
     * @throws IOException
     public static void main(String[] args) throws ClassNotFoundException,
               SQLException, IOException {
          PrintStream psOut = System.out;
          String tbs = "rdf_tablespace";
          int method = 1;
          String className = "oracle.jdbc.driver.OracleDriver"; // path of driver
          // class
          Class.forName(className); // Load the Driver
          String DB_URL = "jdbc:oracle:thin:@URL:1521:THESEUSDB"; // URL of database
          String DB_USER = "SYSTEM"; // database user id
          String DB_PASSWD = "secret_pw"; // database password
          String DB = "Oracle"; // database type
          // Create database connection
          Oracle oracle = new Oracle(DB_URL, DB_USER, DB_PASSWD);
          // darf nicht mit einer zahl anfangen
          String modelName = "onehoundred";
          // create or open the default model
          Model model = ModelFactory.createDefaultModel();
          GraphOracleSem graph = new GraphOracleSem(oracle, modelName);
          // read data
          String filename = "C:\\Path\\sp2b_100000.n3";
          InputStream is = FileManager.get().open(filename);
          // for n3 files
          model.read(is, "", "N3");
          is.close();
          ModelOracleSem modelDest = ModelOracleSem.createOracleSemModel(oracle,
                    modelName);
          GraphOracleSem g = modelDest.getGraph();
          g.dropApplicationTableIndex();
          //batch
               psOut.println("start batch load");
               ((OracleBulkUpdateHandler) g.getBulkUpdateHandler()).addInBatch(
                         GraphUtil.findAll(model.getGraph()), tbs);
               psOut.println("end size " + modelDest.size());
          g.rebuildApplicationTableIndex();
          modelDest.close();
          // Close the database connection
          oracle.dispose();
          System.out.println("Ready.");
I run it - it takes about 3 minutes - and the i get the following result:
start batch load
end size 100073
Ready.
So far, so good. But now, i have a little problem. If i look into my Database (with DBVisualizer) , i cannot find my imported triples...
I don't understand why. In my Java Code, I have "String tbs = "rdf_tablespace"" which I also created before with SQL*Plus. And in that tablespace should be my table "RDF_DATA", i guess. So do I understand anything wrong? Did I forget any step?
Who can help? I am very desperate right now :-)

Similar Messages

  • My iphone is broken,and i came to store to change a new one today. When I come home, I found I lost my backup and may be mistake is made during before backup.The information in my previous iphone is really important for me? how can I get the backup back?

    my iphone is broken,and i came to store to change a new one today. When I come home, I found I lost my backup and may be mistake is made during before backup.The information in my previous iphone is really important for me? how can I get the backup back?

    If you don't have a backup then the only possible solution is to go back to the store and see if they can get your old phone and create a backup of that. I know very often that Apple employees will wipe the returned iPhones clean before shipping them back to wherever they ship them.
    When you say your old phone was "broken" does this mean it is dead and won't turn on?
    Do you have a Time Machine backup of your computer, or a clone that might have this info on it?
    Other than that I hate to say you may be out of luck. Time Machine and/or a cloning program performed regularily will inevitably save your a** in situations like this.
    Good luck
    PM

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • I don´t get the option in itunes to import photos from iphoto, how can I get my photos in my ipad?

    I don´t get the option in itunes to import photos from iphoto, how can I get my photos in my ipad?

    So you don't see this and you cannot navigate to it when you select Choose Folder from there drop down menu?

  • I just upgraded to iOS 7 and I realized that the "Completed" tasks folder in the "Reminders" application was erased. I had important information there. How can I recover my completed tasks and the dates the tasks were completed?.

    I just upgraded to iOS 7 and I realized that the "Completed" tasks folder in the "Reminders" application was erased. I had important information there. How can I recover my completed tasks and the dates the tasks were completed?.

    Restore from your iTune backup.

  • Flash CS6 cant open play SWF files without importing and destroying them, how can I get around this?

    Flash CS6 can't open play SWF files without importing and destroying them, how can I get around this?
    I'm just trying to preview an swf file in flash like I have with all previous versions.

    What if my SWF loads external content from an online server?
    Not only does the current flash player prohibit such activity, it doesn't even pop open an error anymore saying there was an error connecting to an online source.
    Normally, I would simply drag the SWF into Flash and all connections would go through.  I could see traces, errors, and experience no issues.
    Now I can't even do that.  So what then?  You have crippled a fundamental use of the program, but THANK GOD we have that deco brush that nobody asked for.
    And for the record, the nature of my work benefits from not necessarily allowing the Flash Player to connect to online content.  The error it pops up?  That's simply another method of error checking that I require.  Updating the Flash Player options is not an option.
    Why would you even remove this key feature from Flash anyways?  It's been there for years ... has the ratio of people importing SWFs (a rather useless gesture in an increasing OOP world) really outweighed the people using Flash as a testing environment that much?

  • Import Scenario from BPR - how to view the Version after import

    On SOLAR01 when you import scenarios from the BPR, how can you view the version of the Products that were imported? Sometimes in the BPR there are several versions available to import for a particular product.
    Once you have imported those business processes, how can you see the version that is tied to the one you imported?

    Helmut,
    If you don't have access to the server console, it might be possible to 'trick' tp into working from a workstation, but I wouldn't bet on it. You'd have to fake up a profile for it. I haven't tried this.
    Peering into the contents of a delivered transport file would be something that your Basis team would typically do. My suggestion is to work with them, either to use tp command-line option from the server console, or if that's not reasonable, then yes, go ahead and add it to the import queue of one of your sandbox systems. You can always delete it from the queue again later. If you don't actually import it, it isn't going to hurt anything.
    To do any of these options is going to require some level of filesystem access to your transport host, as you need to copy the two files that make up the transport there. You need to put the 'K' file into \usr\sap\trans\cofiles and the 'R' file into \usr\sap\trans\data. Then, you can either use the tp command-line tool, or you can go into STMS, go into the import queue of any system in the transport domain (so a sandbox is fine), and use Extras... Other Requests... Add and type in the transport request ID. Yes, this adds some entries about the transport into a few tables, but it doesn't actually import the transport, and it doesn't change anything about your system. It just allows the transport to show up as importable in the queue, and that will make it so that you can read the object list of the transport. Then, if you decide not to import it, you can delete it from the queue, and your system is back to the way it was before. Also, doing this will not put the transport into any other system's queue. Even if you import the transport (into a sandbox system), it won't show up in any other system's queue until you forward it.
    Regards,
    Matt

  • I cannot import music I bought from another site into iTunes.  The files are there but they won't import into Itunes.  How can I fix this?  Thanks!

    I cannot import music I bought from another site into iTunes.  The files are there but they won't import into Itunes.  How can I fix this?  Thanks

    What format are they in?
    What happens when you try?
    Have you tried placing a copy in the Automatically add to iTunes folder?
    tt2

  • We are using iPhoto '09 trying to import photos from  a memory card.  We stopped the import and ejected the card over 20 hours ago, but iPhoto says its still importing.  Any idea how long the import should run if there were 5000 photos on the card?

    We are using iPhoto '09 trying to import photos from  a memory card.  We stopped the import and ejected the card over 20 hours ago, but iPhoto says its still importing.  Any idea how long the import should run if there were 5000 photos on the card?

    Don't know how long it would take to import that many photos but if you stopped import and ejected the card ther is something else wrong here.
    I would Force Quit iPhoto. Then Restart your mac. Then restart iphoto to see if any or all of your photos were imported. If they ae you're good to go. If they were not imported I would try importing fewer photos at a time and see what happens.

  • I imported over 50 cds to my itunes account on my laptop. I subsequently got a new laptop with Windows 8. None of my imports are there. How do I get them on my new laptop?

    I imported over 50 cds to my itunes account on my laptop. I subsequently got a new laptop with Windows 8. None of my imports are there. How do I get them on my new laptop?

    See this migrate iTunes library post for background on moving your library across properly.
    tt2

  • Update on RDF Triple

    Hi,
    I have to update the set of triples.
    Is it possible to update the RDF Triple with update statement?
    I am not sure about the below syntax and statement (While trying the below statment getting an error ORA-00927: missing equal sign)
    example
    update articles_rdf_data a
    set a.triple.get_subject()='http://nature.example.com/test'
    where a.triple.get_subject()='http://nature.example.com/Article1';
    Please help me to find a solution to update triple
    Version: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    Regards,
    Kavitha.

    Try the following (used model name as 'M1', replace it as appropriate):
    update articles_rdf_data a
    set a.triple=sdo_rdf_triple_s('M1','http://nature.example.com/test',a.triple.get_property(),a.triple.get_obj_value())
    where a.triple.get_subject()='http://nature.example.com/Article1'
    or a.triple.get_subject()='<http://nature.example.com/Article1>';

  • When importing images in Pages, how do I set the default object placement to "stay on page" and "no text wrap"?

    when importing images in Pages, how do I set the default object placement to "stay on page" and "no text wrap"?

    Then use a Layout template.
    I am a designer and I use Word Processing templates with layout breaks and all the other tools available because Layout templates are just WP templates with a lot of options removed.
    Pages is not Indesign, but then Indesign is not Pages, …and Pages 5 is not Pages '09.
    Unless your flyers are for the Web, why are you using Pages at all?
    I am curious, what does your post have to do with the O.P.'s question? …and why are you posting it here?
    Peter

  • I opened a share account on a second laptop and imported my music.  How do I move my aps, contacts, etc for my ipon from the old computer to a new one?

    I opened a share account on a second laptop and imported my music.  How do I move all my apps, contacts,etc for my Ipod touch to the new computer?

    - Transfer iTunes purchases to the computer by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    - Connect the iPod to the computer and make a backup by right clicking on the iPod under Devices in Tunes and select backup
    - Restore the iPod from that backup.

  • I can't import the .MOV file .how to i use it??

    i can't import the .MOV file .how to i use it??

    You might need to tell us a bit more about your problem.  Do you mean you can't import a video file into Premiere, or your computer is having trouble playing Quicktime files?

  • HT2513 importing ical data stuck- how do I stop it?

    importing ical data stuck- how do I stop it?

    Greetings,
    1. First make an iCal backup:  Click on each calendar on the left hand side of iCal one at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    2. Go to iCal > Quit iCal
    3. Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache if present)
    --- NOTE: To get to "Home > Library" in Lion: Click anywhere on the desktop and then click on the "Go" menu at the top of the computer screen while holding down the "option" key on the keyboard.  You will see "Library" in the menu.
    4. Launch iCal and test.
    If the issue persists:
    1. Go to iCal > Quit iCal
    2. Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache if present)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    --- NOTE: Removing these files may remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    3. Launch iCal and test.
    Hope that helps.

Maybe you are looking for