← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14420: add nameableObject property to Schema

 

------------------------------------------------------------
revno: 14420
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-03-26 09:47:19 +0100
message:
  add nameableObject property to Schema
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.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
=== 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-03-21 11:05:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java	2014-03-26 08:47:19 +0000
@@ -35,6 +35,7 @@
 import com.google.common.collect.Lists;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.common.NameableObject;
 
 import java.util.List;
 
@@ -48,6 +49,8 @@
 
     private boolean identifiableObject;
 
+    private boolean nameableObject;
+
     private String singular;
 
     private String plural;
@@ -72,6 +75,7 @@
     {
         this.klass = klass;
         this.identifiableObject = IdentifiableObject.class.isAssignableFrom( klass );
+        this.nameableObject = NameableObject.class.isAssignableFrom( klass );
         this.singular = singular;
         this.plural = plural;
     }
@@ -105,6 +109,13 @@
 
     @JsonProperty
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public boolean isNameableObject()
+    {
+        return nameableObject;
+    }
+
+    @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getSingular()
     {
         return singular;