[Yanel-commits] rev 21574 - in public/yanel/trunk/src/impl/java/org/wyona/yanel/impl: . navigation

michi at wyona.com michi at wyona.com
Tue Jan 9 21:38:54 CET 2007


Author: michi
Date: 2007-01-09 21:38:52 +0100 (Tue, 09 Jan 2007)
New Revision: 21574

Added:
   public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/
   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
Log:
sitetree impl started

Added: 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-09 19:51:34 UTC (rev 21573)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeRTIImpl.java	2007-01-09 20:38:52 UTC (rev 21574)
@@ -0,0 +1,114 @@
+/*
+ * 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.impl.navigation;
+
+import org.wyona.yanel.core.navigation.Node;
+
+import org.apache.log4j.Category;
+
+/**
+ * RTI Implementation
+ */
+public class NodeRTIImpl implements Node {
+
+    private static Category log = Category.getInstance(NodeRTIImpl.class);
+
+    org.wyona.yarep.core.Path path;
+
+    /**
+     *
+     */
+    public NodeRTIImpl(org.wyona.yarep.core.Repository repo, org.wyona.yanel.core.Path path) {
+        this.path = new org.wyona.yarep.core.Path(path.toString());
+        log.error("Path: " + path);
+    }
+
+    /**
+     * @return new child
+     */
+    public Node insertAsFirstChild(Node child) {
+        return null;
+    }
+
+    /**
+     * @return new child
+     */
+    public Node insertBeforeChild(Node newChild, Node refChild) {
+        return null;
+    }
+
+    /**
+     * @return new child
+     */
+    public Node insertAfterChild(Node newChild, Node refChild) {
+        return null;
+    }
+
+    /**
+     * @return new child
+     */
+    public Node appendChild(Node child) {
+        return null;
+    }
+
+    /**
+     */
+    public void removeChild(Node child) {
+    }
+
+    /**
+     *
+     */
+    public boolean isResource() {
+        return true;
+    }
+
+    /**
+     *
+     */
+    public boolean isCollection() {
+        return true;
+    }
+
+    /**
+     *
+     */
+    public Node[] getChildren() {
+        return null;
+    }
+
+    /**
+     *
+     */
+    public Node getParent() {
+        return null;
+    }
+
+    /**
+     *
+     */
+    public Node getNextSibling() {
+        return null;
+    }
+
+    /**
+     *
+     */
+    public Node getPreviousSibling() {
+        return null;
+    }
+}

Added: 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-09 19:51:34 UTC (rev 21573)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/SitetreeRTIImpl.java	2007-01-09 20:38:52 UTC (rev 21574)
@@ -0,0 +1,59 @@
+/*
+ * 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.impl.navigation;
+
+import org.wyona.yanel.core.Path;
+import org.wyona.yanel.core.map.Realm;
+import org.wyona.yanel.core.navigation.Node;
+import org.wyona.yanel.core.navigation.Sitetree;
+
+import org.apache.log4j.Category;
+
+/**
+ * Based on the RTI of each realm
+ */
+public class SitetreeRTIImpl implements Sitetree {
+
+    private static Category log = Category.getInstance(SitetreeRTIImpl.class);
+
+    /**
+     *
+     */
+    public Node getSitetreeNode() {
+        return null;
+    }
+
+    /**
+     *
+     */
+    public Node getNode(Realm realm, Path path) {
+        org.wyona.yarep.core.Repository repo = null;
+        try {
+            repo = realm.getRTIRepository();
+        } catch(Exception e) {
+            log.error(e);
+        }
+        return new NodeRTIImpl(repo, path);
+    }
+
+    /**
+     *
+     */
+    public Node createNode(String name) {
+        return null;
+    }
+}




More information about the Yanel-commits mailing list