jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r368683 [8/8] - in /incubator/jackrabbit/trunk/contrib/jcr-server: client/ client/src/java/org/apache/jackrabbit/webdav/client/methods/ server/ server/src/java/org/apache/jackrabbit/server/ server/src/java/org/apache/jackrabbit/server/io/ s...
Date Fri, 13 Jan 2006 11:13:30 GMT
Added: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java
(added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java
Fri Jan 13 03:11:35 2006
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.apache.org/licenses/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.apache.jackrabbit.webdav.xml;
+
+import org.apache.log4j.Logger;
+
+/**
+ * <code>Namespace</code>
+ */
+public class Namespace {
+
+    private static Logger log = Logger.getLogger(Namespace.class);
+
+    public static final Namespace EMPTY_NAMESPACE = Namespace.getNamespace("","");
+
+    private final String prefix;
+    private final String uri;
+
+    private Namespace(String prefix, String uri) {
+        this.prefix = prefix;
+        this.uri = uri;
+    }
+
+    public String getPrefix() {
+        return prefix;
+    }
+
+    public String getURI() {
+        return uri;
+    }
+
+    public boolean isSame(String namespaceURI) {
+        return uri.equals(namespaceURI);
+    }
+
+    public int hashCode() {
+        return uri.hashCode();
+    }
+
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (obj instanceof Namespace) {
+            return uri.equals(((Namespace)obj).uri);
+        }
+        return false;
+    }
+
+    public static Namespace getNamespace(String prefix, String uri) {
+        if (prefix == null) {
+            prefix = "";
+        }
+        if (uri == null) {
+            uri = "";
+        }
+        return new Namespace(prefix, uri);
+    }
+
+    public static Namespace getNamespace(String uri) {
+        return getNamespace("", uri);
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/Namespace.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java
(added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java
Fri Jan 13 03:11:35 2006
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.apache.org/licenses/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.apache.jackrabbit.webdav.xml;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+
+/**
+ * <code>XmlSerializable</code>...
+ */
+public interface XmlSerializable {
+
+    /**
+     * Returns the xml representation of the implementing object as
+     * {@link org.w3c.dom.Element}. The given <code>Document</code> is used
+     * as factory and represents the {@link org.w3c.dom.Element#getOwnerDocument()
+     * owner document} of the returned DOM element.
+     *
+     * @return a w3c element representing this object
+     * @param document to be used as factory.
+     */
+    public Element toXml(Document document);
+
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/XmlSerializable.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/package.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/package.html?rev=368683&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/package.html
(added)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/package.html
Fri Jan 13 03:11:35 2006
@@ -0,0 +1,3 @@
+<body>
+Xml utility classes.
+</body>
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/contrib/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/xml/package.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message