← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15600: various minor fixes to schema/property, adds persisted property to nodes/annotations, also fieldN...

 

------------------------------------------------------------
revno: 15600
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-09 14:27:37 +0200
message:
  various minor fixes to schema/property, adds persisted property to nodes/annotations, also fieldName, which can be used to generate criteria etc.
removed:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportCollection.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportComplex.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportRoot.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportSimple.java
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeCollection.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeComplex.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeRoot.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeSimple.java
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/SimpleNode.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultPropertyIntrospectorService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFilterService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportCollection.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportCollection.java	2014-06-04 10:49:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportCollection.java	1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-package org.hisp.dhis.node.annotation;
-
-/*
- * Copyright (c) 2004-2014, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
- */
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@Target( { ElementType.FIELD, ElementType.METHOD } )
-@Retention( RetentionPolicy.RUNTIME )
-public @interface ExportCollection
-{
-    String value() default "";
-
-    String namespace() default "";
-
-    String itemName() default "";
-
-    String itemNamespace() default "";
-
-    boolean owner() default false;
-
-    boolean useWrapping() default true;
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportComplex.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportComplex.java	2014-06-04 10:49:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportComplex.java	1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-package org.hisp.dhis.node.annotation;
-
-/*
- * Copyright (c) 2004-2014, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
- */
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@Target( { ElementType.FIELD, ElementType.METHOD } )
-@Retention( RetentionPolicy.RUNTIME )
-public @interface ExportComplex
-{
-    String value() default "";
-
-    String namespace() default "";
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportRoot.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportRoot.java	2014-06-04 10:49:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportRoot.java	1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-package org.hisp.dhis.node.annotation;
-
-/*
- * Copyright (c) 2004-2014, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
- */
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@Target( { ElementType.TYPE } )
-@Retention( RetentionPolicy.RUNTIME )
-public @interface ExportRoot
-{
-    String value() default "";
-
-    String namespace() default "";
-}

=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportSimple.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportSimple.java	2014-06-04 10:49:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/ExportSimple.java	1970-01-01 00:00:00 +0000
@@ -1,48 +0,0 @@
-package org.hisp.dhis.node.annotation;
-
-/*
- * Copyright (c) 2004-2014, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
- */
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@Target( { ElementType.FIELD, ElementType.METHOD } )
-@Retention( RetentionPolicy.RUNTIME )
-public @interface ExportSimple
-{
-    String value() default "";
-
-    boolean isAttribute() default false;
-
-    String namespace() default "";
-}

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeCollection.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeCollection.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeCollection.java	2014-06-09 12:27:37 +0000
@@ -0,0 +1,54 @@
+package org.hisp.dhis.node.annotation;
+
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@Target( { ElementType.FIELD } )
+@Retention( RetentionPolicy.RUNTIME )
+public @interface NodeCollection
+{
+    String value() default "";
+
+    String namespace() default "";
+
+    String itemName() default "";
+
+    String itemNamespace() default "";
+
+    boolean owner() default false;
+
+    boolean useWrapping() default true;
+}

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeComplex.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeComplex.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeComplex.java	2014-06-09 12:27:37 +0000
@@ -0,0 +1,46 @@
+package org.hisp.dhis.node.annotation;
+
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@Target( { ElementType.FIELD } )
+@Retention( RetentionPolicy.RUNTIME )
+public @interface NodeComplex
+{
+    String value() default "";
+
+    String namespace() default "";
+}

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeRoot.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeRoot.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeRoot.java	2014-06-09 12:27:37 +0000
@@ -0,0 +1,46 @@
+package org.hisp.dhis.node.annotation;
+
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@Target( { ElementType.TYPE } )
+@Retention( RetentionPolicy.RUNTIME )
+public @interface NodeRoot
+{
+    String value() default "";
+
+    String namespace() default "";
+}

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeSimple.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeSimple.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/annotation/NodeSimple.java	2014-06-09 12:27:37 +0000
@@ -0,0 +1,52 @@
+package org.hisp.dhis.node.annotation;
+
+/*
+ * Copyright (c) 2004-2014, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@Target( { ElementType.FIELD } )
+@Retention( RetentionPolicy.RUNTIME )
+public @interface NodeSimple
+{
+    String value() default "";
+
+    boolean isAttribute() default false;
+
+    boolean isPersisted() default true;
+
+    String persistedName() default "";
+
+    String namespace() default "";
+}

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java	2014-06-04 10:49:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java	2014-06-09 12:27:37 +0000
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
  */
 
+import com.google.common.base.Objects;
 import org.hisp.dhis.node.AbstractNode;
 import org.hisp.dhis.node.NodeType;
 
@@ -55,4 +56,31 @@
     {
         this.wrapping = wrapping;
     }
+
+    @Override
+    public int hashCode()
+    {
+        return 31 * super.hashCode() + Objects.hashCode( wrapping );
+    }
+
+    @Override
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+        {
+            return true;
+        }
+        if ( obj == null || getClass() != obj.getClass() )
+        {
+            return false;
+        }
+        if ( !super.equals( obj ) )
+        {
+            return false;
+        }
+
+        final CollectionNode other = (CollectionNode) obj;
+
+        return Objects.equal( this.wrapping, other.wrapping );
+    }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/SimpleNode.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/SimpleNode.java	2014-06-08 10:58:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/SimpleNode.java	2014-06-09 12:27:37 +0000
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
  */
 
+import com.google.common.base.Objects;
 import org.hisp.dhis.node.AbstractNode;
 import org.hisp.dhis.node.Node;
 import org.hisp.dhis.node.NodeType;
@@ -38,8 +39,14 @@
  */
 public class SimpleNode extends AbstractNode
 {
+    /**
+     * Value of this node.
+     */
     private final Object value;
 
+    /**
+     * Is this node considered a attribute.
+     */
     private boolean attribute;
 
     public SimpleNode( String name, Object value )
@@ -75,4 +82,31 @@
     {
         throw new InvalidTypeException();
     }
+
+    @Override
+    public int hashCode()
+    {
+        return 31 * super.hashCode() + Objects.hashCode( value, attribute );
+    }
+
+    @Override
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+        {
+            return true;
+        }
+        if ( obj == null || getClass() != obj.getClass() )
+        {
+            return false;
+        }
+        if ( !super.equals( obj ) )
+        {
+            return false;
+        }
+
+        final SimpleNode other = (SimpleNode) obj;
+
+        return Objects.equal( this.value, other.value ) && Objects.equal( this.attribute, other.attribute );
+    }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java	2014-06-09 09:16:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java	2014-06-09 12:27:37 +0000
@@ -60,12 +60,28 @@
     private Method getterMethod;
 
     /**
+     * Direct link to setter for this property.
+     */
+    private Method setterMethod;
+
+    /**
      * Name for this property, if this class is a collection, it is the name of the items -inside- the collection
      * and not the collection wrapper itself.
      */
     private String name;
 
     /**
+     * Name for actual field, used to persistence operations and getting setter/getter.
+     */
+    private String fieldName;
+
+    /**
+     * Is this property persisted somewhere. This property will be used to create criteria queries
+     * on demand (default: true)
+     */
+    private boolean persisted = true;
+
+    /**
      * Name of collection wrapper.
      */
     private String collectionName;
@@ -80,7 +96,7 @@
     /**
      * XML-Namespace used for this property.
      */
-    private String namespaceURI;
+    private String namespace;
 
     /**
      * Usually only used for XML. Is this property considered an attribute.
@@ -162,6 +178,16 @@
         return getterMethod;
     }
 
+    public Method getSetterMethod()
+    {
+        return setterMethod;
+    }
+
+    public void setSetterMethod( Method setterMethod )
+    {
+        this.setterMethod = setterMethod;
+    }
+
     @JsonProperty
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getName()
@@ -176,6 +202,30 @@
 
     @JsonProperty
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public String getFieldName()
+    {
+        return fieldName;
+    }
+
+    public void setFieldName( String fieldName )
+    {
+        this.fieldName = fieldName;
+    }
+
+    @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public boolean isPersisted()
+    {
+        return persisted;
+    }
+
+    public void setPersisted( boolean persisted )
+    {
+        this.persisted = persisted;
+    }
+
+    @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getCollectionName()
     {
         return collectionName == null ? name : collectionName;
@@ -200,14 +250,14 @@
 
     @JsonProperty
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-    public String getNamespaceURI()
+    public String getNamespace()
     {
-        return namespaceURI;
+        return namespace;
     }
 
-    public void setNamespaceURI( String namespaceURI )
+    public void setNamespace( String namespace )
     {
-        this.namespaceURI = namespaceURI;
+        this.namespace = namespace;
     }
 
     @JsonProperty
@@ -273,8 +323,8 @@
     @Override
     public int hashCode()
     {
-        return Objects.hashCode( klass, itemKlass, getterMethod, name, collectionName, description, namespaceURI,
-            attribute, simple, collection, identifiableObject, nameableObject );
+        return Objects.hashCode( klass, itemKlass, getterMethod, name, fieldName, persisted, collectionName, description,
+            namespace, attribute, simple, collection, identifiableObject, nameableObject );
     }
 
     @Override
@@ -292,11 +342,13 @@
         final Property other = (Property) obj;
 
         return Objects.equal( this.klass, other.klass ) && Objects.equal( this.itemKlass, other.itemKlass )
-            && Objects.equal( this.getterMethod, other.getterMethod ) && Objects.equal( this.name, other.name )
-            && Objects.equal( this.collectionName, other.collectionName ) && Objects.equal( this.description, other.description )
-            && Objects.equal( this.namespaceURI, other.namespaceURI ) && Objects.equal( this.attribute, other.attribute )
-            && Objects.equal( this.simple, other.simple ) && Objects.equal( this.collection, other.collection )
-            && Objects.equal( this.identifiableObject, other.identifiableObject ) && Objects.equal( this.nameableObject, other.nameableObject );
+            && Objects.equal( this.getterMethod, other.getterMethod ) && Objects.equal( this.setterMethod, other.setterMethod )
+            && Objects.equal( this.name, other.name ) && Objects.equal( this.fieldName, other.fieldName )
+            && Objects.equal( this.persisted, other.persisted ) && Objects.equal( this.collectionName, other.collectionName )
+            && Objects.equal( this.description, other.description ) && Objects.equal( this.namespace, other.namespace )
+            && Objects.equal( this.attribute, other.attribute ) && Objects.equal( this.simple, other.simple )
+            && Objects.equal( this.collection, other.collection ) && Objects.equal( this.identifiableObject, other.identifiableObject )
+            && Objects.equal( this.nameableObject, other.nameableObject );
     }
 
     @Override
@@ -307,9 +359,11 @@
             .add( "itemKlass", itemKlass )
             .add( "getterMethod", getterMethod )
             .add( "name", name )
+            .add( "fieldName", fieldName )
+            .add( "persisted", persisted )
             .add( "collectionName", collectionName )
             .add( "description", description )
-            .add( "namespaceURI", namespaceURI )
+            .add( "namespace", namespace )
             .add( "attribute", attribute )
             .add( "simple", simple )
             .add( "collection", collection )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java	2014-06-09 09:16:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java	2014-06-09 12:27:37 +0000
@@ -81,7 +81,7 @@
     /**
      * Namespace URI to be used for this class.
      */
-    private String namespaceURI;
+    private String namespace;
 
     /**
      * This will normally be set to equal singular, but in certain cases it might be useful to have another name
@@ -190,14 +190,14 @@
 
     @JsonProperty
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-    public String getNamespaceURI()
+    public String getNamespace()
     {
-        return namespaceURI;
+        return namespace;
     }
 
-    public void setNamespaceURI( String namespaceURI )
+    public void setNamespace( String namespace )
     {
-        this.namespaceURI = namespaceURI;
+        this.namespace = namespace;
     }
 
     @JsonProperty
@@ -334,7 +334,7 @@
     @Override
     public int hashCode()
     {
-        return Objects.hashCode( klass, identifiableObject, nameableObject, singular, plural, namespaceURI, name,
+        return Objects.hashCode( klass, identifiableObject, nameableObject, singular, plural, namespace, name,
             collectionName, shareable, apiEndpoint, metadata, authorities, propertyMap, order, authorityMap );
     }
 
@@ -354,7 +354,7 @@
 
         return Objects.equal( this.klass, other.klass ) && Objects.equal( this.identifiableObject, other.identifiableObject )
             && Objects.equal( this.nameableObject, other.nameableObject ) && Objects.equal( this.singular, other.singular )
-            && Objects.equal( this.plural, other.plural ) && Objects.equal( this.namespaceURI, other.namespaceURI )
+            && Objects.equal( this.plural, other.plural ) && Objects.equal( this.namespace, other.namespace )
             && Objects.equal( this.name, other.name ) && Objects.equal( this.collectionName, other.collectionName )
             && Objects.equal( this.shareable, other.shareable ) && Objects.equal( this.apiEndpoint, other.apiEndpoint )
             && Objects.equal( this.metadata, other.metadata ) && Objects.equal( this.authorities, other.authorities )
@@ -371,7 +371,7 @@
             .add( "nameableObject", nameableObject )
             .add( "singular", singular )
             .add( "plural", plural )
-            .add( "namespaceURI", namespaceURI )
+            .add( "namespace", namespace )
             .add( "name", name )
             .add( "collectionName", collectionName )
             .add( "shareable", shareable )
@@ -379,7 +379,6 @@
             .add( "metadata", metadata )
             .add( "authorities", authorities )
             .add( "propertyMap", propertyMap )
-            .add( "order", order )
             .add( "authorityMap", authorityMap )
             .toString();
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultPropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultPropertyIntrospectorService.java	2014-06-07 18:45:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultPropertyIntrospectorService.java	2014-06-09 12:27:37 +0000
@@ -96,7 +96,7 @@
 
             if ( !StringUtils.isEmpty( jacksonXmlRootElement.namespace() ) )
             {
-                property.setNamespaceURI( jacksonXmlRootElement.namespace() );
+                property.setNamespace( jacksonXmlRootElement.namespace() );
             }
 
             propertyMap.put( "__self__", property );
@@ -153,7 +153,7 @@
 
                 if ( !StringUtils.isEmpty( jacksonXmlProperty.namespace() ) )
                 {
-                    property.setNamespaceURI( jacksonXmlProperty.namespace() );
+                    property.setNamespace( jacksonXmlProperty.namespace() );
                 }
 
                 property.setAttribute( jacksonXmlProperty.isAttribute() );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java	2014-06-06 07:40:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java	2014-06-09 12:27:37 +0000
@@ -157,7 +157,7 @@
         {
             Property property = schema.getPropertyMap().get( "__self__" );
             schema.setName( property.getName() );
-            schema.setNamespaceURI( property.getNamespaceURI() );
+            schema.setNamespace( property.getNamespace() );
 
             schema.getPropertyMap().remove( "__self__" );
         }

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFilterService.java	2014-06-09 10:57:14 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFilterService.java	2014-06-09 12:27:37 +0000
@@ -117,7 +117,7 @@
         }
 
         CollectionNode collectionNode = new CollectionNode( rootSchema.getCollectionName() );
-        collectionNode.setNamespace( rootSchema.getNamespaceURI() );
+        collectionNode.setNamespace( rootSchema.getNamespace() );
 
         if ( objects.isEmpty() )
         {
@@ -142,7 +142,7 @@
 
         Schema schema = schemaService.getDynamicSchema( object.getClass() );
         ComplexNode complexNode = new ComplexNode( schema.getName() );
-        complexNode.setNamespace( schema.getNamespaceURI() );
+        complexNode.setNamespace( schema.getNamespace() );
 
         updateFields( fieldMap, object );
 
@@ -173,7 +173,7 @@
                     Collection<?> collection = (Collection<?>) returnValue;
 
                     CollectionNode collectionNode = complexNode.addChild( new CollectionNode( property.getCollectionName() ) );
-                    collectionNode.setNamespace( property.getNamespaceURI() );
+                    collectionNode.setNamespace( property.getNamespace() );
 
                     if ( property.isIdentifiableObject() )
                     {
@@ -214,7 +214,7 @@
                     {
                         SimpleNode simpleNode = new SimpleNode( fieldKey, returnValue );
                         simpleNode.setAttribute( property.isAttribute() );
-                        simpleNode.setNamespace( property.getNamespaceURI() );
+                        simpleNode.setNamespace( property.getNamespace() );
 
                         complexNode.addChild( simpleNode );
                     }
@@ -229,7 +229,7 @@
                 if ( property.isCollection() )
                 {
                     CollectionNode collectionNode = complexNode.addChild( new CollectionNode( property.getCollectionName() ) );
-                    collectionNode.setNamespace( property.getNamespaceURI() );
+                    collectionNode.setNamespace( property.getNamespace() );
 
                     for ( Object collectionObject : (Collection<?>) returnValue )
                     {
@@ -336,7 +336,7 @@
         Schema schema = schemaService.getDynamicSchema( object.getClass() );
 
         ComplexNode complexNode = new ComplexNode( schema.getSingular() );
-        complexNode.setNamespace( schema.getNamespaceURI() );
+        complexNode.setNamespace( schema.getNamespace() );
 
         for ( String field : fields )
         {
@@ -353,7 +353,7 @@
             {
                 SimpleNode simpleNode = new SimpleNode( field, o );
                 simpleNode.setAttribute( property.isAttribute() );
-                simpleNode.setNamespace( property.getNamespaceURI() );
+                simpleNode.setNamespace( property.getNamespace() );
 
                 complexNode.addChild( simpleNode );
             }