[Yanel-commits] rev 22186 - in public/yanel/trunk/src:
contributions/resources/atom/src/java/org/wyona/yanel/impl/resources
contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources
contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources
contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources
contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources
contributions/resources/nutch/src/test/junit/org/wyona/yanel/impl/resources
contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources
contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources
contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources
core/java/org/wyona/yanel/cmdl core/java/org/wyona/yanel/core
core/java/org/wyona/yanel/core/map
core/java/org/wyona/yanel/core/navigation
core/java/org/wyona/yanel/core/util
core/java/org/wyona/yanel/servlet impl/java/org/wyona/yanel/impl/map
impl/java/org/wyona/yanel/impl/navigation
realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources
resources/directory/src/java/org/wyona/yanel/impl/resources
resources/file/src/java/org/wyona/yanel/impl/resources
resources/importsite/src/java/org/wyona/yanel/impl/resources
resources/xml/src/java/org/wyona/yanel/impl/resources
resources/xml/src/test/junit/org/wyona/yanel/impl/resources
josias at wyona.com
josias at wyona.com
Fri Jan 26 09:33:28 CET 2007
Author: josias
Date: 2007-01-26 09:33:24 +0100 (Fri, 26 Jan 2007)
New Revision: 22186
Added:
public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java
Modified:
public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java
public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java
public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java
public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/XmlViewResource.java
public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java
public/yanel/trunk/src/contributions/resources/nutch/src/test/junit/org/wyona/yanel/impl/resources/NutchResourceTest.java
public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java
public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java
public/yanel/trunk/src/core/java/org/wyona/yanel/cmdl/YanelCommandLine.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/Resource.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceManager.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/Yanel.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Map.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Node.java
public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Sitetree.java
public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/CreateUsecaseHelper.java
public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/YanelServlet.java
public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/map/MapImpl.java
public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeRTIImpl.java
public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/SitetreeRTIImpl.java
public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java
public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java
public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java
public/yanel/trunk/src/resources/importsite/src/java/org/wyona/yanel/impl/resources/ImportSiteResource.java
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
public/yanel/trunk/src/resources/xml/src/test/junit/org/wyona/yanel/impl/resources/XMLResourceTest.java
Log:
started to replace Path by String. use PathUtil for methods like getParent() etc.
Modified: public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -21,6 +21,7 @@
import org.wyona.yanel.core.api.attributes.ViewableV1;
import org.wyona.yanel.core.attributes.viewable.View;
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
+import org.wyona.yanel.core.util.PathUtil;
import javax.servlet.http.HttpServletRequest;
@@ -75,8 +76,8 @@
//sb.append("<?xml-stylesheet type=\"text/xsl\" href=\"yanel/resources/directory/xslt/dir2xhtml.xsl\"?>");
- Path path = getPath();
- org.wyona.yarep.core.Path entriesPath = getEntriesPath(path);
+ String path = getPath();
+ String entriesPath = getEntriesPath(path);
Repository contentRepo = null;
try {
@@ -84,7 +85,7 @@
// TODO: Do not show the children with suffix .yanel-rti resp. make this configurable!
// NOTE: Do not hardcode the .yanel-rti, but rather use Path.getRTIPath ...
- org.wyona.yarep.core.Path[] children = contentRepo.getChildren(entriesPath);
+ org.wyona.yarep.core.Path[] children = contentRepo.getChildren(new Path(entriesPath));
Vector orderedEntries = new Vector();
org.apache.abdera.Abdera abdera = new org.apache.abdera.Abdera();
@@ -117,7 +118,7 @@
// TODO: Add realm prefix, e.g. realm-prefix="ulysses-demo"
// NOTE: The schema is according to http://cocoon.apache.org/2.1/userdocs/directory-generator.html
- sb.append("<atom:feed yanel:path=\"" + path + "\" dir:name=\"" + entriesPath.getName() + "\" dir:path=\"" + entriesPath + "\" xmlns:dir=\"http://apache.org/cocoon/directory/2.0\" xmlns:yanel=\"http://www.wyona.org/yanel/resource/directory/1.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">");
+ sb.append("<atom:feed yanel:path=\"" + path + "\" dir:name=\"" + PathUtil.getName(entriesPath) + "\" dir:path=\"" + entriesPath + "\" xmlns:dir=\"http://apache.org/cocoon/directory/2.0\" xmlns:yanel=\"http://www.wyona.org/yanel/resource/directory/1.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">");
sb.append("<atom:title>" + getFeedTitle(path) + "</atom:title>");
@@ -209,7 +210,7 @@
try {
Transformer transformer = TransformerFactory.newInstance().newTransformer(getXSLTStreamSource(path, contentRepo));
- transformer.setParameter("yanel.path.name", path.getName());
+ transformer.setParameter("yanel.path.name", PathUtil.getName(path));
transformer.setParameter("yanel.path", path.toString());
//transformer.setParameter("yanel.back2context", backToRoot(path, ""));
//transformer.setParameter("yarep.back2realm", backToRoot(new org.wyona.yanel.core.Path(rp.getPath().toString()), ""));
@@ -243,10 +244,10 @@
/**
*
*/
- private StreamSource getXSLTStreamSource(Path path, Repository repo) throws RepositoryException {
- Path xsltPath = getXSLTPath(path);
+ private StreamSource getXSLTStreamSource(String path, Repository repo) throws RepositoryException {
+ String xsltPath = getXSLTPath(path);
if(xsltPath != null) {
- return new StreamSource(repo.getInputStream(new org.wyona.yarep.core.Path(getXSLTPath(path).toString())));
+ return new StreamSource(repo.getInputStream(new org.wyona.yarep.core.Path(getXSLTPath(path))));
} else {
File xsltFile = org.wyona.commons.io.FileUtil.file(rtd.getConfigFile().getParentFile().getAbsolutePath(), "xslt" + File.separator + "atomfeed2xhtml.xsl");
log.debug("XSLT file: " + xsltFile);
@@ -257,9 +258,9 @@
/**
*
*/
- private Path getXSLTPath(Path path) {
+ private String getXSLTPath(String path) {
String xsltPath = getProperty(path, "xslt", null);
- if (xsltPath != null) return new Path(xsltPath);
+ if (xsltPath != null) return xsltPath;
log.info("No XSLT Path within: " + path);
return null;
}
@@ -267,7 +268,7 @@
/**
*
*/
- private String getMimeType(Path path) {
+ private String getMimeType(String path) {
String mimeType = getProperty(path, "mime-type", null);
if (mimeType != null) return mimeType;
@@ -278,17 +279,17 @@
/**
*
*/
- private String getFeedTitle(Path path) {
+ private String getFeedTitle(String path) {
return getProperty(path, "feed-title", "WARNING: No feed title specified!");
}
/**
* Get property from RTI
*/
- private String getProperty(Path path, String name, String defaultValue) {
+ private String getProperty(String path, String name, String defaultValue) {
String propertyValue = defaultValue;
try {
- java.io.BufferedReader br = new java.io.BufferedReader(getRealm().getRTIRepository().getReader(new org.wyona.yarep.core.Path(getPath().getRTIPath().toString())));
+ java.io.BufferedReader br = new java.io.BufferedReader(getRealm().getRTIRepository().getReader(new org.wyona.yarep.core.Path(PathUtil.getRTIPath(getPath()))));
String property = null;
while ((property = br.readLine()) != null) {
@@ -308,15 +309,15 @@
/**
* Get path to entries
*/
- private org.wyona.yarep.core.Path getEntriesPath(Path feedPath) {
+ private String getEntriesPath(String feedPath) {
String entriesPathString = getProperty(feedPath, "entries-path", null);
if (entriesPathString != null) {
- return new org.wyona.yarep.core.Path(entriesPathString);
+ return entriesPathString;
} else {
try {
Repository repo = getRealm().getRepository();
- org.wyona.yarep.core.Path entriesPath = new org.wyona.yarep.core.Path(feedPath.toString());
+ org.wyona.yarep.core.Path entriesPath = new org.wyona.yarep.core.Path(feedPath);
// TODO: This doesn't seem to work ... (check on Yarep ...)
if (repo.isResource(entriesPath)) {
@@ -330,7 +331,7 @@
entriesPath = new org.wyona.yarep.core.Path(new org.wyona.commons.io.Path(entriesPath.toString()).getParent().toString());
log.warn("Use parent of path: " + entriesPath);
}
- return entriesPath;
+ return entriesPath.toString();
} catch(Exception e) {
log.error(e);
return null;
@@ -344,9 +345,9 @@
* @param in entry content
* @return entry path
*/
- public Path createEntry(Path path, java.io.InputStream in) {
+ public String createEntry(String path, java.io.InputStream in) {
try {
- org.wyona.yarep.core.Path entryPath = new org.wyona.yarep.core.Path(getEntriesPath(path).toString() + "/" + new Date().getTime() + ".xml");
+ org.wyona.yarep.core.Path entryPath = new org.wyona.yarep.core.Path(getEntriesPath(path) + "/" + new Date().getTime() + ".xml");
java.io.OutputStream out = getRealm().getRepository().getOutputStream(entryPath);
byte buffer[] = new byte[8192];
int bytesRead;
@@ -355,7 +356,7 @@
}
log.info("Atom entry has been created: " + entryPath);
- return new Path(entryPath.toString());
+ return entryPath.toString();
} catch(Exception e) {
log.error(e);
}
@@ -397,7 +398,7 @@
/**
*
*/
- String getEntriesURL(Path path) {
+ String getEntriesURL(String path) {
return getProperty(path, "entries-url", null);
}
Modified: public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/atom-entry/src/java/org/wyona/yanel/impl/resources/AtomEntryResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -23,6 +23,7 @@
import org.wyona.yanel.core.api.attributes.ViewableV2;
import org.wyona.yanel.core.attributes.viewable.View;
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yarep.core.Repository;
import org.wyona.yarep.core.RepositoryFactory;
@@ -85,11 +86,11 @@
TransformerFactory tf = TransformerFactory.newInstance();
//tf.setURIResolver(null);
Transformer transformer = tf.newTransformer(new StreamSource(getRealm().getRepository().getInputStream(new org.wyona.yarep.core.Path(getXSLTPath().toString()))));
- transformer.setParameter("yanel.path.name", getPath().getName());
- transformer.setParameter("yanel.path", getPath().toString());
+ transformer.setParameter("yanel.path.name", PathUtil.getName(getPath()));
+ transformer.setParameter("yanel.path", getPath());
// TODO: There seems to be a bug re back2context
transformer.setParameter("yanel.back2context", backToRoot(getPath(), ""));
- transformer.setParameter("yarep.back2realm", backToRoot(new org.wyona.yanel.core.Path(getPath().toString()), ""));
+ transformer.setParameter("yarep.back2realm", backToRoot(getPath(), ""));
// TODO: Is this the best way to generate an InputStream from an OutputStream?
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
@@ -122,11 +123,11 @@
/**
*
*/
- private String getMimeType(Path path, String viewId) {
+ private String getMimeType(String path, String viewId) {
String mimeType = getRTI().getProperty("mime-type");
if (mimeType != null) return mimeType;
- String suffix = path.getSuffix();
+ String suffix = PathUtil.getSuffix(path);
if (suffix != null) {
log.debug("SUFFIX: " + suffix);
if (suffix.equals("html")) {
@@ -149,14 +150,14 @@
*
*/
public Reader getReader() throws Exception {
- return getRealm().getRepository().getReader(new org.wyona.yarep.core.Path(getPath().toString()));
+ return getRealm().getRepository().getReader(new org.wyona.yarep.core.Path(getPath()));
}
/**
*
*/
public InputStream getInputStream() throws Exception {
- return getRealm().getRepository().getInputStream(new org.wyona.yarep.core.Path(getPath().toString()));
+ return getRealm().getRepository().getInputStream(new org.wyona.yarep.core.Path(getPath()));
}
/**
@@ -171,7 +172,7 @@
*
*/
public OutputStream getOutputStream() throws Exception {
- return getRealm().getRepository().getOutputStream(new org.wyona.yarep.core.Path(getPath().toString()));
+ return getRealm().getRepository().getOutputStream(new org.wyona.yarep.core.Path(getPath()));
}
/**
@@ -190,7 +191,7 @@
entry.setPublished(date);
}
- OutputStream out = getRealm().getRepository().getOutputStream(new org.wyona.yarep.core.Path(getPath().toString()));
+ OutputStream out = getRealm().getRepository().getOutputStream(new org.wyona.yarep.core.Path(getPath()));
org.apache.abdera.writer.Writer writer = abdera.getWriter();
writer.writeTo(entry, out);
@@ -202,18 +203,18 @@
* Get last modified
*/
public long getLastModified() throws Exception {
- return getRealm().getRepository().getLastModified(new org.wyona.yarep.core.Path(getPath().toString()));
+ return getRealm().getRepository().getLastModified(new org.wyona.yarep.core.Path(getPath()));
}
/**
*
*/
- private Path getXSLTPath() {
+ private String getXSLTPath() {
String xslt = getRTI().getProperty("xslt");
if (xslt != null) {
- return new Path(xslt);
+ return xslt;
} else {
- log.error("No XSLT Path within: " + getPath().getRTIPath());
+ log.error("No XSLT Path within: " + PathUtil.getRTIPath(getPath()));
return null;
}
}
@@ -221,10 +222,10 @@
/**
*
*/
- private String backToRoot(Path path, String backToRoot) {
- org.wyona.commons.io.Path parent = path.getParent();
+ private String backToRoot(String path, String backToRoot) {
+ String parent = PathUtil.getParent(path);
if (parent != null && !isRoot(parent)) {
- return backToRoot(new Path(parent.toString()), backToRoot + "../");
+ return backToRoot(parent, backToRoot + "../");
}
return backToRoot;
}
@@ -232,7 +233,7 @@
/**
*
*/
- private boolean isRoot(org.wyona.commons.io.Path path) {
+ private boolean isRoot(String path) {
if (path.toString().equals("/")) return true;
return false;
}
@@ -241,7 +242,7 @@
*
*/
public boolean delete() throws Exception {
- return getRealm().getRepository().delete(new org.wyona.yarep.core.Path(getPath().toString()));
+ return getRealm().getRepository().delete(new org.wyona.yarep.core.Path(getPath()));
}
protected RepositoryFactory getRepositoryFactory() {
@@ -257,7 +258,7 @@
*
*/
public long getSize() throws Exception {
- return getRealm().getRepository().getSize(getPath());
+ return getRealm().getRepository().getSize(new Path(getPath()));
}
}
Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -70,7 +70,7 @@
org.wyona.yarep.core.Repository dataRepo = getRealm().getRepository();
- if (dataRepo.exists(new org.wyona.yarep.core.Path(getPath().toString()))) {
+ if (dataRepo.exists(new org.wyona.yarep.core.Path(getPath()))) {
log.error("DEBUG: ICS exists!");
if(viewId == null) {
View view = new View();
@@ -81,7 +81,7 @@
} else {
view.setMimeType("text/calendar");
}
- view.setInputStream(dataRepo.getInputStream(new org.wyona.yarep.core.Path(getPath().toString())));
+ view.setInputStream(dataRepo.getInputStream(new org.wyona.yarep.core.Path(getPath())));
log.error("DEBUG: Return ICS!");
return view;
}
@@ -89,7 +89,7 @@
String eventsPath = getRTI().getProperty("events-path");
if (eventsPath == null) {
- eventsPath = getPath().toString();
+ eventsPath = getPath();
}
org.wyona.yarep.core.Path[] children = dataRepo.getChildren(new org.wyona.yarep.core.Path(eventsPath));
//org.wyona.yarep.core.Path[] children = dataRepo.search("categories", categories);
@@ -211,7 +211,7 @@
* Save/Write the actual ICS
*/
private InputStream writeICS(InputStream in) throws Exception {
- org.wyona.yarep.core.Path path = new org.wyona.yarep.core.Path(getPath().toString());
+ org.wyona.yarep.core.Path path = new org.wyona.yarep.core.Path(getPath());
OutputStream out = getRealm().getRepository().getOutputStream(path);
byte[] buf = new byte[8192];
int bytesR;
@@ -270,7 +270,7 @@
*
*/
public void create(HttpServletRequest request) {
- org.wyona.yanel.core.Path newPath = getPath();
+ String newPath = getPath();
log.error("DEBUG: New path: " + newPath);
}
Modified: public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/DavCollection.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -171,6 +171,6 @@
*
*/
public long getSize() throws Exception {
- return getRealm().getRepository().getSize(getPath());
+ return getRealm().getRepository().getSize(new Path(getPath()));
}
}
Modified: public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/XmlViewResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/XmlViewResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/davcollection/src/java/org/wyona/yanel/impl/resources/XmlViewResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -77,7 +77,7 @@
this.contentHandler = xmlSerializer.asContentHandler();
- buildXmlView(getPath(), viewId);
+ buildXmlView(new Path(getPath()), viewId);
View view = new View();
view.setResponse(false); // this resource writes the response itself
Modified: public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -61,6 +61,7 @@
import org.wyona.yanel.core.attributes.viewable.View;
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
import org.wyona.yanel.core.transformation.I18nTransformer;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yarep.core.RepositoryException;
import org.wyona.yarep.core.Repository;
import org.wyona.yarep.core.RepositoryFactory;
@@ -302,14 +303,14 @@
File xsltFile = org.wyona.commons.io.FileUtil.file(rtd.getConfigFile().getParentFile()
.getAbsolutePath(), "xslt" + File.separator + "result2xhtml.xsl");
transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(xsltFile));
- transformer.setParameter("yanel.path.name", getPath().getName());
+ transformer.setParameter("yanel.path.name", PathUtil.getName(getPath()));
// TODO: Remove the trailing slash ...
- transformer.setParameter("yanel.path", getRealm().getMountPoint() + getPath().toString());
+ transformer.setParameter("yanel.path", getRealm().getMountPoint() + getPath());
log.debug("Yanel Path: " + getRealm().getMountPoint() + getPath());
- transformer.setParameter("yanel.back2context", backToRoot(new Path(getRealm().getMountPoint().toString() + getPath().toString()), ""));
- log.debug("Back 2 context: " + getRealm().getMountPoint() + getPath() + ", " + backToRoot(new Path(getRealm().getMountPoint().toString() + getPath().toString()), ""));
- transformer.setParameter("yarep.back2realm", backToRoot(getPath(), ""));
- log.debug("Back 2 realm: " + getPath() + ", " + backToRoot(getPath(), ""));
+ transformer.setParameter("yanel.back2context", backToRoot(new Path(getRealm().getMountPoint() + getPath()), ""));
+ log.debug("Back 2 context: " + getRealm().getMountPoint() + getPath() + ", " + backToRoot(new Path(getRealm().getMountPoint() + getPath()), ""));
+ transformer.setParameter("yarep.back2realm", backToRoot(new Path(getPath()), ""));
+ log.debug("Back 2 realm: " + getPath() + ", " + backToRoot(new Path(getPath()), ""));
transformer.transform(new javax.xml.transform.dom.DOMSource(document), new StreamResult(byteArrayOutputStream));
InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
i18nTransformer = new I18nTransformer(resourceBundle, language);
@@ -335,10 +336,10 @@
streamSource = getXSLTStreamSource();
if(streamSource != null) {
transformer = TransformerFactory.newInstance().newTransformer(streamSource);
- transformer.setParameter("yanel.path.name", getPath().getName());
+ transformer.setParameter("yanel.path.name", PathUtil.getName(getPath()));
transformer.setParameter("yanel.path", getPath().toString());
- transformer.setParameter("yanel.back2context", backToRoot(getPath(), ""));
- transformer.setParameter("yarep.back2realm", backToRoot(getPath(), ""));
+ transformer.setParameter("yanel.back2context", backToRoot(new Path(getPath()), ""));
+ transformer.setParameter("yarep.back2realm", backToRoot(new Path(getPath()), ""));
transformer.setParameter("hitsPerPage", "" + hitsPerPage);
transformer.setParameter("totalHits", "" + totalHits);
transformer.setParameter("query", "" + searchTerm);
Modified: public/yanel/trunk/src/contributions/resources/nutch/src/test/junit/org/wyona/yanel/impl/resources/NutchResourceTest.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/nutch/src/test/junit/org/wyona/yanel/impl/resources/NutchResourceTest.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/nutch/src/test/junit/org/wyona/yanel/impl/resources/NutchResourceTest.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -46,7 +46,7 @@
String url = "/yanel-website/en/search.html";
Map map = yanel.getMap();
Realm realm = yanel.getMap().getRealm(url);
- Path path = yanel.getMap().getPath(realm, url);
+ String path = yanel.getMap().getPath(realm, url);
this.resource = (NutchResource)yanel.getResourceManager().getResource(null, null, realm, path);
confDir = this.resource.getRTD().getConfigFile().getParentFile().getAbsolutePath() +
File.separator + "conf" + File.separator;
Modified: public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -80,7 +80,7 @@
org.xml.sax.XMLReader xmlReader = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
xmlReader.setEntityResolver(new org.apache.xml.resolver.tools.CatalogResolver());
- Source src = new SAXSource(xmlReader, new org.xml.sax.InputSource(repo.getInputStream(getPath())));
+ Source src = new SAXSource(xmlReader, new org.xml.sax.InputSource(repo.getInputStream(new Path(getPath()))));
Result res = new SAXResult(driver.getContentHandler());
@@ -109,16 +109,16 @@
*
*/
public long getSize() throws Exception {
- return getRealm().getRepository().getSize(getPath());
+ return getRealm().getRepository().getSize(new Path(getPath()));
}
/**
*
*/
- private StreamSource getXSLTStreamSource(Path path, Repository repo) throws RepositoryException {
- Path xsltPath = getXSLTPath(path);
+ private StreamSource getXSLTStreamSource(String path, Repository repo) throws RepositoryException {
+ String xsltPath = getXSLTPath(path);
if(xsltPath != null) {
- return new StreamSource(repo.getInputStream(xsltPath));
+ return new StreamSource(repo.getInputStream(new Path(xsltPath)));
} else {
File xsltFile = org.wyona.commons.io.FileUtil.file(
rtd.getConfigFile().getParentFile().getAbsolutePath(), "xslt" + File.separator + "xml2fo.xsl");
@@ -130,9 +130,9 @@
/**
*
*/
- private Path getXSLTPath(Path path) {
+ private String getXSLTPath(String path) {
String xsltPath = getRTI().getProperty("xslt");
- if (xsltPath != null) return new Path(xsltPath);
+ if (xsltPath != null) return xsltPath;
log.info("No XSLT Path within: " + path);
return null;
}
Modified: public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -13,6 +13,7 @@
import org.wyona.yanel.core.api.attributes.ViewableV2;
import org.wyona.yanel.core.attributes.viewable.View;
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yanel.core.util.ResourceAttributeHelper;
import org.apache.log4j.Category;
@@ -316,7 +317,7 @@
*/
private void create() throws Exception {
org.wyona.yanel.core.map.Realm realm = getRealm();
- Path pathOfResourceCreator = getPath();
+ Path pathOfResourceCreator = new Path(getPath());
org.wyona.commons.io.Path parent = new org.wyona.commons.io.Path(pathOfResourceCreator.toString()).getParent();
@@ -334,7 +335,7 @@
String rtps = getRequest().getParameter("resource-type");
String resNamespace = rtps.substring(0, rtps.indexOf("::"));
String resName = rtps.substring(rtps.indexOf("::") + 2);
- Resource newResource = yanel.getResourceManager().getResource(request, response, realm, pathOfNewResource, new ResourceConfiguration(resName, resNamespace, null));
+ Resource newResource = yanel.getResourceManager().getResource(request, response, realm, pathOfNewResource.toString(), new ResourceConfiguration(resName, resNamespace, null));
if (newResource != null) {
if (ResourceAttributeHelper.hasAttributeImplemented(newResource, "Creatable", "2")) {
@@ -353,7 +354,7 @@
StringBuffer rtiContent = new StringBuffer(newResource.getResourceTypeUniversalName() + "\n");
java.util.HashMap rtiProperties = ((CreatableV2) newResource).createRTIProperties(request);
if (rtiProperties != null) {
- log.error("DEBUG: " + rtiProperties + " " + newResource.getPath().getRTIPath());
+ log.error("DEBUG: " + rtiProperties + " " + PathUtil.getRTIPath(newResource.getPath()));
java.util.Iterator iterator = rtiProperties.keySet().iterator();
while (iterator.hasNext()) {
String property = (String) iterator.next();
@@ -364,7 +365,7 @@
} else {
log.warn("No RTI properties: " + newResource.getPath());
}
- java.io.Writer writer = newResource.getRealm().getRTIRepository().getWriter(new org.wyona.yarep.core.Path(newResource.getPath().getRTIPath().toString()));
+ java.io.Writer writer = newResource.getRealm().getRTIRepository().getWriter(new org.wyona.yarep.core.Path(PathUtil.getRTIPath(newResource.getPath())));
writer.write(rtiContent.toString());
writer.close();
}
Modified: public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/contributions/resources/wiki/src/java/org/wyona/yanel/impl/resources/WikiResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -97,7 +97,7 @@
try {
if (viewId != null && viewId.equals("txt")) {
View view = new View();
- view.setInputStream(getRealm().getRepository().getInputStream(new org.wyona.yarep.core.Path(getPath().toString())));
+ view.setInputStream(getRealm().getRepository().getInputStream(new org.wyona.yarep.core.Path(getPath())));
view.setMimeType("text/plain");
return view;
}
@@ -109,7 +109,7 @@
path2Resource = path2Resource.substring(0, path2Resource.lastIndexOf("/") + 1);
String wikiParserBeanId = getWikiSyntax(path);
- InputStream inputStream = dataRepo.getInputStream(new org.wyona.yarep.core.Path(getPath().toString()));
+ InputStream inputStream = dataRepo.getInputStream(new org.wyona.yarep.core.Path(getPath()));
IWikiParser wikiParser = (IWikiParser) yanel.getBeanFactory().getBean(wikiParserBeanId);
wikiParser.parse(inputStream);
@@ -400,7 +400,7 @@
*
*/
public OutputStream getOutputStream() throws Exception {
- return getRealm().getRepository().getOutputStream(getPath());
+ return getRealm().getRepository().getOutputStream(new Path(getPath()));
}
/**
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/cmdl/YanelCommandLine.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/cmdl/YanelCommandLine.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/cmdl/YanelCommandLine.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -89,13 +89,13 @@
Realm realm = map.getRealm(url);
- Path path = map.getPath(realm, url);
+ String path = map.getPath(realm, url);
//PolicyManager pm = (PolicyManager) yanel.getBeanFactory().getBean("policyManager");
PolicyManager pm = realm.getPolicyManager();
String[] groupnames = {"admin", "accounting"};
- if (pm.authorize(path, new Identity("lenya", groupnames), new Role("view"))) {
+ if (pm.authorize(new Path(path), new Identity("lenya", groupnames), new Role("view"))) {
System.out.println("Access granted: " + path);
} else {
// TODO: Deny access resp. start login process!
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/Resource.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/Resource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/Resource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -33,7 +33,7 @@
protected ResourceTypeIdentifier rti;
protected ResourceConfiguration rc;
protected Yanel yanel;
- private Path path;
+ private String path;
protected Realm realm;
protected HttpServletRequest request;
protected HttpServletResponse response;
@@ -94,11 +94,11 @@
return rtd.getResourceTypeNamespace();
}
- public Path getPath() {
+ public String getPath() {
return path;
}
- public void setPath(Path path) {
+ public void setPath(String path) {
this.path = path;
}
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceManager.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceManager.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/ResourceManager.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -24,6 +24,7 @@
import org.apache.log4j.Category;
import org.wyona.yanel.core.map.Map;
import org.wyona.yanel.core.map.Realm;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yarep.core.NoSuchNodeException;
/**
@@ -51,7 +52,7 @@
* @param path Path relative to realm (e.g. yanel.getMap().getPath(realm, request.getServletPath()))
*/
public Resource getResource(HttpServletRequest request, HttpServletResponse response,
- Realm realm, Path path, ResourceTypeDefinition rtd, ResourceTypeIdentifier rti)
+ Realm realm, String path, ResourceTypeDefinition rtd, ResourceTypeIdentifier rti)
throws Exception {
String universalName = rtd.getResourceTypeUniversalName();
if (rtd != null) {
@@ -77,7 +78,7 @@
*
* @param path Path relative to realm (e.g. yanel.getMap().getPath(realm, request.getServletPath()))
*/
- public Resource getResource(HttpServletRequest request, HttpServletResponse response, Realm realm, Path path, ResourceConfiguration rc) throws Exception {
+ public Resource getResource(HttpServletRequest request, HttpServletResponse response, Realm realm, String path, ResourceConfiguration rc) throws Exception {
ResourceTypeDefinition rtd = rtRegistry.getResourceTypeDefinition(rc.getUniversalName());
if (rtd != null) {
@@ -104,13 +105,13 @@
*
* @param path Path relative to realm (e.g. yanel.getMap().getPath(realm, request.getServletPath()))
*/
- public Resource getResource(HttpServletRequest request, HttpServletResponse response, Realm realm, Path path) throws Exception {
- if (realm.getRTIRepository().exists(path.getRCPath())) {
- ResourceConfiguration rc = new ResourceConfiguration(realm.getRTIRepository().getInputStream(path.getRCPath()));
+ public Resource getResource(HttpServletRequest request, HttpServletResponse response, Realm realm, String path) throws Exception {
+ if (realm.getRTIRepository().exists(new Path(PathUtil.getRCPath(path)))) {
+ ResourceConfiguration rc = new ResourceConfiguration(realm.getRTIRepository().getInputStream(new Path(PathUtil.getRCPath(path))));
if (rc != null) return getResource(request, response, realm, path, rc);
}
- if (realm.getRTIRepository().exists(path.getRTIPath())) {
+ if (realm.getRTIRepository().exists(new Path(PathUtil.getRTIPath(path)))) {
// Fallback to deprecated RTI
log.warn("DEPRECATED: RTI should be replaced by ResourceConfiguration: " + realm + ", " + path);
ResourceTypeIdentifier rti = getResourceTypeIdentifier(realm, path);
@@ -126,10 +127,10 @@
* TODO: move this method to some RTIManager class ?
* @deprecated
*/
- public ResourceTypeIdentifier getResourceTypeIdentifier(Realm realm, Path path) throws Exception {
+ public ResourceTypeIdentifier getResourceTypeIdentifier(Realm realm, String path) throws Exception {
log.debug("Original path: " + path);
try {
- Reader reader = realm.getRTIRepository().getReader(path.getRTIPath());
+ Reader reader = realm.getRTIRepository().getReader(new Path(PathUtil.getRTIPath(path)));
return new ResourceTypeIdentifier(reader);
} catch(NoSuchNodeException e) {
log.warn(e.getMessage());
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/Yanel.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/Yanel.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/Yanel.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -116,7 +116,7 @@
* @deprecated
* use getResourceManager().getResource() instead
*/
- public Resource getResource(Realm realm, Path path) throws Exception {
+ public Resource getResource(Realm realm, String path) throws Exception {
return resourceManager.getResource(null, null, realm, path);
}
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Map.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Map.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Map.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -62,5 +62,5 @@
* @param url
* @throws Exception
*/
- public Path getPath(Realm realm, String url) throws Exception;
+ public String getPath(Realm realm, String url) throws Exception;
}
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -28,7 +28,7 @@
private String name;
private String id;
- private Path mountPoint;
+ private String mountPoint;
private Repository repository;
private Repository rtiRepository;
private PolicyManager policyManager;
@@ -41,7 +41,7 @@
/**
*
*/
- public Realm(String name, String id, Path mountPoint) {
+ public Realm(String name, String id, String mountPoint) {
this.name = name;
this.id = id;
this.mountPoint = mountPoint;
@@ -64,7 +64,7 @@
/**
* Mount point of realm
*/
- public Path getMountPoint() {
+ public String getMountPoint() {
return mountPoint;
}
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -125,7 +125,7 @@
String realmId = realmElements[i].getAttribute("id", null);
String rootFlag = realmElements[i].getAttribute("root", "false");
Configuration name = realmElements[i].getChild("name", false);
- Realm realm = new Realm(name.getValue(), realmId, new org.wyona.commons.io.Path(mountPoint));
+ Realm realm = new Realm(name.getValue(), realmId, mountPoint);
Configuration proxy = realmElements[i].getChild("reverse-proxy", false);
if (proxy != null) {
realm.setProxy(proxy.getChild("host-name").getValue(), proxy.getChild("port").getValue(""), proxy.getChild("prefix").getValue());
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Node.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Node.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Node.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -80,5 +80,5 @@
/**
*
*/
- public Path getPath();
+ public String getPath();
}
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Sitetree.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Sitetree.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/navigation/Sitetree.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -32,7 +32,7 @@
/**
*
*/
- public Node getNode(Realm realm, Path path);
+ public Node getNode(Realm realm, String path);
/**
*
Added: public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2006 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.core.util;
+
+import org.apache.log4j.Category;
+
+/**
+ *
+ */
+public class PathUtil extends org.wyona.commons.io.PathUtil {
+
+ private static Category log = Category.getInstance(PathUtil.class);
+
+ /**
+ *
+ */
+ public static String getRTIPath(String path) {
+ // Remove trailing slash except for ROOT ...
+ if (path.length() > 1 && path.charAt(path.length() - 1) == '/') {
+ return path.substring(0, path.length() - 1) + ".yanel-rti";
+ }
+ return path + ".yanel-rti";
+ }
+
+ /**
+ *
+ */
+ public static String getRCPath(String path) {
+ // Remove trailing slash except for ROOT ...
+ if (path.length() > 1 && path.charAt(path.length() - 1) == '/') {
+ return path.substring(0, path.length() - 1) + ".yanel-rc";
+ }
+ return path + ".yanel-rc";
+ }
+}
Property changes on: public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/CreateUsecaseHelper.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/CreateUsecaseHelper.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/CreateUsecaseHelper.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -32,6 +32,7 @@
import org.wyona.yanel.core.api.attributes.ViewableV1;
import org.wyona.yanel.core.api.attributes.ViewableV2;
import org.wyona.yanel.core.api.attributes.CreatableV2;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yanel.core.util.ResourceAttributeHelper;
import org.wyona.yanel.core.Path;
@@ -195,14 +196,14 @@
try {
org.wyona.yanel.core.map.Realm realm = yanel.getMap().getRealm(request.getServletPath());
- Path pathFromWhereCreateUsecaseHasBeenIssued = yanel.getMap().getPath(realm, request.getServletPath());
- org.wyona.commons.io.Path parent = pathFromWhereCreateUsecaseHasBeenIssued.getParent();
- Path newPath = null;
+ String pathFromWhereCreateUsecaseHasBeenIssued = yanel.getMap().getPath(realm, request.getServletPath());
+ String parent = PathUtil.getParent(pathFromWhereCreateUsecaseHasBeenIssued);
+ String newPath = null;
if(parent.equals("null")) {
// if pathFromWhereCreateUsecaseHasBeenIssued is ROOT
- newPath = new Path("/" + createName);
+ newPath = "/" + createName;
} else {
- newPath = new Path(parent + "/" + createName);
+ newPath = parent + "/" + createName;
}
log.debug("New Path: " + newPath);
@@ -217,7 +218,7 @@
StringBuffer rtiContent = new StringBuffer(newResource.getResourceTypeUniversalName() + "\n");
java.util.HashMap rtiProperties = ((CreatableV2) newResource).createRTIProperties(request);
if (rtiProperties != null) {
- log.error("DEBUG: " + rtiProperties + " " + newResource.getPath().getRTIPath());
+ log.error("DEBUG: " + rtiProperties + " " + PathUtil.getRTIPath(newResource.getPath()));
java.util.Iterator iterator = rtiProperties.keySet().iterator();
while (iterator.hasNext()) {
String property = (String) iterator.next();
@@ -228,7 +229,7 @@
} else {
log.warn("No RTI properties: " + newResource.getPath());
}
- java.io.Writer writer = newResource.getRealm().getRTIRepository().getWriter(new org.wyona.yarep.core.Path(newResource.getPath().getRTIPath().toString()));
+ java.io.Writer writer = newResource.getRealm().getRTIRepository().getWriter(new Path(PathUtil.getRTIPath(newResource.getPath())));
writer.write(rtiContent.toString());
writer.close();
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/YanelServlet.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/YanelServlet.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/servlet/YanelServlet.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -466,7 +466,7 @@
try {
String atomEntryUniversalName = "<{http://www.wyona.org/yanel/resource/1.0}atom-entry/>";
org.wyona.yanel.core.map.Realm realm = yanel.getMap().getRealm(request.getServletPath());
- Path newEntryPath = yanel.getMap().getPath(realm, request.getServletPath() + "/" + new java.util.Date().getTime() + ".xml");
+ String newEntryPath = yanel.getMap().getPath(realm, request.getServletPath() + "/" + new java.util.Date().getTime() + ".xml");
log.error("DEBUG: Realm and Path of new Atom entry: " + realm + " " + newEntryPath);
Resource atomEntryResource = yanel.getResourceManager().getResource(request, response, realm, newEntryPath, new ResourceTypeRegistry().getResourceTypeDefinition(atomEntryUniversalName), new org.wyona.yanel.core.ResourceTypeIdentifier(atomEntryUniversalName, null));
@@ -524,7 +524,7 @@
try {
String atomEntryUniversalName = "<{http://www.wyona.org/yanel/resource/1.0}atom-entry/>";
org.wyona.yanel.core.map.Realm realm = yanel.getMap().getRealm(request.getServletPath());
- Path entryPath = yanel.getMap().getPath(realm, request.getServletPath());
+ String entryPath = yanel.getMap().getPath(realm, request.getServletPath());
log.error("DEBUG: Realm and Path of new Atom entry: " + realm + " " + entryPath);
@@ -593,7 +593,7 @@
private Resource getResource(HttpServletRequest request, HttpServletResponse response) {
try {
Realm realm = map.getRealm(request.getServletPath());
- Path path = map.getPath(realm, request.getServletPath());
+ String path = map.getPath(realm, request.getServletPath());
HttpRequest httpRequest = new HttpRequest(request);
HttpResponse httpResponse = new HttpResponse(response);
Resource res = yanel.getResourceManager().getResource(httpRequest, httpResponse, realm, path);
@@ -765,7 +765,7 @@
boolean authorized = false;
Realm realm;
- Path path;
+ String path;
try {
realm = map.getRealm(request.getServletPath());
path = map.getPath(realm, request.getServletPath());
@@ -794,7 +794,7 @@
log.debug("username: " + username + ", password: " + password);
try {
if (realm.getIdentityManager().authenticate(username, password)) {
- authorized = realm.getPolicyManager().authorize(path, new Identity(username, null), new Role("view"));
+ authorized = realm.getPolicyManager().authorize(new Path(path), new Identity(username, null), new Role("view"));
if(authorized) {
return null;
} else {
@@ -847,7 +847,7 @@
try {
log.debug("Check authorization: realm: " + realm + ", path: " + path + ", identity: " + identity.getUsername() + ", role: " + role.getName());
- authorized = realm.getPolicyManager().authorize(path, identity, role);
+ authorized = realm.getPolicyManager().authorize(new Path(path), identity, role);
log.debug("Check authorization result: " + authorized);
} catch (Exception e) {
log.error(e.getMessage(), e);
@@ -937,7 +937,7 @@
Realm realm = map.getRealm(request.getServletPath());
// TODO: Handle this exception more gracefully!
- if (realm == null) log.error("No realm found for path " + new Path(request.getServletPath()));
+ if (realm == null) log.error("No realm found for path " +request.getServletPath());
String proxyHostName = realm.getProxyHostName();
String proxyPort = realm.getProxyPort();
String proxyPrefix = realm.getProxyPrefix();
@@ -1090,7 +1090,7 @@
try {
Realm realm = map.getRealm(request.getServletPath());
- Path path = map.getPath(realm, request.getServletPath());
+ String path = map.getPath(realm, request.getServletPath());
//Realm realm = map.getRealm(new Path(request.getServletPath()));
// HTML Form based authentication
Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/map/MapImpl.java
===================================================================
--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/map/MapImpl.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/map/MapImpl.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -72,7 +72,7 @@
try {
Repository repo = getRealm(path.toString()).getRTIRepository();
- Path rPath = getPath(getRealm(path.toString()), path.toString());
+ Path rPath = new Path(getPath(getRealm(path.toString()), path.toString()));
log.debug("Repo Name: " + repo.getName());
log.debug("New path: " + rPath);
@@ -111,7 +111,7 @@
realms[i] = realmConfig.getRealm(repo.getID());
if (realms[i] == null) {
log.warn("No such realm defined: " + repo.getID() + " (fallback to repo configuration ...)");
- realms[i] = new Realm(repo.getName(), repo.getID(), new Path("/" + repoIds[i] + "/"));
+ realms[i] = new Realm(repo.getName(), repo.getID(), "/" + repoIds[i] + "/");
}
}
}
@@ -174,7 +174,7 @@
* E.g. if the url is /yanel-website/foo/bar.html, it will return /foo/bar.html.
* @param url URL of request but without servlet context
*/
- public Path getPath(Realm realm, String url) throws Exception {
+ public String getPath(Realm realm, String url) throws Exception {
log.debug("URL: " + url);
String mountPoint = realm.getMountPoint().toString();
@@ -182,6 +182,6 @@
throw new Exception("Cannot map url [" + url + "] to path because the url does not " +
"belong to the given realm : " + realm.getID() + ": " + mountPoint);
}
- return new Path("/" + url.substring(mountPoint.length()));
+ return "/" + url.substring(mountPoint.length());
}
}
Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeRTIImpl.java
===================================================================
--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeRTIImpl.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeRTIImpl.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -36,8 +36,8 @@
/**
*
*/
- public NodeRTIImpl(org.wyona.yarep.core.Repository repo, org.wyona.yanel.core.Path path) {
- this.path = new Path(path.toString());
+ public NodeRTIImpl(org.wyona.yarep.core.Repository repo, String path) {
+ this.path = new Path(path);
this.repo = repo;
}
@@ -117,7 +117,7 @@
}
Node[] nodes = new Node[c.size()];
for (int i = 0; i < c.size(); i++) {
- nodes[i] = new NodeRTIImpl(repo, new org.wyona.yanel.core.Path((String) c.elementAt(i)));
+ nodes[i] = new NodeRTIImpl(repo, (String) c.elementAt(i));
}
return nodes;
}
@@ -146,7 +146,7 @@
/**
*
*/
- public org.wyona.yanel.core.Path getPath() {
- return new org.wyona.yanel.core.Path(path.toString());
+ public String getPath() {
+ return path.toString();
}
}
Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/SitetreeRTIImpl.java
===================================================================
--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/SitetreeRTIImpl.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/SitetreeRTIImpl.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -40,7 +40,7 @@
/**
*
*/
- public Node getNode(Realm realm, Path path) {
+ public Node getNode(Realm realm, String path) {
org.wyona.yarep.core.Repository repo = null;
try {
repo = realm.getRTIRepository();
Modified: public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java
===================================================================
--- public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -44,6 +44,7 @@
import org.wyona.yanel.core.attributes.viewable.View;
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
import org.wyona.yanel.core.map.Realm;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yanel.core.util.ResourceAttributeHelper;
import org.wyona.yarep.core.NoSuchNodeException;
import org.wyona.yarep.core.Repository;
@@ -121,9 +122,9 @@
Transformer transformer = TransformerFactory.newInstance()
.newTransformer(getXSLTStreamSource(getPath(), contentRepo));
- transformer.setParameter("yanel.path.name", getPath().getName());
+ transformer.setParameter("yanel.path.name", PathUtil.getName(getPath()));
transformer.setParameter("servlet.context", servletContext);
- transformer.setParameter("yanel.path", getPath().toString());
+ transformer.setParameter("yanel.path", getPath());
transformer.setParameter("yanel.back2context", backToRoot(getPath(), ""));
transformer.setParameter("yarep.back2realm", backToRoot(getPath(), ""));
// TODO: Is this the best way to generate an InputStream from an
@@ -143,12 +144,12 @@
/**
*
*/
- private StreamSource getXSLTStreamSource(Path path, Repository repo)
+ private StreamSource getXSLTStreamSource(String path, Repository repo)
throws Exception {
- Path xsltPath = getXSLTPath();
+ String xsltPath = getXSLTPath();
if (xsltPath != null) {
return new StreamSource(repo
- .getInputStream(new org.wyona.yarep.core.Path(getXSLTPath().toString())));
+ .getInputStream(new org.wyona.yarep.core.Path(getXSLTPath())));
} else {
File xsltFile = org.wyona.commons.io.FileUtil.file(rtd
.getConfigFile().getParentFile().getAbsolutePath(), "xslt"
@@ -161,14 +162,14 @@
/**
*
*/
- private Path getXSLTPath() {
- return new Path(getRTI().getProperty("xslt"));
+ private String getXSLTPath() {
+ return getRTI().getProperty("xslt");
}
/**
*
*/
- private String getMimeType(Path path) {
+ private String getMimeType(String path) {
String mimeType = getRTI().getProperty("mime-type");
if (mimeType == null) mimeType = "application/xhtml+xml";
return mimeType;
@@ -177,10 +178,10 @@
/**
*
*/
- private String backToRoot(Path path, String backToRoot) {
- org.wyona.commons.io.Path parent = path.getParent();
+ private String backToRoot(String path, String backToRoot) {
+ String parent = PathUtil.getParent(path);
if (parent != null && !isRoot(parent)) {
- return backToRoot(new Path(parent.toString()), backToRoot + "../");
+ return backToRoot(parent, backToRoot + "../");
}
return backToRoot;
}
@@ -188,8 +189,8 @@
/**
*
*/
- private boolean isRoot(org.wyona.commons.io.Path path) {
- if (path.toString().equals(File.separator)) return true;
+ private boolean isRoot(String path) {
+ if (path.equals(File.separator)) return true;
return false;
}
Modified: public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java
===================================================================
--- public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/resources/directory/src/java/org/wyona/yanel/impl/resources/DirectoryResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -72,7 +72,7 @@
Repository contentRepo = null;
try {
contentRepo = getRealm().getRepository();
- org.wyona.yarep.core.Path p = new org.wyona.yarep.core.Path(getPath().toString());
+ org.wyona.yarep.core.Path p = new org.wyona.yarep.core.Path(getPath());
// TODO: This doesn't seem to work ... (check on Yarep ...)
if (contentRepo.isResource(p)) {
@@ -158,10 +158,10 @@
/**
*
*/
- private StreamSource getXSLTStreamSource(Path path, Repository repo) throws RepositoryException {
- Path xsltPath = getXSLTPath();
+ private StreamSource getXSLTStreamSource(String path, Repository repo) throws RepositoryException {
+ String xsltPath = getXSLTPath();
if (xsltPath != null) {
- return new StreamSource(repo.getInputStream(new org.wyona.yarep.core.Path(getXSLTPath().toString())));
+ return new StreamSource(repo.getInputStream(new org.wyona.yarep.core.Path(getXSLTPath())));
} else {
File xsltFile = org.wyona.commons.io.FileUtil.file(rtd.getConfigFile().getParentFile().getAbsolutePath(),
"xslt" + File.separator + "dir2xhtml.xsl");
@@ -173,9 +173,9 @@
/**
* Get XSLT
*/
- private Path getXSLTPath() {
+ private String getXSLTPath() {
String xslt =getRTI().getProperty("xslt");
- if (xslt != null) new Path(xslt);
+ if (xslt != null) return xslt;
return null;
}
Modified: public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java
===================================================================
--- public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/resources/file/src/java/org/wyona/yanel/impl/resources/NodeResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -26,6 +26,7 @@
import org.wyona.yanel.core.api.attributes.ViewableV2;
import org.wyona.yanel.core.attributes.viewable.View;
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yarep.core.Repository;
import org.wyona.yarep.core.RepositoryFactory;
@@ -67,7 +68,7 @@
public View getView(String viewId) throws Exception {
View defaultView = new View();
- defaultView.setInputStream(getRealm().getRepository().getInputStream(getPath()));
+ defaultView.setInputStream(getRealm().getRepository().getInputStream(new Path(getPath())));
defaultView.setMimeType(getMimeType(viewId));
return defaultView;
@@ -90,7 +91,7 @@
if (mimeType != null) return mimeType;
// TODO: Load config mime.types ...
- String suffix = getPath().getSuffix();
+ String suffix = PathUtil.getSuffix(getPath());
if (suffix != null) {
log.debug("SUFFIX: " + suffix);
if (suffix.equals("html")) {
@@ -140,14 +141,14 @@
*
*/
public Reader getReader() throws Exception {
- return getRealm().getRepository().getReader(getPath());
+ return getRealm().getRepository().getReader(new Path(getPath()));
}
/**
*
*/
public InputStream getInputStream() throws Exception {
- return getRealm().getRepository().getInputStream(getPath());
+ return getRealm().getRepository().getInputStream(new Path(getPath()));
}
/**
@@ -162,7 +163,7 @@
*
*/
public OutputStream getOutputStream() throws Exception {
- return getRealm().getRepository().getOutputStream(getPath());
+ return getRealm().getRepository().getOutputStream(new Path(getPath()));
}
/**
@@ -176,21 +177,21 @@
*
*/
public long getLastModified() throws Exception {
- return getRealm().getRepository().getLastModified(getPath());
+ return getRealm().getRepository().getLastModified(new Path(getPath()));
}
/**
* Delete data of node resource
*/
public boolean delete() throws Exception {
- return getRealm().getRepository().delete(getPath());
+ return getRealm().getRepository().delete(new Path(getPath()));
}
/**
*
*/
public String[] getRevisions() throws Exception {
- return getRealm().getRepository().getRevisions(getPath());
+ return getRealm().getRepository().getRevisions(new Path(getPath()));
}
public boolean exists() throws Exception {
@@ -202,7 +203,7 @@
*
*/
public long getSize() throws Exception {
- return getRealm().getRepository().getSize(getPath());
+ return getRealm().getRepository().getSize(new Path(getPath()));
}
/**
Modified: public/yanel/trunk/src/resources/importsite/src/java/org/wyona/yanel/impl/resources/ImportSiteResource.java
===================================================================
--- public/yanel/trunk/src/resources/importsite/src/java/org/wyona/yanel/impl/resources/ImportSiteResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/resources/importsite/src/java/org/wyona/yanel/impl/resources/ImportSiteResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -60,7 +60,7 @@
*/
public View getView(String viewId) throws Exception {
- Path path = getPath();
+ String path = getPath();
HttpServletRequest request = getRequest();
// Get language
@@ -153,7 +153,7 @@
*
*/
public long getSize() throws Exception {
- return getRealm().getRepository().getSize(getPath());
+ return getRealm().getRepository().getSize(new Path(getPath()));
}
}
Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -29,6 +29,7 @@
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
import org.wyona.yanel.core.transformation.I18nTransformer;
+import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yanel.core.util.ResourceAttributeHelper;
import org.wyona.yarep.core.Repository;
@@ -89,7 +90,7 @@
String yanelPath = getProperty("yanel-path");
//if (yanelPath == null) yanelPath = path.toString();
- Path xsltPath = getXSLTPath(getPath());
+ String xsltPath = getXSLTPath(getPath());
try {
Repository repo = getRealm().getRepository();
@@ -97,9 +98,9 @@
if (xsltPath != null) {
TransformerFactory tf = TransformerFactory.newInstance();
//tf.setURIResolver(null);
- Transformer transformer = tf.newTransformer(new StreamSource(repo.getInputStream(xsltPath)));
- transformer.setParameter("yanel.path.name", getPath().getName());
- transformer.setParameter("yanel.path", getPath().toString());
+ Transformer transformer = tf.newTransformer(new StreamSource(repo.getInputStream(new Path(xsltPath))));
+ transformer.setParameter("yanel.path.name", PathUtil.getName(getPath()));
+ transformer.setParameter("yanel.path", getPath());
//TODO: There seems to be a bug re back2context ...
transformer.setParameter("yanel.back2context", backToRoot(getPath(), ""));
transformer.setParameter("yarep.back2realm", backToRoot(getPath(), ""));
@@ -162,7 +163,7 @@
if (yanelPath != null) {
log.debug("Yanel Path: " + yanelPath);
Resource res = yanel.getResourceManager().getResource(getRequest(), getResponse(),
- getRealm(), new Path(yanelPath));
+ getRealm(), yanelPath);
if (ResourceAttributeHelper.hasAttributeImplemented(res, "Viewable", "1")) {
// TODO: Pass the request ...
String viewV1path = getRealm().getMountPoint() + yanelPath.substring(1);
@@ -179,17 +180,17 @@
}
}
- return repo.getInputStream(getPath());
+ return repo.getInputStream(new Path(getPath()));
}
/**
* Get mime type
*/
- private String getMimeType(Path path, String viewId) throws Exception {
+ private String getMimeType(String path, String viewId) throws Exception {
String mimeType = getProperty("mime-type");
if (mimeType != null) return mimeType;
- String suffix = path.getSuffix();
+ String suffix = PathUtil.getSuffix(path);
if (suffix != null) {
log.debug("SUFFIX: " + suffix);
if (suffix.equals("html")) {
@@ -212,14 +213,14 @@
*
*/
public Reader getReader() throws Exception {
- return getRealm().getRepository().getReader(getPath());
+ return getRealm().getRepository().getReader(new Path(getPath()));
}
/**
*
*/
public InputStream getInputStream() throws Exception {
- return getRealm().getRepository().getInputStream(getPath());
+ return getRealm().getRepository().getInputStream(new Path(getPath()));
}
/**
@@ -234,7 +235,7 @@
*
*/
public OutputStream getOutputStream() throws Exception {
- return getRealm().getRepository().getOutputStream(getPath());
+ return getRealm().getRepository().getOutputStream(new Path(getPath()));
}
/**
@@ -248,15 +249,15 @@
*
*/
public long getLastModified() throws Exception {
- return getRealm().getRepository().getLastModified(getPath());
+ return getRealm().getRepository().getLastModified(new Path(getPath()));
}
/**
* Get XSLT path
*/
- private Path getXSLTPath(Path path) throws Exception {
+ private String getXSLTPath(String path) throws Exception {
String xsltPath = getProperty("xslt");
- if (xsltPath != null) return new Path(xsltPath);
+ if (xsltPath != null) return xsltPath;
log.info("No XSLT Path within: " + path);
return null;
}
@@ -264,10 +265,10 @@
/**
*
*/
- private String backToRoot(Path path, String backToRoot) {
- org.wyona.commons.io.Path parent = path.getParent();
+ private String backToRoot(String path, String backToRoot) {
+ String parent = PathUtil.getParent(path);
if (parent != null && !isRoot(parent)) {
- return backToRoot(new Path(parent.toString()), backToRoot + "../");
+ return backToRoot(parent, backToRoot + "../");
}
return backToRoot;
}
@@ -275,8 +276,8 @@
/**
*
*/
- private boolean isRoot(org.wyona.commons.io.Path path) {
- if (path.toString().equals(File.separator)) return true;
+ private boolean isRoot(String path) {
+ if (path.equals(File.separator)) return true;
return false;
}
@@ -284,11 +285,11 @@
*
*/
public boolean delete() throws Exception {
- return getRealm().getRepository().delete(getPath());
+ return getRealm().getRepository().delete(new Path(getPath()));
}
public String[] getRevisions() throws Exception {
- return getRealm().getRepository().getRevisions(getPath());
+ return getRealm().getRepository().getRevisions(new Path(getPath()));
}
public boolean exists() throws Exception {
@@ -300,7 +301,7 @@
* Get size of generated page
*/
public long getSize() throws Exception {
- return getRealm().getRepository().getSize(getPath());
+ return getRealm().getRepository().getSize(new Path(getPath()));
}
/**
Modified: public/yanel/trunk/src/resources/xml/src/test/junit/org/wyona/yanel/impl/resources/XMLResourceTest.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/test/junit/org/wyona/yanel/impl/resources/XMLResourceTest.java 2007-01-26 08:25:53 UTC (rev 22185)
+++ public/yanel/trunk/src/resources/xml/src/test/junit/org/wyona/yanel/impl/resources/XMLResourceTest.java 2007-01-26 08:33:24 UTC (rev 22186)
@@ -42,7 +42,7 @@
this.testName = "Test for the XML Resource";
Realm realm = yanel.getMap().getRealm("/test/");
- Path path = new Path("/test/test.html");
+ String path = "/test/test.html";
resource = new XMLResource();
resource.setPath(path);
resource.setRealm(realm);
More information about the Yanel-commits
mailing list