Author: reto
Date: Wed Apr 17 07:21:44 2013
New Revision: 1468779

URL: http://svn.apache.org/r1468779
Log:
CLEREZZA-775: split typehandler api from implementation

Removed:
    
clerezza/trunk/platform.typehandlerspace.impl/src/main/java/org/apache/clerezza/platform/typehandlerspace/OPTIONS.java
    
clerezza/trunk/platform.typehandlerspace.impl/src/main/java/org/apache/clerezza/platform/typehandlerspace/SupportedTypes.java
    
clerezza/trunk/platform.typehandlerspace.impl/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
    clerezza/trunk/platform.typehandlerspace.impl/src/site/resources/
    clerezza/trunk/platform.typehandlerspace.impl/src/site/site.xml
    clerezza/trunk/platform.typehandlerspace.impl/src/site/xsite/
    clerezza/trunk/platform.typehandlerspace.impl/src/test/java/org/
    
clerezza/trunk/platform.typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/
Modified:
    clerezza/trunk/platform.launcher.storageless.parent/pom.xml
    clerezza/trunk/platform.typehandlerspace.impl/pom.xml
    clerezza/trunk/platform.typehandlerspace/pom.xml
    clerezza/trunk/pom.xml
    
clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java

Modified: clerezza/trunk/platform.launcher.storageless.parent/pom.xml
URL: 
http://svn.apache.org/viewvc/clerezza/trunk/platform.launcher.storageless.parent/pom.xml?rev=1468779&r1=1468778&r2=1468779&view=diff
==============================================================================
--- clerezza/trunk/platform.launcher.storageless.parent/pom.xml (original)
+++ clerezza/trunk/platform.launcher.storageless.parent/pom.xml Wed Apr 17 
07:21:44 2013
@@ -564,6 +564,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typehandlerspace.impl</artifactId>
+            <scope>runtime</scope>
+            <version>0.9-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typepriority</artifactId>
             <scope>runtime</scope>
             <version>0.2-SNAPSHOT</version>

Modified: clerezza/trunk/platform.typehandlerspace.impl/pom.xml
URL: 
http://svn.apache.org/viewvc/clerezza/trunk/platform.typehandlerspace.impl/pom.xml?rev=1468779&r1=1468778&r2=1468779&view=diff
==============================================================================
--- clerezza/trunk/platform.typehandlerspace.impl/pom.xml (original)
+++ clerezza/trunk/platform.typehandlerspace.impl/pom.xml Wed Apr 17 07:21:44 
2013
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project 
xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -19,7 +19,9 @@
  under the License.
 
 -->
-
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
@@ -28,24 +30,16 @@
         <relativePath>../parent</relativePath>
     </parent>
     <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.typehandlerspace</artifactId>
+    <artifactId>platform.typehandlerspace.impl</artifactId>
     <version>0.9-SNAPSHOT</version>
     <packaging>bundle</packaging>
-    <name>Clerezza - Platform Type Handler Space</name>
+    <name>Clerezza - Platform Type Handler Space Wink Based 
Implementation</name>
     <dependencies>
         <dependency>
             <groupId>javax.ws.rs</groupId>
             <artifactId>jsr311-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
             <version>0.13-SNAPSHOT</version>
@@ -66,74 +60,29 @@
             <version>0.6-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.config</artifactId>
-            <version>0.4-SNAPSHOT</version>
+            <artifactId>platform.typepriority</artifactId>
+            <version>0.2-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typepriority</artifactId>
-            <version>0.2-SNAPSHOT</version>
+            <artifactId>platform.typehandlerspace</artifactId>
+            <version>0.9-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.rdf.providers</artifactId>
-            <scope>test</scope>
-            <version>0.14-SNAPSHOT</version>
+            <groupId>org.apache.wink</groupId>
+            <artifactId>wink-osgi</artifactId>
+            <version>1.3.0-SNAPSHOT</version>
         </dependency>
-        <!-- testing with last released version, testutils is doscontinued as
-       triaxrs is -->
         <dependency>
             <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.testutils</artifactId>
-            <scope>test</scope>
-            <version>0.9-incubating</version>
-        </dependency>
-     <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-     </dependency>
-     <dependency>
-      <groupId>org.apache.wink</groupId>
-      <artifactId>wink-osgi</artifactId>
-      <version>1.3.0-SNAPSHOT</version>
-     </dependency>
-     <dependency>
-      <groupId>org.apache.clerezza</groupId>
-      <artifactId>platform.graphnodeprovider</artifactId>
-      <version>0.2-SNAPSHOT</version>
-     </dependency>
+            <artifactId>platform.graphnodeprovider</artifactId>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
     </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.codehaus.xsite</groupId>
-                <artifactId>xsite-maven-plugin</artifactId>
-                <configuration>
-                    
<sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
-                    <sitemapPath>content/sitemap.xml</sitemapPath>
-                    <skinPath>templates/skin.html</skinPath>
-                    
<outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>site</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
 </project>
\ No newline at end of file

Modified: clerezza/trunk/platform.typehandlerspace/pom.xml
URL: 
http://svn.apache.org/viewvc/clerezza/trunk/platform.typehandlerspace/pom.xml?rev=1468779&r1=1468778&r2=1468779&view=diff
==============================================================================
--- clerezza/trunk/platform.typehandlerspace/pom.xml (original)
+++ clerezza/trunk/platform.typehandlerspace/pom.xml Wed Apr 17 07:21:44 2013
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project 
xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -19,7 +19,9 @@
  under the License.
 
 -->
-
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
@@ -38,14 +40,6 @@
             <artifactId>jsr311-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
             <version>0.13-SNAPSHOT</version>
@@ -60,59 +54,31 @@
             <artifactId>rdf.ontologies</artifactId>
             <version>0.12-SNAPSHOT</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.extensions</artifactId>
-            <version>0.6-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
+        <!-- s        <dependency>
             <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.config</artifactId>
-            <version>0.4-SNAPSHOT</version>
-        </dependency>
+            <artifactId>platform.typepriority</artifactId>
+            <version>0.2-SNAPSHOT</version>
+        </dependency> 
         <dependency>
             <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typepriority</artifactId>
+            <artifactId>platform.graphnodeprovider</artifactId>
             <version>0.2-SNAPSHOT</version>
         </dependency>
+        -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.rdf.providers</artifactId>
-            <scope>test</scope>
-            <version>0.14-SNAPSHOT</version>
-        </dependency>
         <!-- testing with last released version, testutils is doscontinued as
-       triaxrs is -->
+        triaxrs is -->
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>jaxrs.testutils</artifactId>
             <scope>test</scope>
             <version>0.9-incubating</version>
         </dependency>
-     <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-     </dependency>
-     <dependency>
-      <groupId>org.apache.wink</groupId>
-      <artifactId>wink-osgi</artifactId>
-      <version>1.3.0-SNAPSHOT</version>
-     </dependency>
-     <dependency>
-      <groupId>org.apache.clerezza</groupId>
-      <artifactId>platform.graphnodeprovider</artifactId>
-      <version>0.2-SNAPSHOT</version>
-     </dependency>
+     
     </dependencies>
     <build>
         <plugins>

Modified: clerezza/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/clerezza/trunk/pom.xml?rev=1468779&r1=1468778&r2=1468779&view=diff
==============================================================================
--- clerezza/trunk/pom.xml (original)
+++ clerezza/trunk/pom.xml Wed Apr 17 07:21:44 2013
@@ -98,6 +98,7 @@
                 <module>platform.security.conditions</module>
                 <module>platform.shellcustomizer</module>
                 <module>platform.typehandlerspace</module>
+                <module>platform.typehandlerspace.impl</module>
                 <module>platform.typerendering</module>
                 <module>platform.typerendering.gui</module>
                 <module>platform.typerendering.scala</module>

Modified: 
clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
URL: 
http://svn.apache.org/viewvc/clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java?rev=1468779&r1=1468778&r2=1468779&view=diff
==============================================================================
--- 
clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
 (original)
+++ 
clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
 Wed Apr 17 07:21:44 2013
@@ -320,6 +320,12 @@ public class GraphIndexerTest {
             properties.add(new PropertyHolder(FOAF.firstName));
             properties.add(new PropertyHolder(FOAF.lastName));
             properties.add(pathProperty);
+            List<VirtualProperty> joinProperties = new 
ArrayList<VirtualProperty>();
+            joinProperties.add(pathProperty);
+            joinProperties.add(new PropertyHolder(ownsPetProperty));
+            JoinVirtualProperty joinVirtualProperty = new 
JoinVirtualProperty(joinProperties);
+            properties.add(joinVirtualProperty);
+            properties.add(new PropertyHolder(ownsPetProperty));
             indexDefinitionManager.addDefinitionVirtual(FOAF.Person, 
properties);
             service.reCreateIndex();
             Thread.sleep(1000);
@@ -329,7 +335,8 @@ public class GraphIndexerTest {
             }
             //and a late addtition, lets give Frank a pet
             GraphNode frank = new 
GraphNode(service.findResources(FOAF.firstName, "Frank").get(0), dataGraph);
-            GraphNode pet = new GraphNode(new BNode(), dataGraph);
+            GraphNode pet = new GraphNode(new 
UriRef("http://example.org/pet";), dataGraph);
+            //GraphNode pet = new GraphNode(new BNode(), dataGraph);
             frank.addProperty(ownsPetProperty, pet.getNode());
             //Silvio has become a quite popular pet-name
             pet.addPropertyValue(FOAF.name, "Silvio");
@@ -345,6 +352,37 @@ public class GraphIndexerTest {
                 List<NonLiteral> results = service.findResources(pathProperty, 
"Fifi");
                 Assert.assertEquals(1, results.size());
             }
+            //count occurence of distinct firstnames
+            CountFacetCollector facetCollector = new CountFacetCollector();
+            facetCollector.addFacetProperty(new 
PropertyHolder(ownsPetProperty));
+
+            Thread.sleep(1000);
+            {
+                List<Condition> conditions = new ArrayList<Condition>();
+                conditions.add(new WildcardCondition(pathProperty, "*i*"));
+                //conditions.add(new WildcardCondition(ownsPetProperty, "*"));
+                List<NonLiteral> results = service.findResources(conditions, 
facetCollector);
+                Assert.assertTrue(results.size() > 0);
+                final Set<Entry<String, Integer>> facets = 
facetCollector.getFacets(new PropertyHolder(ownsPetProperty));
+
+                //there are 7 distinct first names
+                
+                Assert.assertEquals(1, facets.size());
+                /*//the firstname "Frank" appears once
+                Assert.assertEquals(new Integer(1), 
facetCollector.getFacetValue(firstName, "Frank"));
+                //the firstname "frank" never appears
+                Assert.assertNull(facetCollector.getFacetValue(firstName, 
"frank"));
+                //the firstname "Jane" appears twice
+                Assert.assertEquals(new Integer(2), 
facetCollector.getFacetValue(firstName, "Jane"));
+                //the firstname "Harry" appears once
+                Assert.assertEquals(new Integer(1), 
facetCollector.getFacetValue(firstName, "Harry"));
+                //the firstname "Harry Joe" appears once
+                Assert.assertEquals(new Integer(1), 
facetCollector.getFacetValue(firstName, "Harry Joe"));
+                //the firstname "William" appears once
+                Assert.assertEquals(new Integer(1), 
facetCollector.getFacetValue(firstName, "William"));
+                //the firstname "John" appears twice
+                Assert.assertEquals(new Integer(2), 
facetCollector.getFacetValue(firstName, "John")); */
+            }
         } catch (ParseException ex) {
         } catch (InterruptedException ex) {
         }


Reply via email to