You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2011/06/07 00:45:14 UTC
svn commit: r1132817 - in
/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree:
./ Attribute.java Element.java
Author: danhaywood
Date: Mon Jun 6 22:45:14 2011
New Revision: 1132817
URL: http://svn.apache.org/viewvc?rev=1132817&view=rev
Log:
ISIS-98: replacing xom dependency within jdom
Added:
incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/
incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Attribute.java
incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Element.java
Added: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Attribute.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Attribute.java?rev=1132817&view=auto
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Attribute.java (added)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Attribute.java Mon Jun 6 22:45:14 2011
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.isis.viewer.restful.viewer.tree;
+
+public class Attribute {
+
+ final org.jdom.Attribute xmlAttribute;
+
+ public Attribute(String name, String value) {
+ this.xmlAttribute = new org.jdom.Attribute(name, value);
+ }
+
+
+}
Added: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Element.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Element.java?rev=1132817&view=auto
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Element.java (added)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/tree/Element.java Mon Jun 6 22:45:14 2011
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.isis.viewer.restful.viewer.tree;
+
+public class Element {
+
+ public final org.jdom.Element xmlElement;
+
+ public Element(String name) {
+ this.xmlElement = new org.jdom.Element(name);
+ }
+
+ public Element(Element aHref) {
+ this.xmlElement = (org.jdom.Element) aHref.xmlElement.clone();
+ }
+
+ public void appendChild(String headerText) {
+ xmlElement.addContent(headerText);
+ }
+
+ public void appendChild(Element element) {
+ xmlElement.addContent(element.xmlElement);
+ }
+
+ /**
+ * @param attribute
+ */
+ public void addAttribute(Attribute attribute) {
+ this.xmlElement.setAttribute(attribute.xmlAttribute);
+ }
+
+}