[Yanel-commits] rev 29406 - in public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl: . map resources/foaf

michi at wyona.com michi at wyona.com
Fri Nov 30 23:37:21 CET 2007


Author: michi
Date: 2007-11-30 23:37:21 +0100 (Fri, 30 Nov 2007)
New Revision: 29406

Added:
   public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map/
   public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java
Modified:
   public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
Log:
package fixed

Added: public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java	                        (rev 0)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java	2007-11-30 22:37:21 UTC (rev 29406)
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2007 Wyona
+ *
+ *  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.wyona.org/licenses/APACHE-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.wyona.yanel.impl.map;
+
+import org.apache.log4j.Category;
+
+import org.wyona.yarep.core.Repository;
+import org.wyona.yarep.core.RepositoryFactory;
+
+/**
+ *
+ */
+public class FOAFRealm extends org.wyona.yanel.core.map.Realm {
+
+    private Category log = Category.getInstance(FOAFRealm.class);
+
+    Repository profilesRepo;
+
+    /**
+     *
+     */
+    public FOAFRealm(String name, String id, String mountPoint, java.io.File configFile) throws Exception {
+        super(name, id, mountPoint, configFile);
+        log.error("DEBUG: Custom FOAF Realm implementation!");
+
+	String repoConfig = "/home/michi/src/wyona-svn/wyona/misc/foaf/jcr-data-repository.xml";
+        profilesRepo = new RepositoryFactory().newRepository("profiles", new java.io.File(repoConfig));
+    }
+
+    /**
+     *
+     */
+    public Repository getProfilesRepository() {
+        return profilesRepo;
+    }
+
+    /**
+     *
+     */
+    public void destroy() throws Exception {
+        this.destroy();
+        getProfilesRepository().close();
+    }
+}

Modified: public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java	2007-11-30 22:35:36 UTC (rev 29405)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java	2007-11-30 22:37:21 UTC (rev 29406)
@@ -174,7 +174,7 @@
      *
      */
     private Repository getProfilesRepository() throws Exception {
-	Repository repoProfiles = ((FOAFRealm) getRealm()).getProfilesRepository();
+	Repository repoProfiles = ((org.wyona.yanel.impl.map.FOAFRealm) getRealm()).getProfilesRepository();
         if (repoProfiles != null) return repoProfiles;
 
         return getRealm().getRepository();



More information about the Yanel-commits mailing list