[Yanel-commits] rev 29403 -
public/yanel/contributions/realms/foaf/src/java/org/wyona/yanel/impl/map
michi at wyona.com
michi at wyona.com
Fri Nov 30 23:30:03 CET 2007
Author: michi
Date: 2007-11-30 23:30:02 +0100 (Fri, 30 Nov 2007)
New Revision: 29403
Modified:
public/yanel/contributions/realms/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java
Log:
init and destroy of profiles repo
Modified: 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 21:27:59 UTC (rev 29402)
+++ public/yanel/contributions/realms/foaf/src/java/org/wyona/yanel/impl/map/FOAFRealm.java 2007-11-30 22:30:02 UTC (rev 29403)
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Wyona
+ * 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.
@@ -18,6 +18,9 @@
import org.apache.log4j.Category;
+import org.wyona.yarep.core.Repository;
+import org.wyona.yarep.core.RepositoryFactory;
+
/**
*
*/
@@ -25,11 +28,31 @@
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();
+ }
}
More information about the Yanel-commits
mailing list