Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
218 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
bin | ||
*~ | ||
*.jar | ||
*.Rcheck/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
# License | ||
|
||
Copyright (C) 2011 Egon Willighagen <egon.willighagen@gmail.com> | ||
|
||
The license for this package is GPL v3. The copyright and license for Jena | ||
is defined by (see http://jena.sourceforge.net/license.html): | ||
|
||
© Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP | ||
© Copyright 2010 Talis Systems Ltd. | ||
© Copyright 2010 Epimorphics Ltd. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
which in turn depends on these packages (see http://jena.sourceforge.net/Licenses/): | ||
|
||
System Version License | ||
|
||
Xerces 2.7.1 Apache 2 License | ||
ICU4J 3.4.4 IBM X License | ||
JUnit 4.5 Common Public License Version 1.0 | ||
Lucene 2.3.1 Apache 2 License | ||
Log4j 1.2.12 Apache 2 License | ||
SLF4J 1.5.6 SLF4J License | ||
WoodSToX StAX parser StAX API 1.0.1 / Impl 3.2.9 Apache 2 License | ||
Jena IRI library 0.7 Jena License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
# About | ||
|
||
java/ -> Helper classes for the R rdf package. | ||
rdf/ -> R package for dealing with RDF, using Jena. | ||
|
||
# Copyright / License | ||
|
||
See the LICENSE file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin | ||
*~ | ||
*.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import com.hp.hpl.jena.rdf.model.*; | ||
import com.hp.hpl.jena.ontology.*; | ||
|
||
public class RJenaHelper { | ||
|
||
public Model loadRdf(String file, String format) { | ||
Model model = ModelFactory.createOntologyModel(); | ||
return model; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Package: rdf | ||
Type: Package | ||
Title: rdf - support for the Resource Description Framework | ||
Version: 1.0 | ||
Date: 2011-03-22 | ||
Author: Egon Willighagen <egon.willighagen@gmail.com> | ||
Maintainer: Egon Willighagen <egon.willighagen@gmail.com> | ||
Depends: R (>= 2.0.0), rJava | ||
Description: Work with RDF data. | ||
License: BSD | ||
LazyLoad: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load.rdf <- function(f, format="RDF/XML") { | ||
.jcall( | ||
"com.hp.hpl.jena.rdf.model.ModelFactory", | ||
"Lcom/hp/hpl/jena/ontology/OntModel;", | ||
"createOntologyModel" | ||
) | ||
|
||
|
||
} | ||
|
||
merge.rdf <- function(model1, model2) { | ||
if (attr(model2, "jclass") != "Lcom/hp/hpl/jena/rdf/model/Model") { | ||
model2 <- .jcast(model2, "com/hp/hpl/jena/rdf/model/Model") | ||
} | ||
|
||
.jcall( | ||
model1, "Lcom/hp/hpl/jena/rdf/model/Model;", | ||
"add", model2 | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.packageName <- "rdf" | ||
|
||
require(rJava, quietly=TRUE) | ||
|
||
.First.lib <- function(lib, pkg) { | ||
dlp<-Sys.getenv("DYLD_LIBRARY_PATH") | ||
if (dlp!="") { # for Mac OS X we need to remove X11 from lib-path | ||
Sys.setenv("DYLD_LIBRARY_PATH"=sub("/usr/X11R6/lib","",dlp)) | ||
} | ||
|
||
.jinit(classpath=c( | ||
paste(lib,pkg,"cont","arq-2.8.7.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","icu4j-3.4.4.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","iri-0.8.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","jena-2.6.4.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","log4j-1.2.13.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","lucene-core-2.3.1.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","slf4j-api-1.5.8.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","slf4j-log4j12-1.5.8.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","stax-api-1.0.1.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","wstx-asl-3.2.9.jar",sep=.Platform$file.sep), | ||
paste(lib,pkg,"cont","xercesImpl-2.7.1.jar",sep=.Platform$file.sep) | ||
)) | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
\name{load.rdf} | ||
\alias{load.rdf} | ||
%- Also NEED an '\alias' for EACH other topic documented here. | ||
\title{ | ||
Load RDF content | ||
} | ||
\description{ | ||
Loads triples from a RDF serialization. | ||
} | ||
\usage{ | ||
load.rdf(file, format = "RDF/XML") | ||
} | ||
%- maybe also 'usage' for other objects documented here. | ||
\arguments{ | ||
\item{file}{ | ||
File to read the triples from. | ||
} | ||
\item{format}{ | ||
Format of the RDF file, e.g. RDF/XML. | ||
} | ||
} | ||
\details{ | ||
%% ~~ If necessary, more details than the description above ~~ | ||
} | ||
\value{ | ||
Returns something at some point. | ||
} | ||
%%\references{ | ||
%% ~put references to the literature/web site here ~ | ||
%%} | ||
\author{ | ||
Egon Willighagen | ||
} | ||
%%\note{ | ||
%% ~~further notes~~ | ||
%%} | ||
|
||
%% ~Make other sections like Warning with \section{Warning }{....} ~ | ||
|
||
%%\seealso{ | ||
%% ~~objects to See Also as \code{\link{help}}, ~~~ | ||
%%} | ||
\examples{ | ||
##---- Should be DIRECTLY executable !! ---- | ||
##-- ==> Define data, use random, | ||
##-- or do help(data=index) for the standard data sets. | ||
|
||
## The function is currently defined as | ||
function(file, format="RDF/XML") { | ||
c(); | ||
} | ||
} | ||
% Add one or more standard keywords, see file 'KEYWORDS' in the | ||
% R documentation directory. | ||
\keyword{ ~RDF } | ||
\keyword{ ~triple } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
\name{rdf-package} | ||
\alias{rdf-package} | ||
\alias{rdf} | ||
\docType{package} | ||
\title{ | ||
What the package does (short line) | ||
~~ package title ~~ | ||
} | ||
\description{ | ||
More about what it does (maybe more than one line) | ||
~~ A concise (1-5 lines) description of the package ~~ | ||
} | ||
\details{ | ||
\tabular{ll}{ | ||
Package: \tab rdf\cr | ||
Type: \tab Package\cr | ||
Version: \tab 1.0\cr | ||
Date: \tab 2011-03-22\cr | ||
License: \tab BSD\cr | ||
LazyLoad: \tab yes\cr | ||
} | ||
~~ An overview of how to use the package, including the most important ~~ | ||
~~ functions ~~ | ||
} | ||
\author{ | ||
Who wrote it | ||
|
||
Maintainer: Who to complain to <yourfault@somewhere.net> | ||
~~ The author and/or maintainer of the package ~~ | ||
} | ||
\references{ | ||
~~ Literature or other references for background information ~~ | ||
} | ||
~~ Optionally other standard keywords, one per line, from file KEYWORDS in ~~ | ||
~~ the R documentation directory ~~ | ||
\keyword{ package } | ||
%\seealso{ | ||
%~~ Optional links to other man pages, e.g. ~~ | ||
%~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~ | ||
%} | ||
%\examples{ | ||
%~~ simple examples of the most important functions ~~ | ||
%} |
This file was deleted.
Oops, something went wrong.