Access LinkedMDB offline [duplicate] - semantic-web

i want to query from Linked Movie Database at linkedmdb.org locally.
is there some rdf or owl version of it that can i download query locally instead of remotely
I tried to query it and got the following error:
org.openjena.riot.RiotException: <E:\Applications\linkedmdb-latest-dump\linkedmdb-latest-dump.nt> Code: 11/LOWERCASE_PREFERRED in SCHEME: lowercase is preferred in this component
org.openjena.riot.system.IRIResolver.exceptions(IRIResolver.java:256)
org.openjena.riot.system.IRIResolver.access$100(IRIResolver.java:24)
org.openjena.riot.system.IRIResolver$IRIResolverNormal.resolveToString(IRIResolver.java:380)
org.openjena.riot.system.IRIResolver.resolveGlobalToString(IRIResolver.java:78)
org.openjena.riot.system.JenaReaderRIOT.readImpl(JenaReaderRIOT.java:121)
org.openjena.riot.system.JenaReaderRIOT.read(JenaReaderRIOT.java:79)
com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:226)
com.hp.hpl.jena.util.FileManager.readModelWorker(FileManager.java:395)
com.hp.hpl.jena.util.FileManager.loadModelWorker(FileManager.java:299)
com.hp.hpl.jena.util.FileManager.loadModel(FileManager.java:250)
ServletExample.runQuery(ServletExample.java:92)
ServletExample.doGet(ServletExample.java:62)
javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

There's a claim that there is a download from this page. Haven't tried it myself, so I don't know whether it's fresh or not.

There is a dump in ntriples format at this address:
http://queens.db.toronto.edu/~oktie/linkedmdb/
If you want to query it you may upload the dump files onto one local triple store such as 4store or jena (using the relational support). Other libraries and tools are available, depending on the language you're more familiar with.
If you need more information let me know.

Related

Load OpenStreetMap data into Virtuoso

How can I load data from OpenStreetMap of a particulat area (e.g. Berlin) into the (open source) Virtuoso triple store which runs on my local computer (Ubuntu)?
I tried to download the particular OSM file and access it with sparqlify in order to convert it to RDF (or turtle etc.), which then later (at least that was my idea) could be loaded to Virtuoso using the bulk loading strategy. That did not work.
I would be happy if you could tell me if there is any other alternative how I could convert the osm files into RDF.... or, if there is a totally different approach?!
I also thought about using apache jena within Java to access the linkedgeodata access point directly, however, I guess having the data locally gives me much more performance at a later point when I run SPARQL commands.
Cheers

What is the significance of data-config.xml file in Solr?

and when shall I use it? How is it configured can anyone please tell me in detail?
The data-config.xml file is an example configuration file for how to use the DataImportHandler in Solr. It's one way of getting data into Solr, allowing one of the servers to connect through JDBC (or through a few other plugins) to a database server or a set of files and import them into Solr.
DIH has a few issues (for example the non-distributed way it works), so it's usually suggested to write the indexing code yourself (and POST it to Solr from a suitable client, such as SolrJ, Solarium, SolrClient, MySolr, etc.)
It has been mentioned that the DIH functionality really should be moved into a separate application, but that hasn't happened yet as far as I know.

SQL Database in GitHub

I am building a Java app that uses an SQLite database to hold most of its data. For the end-user, the database would be almost entirely read-only, with very occasional edits. I'll (theoretically) be displaying/distributing it through my GitHub page, so my question is:
What's the best way to load the database into GitHub? (I'm using IntelliJ with DataGrip.)
I'd prefer to be able to update the database when I commit/push, instead of having to overwrite the whole file. The closest question I can find is How to include MySQL database schema on GitHub? but there could potentially be hundreds or thousands of entries, so I can't just rebuild the tables when the user installs the app.
I'm applying for entry-level developer jobs, and this project is going to be my main portfolio piece during job-hunting. I'm trying to make sure it is not only functional but also makes a good impression. Any help is (very) greatly appreciated.
EDIT:
After moving my .db file into the folder connected to GitHub (same level as my src folder) apparently I can now commit/push it with the rest of my files. How do I make sure that the connection from my Java code to the database stays valid once it is loaded onto another user's system? Can I just stick with
connection = DriverManager.getConnection("jdbc:sqlite:mydatabase.db");
or do I need to rework the path?
Upon starting, if your application can't find a corresponding sqlite database file, have it create one. Then do initial load of your tables from either CSV, JSON or XML files.
You can upload these files to Git, as they are text formats.

How do I access SQL from XPages

What is the process to access data from a SQL data source and have it fill in a list box control so that the user may select one of the values?
I have been given the name of the database and server, the login ID and password.
Code samples would really be appreciated as I have never done any SQL coding.
The latest Extension Library on OpenNTF ( extlib.openntf.org ) has a whole bunch of Relational Database extensions.
You'll need to get the JDBC drivers for whatever SQL server your going to be accessing and then take a look at the ExtLib demo application on how to create the JDBC connector from your application. Once the connector is in place you can then just the new controls in ExtLib to easily create a view pane etc.
You will also need more then the SQL server, username and password, you'll need to find out the different tables that you'll be accessing so that you can reference them from your Xpages application.
I've created a video showing JDBC access from XPages: http://www.youtube.com/watch?v=p6oRCsTsVqc
Wait for the book that will e released soon about the extlib. I know Jeremy hodge wrote the chapter so you might be able to get some info from him.
From an answer I gave earlier: you might want to check out the blog post announcing the JDBC support . It has an excellent video explanation and a link to a slide deck.
Also, take a look at Xpages101 lesson 61. It's paid-for content, but well worth it if you're serious about Xpages development.
If you want to combine Upgrade Pack 1 (UP1) with the Extension Library JDBC parts, then make sure to use the Extension Library that matches exactly the UP1 version. This is version 853-20111215 of the Extension Library. Then you can use the update site method to only deploy the experimental parts of the Extension Library (com.ibm.xsp.extlibx.feature_8.5.3.20111215-0914.jar).
For newer releases of Extension Library things might (will) have changed so that UP1 and Extension Library can not work together.
When UP2 is released, you need to remove the Extension Library package and deploy UP2. At that point in time UP2 might contain the JDBC support.
Roy,
As the previous posters put the ext library stuff will make it a little more "Drag and Drop", but you can use regular JDBC connection to get the data you want, Its pretty simple, but a lot more code than using Domino as a backend. You might want to look at this John Mackey blog post about doing a very similar thing...http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G9GT4
Keep in mind that you need the actual ext. library for this. The upgrade pack does not contain the JDBC stuff.
Edit:
Keep in mind that if you don't need "LIVE" data access, and the information you want is fairly static you could always just use a lotusscript agent to pull the data down into Notes Documents. Run that once a day or whatever. No fancy XPages stuff needed. That's fairly common coding and practices with examples available.
Then just have the list box pull from the documents you brought down.

Store data(strings) in database

I have a Vector < String >. Now i want to store those Strings in database. But i have one "but"! The program user mustn't install anything else except J2RE, he will just copy program to his computer and run. Does java has such kind of database?
P.S. Previously i think about object serialization or just simple text\xml file but according to the task it must be database... So user just copy my program and run, without installing any additional software, except J2RE.
I think HSQLDB is the right choice for your problem. You just need the HSQLDB JAR in your classpath and then use the file-based database configuration
You can embed Apache Derby in your application. This will run on a JRE installation.
The only thing I know of is JavaDB, but I don't know if that's included in J2RE.
For more info on JavaDB see JavaDB
Edit
After reading on the JavaDB site it seems it's only included in the JDK, which I assume would be not sufficient for you.
Why the requirement for a database? You have 1 Vector - is there any other data that is linked to each String? If you just have to search for Strings in the Vector, you can do that without a database. Ordering the list, searching for substring matches, etc can all be done using Java string functions. Even if the list contians 100,000 thousand Strings, it should still be fast.
JavaDB and Derby are very closely related. JavaDB is the Sun distribution of Derby. You can get Derby directly from the Apache web site (http://db.apache.org/derby) and embed it directly into your application, and both JavaDB and Derby require only the JRE in order to run.