You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/03/13 12:57:13 UTC
[2/6] MARMOTTA-100 - ldpath-backend-linkeddata should depend on
ldclient
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/commons/sesame-tools-rio-rss/src/ext/java/org/rometools/feed/module/feedburner/package.html
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rss/src/ext/java/org/rometools/feed/module/feedburner/package.html b/commons/sesame-tools-rio-rss/src/ext/java/org/rometools/feed/module/feedburner/package.html
index 46822a8..6591aaf 100644
--- a/commons/sesame-tools-rio-rss/src/ext/java/org/rometools/feed/module/feedburner/package.html
+++ b/commons/sesame-tools-rio-rss/src/ext/java/org/rometools/feed/module/feedburner/package.html
@@ -1,30 +1,30 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
- <head>
- <title></title>
- </head>
- <body>
-
-
- <pre>
- * This library is provided under dual licenses.
- * You may choose the terms of the Lesser General Public License or the Apache
- * License at your discretion.
- *
- * Copyright (C) 2011 The ROME Team
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- </pre>
- </body>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+
+
+ <pre>
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ * Copyright (C) 2011 The ROME Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ </pre>
+ </body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/commons/sesame-tools-rio-rss/src/ext/resources/org/rometools/feed/module/base/io/tags.properties
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rss/src/ext/resources/org/rometools/feed/module/base/io/tags.properties b/commons/sesame-tools-rio-rss/src/ext/resources/org/rometools/feed/module/base/io/tags.properties
index dcd4a60..1004239 100644
--- a/commons/sesame-tools-rio-rss/src/ext/resources/org/rometools/feed/module/base/io/tags.properties
+++ b/commons/sesame-tools-rio-rss/src/ext/resources/org/rometools/feed/module/base/io/tags.properties
@@ -1,91 +1,91 @@
-# properties to tagnames
-pickup=pickup
-expirationDate=expiration_date
-publishDate=publish_date
-year=year
-courseDateRange=course_date_range
-eventDateRange=event_date_range
-travelDateRange=travel_date_range
-propertyTypes=property_type
-bathrooms=bathrooms
-hoaDues=hoa_dues
-rating=rating
-salary=salary
-taxPercent=taxPercent
-deliveryRadius=delivery_radius
-megapixels=megapixels
-memory=memory
-price=price
-processorSpeed=processor_speed
-gender=gender
-area=area
-age=age
-bedrooms=bedrooms
-pages=pages
-quantity=quantity
-toLocation=to_location
-fromLocation=from_location
-priceType=price_type
-salaryType=salary_type
-size=size
-sexualOrientation=sexual_orientation
-apparelType=apparel_type
-brand=brand
-condition=condition
-courseNumber=course_number
-courseTimes=course_times
-currency=currency
-deliveryNotes=delivery_notes
-education=education
-employer=employer
-id=id
-immigrationStatus=immigration_status
-isbn=isbn
-make=make
-manufacturer=manufacturer
-manufacturerId=manufacturer_id
-maritalStatus=marital_status
-model=model
-nameOfItemBeingReviewed=name_of_item_being_reviewed
-newsSource=news_source
-occupation=occupation
-publicationName=publication_name
-publicationVolume=publication_volume
-reviewType=review_type
-reviewerType=reviewer_type
-schoolDistrict=school_district
-serviceType=service_type
-taxRegion=tax_region
-taxPercent=tax_percent
-upc=upc
-vehicleType=vehicle_type
-urlOfItemBeingReviewed=url_of_item_being_reviewed
-actors=actor
-agents=agent
-artists=artist
-authors=author
-colors=color
-ethnicities=ethnicity
-imageLinks=image_link
-interestedIn=interested_in
-jobFunctions=job_function
-jobIndustries=job_industry
-jobTypes=job_type
-labels=label
-location=location
-listingType=listing_type
-paymentAccepted=payment_accepted
-paymentNotes=payment_notes
-productTypes=product_type
-programmingLanguages=programming_language
-relatedLinks=related_link
-shipping=shipping
-squareFootages=square_footage
-subjectAreas=subject_area
-subjects=subject
-university=university
-operatingSystems=operating_systems
-weight=weight
-modelNumber=model_number
-mileage=mileage
-vin=vin
+# properties to tagnames
+pickup=pickup
+expirationDate=expiration_date
+publishDate=publish_date
+year=year
+courseDateRange=course_date_range
+eventDateRange=event_date_range
+travelDateRange=travel_date_range
+propertyTypes=property_type
+bathrooms=bathrooms
+hoaDues=hoa_dues
+rating=rating
+salary=salary
+taxPercent=taxPercent
+deliveryRadius=delivery_radius
+megapixels=megapixels
+memory=memory
+price=price
+processorSpeed=processor_speed
+gender=gender
+area=area
+age=age
+bedrooms=bedrooms
+pages=pages
+quantity=quantity
+toLocation=to_location
+fromLocation=from_location
+priceType=price_type
+salaryType=salary_type
+size=size
+sexualOrientation=sexual_orientation
+apparelType=apparel_type
+brand=brand
+condition=condition
+courseNumber=course_number
+courseTimes=course_times
+currency=currency
+deliveryNotes=delivery_notes
+education=education
+employer=employer
+id=id
+immigrationStatus=immigration_status
+isbn=isbn
+make=make
+manufacturer=manufacturer
+manufacturerId=manufacturer_id
+maritalStatus=marital_status
+model=model
+nameOfItemBeingReviewed=name_of_item_being_reviewed
+newsSource=news_source
+occupation=occupation
+publicationName=publication_name
+publicationVolume=publication_volume
+reviewType=review_type
+reviewerType=reviewer_type
+schoolDistrict=school_district
+serviceType=service_type
+taxRegion=tax_region
+taxPercent=tax_percent
+upc=upc
+vehicleType=vehicle_type
+urlOfItemBeingReviewed=url_of_item_being_reviewed
+actors=actor
+agents=agent
+artists=artist
+authors=author
+colors=color
+ethnicities=ethnicity
+imageLinks=image_link
+interestedIn=interested_in
+jobFunctions=job_function
+jobIndustries=job_industry
+jobTypes=job_type
+labels=label
+location=location
+listingType=listing_type
+paymentAccepted=payment_accepted
+paymentNotes=payment_notes
+productTypes=product_type
+programmingLanguages=programming_language
+relatedLinks=related_link
+shipping=shipping
+squareFootages=square_footage
+subjectAreas=subject_area
+subjects=subject
+university=university
+operatingSystems=operating_systems
+weight=weight
+modelNumber=model_number
+mileage=mileage
+vin=vin
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/commons/sesame-tools-rio-rss/src/ext/resources/rome.properties
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rss/src/ext/resources/rome.properties b/commons/sesame-tools-rio-rss/src/ext/resources/rome.properties
index edf3956..dedd3af 100644
--- a/commons/sesame-tools-rio-rss/src/ext/resources/rome.properties
+++ b/commons/sesame-tools-rio-rss/src/ext/resources/rome.properties
@@ -1,148 +1,148 @@
-WireFeedParser.classes=org.rometools.feed.module.mediarss.io.RSS20YahooParser
-
-rss_2.0.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
- org.rometools.feed.module.content.io.ContentModuleParser \
- org.rometools.feed.module.itunes.io.ITunesParser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
- org.rometools.feed.module.georss.SimpleParser \
- org.rometools.feed.module.georss.W3CGeoParser \
- org.rometools.feed.module.photocast.io.Parser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.itunes.io.ITunesParserOldNamespace \
- org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser \
- org.rometools.feed.module.sle.io.ModuleParser
-
-
-rss_1.0.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS1 \
- org.rometools.feed.module.content.io.ContentModuleParser
-
-atom_0.3.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
- org.rometools.feed.module.georss.SimpleParser \
- org.rometools.feed.module.georss.W3CGeoParser \
- org.rometools.feed.module.photocast.io.Parser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
-
-atom_1.0.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
- org.rometools.feed.module.georss.SimpleParser \
- org.rometools.feed.module.georss.W3CGeoParser \
- org.rometools.feed.module.photocast.io.Parser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
-
-rss_2.0.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
- org.rometools.feed.module.base.io.GoogleBaseParser \
- org.rometools.feed.module.content.io.ContentModuleParser \
- org.rometools.feed.module.slash.io.SlashModuleParser \
- org.rometools.feed.module.itunes.io.ITunesParser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
- org.rometools.feed.module.georss.SimpleParser \
- org.rometools.feed.module.georss.W3CGeoParser \
- org.rometools.feed.module.photocast.io.Parser \
- org.rometools.feed.module.itunes.io.ITunesParserOldNamespace \
- org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser \
- org.rometools.feed.module.sle.io.ItemParser
-
-rss_1.0.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS1 \
- org.rometools.feed.module.base.io.GoogleBaseParser \
- org.rometools.feed.module.base.io.CustomTagParser \
- org.rometools.feed.module.content.io.ContentModuleParser \
- org.rometools.feed.module.slash.io.SlashModuleParser
-
-atom_0.3.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
- org.rometools.feed.module.base.io.GoogleBaseParser \
- org.rometools.feed.module.base.io.CustomTagParser \
- org.rometools.feed.module.slash.io.SlashModuleParser \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
- org.rometools.feed.module.georss.SimpleParser \
- org.rometools.feed.module.georss.W3CGeoParser \
- org.rometools.feed.module.photocast.io.Parser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
-
-atom_1.0.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
- org.rometools.feed.module.base.io.GoogleBaseParser \
- org.rometools.feed.module.base.io.CustomTagParser \
- org.rometools.feed.module.slash.io.SlashModuleParser \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
- org.rometools.feed.module.georss.SimpleParser \
- org.rometools.feed.module.georss.W3CGeoParser \
- org.rometools.feed.module.photocast.io.Parser \
- org.rometools.feed.module.mediarss.io.MediaModuleParser \
- org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
-
-rss_2.0.feed.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
- org.rometools.feed.module.content.io.ContentModuleGenerator \
- org.rometools.feed.module.itunes.io.ITunesGenerator \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
- org.rometools.feed.module.georss.SimpleGenerator \
- org.rometools.feed.module.georss.W3CGeoGenerator \
- org.rometools.feed.module.photocast.io.Generator \
- org.rometools.feed.module.mediarss.io.MediaModuleGenerator \
- org.rometools.feed.module.sle.io.ModuleGenerator
-
-rss_1.0.feed.ModuleGenerator.classes=org.rometools.feed.module.content.io.ContentModuleGenerator
-
-atom_0.3.feed.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
- org.rometools.feed.module.georss.SimpleGenerator \
- org.rometools.feed.module.georss.W3CGeoGenerator \
- org.rometools.feed.module.photocast.io.Generator \
- org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-
-atom_1.0.feed.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
- org.rometools.feed.module.georss.SimpleGenerator \
- org.rometools.feed.module.georss.W3CGeoGenerator \
- org.rometools.feed.module.photocast.io.Generator \
- org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-
-rss_2.0.item.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
- org.rometools.feed.module.base.io.GoogleBaseGenerator \
- org.rometools.feed.module.base.io.CustomTagGenerator \
- org.rometools.feed.module.content.io.ContentModuleGenerator \
- org.rometools.feed.module.slash.io.SlashModuleGenerator \
- org.rometools.feed.module.itunes.io.ITunesGenerator \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
- org.rometools.feed.module.georss.SimpleGenerator \
- org.rometools.feed.module.georss.W3CGeoGenerator \
- org.rometools.feed.module.photocast.io.Generator \
- org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-
-rss_1.0.item.ModuleGenerator.classes=org.rometools.feed.module.base.io.GoogleBaseGenerator \
- org.rometools.feed.module.content.io.ContentModuleGenerator \
- org.rometools.feed.module.slash.io.SlashModuleGenerator
-
-atom_0.3.item.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
- org.rometools.feed.module.base.io.GoogleBaseGenerator \
- org.rometools.feed.module.base.io.CustomTagGenerator \
- org.rometools.feed.module.slash.io.SlashModuleGenerator \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
- org.rometools.feed.module.georss.SimpleGenerator \
- org.rometools.feed.module.georss.W3CGeoGenerator \
- org.rometools.feed.module.photocast.io.Generator \
- org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-
-atom_1.0.item.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
- org.rometools.feed.module.base.io.CustomTagGenerator \
- org.rometools.feed.module.slash.io.SlashModuleGenerator \
- org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
- org.rometools.feed.module.georss.SimpleGenerator \
- org.rometools.feed.module.georss.W3CGeoGenerator \
- org.rometools.feed.module.photocast.io.Generator \
- org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-
-rss_2.0wNS.feed.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
-rss_2.0wNS.item.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
-rss_2.0yahoo.feed.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
-rss_2.0yahoo.item.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
-
-rss_2.0wNS.feed.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-rss_2.0wNS.item.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-rss_2.0yahoo.feed.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-rss_2.0yahoo.item.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
-
+WireFeedParser.classes=org.rometools.feed.module.mediarss.io.RSS20YahooParser
+
+rss_2.0.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
+ org.rometools.feed.module.content.io.ContentModuleParser \
+ org.rometools.feed.module.itunes.io.ITunesParser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
+ org.rometools.feed.module.georss.SimpleParser \
+ org.rometools.feed.module.georss.W3CGeoParser \
+ org.rometools.feed.module.photocast.io.Parser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.itunes.io.ITunesParserOldNamespace \
+ org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser \
+ org.rometools.feed.module.sle.io.ModuleParser
+
+
+rss_1.0.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS1 \
+ org.rometools.feed.module.content.io.ContentModuleParser
+
+atom_0.3.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
+ org.rometools.feed.module.georss.SimpleParser \
+ org.rometools.feed.module.georss.W3CGeoParser \
+ org.rometools.feed.module.photocast.io.Parser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
+
+atom_1.0.feed.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
+ org.rometools.feed.module.georss.SimpleParser \
+ org.rometools.feed.module.georss.W3CGeoParser \
+ org.rometools.feed.module.photocast.io.Parser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
+
+rss_2.0.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
+ org.rometools.feed.module.base.io.GoogleBaseParser \
+ org.rometools.feed.module.content.io.ContentModuleParser \
+ org.rometools.feed.module.slash.io.SlashModuleParser \
+ org.rometools.feed.module.itunes.io.ITunesParser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
+ org.rometools.feed.module.georss.SimpleParser \
+ org.rometools.feed.module.georss.W3CGeoParser \
+ org.rometools.feed.module.photocast.io.Parser \
+ org.rometools.feed.module.itunes.io.ITunesParserOldNamespace \
+ org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser \
+ org.rometools.feed.module.sle.io.ItemParser
+
+rss_1.0.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS1 \
+ org.rometools.feed.module.base.io.GoogleBaseParser \
+ org.rometools.feed.module.base.io.CustomTagParser \
+ org.rometools.feed.module.content.io.ContentModuleParser \
+ org.rometools.feed.module.slash.io.SlashModuleParser
+
+atom_0.3.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
+ org.rometools.feed.module.base.io.GoogleBaseParser \
+ org.rometools.feed.module.base.io.CustomTagParser \
+ org.rometools.feed.module.slash.io.SlashModuleParser \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
+ org.rometools.feed.module.georss.SimpleParser \
+ org.rometools.feed.module.georss.W3CGeoParser \
+ org.rometools.feed.module.photocast.io.Parser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
+
+atom_1.0.item.ModuleParser.classes=org.rometools.feed.module.cc.io.ModuleParserRSS2 \
+ org.rometools.feed.module.base.io.GoogleBaseParser \
+ org.rometools.feed.module.base.io.CustomTagParser \
+ org.rometools.feed.module.slash.io.SlashModuleParser \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleParser \
+ org.rometools.feed.module.georss.SimpleParser \
+ org.rometools.feed.module.georss.W3CGeoParser \
+ org.rometools.feed.module.photocast.io.Parser \
+ org.rometools.feed.module.mediarss.io.MediaModuleParser \
+ org.rometools.feed.module.mediarss.io.AlternateMediaModuleParser
+
+rss_2.0.feed.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
+ org.rometools.feed.module.content.io.ContentModuleGenerator \
+ org.rometools.feed.module.itunes.io.ITunesGenerator \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
+ org.rometools.feed.module.georss.SimpleGenerator \
+ org.rometools.feed.module.georss.W3CGeoGenerator \
+ org.rometools.feed.module.photocast.io.Generator \
+ org.rometools.feed.module.mediarss.io.MediaModuleGenerator \
+ org.rometools.feed.module.sle.io.ModuleGenerator
+
+rss_1.0.feed.ModuleGenerator.classes=org.rometools.feed.module.content.io.ContentModuleGenerator
+
+atom_0.3.feed.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
+ org.rometools.feed.module.georss.SimpleGenerator \
+ org.rometools.feed.module.georss.W3CGeoGenerator \
+ org.rometools.feed.module.photocast.io.Generator \
+ org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+
+atom_1.0.feed.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
+ org.rometools.feed.module.georss.SimpleGenerator \
+ org.rometools.feed.module.georss.W3CGeoGenerator \
+ org.rometools.feed.module.photocast.io.Generator \
+ org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+
+rss_2.0.item.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
+ org.rometools.feed.module.base.io.GoogleBaseGenerator \
+ org.rometools.feed.module.base.io.CustomTagGenerator \
+ org.rometools.feed.module.content.io.ContentModuleGenerator \
+ org.rometools.feed.module.slash.io.SlashModuleGenerator \
+ org.rometools.feed.module.itunes.io.ITunesGenerator \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
+ org.rometools.feed.module.georss.SimpleGenerator \
+ org.rometools.feed.module.georss.W3CGeoGenerator \
+ org.rometools.feed.module.photocast.io.Generator \
+ org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+
+rss_1.0.item.ModuleGenerator.classes=org.rometools.feed.module.base.io.GoogleBaseGenerator \
+ org.rometools.feed.module.content.io.ContentModuleGenerator \
+ org.rometools.feed.module.slash.io.SlashModuleGenerator
+
+atom_0.3.item.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
+ org.rometools.feed.module.base.io.GoogleBaseGenerator \
+ org.rometools.feed.module.base.io.CustomTagGenerator \
+ org.rometools.feed.module.slash.io.SlashModuleGenerator \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
+ org.rometools.feed.module.georss.SimpleGenerator \
+ org.rometools.feed.module.georss.W3CGeoGenerator \
+ org.rometools.feed.module.photocast.io.Generator \
+ org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+
+atom_1.0.item.ModuleGenerator.classes=org.rometools.feed.module.cc.io.CCModuleGenerator \
+ org.rometools.feed.module.base.io.CustomTagGenerator \
+ org.rometools.feed.module.slash.io.SlashModuleGenerator \
+ org.rometools.feed.module.opensearch.impl.OpenSearchModuleGenerator \
+ org.rometools.feed.module.georss.SimpleGenerator \
+ org.rometools.feed.module.georss.W3CGeoGenerator \
+ org.rometools.feed.module.photocast.io.Generator \
+ org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+
+rss_2.0wNS.feed.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
+rss_2.0wNS.item.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
+rss_2.0yahoo.feed.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
+rss_2.0yahoo.item.ModuleParser.classes=org.rometools.feed.module.mediarss.io.MediaModuleParser
+
+rss_2.0wNS.feed.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+rss_2.0wNS.item.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+rss_2.0yahoo.feed.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+rss_2.0yahoo.item.ModuleGenerator.classes=org.rometools.feed.module.mediarss.io.MediaModuleGenerator
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/README.txt
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/README.txt b/libraries/ldpath/ldpath-backend-linkeddata/README.txt
new file mode 100644
index 0000000..86e3f9c
--- /dev/null
+++ b/libraries/ldpath/ldpath-backend-linkeddata/README.txt
@@ -0,0 +1,7 @@
+LDPath Linked Data Backend
+==========================
+
+This module provides a simple command-line application for querying the
+Linked Data Cloud with LDPath (using LDClient and LDCache). To get an overview
+over the available command line options, run:
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/pom.xml b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
index ff801ff..fdcb023 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
+++ b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
@@ -29,26 +29,105 @@
<artifactId>ldpath-backend-linkeddata</artifactId>
<packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.apache.marmotta.ldpath.backend.linkeddata.LDQuery</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.jolira</groupId>
+ <artifactId>onejar-maven-plugin</artifactId>
+ <version>1.4.4</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>one-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<dependency>
- <groupId>org.apache.marmotta</groupId>
+ <groupId>org.apache.marmotta</groupId>
<artifactId>ldpath-api</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.marmotta</groupId>
+ <groupId>org.apache.marmotta</groupId>
<artifactId>ldpath-core</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.marmotta</groupId>
+ <groupId>org.apache.marmotta</groupId>
<artifactId>ldpath-backend-sesame</artifactId>
</dependency>
+ <!-- LDClient and some of the more interesting providers -->
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-provider-rdf</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-provider-rdfa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-provider-facebook</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-provider-mediawiki</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-provider-youtube</artifactId>
+ </dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldclient-provider-vimeo</artifactId>
</dependency>
+
+ <!-- LDCache Generic Sail and File Backend -->
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldcache-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldcache-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldcache-sail-generic</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>ldcache-backend-file</artifactId>
+ </dependency>
+
+
+ <!-- Sesame Model and Parsers -->
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-model</artifactId>
@@ -115,18 +194,15 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
-
-
<dependency>
- <groupId>org.fusesource.jdbm</groupId>
- <artifactId>jdbm</artifactId>
- <version>2.0.1</version>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/AbstractLDBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/AbstractLDBackend.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/AbstractLDBackend.java
deleted file mode 100644
index 7f91e57..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/AbstractLDBackend.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.api.LDCacheProvider;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.Endpoint;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.service.LDCache;
-import org.apache.marmotta.ldpath.backend.sesame.SesameRepositoryBackend;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.repository.Repository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-/**
- * Abstract superclass for Linked Data backends. Implements functionality common to all implementations.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public abstract class AbstractLDBackend extends SesameRepositoryBackend implements LDCacheProvider {
-
- private Logger log = LoggerFactory.getLogger(AbstractLDBackend.class);
-
- private LDCache ldCache;
-
- /**
- * Initialise a new sesame backend. Repository needs to be set using setRepository.
- */
- protected AbstractLDBackend() {
- ldCache = new LDCache(this);
-
- try {
- Configuration config = new PropertiesConfiguration("endpoints.properties");
-
- HashSet<String> endpointNames = new HashSet<String>();
- for(Iterator<String> it = config.getKeys(); it.hasNext(); ) {
- String key = it.next();
- String[] components = key.split("\\.");
- if(components.length > 1) {
- endpointNames.add(components[0]);
- }
- }
- for(String endpointName : endpointNames) {
- String prefix = config.getString(endpointName+".prefix","");
- String kind = config.getString(endpointName+".kind","");
- String endpointUrl = config.getString(endpointName+".endpoint","");
- String mimetype = config.getString(endpointName+".mimetype","");
- long expiry = config.getLong(endpointName+".expiry",(long)86400);
-
- Endpoint.EndpointType type;
- try {
- type = Endpoint.EndpointType.valueOf(kind.toUpperCase());
- } catch (Exception e) {
- type = Endpoint.EndpointType.LINKEDDATA;
- }
-
- if (prefix != null && prefix.startsWith(Endpoint.REGEX_INDICATOR)) {
- // Check for valid Regex
- try {
- Pattern.compile(prefix.substring(Endpoint.REGEX_INDICATOR.length()));
- } catch (PatternSyntaxException pse) {
- log.error("invalid regexp pattern in endpoint '{}' prefix definition: {}",endpointName,prefix);
- }
- }
- if (endpointUrl != null) {
- endpointUrl = endpointUrl.replace('<', '{').replace('>', '}');
- } else {
- endpointUrl = "";
- }
- Endpoint endpoint = new Endpoint(endpointName, type, prefix, endpointUrl, mimetype, expiry);
- log.info("Registering LD Cache Endpoint \"{}\"",endpointName);
- registerEndpoint(endpoint);
- }
-
- } catch (ConfigurationException e) {
- log.warn("could not load configuration file endpoints.properties from current directory, home directory, or classpath");
- }
-
-
- }
-
- /**
- * Return the sesame repository used for storing the triples that are retrieved from the Linked Data Cloud.
- * Triples will always be added to the context http://www.newmedialab.at/ldclient/cache to be able to distinguish
- * them from other triples.
- *
- * @return an initialised Sesame repository that can be used for caching triples
- */
- @Override
- public Repository getTripleRepository() {
- return getRepository();
- }
-
-
- /**
- * List the objects of triples in the triple store underlying this backend that have the subject and
- * property given as argument.
- *
- * @param subject the subject of the triples to look for
- * @param property the property of the triples to look for
- * @return all objects of triples with matching subject and property
- */
- @Override
- public Collection<Value> listObjects(Value subject, Value property) {
- if(isURI(subject)) {
- ldCache.refreshResource((URI)subject);
- }
- return super.listObjects(subject, property);
- }
-
- /**
- * List the subjects of triples in the triple store underlying this backend that have the object and
- * property given as argument.
- *
- * @param object the object of the triples to look for
- * @param property the property of the triples to look for
- * @return all dubjects of triples with matching object and property
- * @throws UnsupportedOperationException in case reverse selection is not supported (e.g. when querying Linked Data)
- */
- @Override
- public Collection<Value> listSubjects(Value property, Value object) {
- throw new IllegalArgumentException("reverse navigation not supported by Linked Data backend");
- }
-
-
- /**
- * Register a new Linked Data endpoint with this cache provider.
- *
- * @param endpoint
- */
- @Override
- public void registerEndpoint(Endpoint endpoint) {
- ldCache.getEndpointService().addEndpoint(endpoint);
- }
-
- /**
- * List all endpoints currently registered with the Linked Data cache provider.
- *
- * @return a collection of endpoints
- */
- @Override
- public Collection<Endpoint> listEndpoints() {
- return ldCache.getEndpointService().listEndpoints();
- }
-
- /**
- * Unregister the Linked Data endpoint given as argument.
- *
- * @param endpoint the endpoint to unregister
- */
- @Override
- public void unregisterEndpoint(Endpoint endpoint) {
- ldCache.getEndpointService().removeEndpoint(endpoint);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDMemoryBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDMemoryBackend.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDMemoryBackend.java
deleted file mode 100644
index 9035b0d..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDMemoryBackend.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata;
-
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.CacheEntry;
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.RepositoryException;
-import org.openrdf.repository.sail.SailRepository;
-import org.openrdf.sail.memory.MemoryStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A Linked Data backend implementation with no persistent storage. All retrieved data is kept in memory and discarded
- * when the virtual machine exits.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class LDMemoryBackend extends AbstractLDBackend {
-
- private static final Logger log = LoggerFactory.getLogger(LDMemoryBackend.class);
-
- private Map<String,CacheEntry> cacheEntries;
-
- public LDMemoryBackend() {
- super();
-
- cacheEntries = new HashMap<String,CacheEntry>();
-
- try {
- Repository repository = new SailRepository(new MemoryStore());
- repository.initialize();
- setRepository(repository);
-
- } catch (RepositoryException e) {
- log.error("error initialising connection to Sesame in-memory repository",e);
- }
-
- }
-
-
-
- /**
- * Return a map that can be used to store caching metadata about resources. The LDCacheProvider should take care
- * of persisting the metadata if desired.
- *
- * @return a map for storing caching metadata
- */
- @Override
- public Map<String,CacheEntry> getMetadataRepository() {
- return cacheEntries;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDPersistentBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDPersistentBackend.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDPersistentBackend.java
index 7f16fda..1e56703 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDPersistentBackend.java
+++ b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDPersistentBackend.java
@@ -17,20 +17,22 @@
*/
package org.apache.marmotta.ldpath.backend.linkeddata;
-import jdbm.RecordManager;
-import jdbm.RecordManagerFactory;
-
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.CacheEntry;
+import org.apache.marmotta.commons.sesame.filter.AlwaysTrueFilter;
+import org.apache.marmotta.commons.sesame.filter.SesameFilter;
+import org.apache.marmotta.ldcache.backend.file.LDCachingFileBackend;
+import org.apache.marmotta.ldcache.sail.GenericLinkedDataSail;
+import org.apache.marmotta.ldclient.model.ClientConfiguration;
+import org.apache.marmotta.ldpath.backend.sesame.SesameRepositoryBackend;
+import org.openrdf.model.Resource;
import org.openrdf.repository.Repository;
import org.openrdf.repository.RepositoryException;
import org.openrdf.repository.sail.SailRepository;
-import org.openrdf.sail.nativerdf.NativeStore;
+import org.openrdf.sail.memory.MemoryStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
-import java.util.Map;
/**
* A Linked Data backend with persistent caching of the retrieved data. All data is read and stored in the directory
@@ -38,13 +40,15 @@ import java.util.Map;
* <p/>
* Author: Sebastian Schaffert
*/
-public class LDPersistentBackend extends AbstractLDBackend {
- private static final Logger log = LoggerFactory.getLogger(LDMemoryBackend.class);
+public class LDPersistentBackend extends SesameRepositoryBackend {
+ private static final Logger log = LoggerFactory.getLogger(LDPersistentBackend.class);
+
+ private LDCachingFileBackend backend;
- private Map<String,CacheEntry> cacheEntries;
+ private GenericLinkedDataSail sail;
+ private SesameFilter<Resource> cacheFilter;
- private RecordManager recordManager;
/**
* Create a persistent linked data backend storing the cache data in the directory passed as argument.
@@ -63,13 +67,14 @@ public class LDPersistentBackend extends AbstractLDBackend {
tripleStore.mkdirs();
}
-
- recordManager = RecordManagerFactory.createRecordManager(dataDirectory.getAbsolutePath()+File.separator+"resource_cache.cache");
-
- cacheEntries = recordManager.treeMap("resources");
+ cacheFilter = new AlwaysTrueFilter<Resource>();
try {
- Repository repository = new SailRepository(new NativeStore(tripleStore));
+ ClientConfiguration config = new ClientConfiguration();
+
+ backend = new LDCachingFileBackend(dataDirectory);
+ sail = new GenericLinkedDataSail(new MemoryStore(),backend, cacheFilter, config);
+ Repository repository = new SailRepository(sail);
repository.initialize();
setRepository(repository);
@@ -81,26 +86,12 @@ public class LDPersistentBackend extends AbstractLDBackend {
public void shutdown() {
try {
- recordManager.close();
getRepository().shutDown();
- } catch (IOException e) {
- log.error("error shutting down record manager for resource cache");
} catch (RepositoryException e) {
log.error("error shutting down repository for resource cache");
}
}
- /**
- /**
- * Return a map that can be used to store caching metadata about resources. The LDCacheProvider should take care
- * of persisting the metadata if desired.
- *
- * @return a map for storing caching metadata
- */
- @Override
- public Map<String,CacheEntry> getMetadataRepository() {
- return cacheEntries;
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDQuery.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDQuery.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDQuery.java
index 769dc98..5a7ee3e 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDQuery.java
+++ b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDQuery.java
@@ -18,6 +18,7 @@
package org.apache.marmotta.ldpath.backend.linkeddata;
import ch.qos.logback.classic.Level;
+import com.google.common.io.Files;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
@@ -27,6 +28,7 @@ import org.apache.commons.cli.OptionGroup;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
+import org.apache.commons.io.FileUtils;
import org.apache.marmotta.ldpath.LDPath;
import org.apache.marmotta.ldpath.backend.sesame.SesameRepositoryBackend;
import org.apache.marmotta.ldpath.exception.LDPathParseException;
@@ -86,16 +88,14 @@ public class LDQuery {
}
- String format = null;
- if(cmd.hasOption("format")) {
- format = cmd.getOptionValue("format");
- }
-
+ File tmpDir = null;
SesameRepositoryBackend backend;
if(cmd.hasOption("store")) {
backend = new LDPersistentBackend(new File(cmd.getOptionValue("store")));
} else {
- backend = new LDMemoryBackend();
+ tmpDir = Files.createTempDir();
+
+ backend = new LDPersistentBackend(tmpDir);
}
Resource context = null;
@@ -139,6 +139,10 @@ public class LDQuery {
((LDPersistentBackend) backend).shutdown();
}
+ if(tmpDir != null) {
+ FileUtils.deleteDirectory(tmpDir);
+ }
+
} catch (ParseException e) {
System.err.println("invalid arguments");
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/api/LDCacheProvider.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/api/LDCacheProvider.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/api/LDCacheProvider.java
deleted file mode 100644
index 8585de0..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/api/LDCacheProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.api;
-
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.CacheEntry;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.Endpoint;
-import org.openrdf.repository.Repository;
-
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * An interface specifying a factory that provides different caching mechanisms, e.g. in-memory or file storage.
- * A cache provider typically offers two kinds of caching services, one for the retrieved triples (a sesame repository)
- * and one for the caching metadata (a map from URIs to CacheEntry).
- * <p/>
- * Author: Sebastian Schaffert
- */
-public interface LDCacheProvider {
-
- /**
- * Return the sesame repository used for storing the triples that are retrieved from the Linked Data Cloud.
- * Triples will always be added to the context http://www.newmedialab.at/ldclient/cache to be able to distinguish
- * them from other triples.
- *
- * @return an initialised Sesame repository that can be used for caching triples
- */
- public Repository getTripleRepository();
-
-
- /**
- * Return a map that can be used to store caching metadata about resources. The LDCacheProvider should take care
- * of persisting the metadata if desired.
- *
- * @return a map for storing caching metadata
- */
- public Map<String,CacheEntry> getMetadataRepository();
-
- /**
- * Register a new Linked Data endpoint with this cache provider.
- *
- * @param endpoint
- */
- public void registerEndpoint(Endpoint endpoint);
-
-
- /**
- * List all endpoints currently registered with the Linked Data cache provider.
- * @return a collection of endpoints
- */
- public Collection<Endpoint> listEndpoints();
-
- /**
- * Unregister the Linked Data endpoint given as argument.
- *
- * @param endpoint the endpoint to unregister
- */
- public void unregisterEndpoint(Endpoint endpoint);
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/exception/LDClientException.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/exception/LDClientException.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/exception/LDClientException.java
deleted file mode 100644
index 2d7c789..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/exception/LDClientException.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.exception;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class LDClientException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Constructs a new exception with <code>null</code> as its detail message.
- * The cause is not initialized, and may subsequently be initialized by a
- * call to {@link #initCause}.
- */
- public LDClientException() {
- }
-
- /**
- * Constructs a new exception with the specified detail message. The
- * cause is not initialized, and may subsequently be initialized by
- * a call to {@link #initCause}.
- *
- * @param message the detail message. The detail message is saved for
- * later retrieval by the {@link #getMessage()} method.
- */
- public LDClientException(String message) {
- super(message);
- }
-
- /**
- * Constructs a new exception with the specified detail message and
- * cause. <p>Note that the detail message associated with
- * <code>cause</code> is <i>not</i> automatically incorporated in
- * this exception's detail message.
- *
- * @param message the detail message (which is saved for later retrieval
- * by the {@link #getMessage()} method).
- * @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- * @since 1.4
- */
- public LDClientException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Constructs a new exception with the specified cause and a detail
- * message of <tt>(cause==null ? null : cause.toString())</tt> (which
- * typically contains the class and detail message of <tt>cause</tt>).
- * This constructor is useful for exceptions that are little more than
- * wrappers for other throwables (for example, {@link
- * java.security.PrivilegedActionException}).
- *
- * @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- * @since 1.4
- */
- public LDClientException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/CacheEntry.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/CacheEntry.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/CacheEntry.java
deleted file mode 100644
index 81c22f9..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/CacheEntry.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model;
-
-import org.openrdf.model.URI;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * The cache entry for a URI resource managed by the Linked Data Cache. Contains maintenance information about
- * the resource, i.e. when it has been retrieved last, when to retrieve it next, etc.
- * <p/>
- * User: sschaffe
- */
-public class CacheEntry implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * The URI resource managed by this cache entry.
- */
- private URI resource;
-
- /**
- * The date when this resource has been retrieved the last time.
- */
- private Date lastRetrieved;
-
-
- /**
- * The date when this resource needs to be retrieved again according to expiry configuration.
- */
- private Date expiryDate;
-
-
- /**
- * The number of times this resource has already been updated.
- */
- private Long updateCount;
-
-
-
- public CacheEntry() {
- }
-
- public URI getResource() {
- return resource;
- }
-
- public void setResource(URI resource) {
- this.resource = resource;
- }
-
- public Date getLastRetrieved() {
- return lastRetrieved;
- }
-
- public void setLastRetrieved(Date lastRetrieved) {
- this.lastRetrieved = lastRetrieved;
- }
-
- public Date getExpiryDate() {
- return expiryDate;
- }
-
- public void setExpiryDate(Date expiryDate) {
- this.expiryDate = expiryDate;
- }
-
- public Long getUpdateCount() {
- return updateCount;
- }
-
- public void setUpdateCount(Long updateCount) {
- this.updateCount = updateCount;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/ClientResponse.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/ClientResponse.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/ClientResponse.java
deleted file mode 100644
index 3d86404..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/ClientResponse.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model;
-
-import org.openrdf.repository.Repository;
-
-import java.util.Date;
-
-/**
- * Add file description here!
- * <p/>
- * User: sschaffe
- */
-public class ClientResponse {
-
- private Repository triples;
-
- private Date expires;
-
- public ClientResponse(Repository triples) {
- this.triples = triples;
- }
-
- public Repository getTriples() {
- return triples;
- }
-
- public void setTriples(Repository triples) {
- this.triples = triples;
- }
-
- public Date getExpires() {
- return expires;
- }
-
- public void setExpires(Date expires) {
- this.expires = expires;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/Endpoint.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/Endpoint.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/Endpoint.java
deleted file mode 100644
index 004c05c..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/model/Endpoint.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model;
-
-import org.openrdf.model.URI;
-
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-/**
- * Definition of a Linked Data Endpoint. Contains information how to query the
- * endpoint, what format to expect, and when to expire data from this endpoint.
- * <p/>
- * <ul>
- * <li> {@link EndpointType#LINKEDDATA} endpoints will be accessed by directly
- * retrieving the URI with appropriate Accept headers following the Linked Data
- * recommendations
- * <li> {@link EndpointType#CACHE} endpoints will be accessed by passing the URI
- * as request parameter to the cache and parsing the response according to the
- * content type defined for this endpoint (Content-Type header is too
- * unspecific)
- * <li> {@link EndpointType#SPARQL} endpoints will be accessed by issuing a query
- * of <code>SELECT ?p ?o WHERE { {url} ?p ?o }</code> to retrieve all triples
- * for the requested resource
- * <li> {@link EndpointType#NONE} act as blacklist. Resources matching handled by
- * this endpoint are not fetched.
- * </ul>
- * <p/>
- * User: sschaffe
- */
-
-public class Endpoint {
-
-
- private Long id;
-
-
- /**
- * A human-readable name for this endpoint.
- */
- private String name;
-
- /**
- * The type of the endpoint. One of LINKEDDATA, CACHE, or SPARQL
- */
- private EndpointType type;
-
-
- public static final String REGEX_INDICATOR = "~";
-
- /**
- * URI prefix managed by the endpoint. All resources matching the URI prefix
- * are handled by this endpoint. {@link #uriPrefix} starting with
- * <code>{@value #REGEX_INDICATOR}</code> are interpreted as <i>regular
- * expression</i> (which may not be a prefix).
- *
- * @see java.util.regex.Pattern
- */
- private String uriPrefix;
-
- private Pattern uriPattern = null;
-
- /**
- * The HTTP URL to access the endpoint. Occurrences of the string {uri} will
- * be replaced by the resource URI of the queried resource for CACHE
- * endpoints. Occurrences of the string {query} will be replaced by the
- * SPARQL query for the requested resource for SPARQL endpoints.
- *
- * Requried for SPARQL and CACHE endpoints, ignored for LINKEDDATA endpoints
- *
- * <pre>
- * Examples:
- * - Sindice: http://api.sindice.com/v2/live?url={uri}
- * or http://api.sindice.com/v2/cache?url={uri}
- * or http://sparql.sindice.com/sparql?default-graph-uri=&query={query}&format=text%2Fhtml&debug=on
- * - Stanbol: http://dev.iks-project.eu:8080/entityhub/lookup/?id={uri}&create=false
- * </pre>
- */
- private String endpointUrl;
-
-
- /**
- * The content type (MIME) returned by this endpoint. Used to determine how to parse the result.
- */
- private String contentType;
-
-
- /**
- * The default expiry time in seconds to use for this endpoint if the HTTP request does not explicitly return an
- * expiry time.
- */
- private Long defaultExpiry;
-
-
-
- public Endpoint() {
- }
-
-
- public Endpoint(String name, EndpointType type, String uriPrefix, String endpointUrl, String contentType, Long defaultExpiry) {
- this.name = name;
- this.type = type;
- this.uriPrefix = uriPrefix;
- this.endpointUrl = endpointUrl;
- this.contentType = contentType;
- this.defaultExpiry = defaultExpiry;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public EndpointType getType() {
- return type;
- }
-
- public void setType(EndpointType type) {
- this.type = type;
- }
-
- public String getUriPrefix() {
- return uriPrefix;
- }
-
- public void setUriPrefix(String uriPrefix) {
- this.uriPrefix = uriPrefix;
- }
-
- public String getEndpointUrl() {
- return endpointUrl;
- }
-
- public void setEndpointUrl(String endpointUrl) {
- this.endpointUrl = endpointUrl;
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public Long getDefaultExpiry() {
- return defaultExpiry;
- }
-
- public void setDefaultExpiry(Long defaultExpiry) {
- this.defaultExpiry = defaultExpiry;
- }
-
-
- /**
- * Check if this {@link Endpoint} handles (is responsible) for this {@link URI}.
- *
- * @param resource the Resource to check
- * @return <code>true</code> if the {@link javax.annotation.Resource}'s uri matches the endpoint's {@link #uriPrefix}
- *
- * @see #uriPrefix
- */
- public boolean handles(URI resource) {
- return handles(resource.stringValue());
- }
-
-
- /**
- * Check if this {@link Endpoint} handles (is responsible) for this URI.
- *
- * @param uri the URI to check
- * @return <code>true</code> if the uri matches the endpoint's {@link #uriPrefix}
- *
- * @see #uriPrefix
- */
- public boolean handles(String uri) {
- if (uriPrefix.startsWith(REGEX_INDICATOR)) {
- try {
- if (uriPattern == null) {
- uriPattern = Pattern.compile(uriPrefix.substring(REGEX_INDICATOR.length()));
- }
- return uriPattern.matcher(uri).find();
- } catch (PatternSyntaxException pse) {
- return false;
- }
- } else {
- return uri.startsWith(uriPrefix);
- }
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- Endpoint endpoint = (Endpoint) o;
-
- if (name != null ? !name.equals(endpoint.name) : endpoint.name != null) {
- return false;
- }
- if (type != endpoint.type) {
- return false;
- }
- if (uriPrefix != null ? !uriPrefix.equals(endpoint.uriPrefix) : endpoint.uriPrefix != null) {
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = name != null ? name.hashCode() : 0;
- result = 31 * result + (type != null ? type.hashCode() : 0);
- result = 31 * result + (uriPrefix != null ? uriPrefix.hashCode() : 0);
- return result;
- }
-
- public enum EndpointType {
- /**
- * Endpoint is a SPARQL endpoint that needs to be queried
- */
- SPARQL,
-
- /**
- * Endpoint is direct access to a linked data source
- */
- LINKEDDATA,
-
- /**
- * Endpoint is a triple cache that can be accessed by passing the resource URI as request parameter
- */
- CACHE,
-
- /**
- * Endpoint does not retrieve external triples
- */
- NONE
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/package-info.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/package-info.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/package-info.java
deleted file mode 100644
index e0d4338..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/package-info.java
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
- * To be replaced by ldcache/ldclient, see <a href="https://issues.apache.org/jira/browse/MARMOTTA-100">MARMOTTA-100</a>
- */
-@java.lang.Deprecated
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5cb144f5/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/service/LDCache.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/service/LDCache.java b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/service/LDCache.java
deleted file mode 100644
index 8298bc8..0000000
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/legacy/ldclient/service/LDCache.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.service;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.api.LDCacheProvider;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.exception.LDClientException;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.CacheEntry;
-import org.apache.marmotta.ldpath.backend.linkeddata.legacy.ldclient.model.ClientResponse;
-import org.openrdf.model.Statement;
-import org.openrdf.model.URI;
-import org.openrdf.repository.RepositoryConnection;
-import org.openrdf.repository.RepositoryException;
-import org.openrdf.repository.RepositoryResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class LDCache {
-
- private static final String CTX_CACHE = "http://www.newmedialab.at/ldclient/cache";
-
- private Logger log = LoggerFactory.getLogger(LDCache.class);
-
- private LDClient clientService;
-
- private LDEndpoints endpointService;
-
-
- private ThreadLocal<Boolean> inProgress = new ThreadLocal<Boolean>();
-
-
- private LDCacheProvider cacheProvider;
-
- // lock a resource while refreshing it so that not several threads trigger a refresh at the same time
- private HashMap<URI,Lock> resourceLocks;
-
- private Configuration config;
-
-
- public LDCache(LDCacheProvider ldCacheProvider) {
- log.info("Linked Data Caching Service initialising ...");
- try {
- config = new PropertiesConfiguration("ldclient.properties");
- } catch (ConfigurationException e) {
- log.warn("could not load configuration file ldclient.properties from current directory, home directory, or classpath");
- }
-
- resourceLocks = new HashMap<URI, Lock>();
-
- cacheProvider = ldCacheProvider;
- clientService = new LDClient();
- endpointService = new LDEndpoints();
- }
-
-
- private void lockResource(URI resource) {
- Lock lock;
- synchronized (resourceLocks) {
- lock = resourceLocks.get(resource);
- if(lock == null) {
- lock = new ReentrantLock();
- resourceLocks.put(resource,lock);
- }
- }
- lock.lock();
- }
-
- private void unlockResource(URI resource) {
- Lock lock;
- synchronized (resourceLocks) {
- lock = resourceLocks.remove(resource);
- }
- if(lock != null) {
- lock.unlock();
- }
- }
-
-
- /**
- * Refresh the cached resource passed as argument. The method will do nothing for local resources.
- * Calling the method will carry out the following tasks:
- * 1. check whether the resource is a remote resource; if no, returns immediately
- * 2. check whether the resource has a cache entry; if no, goto 4
- * 3. check whether the expiry time of the cache entry has passed; if no, returns immediately
- * 4. retrieve the triples for the resource from the Linked Data Cloud using the methods offered by the
- * LinkedDataClientService (registered endpoints etc); returns immediately if the result is null or
- * an exception is thrown
- * 5. remove all old triples for the resource and add all new triples for the resource
- * 6. create new expiry information of the cache entry and persist it in the transaction
- *
- * @param resource
- */
- public void refreshResource(URI resource) {
-
- lockResource(resource);
- try {
-
- // 2. check whether the resource has a cache entry; if no, goto 4
- CacheEntry entry = getCacheEntry(resource);
-
- // 3. check whether the expiry time of the cache entry has passed; if no, returns immediately
- if(entry != null && entry.getExpiryDate().after(new Date())) {
- log.info("not refreshing resource {}, as the cached entry is not yet expired",resource);
- return;
- }
-
- // 4.
- log.debug("refreshing resource {}",resource);
- try {
- ClientResponse response = clientService.retrieveResource(resource);
-
- if(response != null) {
- log.info("refreshed resource {}",resource);
-
- URI context = cacheProvider.getTripleRepository().getValueFactory().createURI(CTX_CACHE);
-
-
- RepositoryConnection lmfConnection = cacheProvider.getTripleRepository().getConnection();
- RepositoryConnection respConnection = response.getTriples().getConnection();
-
- lmfConnection.remove(resource,null,null,context);
-
-
- RepositoryResult<Statement> triples = respConnection.getStatements(null,null,null,true);
- while(triples.hasNext()) {
- Statement triple = triples.next();
- try {
- lmfConnection.add(triple,context);
- } catch (RuntimeException ex) {
- log.warn("not adding triple {}: an exception occurred ({})",triple,ex.getMessage());
- }
- }
- lmfConnection.commit();
-
- lmfConnection.close();
- respConnection.close();
-
- CacheEntry newEntry = new CacheEntry();
- newEntry.setResource(resource);
- newEntry.setExpiryDate(response.getExpires());
- newEntry.setLastRetrieved(new Date());
- if(entry != null) {
- newEntry.setUpdateCount(entry.getUpdateCount()+1);
- } else {
- newEntry.setUpdateCount((long)1);
- }
-
- cacheProvider.getMetadataRepository().put(resource.stringValue(),newEntry);
-
- }
-
- } catch (LDClientException e) {
- // on exception, save an expiry information and retry in one day
- CacheEntry newEntry = new CacheEntry();
- newEntry.setResource(resource);
- newEntry.setExpiryDate(new Date(System.currentTimeMillis() + config.getInt("expiry", 86400)*1000));
- newEntry.setLastRetrieved(new Date());
- if(entry != null) {
- newEntry.setUpdateCount(entry.getUpdateCount()+1);
- } else {
- newEntry.setUpdateCount((long)1);
- }
-
- cacheProvider.getMetadataRepository().put(resource.stringValue(), newEntry);
-
- log.error("refreshing the remote resource {} from the Linked Data Cloud failed ({})",resource,e.getMessage());
- return;
- } catch (RepositoryException e) {
- log.error("repository error while refreshing the remote resource {} from the Linked Data Cloud", resource, e);
- return;
- }
- } finally {
- unlockResource(resource);
- }
-
- }
-
-
- private CacheEntry getCacheEntry(URI resource) {
- return cacheProvider.getMetadataRepository().get(resource.stringValue());
- }
-
- public LDEndpoints getEndpointService() {
- return endpointService;
- }
-
-}