[Yanel-commits] rev 29404 - in
public/yanel/contributions/realms/foaf/src:
java/org/wyona/yanel/impl/map
resources/foaf/src/java/org/wyona/yanel/impl
resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf
michi at wyona.com
michi at wyona.com
Fri Nov 30 23:31:22 CET 2007
Author: michi
Date: 2007-11-30 23:31:21 +0100 (Fri, 30 Nov 2007)
New Revision: 29404
Added:
public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map
Removed:
public/yanel/contributions/realms/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:
moved
Deleted: public/yanel/contributions/realms/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java 2007-11-30 22:30:02 UTC (rev 29403)
+++ public/yanel/contributions/realms/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java 2007-11-30 22:31:21 UTC (rev 29404)
@@ -1,58 +0,0 @@
-/*
- * 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();
- }
-}
Copied: public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map (from rev 29403, public/yanel/contributions/realms/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 (rev 0)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/map 2007-11-30 22:31:21 UTC (rev 29404)
@@ -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:30:02 UTC (rev 29403)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java 2007-11-30 22:31:21 UTC (rev 29404)
@@ -174,11 +174,9 @@
*
*/
private Repository getProfilesRepository() throws Exception {
- Repository repo = getRealm().getRepository();
- String repoConfig = getResourceConfigProperty("repo-config");
- if (repoConfig != null) {
- repo = new RepositoryFactory().newRepository("profiles", new File(repoConfig));
- }
- return repo;
+ Repository repoProfiles = ((FOAFRealm) getRealm()).getProfilesRepository();
+ if (repoProfiles != null) return repoProfiles;
+
+ return getRealm().getRepository();
}
}
More information about the Yanel-commits
mailing list