Differences between revisions 3 and 4
Revision 3 as of 2017-08-11 22:22:01
Size: 82
Editor: gmora1223
Comment:
Revision 4 as of 2017-08-22 04:17:39
Size: 4863
Editor: gmora1223
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= User Documentation = = User Documentation - Marmotta RDF4J =
Line 3: Line 3:
Under construction.
Line 5: Line 4:
1. Marmotta requires JDK 8
2.
<<TableOfContents(3)>>

== Prerequisites ==
 *This Marmotta version requires Java 8.
 *It works on H2 and PostgreSQL.
 *Hardware and other software requirements keeps the same, further details: [[https://marmotta.apache.org/installation.html]].

{{{#!wiki note
'''About MySQL:'''
MySQL components are outdated since changes made in Marmotta 3.4 and additionally due new features and configurations in newer versions of MySQL. This issues should be overcome in next releases of Marmotta.
}}}


== Source code download ==

The source code is currently available in branch [[https://github.com/gmora1223/marmotta/tree/MARMOTTA-659|MARMOTTA-659]], which would be merged to the main [[https://github.com/apache/marmotta/tree/develop|develop branch]] as soon as Marmotta 3.5 is released.

{{{#!wiki note
'''Marmotta 3.5 & Java 8:'''
Lead developers of the project have decided to postpone the inclusion of MARMOTTA-659 into Marmotta 3.4 release due the new requirement of Java 8, which is intended to be tackled in future versions.
}}}

== Installation ==
The changes made to port Marmotta to RDF4J are merely internal and should not affect to the existing installation procedures. Currently, it is only possible to install this new version of Marmotta form source code as is explained in the official [[https://marmotta.apache.org/installation.html#source|guide]]. However, it is necessary to remark that the source code is not available in the [[https://github.com/apache/marmotta|official repository]] yet and should be downloaded from the aforementioned [[https://github.com/gmora1223/marmotta/tree/MARMOTTA-659|repository]].

Regarding to the other installation options (i.e. WAR, Standalone), these can be executed after compiling manually the sources of this version. However, as soon as the this version is released as bundles this extra step will not be necessary.


== Main differences ==

From a end-user perspective Marmotta has suffered minor changes due the fact that changes made to port Marmotta to RDF4J are internal. These changes are mainly related with datatypes. In the other hand, developers must be aware of some changes in new methods and behaviors introduced by RDF4J.

=== Default datatypes in literals ===

RDF4J introduces RDF 1.1, which establishes that every literal must be data typed. For this reason, literals with no datatype defined now uses default values according with the RDF 1.1 recommendations:

 *When no datatype is defined, the xsd:string datatype is created. Example:



'''Inserting a literal with no data type.'''
{{{
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA
{
   GRAPH <http://example.org/graph>
     { <http://edf.org/resource/dev> foaf:name "dev" . }
}
}}}

'''Querying.'''
{{{
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
{
   GRAPH <http://example.org/graph>
     { <http://edf.org/resource/dev> foaf:name ?name . }
}
}}}

'''Results.'''
|| '''''name''''' ||
|| “dev”^^xsd:string ||

 *When a literal has a language tag, the rdf:langString datatype is created.


'''Inserting a literal with language tag and no data type.'''
{{{
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA
{
   GRAPH <http://example.org/graph>
     { <http://edf.org/resource/dev> foaf:name "dev"@en . }
}
}}}

'''Querying.'''
{{{
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
{
   GRAPH <http://example.org/graph>
     { <http://edf.org/resource/dev> foaf:name ?name . }
}
}}}

'''Results.'''
|| '''''name''''' ||
|| “dev”@en^^rdf:langString||



=== For developers ===


Some dependencies have changed during the migration process, especially those related with Sesame have turned into RDF4J.

|||| '''From''' |||| '''To''' ||
|| '''Dependency''' || '''Version''' || '''Dependency''' || '''Version''' ||
|| sesame-* || 2.7.16 || rdf4j-* || 2.2.2 ||
|| json-java-sesame || 0.5.1 || rdf4j-rio-jsonld || 2.2.2 ||
|| junit || 4.11 || junit || 4.12 ||


{{{#!wiki note
A new variable was introduced in the pom.xml files with the version of RDF4J, it is called rdf4j.version and it replaces sesame.version.
}}}

Additionally all the java packages related with Sesame have been changed for its equivalent in RDF4J.

{{{
import org.openrdf.* -> import org.eclipse.rdf4j.*
}}}

Also RDF4J incorporated new features which have been inherited by Marmotta such:

 *URI have been deprecated and replaced with IRI.
 *Simple constructors like StatementImpl, URIImpl, NodeImpl, etc. are deprecated and in order to create those objects a ValueFactory should be used instead.
 *Statements not include contexts therefore statements with identical triples (Subject, Predicate and Object) but different contexts are no more considered not equals.

User Documentation - Marmotta RDF4J

Prerequisites

About MySQL: MySQL components are outdated since changes made in Marmotta 3.4 and additionally due new features and configurations in newer versions of MySQL. This issues should be overcome in next releases of Marmotta.

Source code download

The source code is currently available in branch MARMOTTA-659, which would be merged to the main develop branch as soon as Marmotta 3.5 is released.

Marmotta 3.5 & Java 8: Lead developers of the project have decided to postpone the inclusion of MARMOTTA-659 into Marmotta 3.4 release due the new requirement of Java 8, which is intended to be tackled in future versions.

Installation

The changes made to port Marmotta to RDF4J are merely internal and should not affect to the existing installation procedures. Currently, it is only possible to install this new version of Marmotta form source code as is explained in the official guide. However, it is necessary to remark that the source code is not available in the official repository yet and should be downloaded from the aforementioned repository.

Regarding to the other installation options (i.e. WAR, Standalone), these can be executed after compiling manually the sources of this version. However, as soon as the this version is released as bundles this extra step will not be necessary.

Main differences

From a end-user perspective Marmotta has suffered minor changes due the fact that changes made to port Marmotta to RDF4J are internal. These changes are mainly related with datatypes. In the other hand, developers must be aware of some changes in new methods and behaviors introduced by RDF4J.

Default datatypes in literals

RDF4J introduces RDF 1.1, which establishes that every literal must be data typed. For this reason, literals with no datatype defined now uses default values according with the RDF 1.1 recommendations:

  • When no datatype is defined, the xsd:string datatype is created. Example:

Inserting a literal with no data type.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA
{
   GRAPH <http://example.org/graph> 
     { <http://edf.org/resource/dev> foaf:name "dev" .  }
}

Querying.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
{
   GRAPH <http://example.org/graph> 
     { <http://edf.org/resource/dev> foaf:name ?name .  }
}

Results.

name

“dev”xsd:string

  • When a literal has a language tag, the rdf:langString datatype is created.

Inserting a literal with language tag and no data type.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA
{
   GRAPH <http://example.org/graph> 
     { <http://edf.org/resource/dev> foaf:name "dev"@en .  }
}

Querying.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
{
   GRAPH <http://example.org/graph> 
     { <http://edf.org/resource/dev> foaf:name ?name .  }
}

Results.

name

“dev”@enrdf:langString

For developers

Some dependencies have changed during the migration process, especially those related with Sesame have turned into RDF4J.

From

To

Dependency

Version

Dependency

Version

sesame-*

2.7.16

rdf4j-*

2.2.2

json-java-sesame

0.5.1

rdf4j-rio-jsonld

2.2.2

junit

4.11

junit

4.12

A new variable was introduced in the pom.xml files with the version of RDF4J, it is called rdf4j.version and it replaces sesame.version.

Additionally all the java packages related with Sesame have been changed for its equivalent in RDF4J.

import org.openrdf.*    ->   import org.eclipse.rdf4j.*

Also RDF4J incorporated new features which have been inherited by Marmotta such:

  • URI have been deprecated and replaced with IRI.
  • Simple constructors like StatementImpl, URIImpl, NodeImpl, etc. are deprecated and in order to create those objects a ValueFactory should be used instead.

  • Statements not include contexts therefore statements with identical triples (Subject, Predicate and Object) but different contexts are no more considered not equals.

MARMOTTA-659/UserDocumentation (last edited 2017-08-22 04:17:39 by gmora1223)