Author: reto
Date: Thu Apr 7 14:52:05 2011
New Revision: 1089902
URL: http://svn.apache.org/viewvc?rev=1089902&view=rev
Log:
CLEREZZA-388: added java friendly methods to IndexDefinitionManager
Modified:
incubator/clerezza/issues/CLEREZZA-388/rdf.cris/core/src/main/scala/org/apache/clerezza/rdf/cris/IndexDefinitionManager.scala
Modified:
incubator/clerezza/issues/CLEREZZA-388/rdf.cris/core/src/main/scala/org/apache/clerezza/rdf/cris/IndexDefinitionManager.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/issues/CLEREZZA-388/rdf.cris/core/src/main/scala/org/apache/clerezza/rdf/cris/IndexDefinitionManager.scala?rev=1089902&r1=1089901&r2=1089902&view=diff
==============================================================================
---
incubator/clerezza/issues/CLEREZZA-388/rdf.cris/core/src/main/scala/org/apache/clerezza/rdf/cris/IndexDefinitionManager.scala
(original)
+++
incubator/clerezza/issues/CLEREZZA-388/rdf.cris/core/src/main/scala/org/apache/clerezza/rdf/cris/IndexDefinitionManager.scala
Thu Apr 7 14:52:05 2011
@@ -38,6 +38,11 @@ trait IndexDefinitionManager {
val virtualProperties = for (u <- (firstProperty :: properties.toList))
yield new PropertyHolder(u)
addDefinition(rdfType, virtualProperties: _*)
}
+
+ /**
+ * Defines an index for the specified types and virtual properties,
removing
+ * previous index definitions for that type
+ */
def addDefinition(rdfType: UriRef, properties: VirtualProperty*) {
deleteDefinition(rdfType)
val node = new GraphNode(new BNode(), definitionGraph)
@@ -81,6 +86,24 @@ trait IndexDefinitionManager {
}
/**
+ * Defines an index for the specified types and properties, removing
+ * previous index definitions for that type (java friendly version)
+ */
+ def addDefinition(rdfType: UriRef, properties: List[UriRef]) {
+ import collection.JavaConversions._
+ addDefinition(rdfType, properties.head, properties.tail: _*)
+ }
+
+ /**
+ * Defines an index for the specified types and virtual properties,
removing
+ * previous index definitions for that type (java friendly version)
+ */
+ def addDefinitionVirtual(rdfType: UriRef, properties:
List[VirtualProperty]) {
+ import collection.JavaConversions._
+ addDefinition(rdfType, properties: _*)
+ }
+
+ /**
* remove index definitions for the specified rdf type
*/
def deleteDefinition(rdfType: UriRef) {