Hi:
Jumping in late here. I always look when there is code and it quite clearly states that his code base is subject to the
I also perused the main trunk and all the code is in fact open (although Piotr, you may want to add a header to each source file with a statement of license and link to help others understand this). I trust that the MPL license is sufficient for Ontolog Forum to at least allow discussion here?
Assuming it is, the code project appears to be a way to map OWL to SQL. The current code base does this with a lot of hard coded statement constructors and is heavily string based. Sample:
if(name.equals("occurs_before"))
|
result = "SELECT 1 FROM {TABLE_NAME} {Q2} WHERE "+(additionalCondition != null ? additionalCondition : "")+"{Q1}.{DATE_FIELD} < {Q2}.{DATE_FIELD} ";
|
else if(!name.contains("_day"))
|
throw new OwlToSqlTransformationException("Unsupported time unit of a temporal object property: "+name);
|
else if(name.contains("between"))
|
result = "SELECT 1 FROM {TABLE_NAME} {Q2} WHERE "+(additionalCondition != null ? additionalCondition : "")+"("+conf.getDBSpecificDateDifference("{Q2}.{DATE_FIELD} - {Q1}.{DATE_FIELD}")+" BETWEEN "+TextProcessingUtils.parseNumberOfDaysBetween(name)+") ";
|
else if(name.startsWith("occurs_max"))
|
result = "SELECT 1 FROM {TABLE_NAME} {Q2} WHERE "+(additionalCondition != null ? additionalCondition : "")+"("+conf.getDBSpecificDateDifference("{Q2}.{DATE_FIELD} - {Q1}.{DATE_FIELD}")+" BETWEEN 1 AND "+TextProcessingUtils.parseNumberOfDays(name)+") ";
|
else if(name.startsWith("occurs_min"))
|
result = "SELECT 1 FROM {TABLE_NAME} {Q2} WHERE "+(additionalCondition != null ? additionalCondition : "")+conf.getDBSpecificDateDifference("{Q2}.{DATE_FIELD} - {Q1}.{DATE_FIELD}")+" >= "+TextProcessingUtils.parseNumberOfDays(name)+" ";
|
else if(name.substring(0,8).matches("occurs_[0-9]"))
|
result = "SELECT 1 FROM {TABLE_NAME} {Q2} WHERE "+(additionalCondition != null ? additionalCondition : "")+conf.getDBSpecificDateDifference("{Q2}.{DATE_FIELD} - {Q1}.{DATE_FIELD}")+" = "+TextProcessingUtils.parseNumberOfDays(name)+" ";
|
else
|
throw new OwlToSqlTransformationException("Unsupported temporal object property: "+name);
|
}
|
It looks like an interesting approach although I am not sure how scalable it is the way it is factored. I applaud someone actually taking ontological concepts and writing code.
YAMMV
Duane Nickull
***********************************
Technoracle Advanced Systems Inc.
Consulting and Contracting; Proven Results!
i. Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
t. @duanechaos
"Don't fear the Graph! Embrace Neo4J"
Hi Piotr,
I think you should give here not an URL to practically empty site, but URL to report or an article about your methodology, system, and 'simple' English.
It would be even better if you just say what is new in your approach and what kind of problem it solves.
As it looks like you say "I did it!". And they say "We did it many times".
Best regards,
Alex
_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/
Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/
Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
Shared Files: http://ontolog.cim3.net/file/
Community Wiki: http://ontolog.cim3.net/wiki/
To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J