[Yanel-commits] rev 28545 - in
public/yanel/contributions/realms/foaf: data data/profiles
data/profiles/foo-bar.rdf.yarep
src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf
michi at wyona.com
michi at wyona.com
Tue Nov 6 22:36:52 CET 2007
Author: michi
Date: 2007-11-06 22:36:51 +0100 (Tue, 06 Nov 2007)
New Revision: 28545
Added:
public/yanel/contributions/realms/foaf/data/profiles/foo-bar.rdf.yarep/
public/yanel/contributions/realms/foaf/data/profiles/foo-bar.rdf.yarep/meta
Modified:
public/yanel/contributions/realms/foaf/data/login.html
public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
Log:
hosted profiles fixed
Modified: public/yanel/contributions/realms/foaf/data/login.html
===================================================================
--- public/yanel/contributions/realms/foaf/data/login.html 2007-11-06 21:02:45 UTC (rev 28544)
+++ public/yanel/contributions/realms/foaf/data/login.html 2007-11-06 21:36:51 UTC (rev 28545)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h2>Login</h2>
-<form>
+<form action="profiles/foo-bar.html" type="post">
<table>
<tr><td>Email</td><td><input type="text"/></td></tr>
<tr><td>Password</td><td><input type="password"/></td></tr>
Added: public/yanel/contributions/realms/foaf/data/profiles/foo-bar.rdf.yarep/meta
===================================================================
--- public/yanel/contributions/realms/foaf/data/profiles/foo-bar.rdf.yarep/meta (rev 0)
+++ public/yanel/contributions/realms/foaf/data/profiles/foo-bar.rdf.yarep/meta 2007-11-06 21:36:51 UTC (rev 28545)
@@ -0,0 +1 @@
+yarep_type<string>:resource
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-06 21:02:45 UTC (rev 28544)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java 2007-11-06 21:36:51 UTC (rev 28545)
@@ -57,12 +57,16 @@
public View getView(String viewId) {
View view = new View();
try {
- URL url = new URL(getRequest().getParameter("href"));
+ if (getRequest().getParameter("href") != null) {
+ URL url = new URL(getRequest().getParameter("href"));
/*
- view.setInputStream(url.openConnection().getInputStream());
- view.setMimeType(getMimeType(viewId));
+ view.setInputStream(url.openConnection().getInputStream());
+ view.setMimeType(getMimeType(viewId));
*/
- return getXMLView(viewId, url.openConnection().getInputStream());
+ return getXMLView(viewId, url.openConnection().getInputStream());
+ } else {
+ return getXMLView(viewId, getRealm().getRepository().getNode("/profiles/foo-bar.rdf").getInputStream());
+ }
} catch (java.io.FileNotFoundException e) {
log.error(e);
view.setInputStream(new java.io.StringBufferInputStream(new StringBuffer("No such file: " + e.getMessage()).toString()));
@@ -79,6 +83,7 @@
*
*/
public ViewDescriptor[] getViewDescriptors() {
+ ViewDescriptor[] vd = new ViewDescriptor[1];
return null;
}
}
More information about the Yanel-commits
mailing list