Re: About Parameterized SPARQL String

2021-03-27 Thread Samita Bai / PhD CS Scholar @ City Campus
Thank you, Andy, for a detailed description. I am interested in learning more 
about SPARQL from you, can you link me to some of your video lectures which I 
can watch to learn basics? It would be helpful.



Regards,
Samita Bai




From: Andy Seaborne 
Sent: 26 March 2021 15:32
To: users@jena.apache.org 
Subject: Re: About Parameterized SPARQL String

Hi Samita,

The values are inserted in to the overall query at the point where they
are bound. There are 3 places allowed - Basic Graph Pattern Matching
Property Path Patterns and GRAPH ?g - which are the places where SPARQL
touches the data.

Let;'s say we have { ?s ?p ?o } and we want ?s to be ex:s.

this becomes (written in SPARQL syntax)

{ ?s ?p ?o VALUES ?s { ex:s } }

which is join( {?s ?p ?o }, T) where T is the table from VALUES.

{ ?s :p ?o } UNION { ?s :q ?z }

becomes

{ ?s ?p ?o VALUES ?s { ex:s } } UNION { ?s :q ?z VALUES ?s { ex:s } }

multiple joins -- the algebra forms are given in the write-up.

Doing it this way leaves the variable in-place, so it can be used in
expressions but the value it has is forced to a specific RDF term.

 Andy

On 25/03/2021 16:52, Samita Bai / PhD CS Scholar @ City Campus wrote:
> Dear Andy,
>
> I read about the EXISTS from the link you sent. I can now understand your 
> answer partially, can you please elaborate the following statement more.
>
> The pattern is rewritten to inject a "join" into each place the
> variables can become bound. It is not a single join.
>
> It would be helpful.
>
> Thanks in advance for your consideration.
>
> Regards,
> Samita Bai
> 
> From: Andy Seaborne 
> Sent: 25 March 2021 17:57
> To: users@jena.apache.org 
> Subject: Re: About Parameterized SPARQL String
>
> https://afs.github.io/substitute
>
> This covers use in EXISTS but the mechanism is general and gives a
> foundation for value-substitution.
>
> Is it "join" - yes and no.
>
> The pattern is rewritten to inject a "join" into each place the
> variables can become bound. It is not a single join.
>
>   Andy
>
> On 25/03/2021 09:05, Rob Vesse wrote:
>> ParameterizedSparqlString works by simple textual substitution into the 
>> provided query string so you get a more specific query with your parameters
>>
>> It does not have any relationship to joins.
>>
>> I guess what you may be asking is how it compares to other methods for 
>> providing initial bindings e.g. adding VALUES to a query which would be 
>> evaluated as a Join?  The answer there is that it isn't really a fair 
>> comparison, a parameterized query vs one using VALUES might yield very 
>> different query execution plans so perform very differently.  As with all 
>> queries it's going to depend on both your queries and your data
>>
>> Rob
>>
>> On 25/03/2021, 08:31, "Samita Bai  / PhD CS Scholar @ City Campus" 
>>  wrote:
>>
>>   Hello everyone,
>>
>>   I have used Parameterized SPARQL String for providing initial solution 
>> bindings for query execution. I need to document my technique; can anyone 
>> help me how can we compare Parameterized SPARQL String with joins?
>>
>>   Is Parameterized SPARQL string type of join or its entirely different?
>>
>>   Please someone help me out.
>>
>>
>>   Regards,
>>   Samita Bai
>>
>>
>>   P : Please consider the environment before printing this e-mail
>>
>>   
>>
>>   CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments 
>> may contain confidential and privileged information. If you are not the 
>> intended recipient, please notify the sender immediately by return e-mail, 
>> delete this e-mail and destroy any copies. Any dissemination or use of this 
>> information by a person other than the intended recipient is unauthorized 
>> and may be illegal.
>>
>>   
>>
>>
>>
>>
>
> P : Please consider the environment before printing this e-mail
>
> 
>
> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
> contain confidential and privileged information. If you are not the intended 
> recipient, please notify the sender immediately by return e-mail, delete this 
> e-mail and destroy any copies. Any dissemination or use of this information 
> by a person other than the intended recipient is unauthorized and may be 
> illegal.
>
> 
>

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: About Parameterized SPARQL String

2021-03-25 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Andy,

I read about the EXISTS from the link you sent. I can now understand your 
answer partially, can you please elaborate the following statement more.

The pattern is rewritten to inject a "join" into each place the
variables can become bound. It is not a single join.

It would be helpful.

Thanks in advance for your consideration.

Regards,
Samita Bai

From: Andy Seaborne 
Sent: 25 March 2021 17:57
To: users@jena.apache.org 
Subject: Re: About Parameterized SPARQL String

https://afs.github.io/substitute

This covers use in EXISTS but the mechanism is general and gives a
foundation for value-substitution.

Is it "join" - yes and no.

The pattern is rewritten to inject a "join" into each place the
variables can become bound. It is not a single join.

 Andy

On 25/03/2021 09:05, Rob Vesse wrote:
> ParameterizedSparqlString works by simple textual substitution into the 
> provided query string so you get a more specific query with your parameters
>
> It does not have any relationship to joins.
>
> I guess what you may be asking is how it compares to other methods for 
> providing initial bindings e.g. adding VALUES to a query which would be 
> evaluated as a Join?  The answer there is that it isn't really a fair 
> comparison, a parameterized query vs one using VALUES might yield very 
> different query execution plans so perform very differently.  As with all 
> queries it's going to depend on both your queries and your data
>
> Rob
>
> On 25/03/2021, 08:31, "Samita Bai  / PhD CS Scholar @ City Campus" 
>  wrote:
>
>  Hello everyone,
>
>  I have used Parameterized SPARQL String for providing initial solution 
> bindings for query execution. I need to document my technique; can anyone 
> help me how can we compare Parameterized SPARQL String with joins?
>
>  Is Parameterized SPARQL string type of join or its entirely different?
>
>  Please someone help me out.
>
>
>  Regards,
>  Samita Bai
>
>
>  P : Please consider the environment before printing this e-mail
>
>  
>
>  CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
> contain confidential and privileged information. If you are not the intended 
> recipient, please notify the sender immediately by return e-mail, delete this 
> e-mail and destroy any copies. Any dissemination or use of this information 
> by a person other than the intended recipient is unauthorized and may be 
> illegal.
>
>  
>
>
>
>

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: About Parameterized SPARQL String

2021-03-25 Thread Samita Bai / PhD CS Scholar @ City Campus
Thank you Rob, I was confused that if it could be related with joins.


Regards,
Samita Bai

Get Outlook for Android<https://aka.ms/ghei36>

From: Rob Vesse 
Sent: Thursday, March 25, 2021 2:05:21 PM
To: users@jena.apache.org 
Subject: Re: About Parameterized SPARQL String

ParameterizedSparqlString works by simple textual substitution into the 
provided query string so you get a more specific query with your parameters

It does not have any relationship to joins.

I guess what you may be asking is how it compares to other methods for 
providing initial bindings e.g. adding VALUES to a query which would be 
evaluated as a Join?  The answer there is that it isn't really a fair 
comparison, a parameterized query vs one using VALUES might yield very 
different query execution plans so perform very differently.  As with all 
queries it's going to depend on both your queries and your data

Rob

On 25/03/2021, 08:31, "Samita Bai  / PhD CS Scholar @ City Campus" 
 wrote:

Hello everyone,

I have used Parameterized SPARQL String for providing initial solution 
bindings for query execution. I need to document my technique; can anyone help 
me how can we compare Parameterized SPARQL String with joins?

Is Parameterized SPARQL string type of join or its entirely different?

Please someone help me out.


Regards,
Samita Bai


P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.







P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: About Parameterized SPARQL String

2021-03-25 Thread Samita Bai / PhD CS Scholar @ City Campus
Thank you Andy, I have to go through the link about SPARQL substitute because 
otherwise I am not understanding it properly.


Regards,
Samita Bai

Get Outlook for Android<https://aka.ms/ghei36>

From: Andy Seaborne 
Sent: Thursday, March 25, 2021 5:57:28 PM
To: users@jena.apache.org 
Subject: Re: About Parameterized SPARQL String

https://afs.github.io/substitute

This covers use in EXISTS but the mechanism is general and gives a
foundation for value-substitution.

Is it "join" - yes and no.

The pattern is rewritten to inject a "join" into each place the
variables can become bound. It is not a single join.

 Andy

On 25/03/2021 09:05, Rob Vesse wrote:
> ParameterizedSparqlString works by simple textual substitution into the 
> provided query string so you get a more specific query with your parameters
>
> It does not have any relationship to joins.
>
> I guess what you may be asking is how it compares to other methods for 
> providing initial bindings e.g. adding VALUES to a query which would be 
> evaluated as a Join?  The answer there is that it isn't really a fair 
> comparison, a parameterized query vs one using VALUES might yield very 
> different query execution plans so perform very differently.  As with all 
> queries it's going to depend on both your queries and your data
>
> Rob
>
> On 25/03/2021, 08:31, "Samita Bai  / PhD CS Scholar @ City Campus" 
>  wrote:
>
>  Hello everyone,
>
>  I have used Parameterized SPARQL String for providing initial solution 
> bindings for query execution. I need to document my technique; can anyone 
> help me how can we compare Parameterized SPARQL String with joins?
>
>  Is Parameterized SPARQL string type of join or its entirely different?
>
>  Please someone help me out.
>
>
>  Regards,
>  Samita Bai
>
>
>  P : Please consider the environment before printing this e-mail
>
>  
>
>  CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
> contain confidential and privileged information. If you are not the intended 
> recipient, please notify the sender immediately by return e-mail, delete this 
> e-mail and destroy any copies. Any dissemination or use of this information 
> by a person other than the intended recipient is unauthorized and may be 
> illegal.
>
>  
>
>
>
>

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




About Parameterized SPARQL String

2021-03-25 Thread Samita Bai / PhD CS Scholar @ City Campus
Hello everyone,

I have used Parameterized SPARQL String for providing initial solution bindings 
for query execution. I need to document my technique; can anyone help me how 
can we compare Parameterized SPARQL String with joins?

Is Parameterized SPARQL string type of join or its entirely different?

Please someone help me out.


Regards,
Samita Bai


P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: Merging a massive amount of RDFs

2021-02-12 Thread Samita Bai / PhD CS Scholar @ City Campus
Hello all,

Can anyone suggest me any code for cleaning RDF data?


Regards,
Samita

Get Outlook for Android


From: Andy Seaborne 
Sent: Friday, February 12, 2021 6:59:55 PM
To: users@jena.apache.org 
Subject: Re: Merging a massive amount of RDFs

Yes, getting rid of the union model and using a single model to collect
all the RDF is better.

Have you detemined where the time is going? On reading or writing?

You have a lot of files and starting up the XML parser is expensive let
along the RDF/XML parser on top of that.  If you have the option of a
different format such as Turtle, that is worth trying.

If this is a fixed set of files to use many times, consider using a
database, loading it once and then using that persistent database.

 tdbloader --loc DB *rdf

You are writing with pretty printing turned on. Writing RDF/XML in
pretty format is costly, try RDFFormat.RDFXML_PLAIN.

If you are trying to read all the files and print them, you can do that
with the command line

# Read all RDF/XML files and print a single graph in turtle:
riot --stream Turtle *.rdf

 Andy

On 12/02/2021 13:43, Alexis Armin Huf wrote:
> Hi, emri.
>
> In my experience with Jena I have observed that Graphs are more efficient
> than Models when there is too much data being iterated. Also, at every
> createUnion() call, your code is creating a new Union graph which in the
> end will yield a tree of 700 models that will potentially be traversed when
> doing searches (which the RDF/XML serializer will eventually have to do in
> order to layout resources properly inside the XML).
>
> Maybe this will be faster:
>
> public static void main(String[] args)  throws Exception{
>  File folder = new File("C:\\Users\\Admin\\Desktop\\KG");
>  Graph acc = GraphFactory.createDefaultGraph();
>  RDFDataMgr.read(acc,
> "file:C:\\Users\\Admin\\Desktop\\KG\\AccessComponent.bo.rdf");
>  for (File file : folder.listFiles()) {
>  if (file.isFile())
>  RDFDataMgr.read(acc, file.toURI().toString());
>  }
>  try (FileOutputStream out = new
> FileOutputStream("C:\\Users\\Admin\\Desktop\\merged.rdf")) {
>  RDFDataMgr.write(out, acc, RDFFormat.RDFXML);
>  }
> }
>
>
> Note that I have not tested this, you may want to run some iterations under
> the debugger.
>
> On Fri, Feb 12, 2021 at 9:29 AM emri mbiemri 
> wrote:
>
>> Hi, the code is:
>> --
>>
>>
>> public class RDFMerge {
>>
>> private static File folder;
>> private static Model kg;
>> // private static OutputStream out;
>>
>> public static void iterate() {
>>
>> folder = new File("C:\\Users\\Admin\\Desktop\\KG");
>> kg =
>>
>> ModelFactory.createDefaultModel().read("C:\\Users\\Admin\\Desktop\\KG\\AccessComponent.bo.rdf");
>>
>> File[] listOfFiles = folder.listFiles(); // Interating through the
>> directory
>> for (File file : listOfFiles) {
>>
>> if (file.isFile()) {
>>
>> kg = merge(kg, file);
>>
>> }
>>
>> }
>>
>>
>>   OutputStream out1;
>>   try { out1 = new FileOutputStream( new
>> File("C:\\Users\\Admin\\Desktop\\merged.rdf"));
>>   kg.write( out1, "RDF/XML", null );
>>   System.out.println("RDFs merged successfully!"); }
>>   catch(FileNotFoundException e) { e.printStackTrace(); }
>>
>>
>> }
>>
>>
>> public static Model merge(Model k, File i) {
>>
>> // Model kg_in =
>> ModelFactory.createDefaultModel().read(k.getAbsolutePath());
>> Model other_in =
>> ModelFactory.createDefaultModel().read(i.getAbsolutePath());
>>
>> Model union = ModelFactory.createUnion(k, other_in);
>> return union;
>> }}
>>
>> On Fri, Feb 12, 2021 at 2:12 PM Andy Seaborne  wrote:
>>
>>> Hi there - the attachment didn't make it through.
>>>
>>> Could you include the code in the body of the message please? Or put in
>>> somewhere like a gist on github / pastebin /... and send a link.
>>>
>>>   Andy
>>>
>>> On 12/02/2021 11:45, emri mbiemri wrote:
 Dear all,

 Do you know how I can merge some thousands RDF models into a single
>> one?
 I have tried it by iteration through all files within a folder and then
 using Jena's union function to merge them one by one! The problem is
 that the program is running for more than 13  hours and is still not
 stopping (with only 50 models as test).

 So far I have close to 700 models, in total 68MB.

 Attached you seen the code I am using for.

 Do you have any idea what I can do to merge all these files into a
 single knowledge-graph?

 Thanks for your help.
>>>
>>
>
>

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person 

Re: Combined query results

2018-06-09 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Claude,


I am working on two systems to answer the query so I need to split a query into 
two parts, one part will be sent to one system and its results would be sent to 
another system as a parametrized query.



Regards,

Samita Bai


From: Claude Warren 
Sent: 08 June 2018 22:26:55
To: users@jena.apache.org
Subject: Re: Combined query results

How about:

prefix : <http://example.org/>

Select ?alice ?address where {
   ?alice :hasAddress ?address;
  :hasName "Alice"
}




On Thu, Jun 7, 2018, 12:36 AM Samita Bai / PhD CS Scholar @ City Campus <
s...@iba.edu.pk> wrote:

> I need some help with the following code. I am using parameterized sparql
> string and I want to display combined results of both queries how can I do
> that. Any help or suggestion would be truly appreciated.
>
>
>
> final static String filename = "/home/samita/turtleContent.ttl";
>
>  static Model model= null;
>
>
> final static String turtleContent = "" +
> "@prefix : <http://example.org/> .\n" +
> "\n" +
> ":alice :hasName \"Alice\" .\n" +
> ":alice :hasAddress \"4222 Clinton Way\" .\n" +
> ":herman :hasName \"Herman\".\n" +
> ":herman :hasAddress \"1313 Mockingbird Lane\" .\n" +
> ":DrWho :hasAddress \"The TARDIS\"" +
> "";
>
>
>// Read the model from the turtle content
>final static Model model = ModelFactory.createDefaultModel()
>// .read( new ByteArrayInputStream( turtleContent.getBytes()),
> null, "TURTLE" );
>
>
> final static String findAlice = "prefix : <http://example.org/>" +
> "select ?alice where {" +
> "?alice :hasName \"Alice\" }"  ;
>
> final static String findAliceAddress = "prefix : <http://example.org/>"
> +
> "select ?address where {" +
> " ?alice :hasAddress ?address }";
>
>  public static void useParameterizedSPARQLString() {
> System.out.println( "== useParameterizedSPARQLString ==" );
> // execute the query that finds a (single) binding for ?alice.
> Then create
> // a query solution map containing those results.
> final ResultSet aliceResults = QueryExecutionFactory.create(
> findAlice, model ).execSelect();
> final QuerySolutionMap map = new QuerySolutionMap();
> map.addAll( aliceResults.next() );
> // Create a ParameterizedSparqlString from the findAliceAddress
> query string (if this
> // approach were taken, findAliceAddress could actually *be* a
> Param.SparqlString, of
> // course).
> final ParameterizedSparqlString pss = new
> ParameterizedSparqlString( findAliceAddress );
> System.out.println( pss.toString() );
> pss.setParams( map );
> System.out.println( pss.toString() );
> // execute the query and show the results
> ResultSetFormatter.out( QueryExecutionFactory.create(
> pss.toString(), model ).execSelect() );
> }
>
> The results I get is:
>
> --
> | address|
> ==
> | "4222 Clinton Way" |
> --
>
> Is there any way to display the variable ?alice also
>
> Like
>
> alice   address
>
> http://example.org/alice"4222 Clinton Way"<
> http://example.org/alice>
>
>
>
>
>
> P : Please consider the environment before printing this e-mail
>
> 
>
> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may
> contain confidential and privileged information. If you are not the
> intended recipient, please notify the sender immediately by return e-mail,
> delete this e-mail and destroy any copies. Any dissemination or use of this
> information by a person other than the intended recipient is unauthorized
> and may be illegal.
>
> 
>

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Combined query results

2018-06-07 Thread Samita Bai / PhD CS Scholar @ City Campus
I need some help with the following code. I am using parameterized sparql 
string and I want to display combined results of both queries how can I do 
that. Any help or suggestion would be truly appreciated.



final static String filename = "/home/samita/turtleContent.ttl";

 static Model model= null;


final static String turtleContent = "" +
"@prefix :  .\n" +
"\n" +
":alice :hasName \"Alice\" .\n" +
":alice :hasAddress \"4222 Clinton Way\" .\n" +
":herman :hasName \"Herman\".\n" +
":herman :hasAddress \"1313 Mockingbird Lane\" .\n" +
":DrWho :hasAddress \"The TARDIS\"" +
"";


   // Read the model from the turtle content
   final static Model model = ModelFactory.createDefaultModel()
   // .read( new ByteArrayInputStream( turtleContent.getBytes()), null, 
"TURTLE" );


final static String findAlice = "prefix : " +
"select ?alice where {" +
"?alice :hasName \"Alice\" }"  ;

final static String findAliceAddress = "prefix : " +
"select ?address where {" +
" ?alice :hasAddress ?address }";

 public static void useParameterizedSPARQLString() {
System.out.println( "== useParameterizedSPARQLString ==" );
// execute the query that finds a (single) binding for ?alice.  Then 
create
// a query solution map containing those results.
final ResultSet aliceResults = QueryExecutionFactory.create( findAlice, 
model ).execSelect();
final QuerySolutionMap map = new QuerySolutionMap();
map.addAll( aliceResults.next() );
// Create a ParameterizedSparqlString from the findAliceAddress query 
string (if this
// approach were taken, findAliceAddress could actually *be* a 
Param.SparqlString, of
// course).
final ParameterizedSparqlString pss = new ParameterizedSparqlString( 
findAliceAddress );
System.out.println( pss.toString() );
pss.setParams( map );
System.out.println( pss.toString() );
// execute the query and show the results
ResultSetFormatter.out( QueryExecutionFactory.create( pss.toString(), 
model ).execSelect() );
}

The results I get is:

--
| address|
==
| "4222 Clinton Way" |
--

Is there any way to display the variable ?alice also

Like

alice   address

http://example.org/alice"4222 Clinton Way"





P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: TDB 2 Store Parameters

2018-04-17 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Adam,


I am using CLI utility now 


Regards,

Samita Bai


From: ajs6f <aj...@apache.org>
Sent: 17 April 2018 19:39:34
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

I'm glad you got what you wanted, but you should also be aware that if you're 
just trying to load RDF into a TDB instance, there is no need at all to write 
Java code. The tdbloader and tdbloader2 CLI utilities work very very well for 
that.

ajs6f

> On Apr 17, 2018, at 1:03 AM, Samita Bai / PhD CS Scholar @ City Campus 
> <s...@iba.edu.pk> wrote:
>
> Dear Andy & Adam,
>
>
> Thanks a lot for the help, I got my code running finally. I just caught the 
> RiotException, that was all needed. Feeling so happy.
>
>
> I really appreciate for your time and efforts :)
>
>
> Best regards,
>
> Samita Bai
>
> ____
> From: Samita Bai / PhD CS Scholar @ City Campus <s...@iba.edu.pk>
> Sent: 17 April 2018 02:13:32
> To: users@jena.apache.org
> Subject: Re: TDB 2 Store Parameters
>
> Dear Andy,
>
>
> I downloaded the same dataset from the link as you told i.e.
>
>
> http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz
>
>
> Then I extracted and ran the following code
>
>
> public class ReadQuadInJena {
>
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> TDBLoader tlobj= new TDBLoader();
> String Ds ="/home/samita/data.nq";
> Location location = Location.create("/home/samita/Load_TDB");
> DatasetGraphTDB dgtdb = DatasetBuilderStd.create(location);
> try {
> InputStream is = new FileInputStream(AndyDs);
> tlobj.loadDataset(dgtdb, is);
> }catch(FileNotFoundException e) {}
> }
>
> It ended up with this error.
>
> Exception in thread "main" org.apache.jena.riot.RiotException: [line: 30506, 
> col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
> <http://fonts.googleapis.com/css?family=Nunito[|]...>
> at 
> org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
> at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
> at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:105)
> at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:67)
> at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)
> at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
> at 
> org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:195)
> at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
> at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:324)
> at org.apache.jena.riot.RDFParser.parse(RDFParser.java:273)
> at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
> at org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:870)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:693)
> at 
> org.apache.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:152)
> at 
> org.apache.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:115)
> at org.apache.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:256)
> at org.apache.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:191)
> at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:47)
>
> If it was running fine at your end what's wrong with my code. Please help me.
>
>
>
>
>
> 
> From: Andy Seaborne <a...@apache.org>
> Sent: 16 April 2018 22:13:36
> To: users@jena.apache.org
> Subject: Re: TDB 2 Store Parameters
>
> I downlaoded
>
> http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz
>
> (the latest I could find)
>
> and used tdblaoder.
>
> Is that the data you are using?
>
> Andy
>
> On 16/04/18 17:32, ajs6f wrote:
>> You should be able to check the validity of any of your files just by 
>> running them through Jena's `riot` command.
>>
>> You can try loading them into a TDB1 or TDB2 db by using the `tdbloader` or 
>> `tdb2.tdbloader` commands.
>>
>> ajs6f
>>
>>> On Apr 16, 2018, at 12:28 PM, Samita Bai / PhD CS Scholar @ City Campus 
>>> <s...@iba.edu.pk> wrote:
>>>
>>> OK Andy I got your point. Can you please share the code that you used to 
>>> read the Dynamic Linked Data Observatory dataset?
>>>
>>>
>>>
>>> Regards,
>>>
>>> Samita Bai
>>>
>>> 
>>> From: Andy Seaborne <a...@apache.org>
>>> Sent: 16 April 2018 15:34:07
>>> To: users@jena.apache.org
>>> Subject: Re:

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Andy & Adam,


Thanks a lot for the help, I got my code running finally. I just caught the 
RiotException, that was all needed. Feeling so happy.


I really appreciate for your time and efforts :)


Best regards,

Samita Bai


From: Samita Bai / PhD CS Scholar @ City Campus <s...@iba.edu.pk>
Sent: 17 April 2018 02:13:32
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

Dear Andy,


I downloaded the same dataset from the link as you told i.e.


http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz


Then I extracted and ran the following code


public class ReadQuadInJena {

public static void main(String[] args) {
// TODO Auto-generated method stub
TDBLoader tlobj= new TDBLoader();
String Ds ="/home/samita/data.nq";
Location location = Location.create("/home/samita/Load_TDB");
DatasetGraphTDB dgtdb = DatasetBuilderStd.create(location);
try {
InputStream is = new FileInputStream(AndyDs);
tlobj.loadDataset(dgtdb, is);
}catch(FileNotFoundException e) {}
}

It ended up with this error.

Exception in thread "main" org.apache.jena.riot.RiotException: [line: 30506, 
col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
<http://fonts.googleapis.com/css?family=Nunito[|]...>
at 
org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:105)
at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:67)
at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)
at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
at 
org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:195)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:324)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:273)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
at org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:870)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:693)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:152)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:115)
at org.apache.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:256)
at org.apache.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:191)
at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:47)

If it was running fine at your end what's wrong with my code. Please help me.






From: Andy Seaborne <a...@apache.org>
Sent: 16 April 2018 22:13:36
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

I downlaoded

http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz

(the latest I could find)

and used tdblaoder.

Is that the data you are using?

 Andy

On 16/04/18 17:32, ajs6f wrote:
> You should be able to check the validity of any of your files just by running 
> them through Jena's `riot` command.
>
> You can try loading them into a TDB1 or TDB2 db by using the `tdbloader` or 
> `tdb2.tdbloader` commands.
>
> ajs6f
>
>> On Apr 16, 2018, at 12:28 PM, Samita Bai / PhD CS Scholar @ City Campus 
>> <s...@iba.edu.pk> wrote:
>>
>> OK Andy I got your point. Can you please share the code that you used to 
>> read the Dynamic Linked Data Observatory dataset?
>>
>>
>>
>> Regards,
>>
>> Samita Bai
>>
>> 
>> From: Andy Seaborne <a...@apache.org>
>> Sent: 16 April 2018 15:34:07
>> To: users@jena.apache.org
>> Subject: Re: TDB 2 Store Parameters
>>
>> If you wish to prcoess the data as it is parsed, then see StreamRDF and
>> either
>>
>> NxParser, which is not part of Jena, is not a validating parser.
>>
>> If the data is not valid, then you will have problems at some point,
>> either loading, querying or outputting later.
>>
>> Adam has explained that TDB2 inxexes heavily so that querying is well
>> severed.
>>
>> We can't help with the parser errors without knowing what they are.
>>
>> Which files from Dynamic Linked Data Observatory are you processing?
>> Don't the later ones replace the earlier ones?
>>
>> I found that the last n-quads file was 42 million triples and all valid.
>>
>>  Andy
>>
>> On 16/04/18 11:05, ajs6f wrote:
>>> Is there are syntax errors in your RDF (and it sounds like that is why Jena 
>>> will not read it directly) you are doing yourself no service by taking 
>>> unusual pains to force TDB to ingest your data.
>>>
>>> Please show us the errors that 

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Andy,


I downloaded the same dataset from the link as you told i.e.


http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz


Then I extracted and ran the following code


public class ReadQuadInJena {

public static void main(String[] args) {
// TODO Auto-generated method stub
TDBLoader tlobj= new TDBLoader();
String Ds ="/home/samita/data.nq";
Location location = Location.create("/home/samita/Load_TDB");
DatasetGraphTDB dgtdb = DatasetBuilderStd.create(location);
try {
InputStream is = new FileInputStream(AndyDs);
tlobj.loadDataset(dgtdb, is);
}catch(FileNotFoundException e) {}
}

It ended up with this error.

Exception in thread "main" org.apache.jena.riot.RiotException: [line: 30506, 
col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
<http://fonts.googleapis.com/css?family=Nunito[|]...>
at 
org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:105)
at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:67)
at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)
at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
at 
org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:195)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:324)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:273)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
at org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:870)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:693)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:152)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:115)
at org.apache.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:256)
at org.apache.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:191)
at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:47)

If it was running fine at your end what's wrong with my code. Please help me.






From: Andy Seaborne <a...@apache.org>
Sent: 16 April 2018 22:13:36
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

I downlaoded

http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz

(the latest I could find)

and used tdblaoder.

Is that the data you are using?

 Andy

On 16/04/18 17:32, ajs6f wrote:
> You should be able to check the validity of any of your files just by running 
> them through Jena's `riot` command.
>
> You can try loading them into a TDB1 or TDB2 db by using the `tdbloader` or 
> `tdb2.tdbloader` commands.
>
> ajs6f
>
>> On Apr 16, 2018, at 12:28 PM, Samita Bai / PhD CS Scholar @ City Campus 
>> <s...@iba.edu.pk> wrote:
>>
>> OK Andy I got your point. Can you please share the code that you used to 
>> read the Dynamic Linked Data Observatory dataset?
>>
>>
>>
>> Regards,
>>
>> Samita Bai
>>
>> 
>> From: Andy Seaborne <a...@apache.org>
>> Sent: 16 April 2018 15:34:07
>> To: users@jena.apache.org
>> Subject: Re: TDB 2 Store Parameters
>>
>> If you wish to prcoess the data as it is parsed, then see StreamRDF and
>> either
>>
>> NxParser, which is not part of Jena, is not a validating parser.
>>
>> If the data is not valid, then you will have problems at some point,
>> either loading, querying or outputting later.
>>
>> Adam has explained that TDB2 inxexes heavily so that querying is well
>> severed.
>>
>> We can't help with the parser errors without knowing what they are.
>>
>> Which files from Dynamic Linked Data Observatory are you processing?
>> Don't the later ones replace the earlier ones?
>>
>> I found that the last n-quads file was 42 million triples and all valid.
>>
>>  Andy
>>
>> On 16/04/18 11:05, ajs6f wrote:
>>> Is there are syntax errors in your RDF (and it sounds like that is why Jena 
>>> will not read it directly) you are doing yourself no service by taking 
>>> unusual pains to force TDB to ingest your data.
>>>
>>> Please show us the errors that Jena is throwing trying to read your data 
>>> and an appropriate sample of the data in question.
>>>
>>>
>>> ajs6f
>>>
>>>> On Apr 16, 2018, at 4:42 AM, Samita Bai / PhD CS Scholar @ City Campus 
>>>> <s...@iba.edu.pk> wrote:
>>>>
>>>> In addition to previous query. It is taking a lot of time to first parse 
>>>> the dataset 

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
I think I have to download the file first as it in nq.gz format. I wrote the 
following code which gave me exception


public class ReadQuadInJena {

public static void main(String[] args) {
// TODO Auto-generated method stub
String URL = "http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz;;
Location location = Location.create("/home/samita/TDBLoaded");
DatasetGraphTDB dgtdb = DatasetBuilderStd.create(location);
TDBLoader.load(dgtdb, URL);
}}


URL is not valid cz it contains the nq.gz format.


From: Andy Seaborne <a...@apache.org>
Sent: 17 April 2018 01:49:06
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

Corrupt input file or the input file has binary in it.

(it means the input is not legal UTF-8)

On 16/04/18 21:20, Samita Bai  / PhD CS Scholar @ City Campus wrote:
>
> Dear Andy,
>
>
>
> I got the following exception with TDBLoader for the latest dataset as you 
> said.
>
>
> Exception in thread "main" org.apache.jena.atlas.RuntimeIOException: 
> java.nio.charset.MalformedInputException: Input length = 1
> at org.apache.jena.atlas.io.IO.exception(IO.java:233)
> at 
> org.apache.jena.atlas.io.CharStreamBuffered$SourceReader.fill(CharStreamBuffered.java:77)
> at 
> org.apache.jena.atlas.io.CharStreamBuffered.fillArray(CharStreamBuffered.java:154)
> at 
> org.apache.jena.atlas.io.CharStreamBuffered.advance(CharStreamBuffered.java:137)
> at org.apache.jena.atlas.io.PeekReader.advanceAndSet(PeekReader.java:235)
> at org.apache.jena.atlas.io.PeekReader.init(PeekReader.java:229)
> at org.apache.jena.atlas.io.PeekReader.peekChar(PeekReader.java:151)
> at org.apache.jena.atlas.io.PeekReader.makeUTF8(PeekReader.java:92)
> at 
> org.apache.jena.riot.tokens.TokenizerFactory.makeTokenizerUTF8(TokenizerFactory.java:48)
> at org.apache.jena.riot.lang.RiotParsers.createParser(RiotParsers.java:57)
> at 
> org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:194)
> at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
> at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:303)
> at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
> at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
> at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:680)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:649)
> at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:637)
> at 
> org.apache.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:143)
> at 
> org.apache.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:109)
> at org.apache.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:252)
> at org.apache.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:184)
> at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:74)
> at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:53)
> at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:44)
> at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:42)
> Caused by: java.nio.charset.MalformedInputException: Input length = 1
> at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:281)
> at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
> at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
> at java.base/java.io.InputStreamReader.read(InputStreamReader.java:185)
> at java.base/java.io.Reader.read(Reader.java:140)
> ... 26 more
>
>
>
> 
> From: ajs6f <aj...@apache.org>
> Sent: 17 April 2018 00:24:12
> To: users@jena.apache.org
> Subject: Re: TDB 2 Store Parameters
>
> This appears to be a plain problem in the data. The character "|" should be 
> %-escaped. Have you talked with the data providers to figure out why the data 
> is invalid? You don't show where this triple comes from, but since Andy had 
> no problem loading a more recent data set from the same provider, perhaps you 
> can just try that.
>
> Parsing in Jena intentionally defaults to rejecting invalid RDF. That's by 
> far the safest approach for a library system like Jena. You can catch an 
> exception and ignore the invalid data, and if that works for your 
> application, good, or you can try to take some more sophisticated approach. 
> But in any event you'll generally be well-advised to clean up the data 
> _before_ it goes into your application. For one thing, Jena's tools (e.g. 
> tdbloader) expect valid data.
>
> As for your code terminating, you don't show your code with a try-catch, so 
> we can't help you very well.
>
> Adam
>
>> On Apr 16, 2018, at 1:50 PM, Samita Bai / PhD CS Scholar @ City Campus 
>> <s...@ib

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus

Dear Andy,



I got the following exception with TDBLoader for the latest dataset as you said.


Exception in thread "main" org.apache.jena.atlas.RuntimeIOException: 
java.nio.charset.MalformedInputException: Input length = 1
at org.apache.jena.atlas.io.IO.exception(IO.java:233)
at 
org.apache.jena.atlas.io.CharStreamBuffered$SourceReader.fill(CharStreamBuffered.java:77)
at 
org.apache.jena.atlas.io.CharStreamBuffered.fillArray(CharStreamBuffered.java:154)
at 
org.apache.jena.atlas.io.CharStreamBuffered.advance(CharStreamBuffered.java:137)
at org.apache.jena.atlas.io.PeekReader.advanceAndSet(PeekReader.java:235)
at org.apache.jena.atlas.io.PeekReader.init(PeekReader.java:229)
at org.apache.jena.atlas.io.PeekReader.peekChar(PeekReader.java:151)
at org.apache.jena.atlas.io.PeekReader.makeUTF8(PeekReader.java:92)
at 
org.apache.jena.riot.tokens.TokenizerFactory.makeTokenizerUTF8(TokenizerFactory.java:48)
at org.apache.jena.riot.lang.RiotParsers.createParser(RiotParsers.java:57)
at 
org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:194)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:303)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:680)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:649)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:637)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:143)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:109)
at org.apache.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:252)
at org.apache.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:184)
at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:74)
at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:53)
at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:44)
at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:42)
Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:281)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:185)
at java.base/java.io.Reader.read(Reader.java:140)
... 26 more




From: ajs6f <aj...@apache.org>
Sent: 17 April 2018 00:24:12
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

This appears to be a plain problem in the data. The character "|" should be 
%-escaped. Have you talked with the data providers to figure out why the data 
is invalid? You don't show where this triple comes from, but since Andy had no 
problem loading a more recent data set from the same provider, perhaps you can 
just try that.

Parsing in Jena intentionally defaults to rejecting invalid RDF. That's by far 
the safest approach for a library system like Jena. You can catch an exception 
and ignore the invalid data, and if that works for your application, good, or 
you can try to take some more sophisticated approach. But in any event you'll 
generally be well-advised to clean up the data _before_ it goes into your 
application. For one thing, Jena's tools (e.g. tdbloader) expect valid data.

As for your code terminating, you don't show your code with a try-catch, so we 
can't help you very well.

Adam

> On Apr 16, 2018, at 1:50 PM, Samita Bai / PhD CS Scholar @ City Campus 
> <s...@iba.edu.pk> wrote:
>
> Even if I am using try catch to catch RiotException but my code still gets 
> terminated on this exception 
>
>
> Regards,
>
> Samita Bai
>
> ________
> From: Samita Bai / PhD CS Scholar @ City Campus
> Sent: 16 April 2018 22:32:26
> To: users@jena.apache.org
> Subject: Re: TDB 2 Store Parameters
>
>
> Yes I am using the same data but of Feb, 2018 as I started experimenting that 
> time. For example for  the following piece of code I am getting the error as 
> shown below.
>
>
> public class ReadQuadInJena {
>
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> String FileName = "/home/samita/Dyldo_DS_4Feb2018/data.nq";
> DatasetGraph dsg = RDFDataMgr.loadDatasetGraph(FileName);
> //System.out.println(node);
> Iterator iterQuad = dsg.find();
> while(iterQuad.hasNext()){
> System.out.println(iterQuad.next());
> }
>
>
>
>
>
>
> Exception in thread "main" org.apache.jena.riot.RiotException: [line: 89841, 
> col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
> <http://fonts.googleapis.com/css?family=Nunito[|]...&g

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Andy,

I received this exception with TDBLoader for the dataset you told me.


Exception in thread "main" org.apache.jena.atlas.RuntimeIOException: 
java.nio.charset.MalformedInputException: Input length = 1
at org.apache.jena.atlas.io.IO.exception(IO.java:233)
at 
org.apache.jena.atlas.io.CharStreamBuffered$SourceReader.fill(CharStreamBuffered.java:77)
at 
org.apache.jena.atlas.io.CharStreamBuffered.fillArray(CharStreamBuffered.java:154)
at 
org.apache.jena.atlas.io.CharStreamBuffered.advance(CharStreamBuffered.java:137)
at org.apache.jena.atlas.io.PeekReader.advanceAndSet(PeekReader.java:235)
at org.apache.jena.atlas.io.PeekReader.init(PeekReader.java:229)
at org.apache.jena.atlas.io.PeekReader.peekChar(PeekReader.java:151)
at org.apache.jena.atlas.io.PeekReader.makeUTF8(PeekReader.java:92)
at 
org.apache.jena.riot.tokens.TokenizerFactory.makeTokenizerUTF8(TokenizerFactory.java:48)
at org.apache.jena.riot.lang.RiotParsers.createParser(RiotParsers.java:57)
at 
org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:194)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:303)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:680)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:649)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:637)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(BulkLoader.java:143)
at 
org.apache.jena.tdb.store.bulkloader.BulkLoader.loadDataset(BulkLoader.java:109)
at org.apache.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:252)
at org.apache.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:184)
at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:74)
at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:53)
at org.apache.jena.tdb.TDBLoader.load(TDBLoader.java:44)
at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:42)
Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:281)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:185)
at java.base/java.io.Reader.read(Reader.java:140)
... 26 more



____
From: Samita Bai / PhD CS Scholar @ City Campus
Sent: 17 April 2018 01:09:53
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters


i have updated the code as follows:


public class ReadQuadInJena {

public static void main(String[] args) {
// TODO Auto-generated method stub
String URL = "http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz;;
Location location = Location.create("/home/samita/TDBLoaded");
DatasetGraphTDB dgtdb = DatasetBuilderStd.create(location);
TDBLoader.load(dgtdb, URL);
}}


Code is running, I really don't know will it take data from .nq.gz or not?



________________
From: Samita Bai / PhD CS Scholar @ City Campus
Sent: 17 April 2018 00:43:10
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters


Dear Adam,


I just simply put the data in try-catch block like this


try {
Iterator iterQuad = dsg.find();
while(iterQuad.hasNext()){
System.out.println(iterQuad.next());
}}catch(RiotException e) {System.out.println("caught");}

}

OK I can work with new data using TDBLoader. Please help me should I download 
and extract the data first as it is .nq.gz format?


Or should I give URL of this file in TDBLoader? will it work with .gz format?


Plus if you have any code snippet of using TDBLoader please share with me as I 
am trying to create DatasetGraphTDB but I could not 


Regards,

Samita Bai


From: ajs6f <aj...@apache.org>
Sent: 17 April 2018 00:24:12
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

This appears to be a plain problem in the data. The character "|" should be 
%-escaped. Have you talked with the data providers to figure out why the data 
is invalid? You don't show where this triple comes from, but since Andy had no 
problem loading a more recent data set from the same provider, perhaps you can 
just try that.

Parsing in Jena intentionally defaults to rejecting invalid RDF. That's by far 
the safest approach for a library system like Jena. You can catch an exception 
and ignore the invalid data, and if that works for your application, good, or 
you can try to take some more sophisticated approach. But in any event you'll 
generally be well-advised to clean up the data _before_ it goes into your 
application. For one thing, Jena's tools (e.g. tdbloader) expect valid data.

As for your code terminating, you don't show your cod

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Adam,


I just simply put the data in try-catch block like this


try {
Iterator iterQuad = dsg.find();
while(iterQuad.hasNext()){
System.out.println(iterQuad.next());
}}catch(RiotException e) {System.out.println("caught");}

}

OK I can work with new data using TDBLoader. Please help me should I download 
and extract the data first as it is .nq.gz format?


Or should I give URL of this file in TDBLoader? will it work with .gz format?


Plus if you have any code snippet of using TDBLoader please share with me as I 
am trying to create DatasetGraphTDB but I could not 


Regards,

Samita Bai


From: ajs6f <aj...@apache.org>
Sent: 17 April 2018 00:24:12
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

This appears to be a plain problem in the data. The character "|" should be 
%-escaped. Have you talked with the data providers to figure out why the data 
is invalid? You don't show where this triple comes from, but since Andy had no 
problem loading a more recent data set from the same provider, perhaps you can 
just try that.

Parsing in Jena intentionally defaults to rejecting invalid RDF. That's by far 
the safest approach for a library system like Jena. You can catch an exception 
and ignore the invalid data, and if that works for your application, good, or 
you can try to take some more sophisticated approach. But in any event you'll 
generally be well-advised to clean up the data _before_ it goes into your 
application. For one thing, Jena's tools (e.g. tdbloader) expect valid data.

As for your code terminating, you don't show your code with a try-catch, so we 
can't help you very well.

Adam

> On Apr 16, 2018, at 1:50 PM, Samita Bai / PhD CS Scholar @ City Campus 
> <s...@iba.edu.pk> wrote:
>
> Even if I am using try catch to catch RiotException but my code still gets 
> terminated on this exception 
>
>
> Regards,
>
> Samita Bai
>
> ________
> From: Samita Bai / PhD CS Scholar @ City Campus
> Sent: 16 April 2018 22:32:26
> To: users@jena.apache.org
> Subject: Re: TDB 2 Store Parameters
>
>
> Yes I am using the same data but of Feb, 2018 as I started experimenting that 
> time. For example for  the following piece of code I am getting the error as 
> shown below.
>
>
> public class ReadQuadInJena {
>
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> String FileName = "/home/samita/Dyldo_DS_4Feb2018/data.nq";
> DatasetGraph dsg = RDFDataMgr.loadDatasetGraph(FileName);
> //System.out.println(node);
> Iterator iterQuad = dsg.find();
> while(iterQuad.hasNext()){
> System.out.println(iterQuad.next());
> }
>
>
>
>
>
>
> Exception in thread "main" org.apache.jena.riot.RiotException: [line: 89841, 
> col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
> <http://fonts.googleapis.com/css?family=Nunito[|]...>
> at 
> org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
> at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
> at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:105)
> at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:67)
> at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)
> at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
> at 
> org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:195)
> at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
> at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:303)
> at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
> at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
> at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:519)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:486)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:439)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:419)
> at org.apache.jena.riot.RDFDataMgr.loadDatasetGraph(RDFDataMgr.java:392)
> at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:19)
>
>
>
> 
> From: Andy Seaborne <a...@apache.org>
> Sent: 16 April 2018 22:13:36
> To: users@jena.apache.org
> Subject: Re: TDB 2 Store Parameters
>
> I downlaoded
>
> http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz
>
> (the latest I could find)
>
> and used tdblaoder.
>
> Is that the data you are using?
>
> Andy
>
> On 16/04/18 17:32, ajs6f wrote:
>> You should be able to check the validity of any of your files just by 
>> running them through Jena's `riot` co

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Even if I am using try catch to catch RiotException but my code still gets 
terminated on this exception 


Regards,

Samita Bai


From: Samita Bai / PhD CS Scholar @ City Campus
Sent: 16 April 2018 22:32:26
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters


Yes I am using the same data but of Feb, 2018 as I started experimenting that 
time. For example for  the following piece of code I am getting the error as 
shown below.


public class ReadQuadInJena {

public static void main(String[] args) {
// TODO Auto-generated method stub
String FileName = "/home/samita/Dyldo_DS_4Feb2018/data.nq";
DatasetGraph dsg = RDFDataMgr.loadDatasetGraph(FileName);
//System.out.println(node);
Iterator iterQuad = dsg.find();
while(iterQuad.hasNext()){
System.out.println(iterQuad.next());
}






Exception in thread "main" org.apache.jena.riot.RiotException: [line: 89841, 
col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
<http://fonts.googleapis.com/css?family=Nunito[|]...>
at 
org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:105)
at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:67)
at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)
at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
at 
org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:195)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:303)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:519)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:486)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:439)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:419)
at org.apache.jena.riot.RDFDataMgr.loadDatasetGraph(RDFDataMgr.java:392)
at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:19)




From: Andy Seaborne <a...@apache.org>
Sent: 16 April 2018 22:13:36
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

I downlaoded

http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz

(the latest I could find)

and used tdblaoder.

Is that the data you are using?

 Andy

On 16/04/18 17:32, ajs6f wrote:
> You should be able to check the validity of any of your files just by running 
> them through Jena's `riot` command.
>
> You can try loading them into a TDB1 or TDB2 db by using the `tdbloader` or 
> `tdb2.tdbloader` commands.
>
> ajs6f
>
>> On Apr 16, 2018, at 12:28 PM, Samita Bai / PhD CS Scholar @ City Campus 
>> <s...@iba.edu.pk> wrote:
>>
>> OK Andy I got your point. Can you please share the code that you used to 
>> read the Dynamic Linked Data Observatory dataset?
>>
>>
>>
>> Regards,
>>
>> Samita Bai
>>
>> 
>> From: Andy Seaborne <a...@apache.org>
>> Sent: 16 April 2018 15:34:07
>> To: users@jena.apache.org
>> Subject: Re: TDB 2 Store Parameters
>>
>> If you wish to prcoess the data as it is parsed, then see StreamRDF and
>> either
>>
>> NxParser, which is not part of Jena, is not a validating parser.
>>
>> If the data is not valid, then you will have problems at some point,
>> either loading, querying or outputting later.
>>
>> Adam has explained that TDB2 inxexes heavily so that querying is well
>> severed.
>>
>> We can't help with the parser errors without knowing what they are.
>>
>> Which files from Dynamic Linked Data Observatory are you processing?
>> Don't the later ones replace the earlier ones?
>>
>> I found that the last n-quads file was 42 million triples and all valid.
>>
>>  Andy
>>
>> On 16/04/18 11:05, ajs6f wrote:
>>> Is there are syntax errors in your RDF (and it sounds like that is why Jena 
>>> will not read it directly) you are doing yourself no service by taking 
>>> unusual pains to force TDB to ingest your data.
>>>
>>> Please show us the errors that Jena is throwing trying to read your data 
>>> and an appropriate sample of the data in question.
>>>
>>>
>>> ajs6f
>>>
>>>> On Apr 16, 2018, at 4:42 AM, Samita Bai / PhD CS Scholar @ City Campus 
>>>> <s...@iba.edu.pk> wrote:
>>>>
>>>> In addition to previous query. It is takin

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Yes I am using the same data but of Feb, 2018 as I started experimenting that 
time. For example for  the following piece of code I am getting the error as 
shown below.


public class ReadQuadInJena {

public static void main(String[] args) {
// TODO Auto-generated method stub
String FileName = "/home/samita/Dyldo_DS_4Feb2018/data.nq";
DatasetGraph dsg = RDFDataMgr.loadDatasetGraph(FileName);
//System.out.println(node);
Iterator iterQuad = dsg.find();
while(iterQuad.hasNext()){
System.out.println(iterQuad.next());
}






Exception in thread "main" org.apache.jena.riot.RiotException: [line: 89841, 
col: 232] Illegal character in IRI (codepoint 0x7C, '|'): 
<http://fonts.googleapis.com/css?family=Nunito[|]...>
at 
org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:105)
at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:67)
at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)
at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
at 
org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:195)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:334)
at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:303)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:277)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:498)
at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:519)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:486)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:439)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:419)
at org.apache.jena.riot.RDFDataMgr.loadDatasetGraph(RDFDataMgr.java:392)
at ldbqPack.ReadQuadInJena.main(ReadQuadInJena.java:19)




From: Andy Seaborne <a...@apache.org>
Sent: 16 April 2018 22:13:36
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

I downlaoded

http://swse.deri.org/dyldo/data/2016-03-27/data.nq.gz

(the latest I could find)

and used tdblaoder.

Is that the data you are using?

 Andy

On 16/04/18 17:32, ajs6f wrote:
> You should be able to check the validity of any of your files just by running 
> them through Jena's `riot` command.
>
> You can try loading them into a TDB1 or TDB2 db by using the `tdbloader` or 
> `tdb2.tdbloader` commands.
>
> ajs6f
>
>> On Apr 16, 2018, at 12:28 PM, Samita Bai / PhD CS Scholar @ City Campus 
>> <s...@iba.edu.pk> wrote:
>>
>> OK Andy I got your point. Can you please share the code that you used to 
>> read the Dynamic Linked Data Observatory dataset?
>>
>>
>>
>> Regards,
>>
>> Samita Bai
>>
>> 
>> From: Andy Seaborne <a...@apache.org>
>> Sent: 16 April 2018 15:34:07
>> To: users@jena.apache.org
>> Subject: Re: TDB 2 Store Parameters
>>
>> If you wish to prcoess the data as it is parsed, then see StreamRDF and
>> either
>>
>> NxParser, which is not part of Jena, is not a validating parser.
>>
>> If the data is not valid, then you will have problems at some point,
>> either loading, querying or outputting later.
>>
>> Adam has explained that TDB2 inxexes heavily so that querying is well
>> severed.
>>
>> We can't help with the parser errors without knowing what they are.
>>
>> Which files from Dynamic Linked Data Observatory are you processing?
>> Don't the later ones replace the earlier ones?
>>
>> I found that the last n-quads file was 42 million triples and all valid.
>>
>>  Andy
>>
>> On 16/04/18 11:05, ajs6f wrote:
>>> Is there are syntax errors in your RDF (and it sounds like that is why Jena 
>>> will not read it directly) you are doing yourself no service by taking 
>>> unusual pains to force TDB to ingest your data.
>>>
>>> Please show us the errors that Jena is throwing trying to read your data 
>>> and an appropriate sample of the data in question.
>>>
>>>
>>> ajs6f
>>>
>>>> On Apr 16, 2018, at 4:42 AM, Samita Bai / PhD CS Scholar @ City Campus 
>>>> <s...@iba.edu.pk> wrote:
>>>>
>>>> In addition to previous query. It is taking a lot of time to first parse 
>>>> the dataset using NXParser then checking for object, and creating quad 
>>>> again and storing in TDB. It could be very simple if we can take the quad 
>>>> check its object and insert it in TDB.
>>>>
>>>>
>

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
In addition to previous query. It is taking a lot of time to first parse the 
dataset using NXParser then checking for object, and creating quad again and 
storing in TDB. It could be very simple if we can take the quad check its 
object and insert it in TDB.


But Jena is not helping me with this 


So I have to create quads again and store it in TDB.


Any help is surely appreciated.


Regards,

Samita Bai


From: Samita Bai / PhD CS Scholar @ City Campus
Sent: 16 April 2018 13:33:51
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters


Thank you Andy and Adam for the help. Actually, I am just indexing the quads 
where object is either literal or foreign URI (i.e. Object belonging to 
different dataset than subject), I am using NXParser (as Jena is giving various 
parsing errors) to parse the dataset and then I am storing in TDB2 in the 
following manner.



public  void SetQuadsList(String sub, String pred, String obj, String context) {
Node subjects = NodeFactory.createURI(sub);
Node objects = NodeFactory.createURI(obj);
Node contexts =NodeFactory.createURI(context);
//Node rdfSeeAlso = RDFS.seeAlso.asNode();

Node predicates =NodeFactory.createURI(pred);

//Quad quads = Quad.create(contexts, objects, rdfSeeAlso, subjects);

Quad quads = Quad.create(contexts, subjects, predicates, objects);

QuadList.add(quads);

//System.out.println("Number of backlinks:" + QuadList.size());

//System.out.println("quad written");

//System.out.println("Quad"+quads.toString());

}
public List GetQuadsList(){
return QuadList;
}
public void QuadsToTDB(List quadList) {
final String DATASET_DIR_NAME = "DyLDO1000K_Index";
Dataset dataset = TDB2Factory.connectDataset ( DATASET_DIR_NAME );


dataset.begin ( ReadWrite.WRITE );
try {
DatasetGraph dsg = dataset.asDatasetGraph();
Iterator quads = quadList.iterator();
System.out.println("Size of Quad List: "+quadList.size());
while ( quads.hasNext() ) {
//System.out.println("here");
Quad quad = quads.next();
dsg.add(quad);
//System.out.println(quad.toString()+ "added");
//RDFDataMgr.writeQuads(System.out, quads);
  //  RDFDataMgr.write(System.out, dsg, Lang.NQUADS);

}
System.out.println("dsg created of size "+dsg.size());
//RDFDataMgr.write(System.out, dsg, Lang.NQUADS);
System.out.println("written dsg using datamgr.");


//System.out.println(dataset.isEmpty());
//RDFDataMgr.write(System.out, dsg, Lang.NQUADS);
dataset.commit();

System.out.println("committed dataset.");


} catch ( Exception e ) {
e.printStackTrace(System.err);
//dataset.abort();
} finally {
//RDFDataMgr.write(System.out, dsg, Lang.NQUADS);
dataset.end();

}
System.out.println("end method.");
}}


I have indexed 40,000 files (as I have spilited the dataset into files 
according to context) and the index size has become 120 GB. I have a total of 
1,35,600 files whose total size is 19.8 GB only.


Why the TDB is making such BIG index size. I am confused :( is there any 
problem in my code.


Please suggest me if there can be some improvements.



Regards,

Samita Bai







From: ajs6f <aj...@apache.org>
Sent: 15 April 2018 03:07:59
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

42 million quads is nothing like so many that either TDB version should have 
any problem doing normal indexing (assuming very little in the way of 
hardware-- I ingest datasets like that on my laptop all the time).

Do you have some extraordinary hardware limitations?

Adam

> On Apr 14, 2018, at 11:42 AM, Andy Seaborne <a...@apache.org> wrote:
>
> Hi Samita,
>
> Firstly - as Adam points out - if theer are no indexes then access to the 
> data will be very slow.  For a GSPO index,  that means squeries must be 
> "GRAPH  { ... }" and probably "GRAPH  { .. }".
>
> GSPO means lookup by G then S within those G and the same for P then O.
>
> I looked at the data and it seems to be able 42 million quads.
>
> Using TDB1 (the loader is faster at this scale currently) is likely to be a 
> better choice.
>
> Looking at StoreParams in TDB2:
>
> The code below creates the database at TDB2Factory.connectDataset so any 
> StoreParams after that do not affect indexing.
>
> I tried to make it work in the release but the code ignores provided 
> StoreParams - sorry.  Even if it did work, it hits a test to make sure there 
> are basic indexing (Adam's point).
>
>Andy
>
>
> On 13/04/18 13:42, Samita Bai  / Ph

Re: TDB 2 Store Parameters

2018-04-16 Thread Samita Bai / PhD CS Scholar @ City Campus
Thank you Andy and Adam for the help. Actually, I am just indexing the quads 
where object is either literal or foreign URI (i.e. Object belonging to 
different dataset than subject), I am using NXParser (as Jena is giving various 
parsing errors) to parse the dataset and then I am storing in TDB2 in the 
following manner.



public  void SetQuadsList(String sub, String pred, String obj, String context) {
Node subjects = NodeFactory.createURI(sub);
Node objects = NodeFactory.createURI(obj);
Node contexts =NodeFactory.createURI(context);
//Node rdfSeeAlso = RDFS.seeAlso.asNode();

Node predicates =NodeFactory.createURI(pred);

//Quad quads = Quad.create(contexts, objects, rdfSeeAlso, subjects);

Quad quads = Quad.create(contexts, subjects, predicates, objects);

QuadList.add(quads);

//System.out.println("Number of backlinks:" + QuadList.size());

//System.out.println("quad written");

//System.out.println("Quad"+quads.toString());

}
public List GetQuadsList(){
return QuadList;
}
public void QuadsToTDB(List quadList) {
final String DATASET_DIR_NAME = "DyLDO1000K_Index";
Dataset dataset = TDB2Factory.connectDataset ( DATASET_DIR_NAME );


dataset.begin ( ReadWrite.WRITE );
try {
DatasetGraph dsg = dataset.asDatasetGraph();
Iterator quads = quadList.iterator();
System.out.println("Size of Quad List: "+quadList.size());
while ( quads.hasNext() ) {
//System.out.println("here");
Quad quad = quads.next();
dsg.add(quad);
//System.out.println(quad.toString()+ "added");
//RDFDataMgr.writeQuads(System.out, quads);
  //  RDFDataMgr.write(System.out, dsg, Lang.NQUADS);

}
System.out.println("dsg created of size "+dsg.size());
//RDFDataMgr.write(System.out, dsg, Lang.NQUADS);
System.out.println("written dsg using datamgr.");


//System.out.println(dataset.isEmpty());
//RDFDataMgr.write(System.out, dsg, Lang.NQUADS);
dataset.commit();

System.out.println("committed dataset.");


} catch ( Exception e ) {
e.printStackTrace(System.err);
//dataset.abort();
} finally {
//RDFDataMgr.write(System.out, dsg, Lang.NQUADS);
dataset.end();

}
System.out.println("end method.");
}}


I have indexed 40,000 files (as I have spilited the dataset into files 
according to context) and the index size has become 120 GB. I have a total of 
1,35,600 files whose total size is 19.8 GB only.


Why the TDB is making such BIG index size. I am confused :( is there any 
problem in my code.


Please suggest me if there can be some improvements.



Regards,

Samita Bai







From: ajs6f <aj...@apache.org>
Sent: 15 April 2018 03:07:59
To: users@jena.apache.org
Subject: Re: TDB 2 Store Parameters

42 million quads is nothing like so many that either TDB version should have 
any problem doing normal indexing (assuming very little in the way of 
hardware-- I ingest datasets like that on my laptop all the time).

Do you have some extraordinary hardware limitations?

Adam

> On Apr 14, 2018, at 11:42 AM, Andy Seaborne <a...@apache.org> wrote:
>
> Hi Samita,
>
> Firstly - as Adam points out - if theer are no indexes then access to the 
> data will be very slow.  For a GSPO index,  that means squeries must be 
> "GRAPH  { ... }" and probably "GRAPH  { .. }".
>
> GSPO means lookup by G then S within those G and the same for P then O.
>
> I looked at the data and it seems to be able 42 million quads.
>
> Using TDB1 (the loader is faster at this scale currently) is likely to be a 
> better choice.
>
> Looking at StoreParams in TDB2:
>
> The code below creates the database at TDB2Factory.connectDataset so any 
> StoreParams after that do not affect indexing.
>
> I tried to make it work in the release but the code ignores provided 
> StoreParams - sorry.  Even if it did work, it hits a test to make sure there 
> are basic indexing (Adam's point).
>
>Andy
>
>
> On 13/04/18 13:42, Samita Bai  / PhD CS Scholar @ City Campus wrote:
>> I wrote the following code to build only one type of triple and quad index 
>> but it is still creating all indexes 
>> package ldbqPack;
>> import org.apache.jena.query.Dataset;
>> import org.apache.jena.tdb2.TDB2Factory;
>> import org.apache.jena.tdb2.setup.StoreParams;
>> import org.apache.jena.tdb2.sys.DatabaseConnection;
>> import org.apache.jena.dboe.base.block.FileMode;
>> import org.apache.jena.dboe.base.file.Location;
>> import org.apache.jena.tdb2.setup.StoreParamsFactory;
>> publ

TDB 2 Store Parameters

2018-04-13 Thread Samita Bai / PhD CS Scholar @ City Campus
I wrote the following code to build only one type of triple and quad index but 
it is still creating all indexes 


package ldbqPack;

import org.apache.jena.query.Dataset;

import org.apache.jena.tdb2.TDB2Factory;
import org.apache.jena.tdb2.setup.StoreParams;
import org.apache.jena.tdb2.sys.DatabaseConnection;
import org.apache.jena.dboe.base.block.FileMode;
import org.apache.jena.dboe.base.file.Location;
import org.apache.jena.tdb2.setup.StoreParamsFactory;


public class StrPrms {
static String[] tindexes= {"SPO"};
static String[] qindexes= {"GSPO"};
static String[] pindexes= {"GPU"};
static final StoreParams pApp = StoreParams.builder()
   .blockSize(12)  // Not dynamic
   .nodeMissCacheSize(12)  // Dynamic
   .build();
   static final StoreParams pLoc = StoreParams.builder()
   .blockSize(0)
   .nodeMissCacheSize(0).build();

   static final StoreParams pDft = StoreParams.builder()
.fileMode(FileMode.mapped)
.blockSize(8192)
.blockReadCacheSize(5000)
.blockWriteCacheSize(1000)
.node2NodeIdCacheSize(20)
.nodeId2NodeCacheSize(75)
.nodeMissCacheSize(1000)
.nodeTableBaseName("nodes")
.primaryIndexTriples("SPO")
.tripleIndexes(tindexes)
.primaryIndexQuads("GSPO")
.quadIndexes(qindexes)
.prefixTableBaseName("prefixes")
.primaryIndexPrefix("GPU")
.prefixIndexes(pindexes)
.build();


public static void main(String[] args) {
// TODO Auto-generated method stub
final String DATASET_DIR_NAME = "DyLDO100";
Dataset dataset = TDB2Factory.connectDataset ( DATASET_DIR_NAME );

Location location = Location.create(DATASET_DIR_NAME);

StoreParams custom_params = 
StoreParamsFactory.decideStoreParams(location, true, pApp, pLoc,  pDft);

   DatabaseConnection.connectCreate(location, custom_params);

   StoreParams params = StoreParams.getSmallStoreParams();

System.out.println(params);


}

}

Please help.

Regards,
Samita Bai




P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




TDB2 store parameters

2018-04-13 Thread Samita Bai / PhD CS Scholar @ City Campus
Hello,


I want to store only one index in TDB2 i.e. GSPO, instead of all combinations. 
How can I do it? I read some documentation and got to know that it can be done 
with the help of store parameters but I am not finding any help how to call 
that config file from code.


Please guide me.


Regards,

Samita Bai

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: Jena Property Table

2018-02-28 Thread Samita Bai / PhD CS Scholar @ City Campus
Yes Andy, I am also thinking to switch to TDB, cheers.


I felt so good you helped me.


Now I can convince my supervisor 


Regards,

Samita Bai


From: Andy Seaborne <a...@apache.org>
Sent: 28 February 2018 16:24:21
To: users@jena.apache.org
Subject: Re: Jena Property Table

I read the javadoc :-)

"""
Each Row of the PropertyTable has an unique rowKey Node of the subject
(or s for short).
"""

I'm not convinced all the implementations follow this but if they don't,
I do not see how it is useable.

A direct implementation as a graph looks just as easy.

If you don't have a lot or data and so don't need the compactness of a
custom implementation, use Modelfactory.createDefaultModel (or the graph
version Factory.createGraphMem( )). Because Graph is an interface, you
can replace the default implementation later.

If you are going to be doing querying and updates, then DatasetFactory
and use a transactional dataset (or TDB for a persistent one).

It depends what's important to your project - if this is a necessary
implementation component with no performance implications, do whatever
is the least work.

Could you say something about your project and what are you trying to 0o?
     Andy

On 28/02/18 11:07, Samita Bai  / PhD CS Scholar @ City Campus wrote:
> Thank you Andy for such a detailed reply. I am not getting this 'one subject 
> only'. Is it not possible to add more subjects in a single property table?
>
> And you are suggesting me to extend GraphBase right? Ok I will work it now.
>
>
>
> Thank you so much.
>
> 
> From: Andy Seaborne <a...@apache.org>
> Sent: 28 February 2018 15:50:38
> To: users@jena.apache.org
> Subject: Re: Jena Property Table
>
> The PropertyTable abstraction is for regular data where for each subject
> there are the same properties, and the same number of each property for
> every subject.
>
> Each row of the property table has a unique key which is the subject of
> each triple. Being unique, it is assuming one subject - one row.
>
>
> If your data is one subject, one RDFS.seeAlso, a property table could be
> used. If your data is one subject, potentially many RDFS.seeAlso, then
> PropertyTable isn't the right abstaction.
>
> GraphPropertyTable is the Graph implementation over PropertyTable.
> Graphs are central to Jena.  A quick look at the code and I think it has
> bugs (it ignores the subject in a Graph.find operation which looks wrong
> to me).
>
> Personally, I'd consider not using that at all but instade doing your
> own implementation of Graph by extending GraphBase ; you only have to
> implement:
>
> performAdd( Triple t )
> performDelete( Triple t )
> graphBaseFind(Triple triplePattern)
>
> then check triple added match your restriction to RDFS.seeAlso
> Choose the datastructure to store the (subject, object) pairs needed.
> (A Multimap<Node,Node> for example).
>
> And write test cases :-)
>
>   Hope that helps,
>   Andy
>
> The name is taken from this earlier work:
> http://www.hpl.hp.com/techreports/2006/HPL-2006-140.html
> which is for a SQL-storage system no longer in Jena.
>
>
> On 28/02/18 10:31, Samita Bai  / PhD CS Scholar @ City Campus wrote:
>> Dear Andy,
>>
>>
>> I am working on my Ph.D thesis and I have created a dataset of triples in 
>> which the property is same (i.e. RDFS.seeAlso), means I have only one 
>> property for all triples. I thought I will be creating a property table with 
>> one column and many rows. And I coded it too. But I am bit concerned because 
>> property table is now deprecated.
>>
>>
>> Please suggest me any indexing or storing mechanism where we want to store 
>> only one property for many triples.
>>
>>
>> Thanks & Regards,
>>
>> Samita Bai
>>
>> 
>> From: Andy Seaborne <a...@apache.org>
>> Sent: 28 February 2018 15:26:25
>> To: users@jena.apache.org
>> Subject: Re: Jena Property Table
>>
>> Hi Samita,
>>
>> The jena-csv module sees less attention than the major modules and is
>> considered "legacy".  That said, it is not going away any time soon and
>> the source code will always be available.
>>
>> Could you say something about your project and what are you trying to do
>> with property tables?  Maybe there is a different approach somewhere.
>>
>>Andy
>>
>>
>>
>> On 28/02/18 09:36, Samita Bai  / PhD CS Scholar @ City Campus wrote:
>>> Oh Ok, then please follow this link
>>>
>>>
>>> https://github.com/apache/jena/tree/master/j

Re: Jena Property Table

2018-02-28 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Andy,


My data is as follows,


subject_1  rdfs:seeAlso object_1

subject_2  rdfs:seeAlso object_2

subject_3  rdfs:seeAlso object_3



subject_n  rdfs:seeAlso object_n


so it is actually one subject one rdfs:seeAlso, so should I go for property 
table?


From: Andy Seaborne <a...@apache.org>
Sent: 28 February 2018 15:50:38
To: users@jena.apache.org
Subject: Re: Jena Property Table

The PropertyTable abstraction is for regular data where for each subject
there are the same properties, and the same number of each property for
every subject.

Each row of the property table has a unique key which is the subject of
each triple. Being unique, it is assuming one subject - one row.


If your data is one subject, one RDFS.seeAlso, a property table could be
used. If your data is one subject, potentially many RDFS.seeAlso, then
PropertyTable isn't the right abstaction.

GraphPropertyTable is the Graph implementation over PropertyTable.
Graphs are central to Jena.  A quick look at the code and I think it has
bugs (it ignores the subject in a Graph.find operation which looks wrong
to me).

Personally, I'd consider not using that at all but instade doing your
own implementation of Graph by extending GraphBase ; you only have to
implement:

performAdd( Triple t )
performDelete( Triple t )
graphBaseFind(Triple triplePattern)

then check triple added match your restriction to RDFS.seeAlso
Choose the datastructure to store the (subject, object) pairs needed.
(A Multimap<Node,Node> for example).

And write test cases :-)

 Hope that helps,
 Andy

The name is taken from this earlier work:
http://www.hpl.hp.com/techreports/2006/HPL-2006-140.html
which is for a SQL-storage system no longer in Jena.


On 28/02/18 10:31, Samita Bai  / PhD CS Scholar @ City Campus wrote:
> Dear Andy,
>
>
> I am working on my Ph.D thesis and I have created a dataset of triples in 
> which the property is same (i.e. RDFS.seeAlso), means I have only one 
> property for all triples. I thought I will be creating a property table with 
> one column and many rows. And I coded it too. But I am bit concerned because 
> property table is now deprecated.
>
>
> Please suggest me any indexing or storing mechanism where we want to store 
> only one property for many triples.
>
>
> Thanks & Regards,
>
> Samita Bai
>
> 
> From: Andy Seaborne <a...@apache.org>
> Sent: 28 February 2018 15:26:25
> To: users@jena.apache.org
> Subject: Re: Jena Property Table
>
> Hi Samita,
>
> The jena-csv module sees less attention than the major modules and is
> considered "legacy".  That said, it is not going away any time soon and
> the source code will always be available.
>
> Could you say something about your project and what are you trying to do
> with property tables?  Maybe there is a different approach somewhere.
>
>   Andy
>
>
>
> On 28/02/18 09:36, Samita Bai  / PhD CS Scholar @ City Campus wrote:
>> Oh Ok, then please follow this link
>>
>>
>> https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable
>>
>> [https://avatars3.githubusercontent.com/u/47359?s=400=4]<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
>>
>> apache/jena<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
>> github.com
>> jena - Mirror of Apache Jena
>>
>>
>>
>>
>>
>> ________
>> From: Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
>> Sent: 28 February 2018 13:44:33
>> To: users@jena.apache.org
>> Subject: Re: Jena Property Table
>>
>> Attachments do not work on this mailing list.
>>
>>
>> On 28.02.2018 09:21, Samita Bai / PhD CS Scholar @ City Campus wrote:
>>>
>>> Dear Lorenz,
>>>
>>>
>>> I have attached the screenshot, I am talking about property table in
>>> jena csv package. Please have a look and suggest me.
>>>
>>>
>>> Regards,
>>>
>>> --------------------
>>> *From:* Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
>>> *Sent:* 28 February 2018 13:07:47
>>> *To:* users@jena.apache.org
>>> *Subject:* Re: Jena Property Table
>>>
>>> Can you be a bit more precise please? What exactly is deprecated? And
>>> what do you want to do in your project?
>>>
>>>
>>> On 28.02.2018 08:45, Samita Bai / PhD CS Scholar @ City Campus wrote:
>>>> Hello Jena team,
>>>>
>>>&

Re: Jena Property Table

2018-02-28 Thread Samita Bai / PhD CS Scholar @ City Campus
Thank you Andy for such a detailed reply. I am not getting this 'one subject 
only'. Is it not possible to add more subjects in a single property table?

And you are suggesting me to extend GraphBase right? Ok I will work it now.



Thank you so much.


From: Andy Seaborne <a...@apache.org>
Sent: 28 February 2018 15:50:38
To: users@jena.apache.org
Subject: Re: Jena Property Table

The PropertyTable abstraction is for regular data where for each subject
there are the same properties, and the same number of each property for
every subject.

Each row of the property table has a unique key which is the subject of
each triple. Being unique, it is assuming one subject - one row.


If your data is one subject, one RDFS.seeAlso, a property table could be
used. If your data is one subject, potentially many RDFS.seeAlso, then
PropertyTable isn't the right abstaction.

GraphPropertyTable is the Graph implementation over PropertyTable.
Graphs are central to Jena.  A quick look at the code and I think it has
bugs (it ignores the subject in a Graph.find operation which looks wrong
to me).

Personally, I'd consider not using that at all but instade doing your
own implementation of Graph by extending GraphBase ; you only have to
implement:

performAdd( Triple t )
performDelete( Triple t )
graphBaseFind(Triple triplePattern)

then check triple added match your restriction to RDFS.seeAlso
Choose the datastructure to store the (subject, object) pairs needed.
(A Multimap<Node,Node> for example).

And write test cases :-)

 Hope that helps,
 Andy

The name is taken from this earlier work:
http://www.hpl.hp.com/techreports/2006/HPL-2006-140.html
which is for a SQL-storage system no longer in Jena.


On 28/02/18 10:31, Samita Bai  / PhD CS Scholar @ City Campus wrote:
> Dear Andy,
>
>
> I am working on my Ph.D thesis and I have created a dataset of triples in 
> which the property is same (i.e. RDFS.seeAlso), means I have only one 
> property for all triples. I thought I will be creating a property table with 
> one column and many rows. And I coded it too. But I am bit concerned because 
> property table is now deprecated.
>
>
> Please suggest me any indexing or storing mechanism where we want to store 
> only one property for many triples.
>
>
> Thanks & Regards,
>
> Samita Bai
>
> 
> From: Andy Seaborne <a...@apache.org>
> Sent: 28 February 2018 15:26:25
> To: users@jena.apache.org
> Subject: Re: Jena Property Table
>
> Hi Samita,
>
> The jena-csv module sees less attention than the major modules and is
> considered "legacy".  That said, it is not going away any time soon and
> the source code will always be available.
>
> Could you say something about your project and what are you trying to do
> with property tables?  Maybe there is a different approach somewhere.
>
>   Andy
>
>
>
> On 28/02/18 09:36, Samita Bai  / PhD CS Scholar @ City Campus wrote:
>> Oh Ok, then please follow this link
>>
>>
>> https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable
>>
>> [https://avatars3.githubusercontent.com/u/47359?s=400=4]<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
>>
>> apache/jena<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
>> github.com
>> jena - Mirror of Apache Jena
>>
>>
>>
>>
>>
>> ________
>> From: Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
>> Sent: 28 February 2018 13:44:33
>> To: users@jena.apache.org
>> Subject: Re: Jena Property Table
>>
>> Attachments do not work on this mailing list.
>>
>>
>> On 28.02.2018 09:21, Samita Bai / PhD CS Scholar @ City Campus wrote:
>>>
>>> Dear Lorenz,
>>>
>>>
>>> I have attached the screenshot, I am talking about property table in
>>> jena csv package. Please have a look and suggest me.
>>>
>>>
>>> Regards,
>>>
>>> --------------------
>>> *From:* Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
>>> *Sent:* 28 February 2018 13:07:47
>>> *To:* users@jena.apache.org
>>> *Subject:* Re: Jena Property Table
>>>
>>> Can you be a bit more precise please? What exactly is deprecated? And
>>> what do you want to do in your project?
>>>
>>>
>>> On 28.02.2018 08:45, Samita Bai / PhD CS Scholar @ City Campus wrote:
>>>> Hello Jena team,
>>>>
>>>>
>>

Re: Jena Property Table

2018-02-28 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Andy,


I am working on my Ph.D thesis and I have created a dataset of triples in which 
the property is same (i.e. RDFS.seeAlso), means I have only one property for 
all triples. I thought I will be creating a property table with one column and 
many rows. And I coded it too. But I am bit concerned because property table is 
now deprecated.


Please suggest me any indexing or storing mechanism where we want to store only 
one property for many triples.


Thanks & Regards,

Samita Bai


From: Andy Seaborne <a...@apache.org>
Sent: 28 February 2018 15:26:25
To: users@jena.apache.org
Subject: Re: Jena Property Table

Hi Samita,

The jena-csv module sees less attention than the major modules and is
considered "legacy".  That said, it is not going away any time soon and
the source code will always be available.

Could you say something about your project and what are you trying to do
with property tables?  Maybe there is a different approach somewhere.

 Andy



On 28/02/18 09:36, Samita Bai  / PhD CS Scholar @ City Campus wrote:
> Oh Ok, then please follow this link
>
>
> https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable
>
> [https://avatars3.githubusercontent.com/u/47359?s=400=4]<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
>
> apache/jena<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
> github.com
> jena - Mirror of Apache Jena
>
>
>
>
>
> 
> From: Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
> Sent: 28 February 2018 13:44:33
> To: users@jena.apache.org
> Subject: Re: Jena Property Table
>
> Attachments do not work on this mailing list.
>
>
> On 28.02.2018 09:21, Samita Bai / PhD CS Scholar @ City Campus wrote:
>>
>> Dear Lorenz,
>>
>>
>> I have attached the screenshot, I am talking about property table in
>> jena csv package. Please have a look and suggest me.
>>
>>
>> Regards,
>>
>> 
>> *From:* Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
>> *Sent:* 28 February 2018 13:07:47
>> *To:* users@jena.apache.org
>> *Subject:* Re: Jena Property Table
>>
>> Can you be a bit more precise please? What exactly is deprecated? And
>> what do you want to do in your project?
>>
>>
>> On 28.02.2018 08:45, Samita Bai / PhD CS Scholar @ City Campus wrote:
>>> Hello Jena team,
>>>
>>>
>>> I have a query regarding Jena Property table, it is deprecated, is
>> any alternative provided for this? Should I use it in my project or not?
>>>
>>>
>>> Please help me.
>>>
>>>
>>> Regards,
>>>
>>> Samita
>>>
>>> P : Please consider the environment before printing this e-mail
>>>
>>> 
>>>
>>> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments
>> may contain confidential and privileged information. If you are not
>> the intended recipient, please notify the sender immediately by return
>> e-mail, delete this e-mail and destroy any copies. Any dissemination
>> or use of this information by a person other than the intended
>> recipient is unauthorized and may be illegal.
>>>
>>> 
>>>
>>
>> *P /: Please consider the environment before printing this e-mail/*
>>
>> 
>>
>> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments
>> may contain confidential and privileged information. If you are not
>> the intended recipient, please notify the sender immediately by return
>> e-mail, delete this e-mail and destroy any copies. Any dissemination
>> or use of this information by a person other than the intended
>> recipient is unauthorized and may be illegal.
>>
>> 
>
>
> P : Please consider the environment before printing this e-mail
>
> 
>
> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
> contain confidential and privileged information. If you are not the intended 
> recipient, please notify the sender immediately by return e-mail, delete this 
> e-mail and destroy any copies. Any dissemination or use of this information 
> by a person other than the intended recipient is unauthorized and may be 
> illegal.
>
> 
>

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: Jena Property Table

2018-02-28 Thread Samita Bai / PhD CS Scholar @ City Campus
Oh Ok, then please follow this link


https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable

[https://avatars3.githubusercontent.com/u/47359?s=400=4]<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>

apache/jena<https://github.com/apache/jena/tree/master/jena-csv/src/main/java/org/apache/jena/propertytable>
github.com
jena - Mirror of Apache Jena






From: Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
Sent: 28 February 2018 13:44:33
To: users@jena.apache.org
Subject: Re: Jena Property Table

Attachments do not work on this mailing list.


On 28.02.2018 09:21, Samita Bai / PhD CS Scholar @ City Campus wrote:
>
> Dear Lorenz,
>
>
> I have attached the screenshot, I am talking about property table in
> jena csv package. Please have a look and suggest me.
>
>
> Regards,
>
> 
> *From:* Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
> *Sent:* 28 February 2018 13:07:47
> *To:* users@jena.apache.org
> *Subject:* Re: Jena Property Table
>
> Can you be a bit more precise please? What exactly is deprecated? And
> what do you want to do in your project?
>
>
> On 28.02.2018 08:45, Samita Bai / PhD CS Scholar @ City Campus wrote:
> > Hello Jena team,
> >
> >
> > I have a query regarding Jena Property table, it is deprecated, is
> any alternative provided for this? Should I use it in my project or not?
> >
> >
> > Please help me.
> >
> >
> > Regards,
> >
> > Samita
> >
> > P : Please consider the environment before printing this e-mail
> >
> > 
> >
> > CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments
> may contain confidential and privileged information. If you are not
> the intended recipient, please notify the sender immediately by return
> e-mail, delete this e-mail and destroy any copies. Any dissemination
> or use of this information by a person other than the intended
> recipient is unauthorized and may be illegal.
> >
> > 
> >
>
> *P /: Please consider the environment before printing this e-mail/*
>
> 
>
> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments
> may contain confidential and privileged information. If you are not
> the intended recipient, please notify the sender immediately by return
> e-mail, delete this e-mail and destroy any copies. Any dissemination
> or use of this information by a person other than the intended
> recipient is unauthorized and may be illegal.
>
> 


P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Re: Jena Property Table

2018-02-28 Thread Samita Bai / PhD CS Scholar @ City Campus
Dear Lorenz,


I have attached the screenshot, I am talking about property table in jena csv 
package. Please have a look and suggest me.


Regards,


From: Lorenz Buehmann <buehm...@informatik.uni-leipzig.de>
Sent: 28 February 2018 13:07:47
To: users@jena.apache.org
Subject: Re: Jena Property Table

Can you be a bit more precise please? What exactly is deprecated? And
what do you want to do in your project?


On 28.02.2018 08:45, Samita Bai / PhD CS Scholar @ City Campus wrote:
> Hello Jena team,
>
>
> I have a query regarding Jena Property table, it is deprecated, is any 
> alternative provided for this? Should I use it in my project or not?
>
>
> Please help me.
>
>
> Regards,
>
> Samita
>
> P : Please consider the environment before printing this e-mail
>
> 
>
> CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
> contain confidential and privileged information. If you are not the intended 
> recipient, please notify the sender immediately by return e-mail, delete this 
> e-mail and destroy any copies. Any dissemination or use of this information 
> by a person other than the intended recipient is unauthorized and may be 
> illegal.
>
> 
>


P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.




Jena Property Table

2018-02-27 Thread Samita Bai / PhD CS Scholar @ City Campus
Hello Jena team,


I have a query regarding Jena Property table, it is deprecated, is any 
alternative provided for this? Should I use it in my project or not?


Please help me.


Regards,

Samita

P : Please consider the environment before printing this e-mail



CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may 
contain confidential and privileged information. If you are not the intended 
recipient, please notify the sender immediately by return e-mail, delete this 
e-mail and destroy any copies. Any dissemination or use of this information by 
a person other than the intended recipient is unauthorized and may be illegal.