r13737 - in search_server/trunk: index/src/main/java/org/musicbrainz/search/index servlet/src/test/java/org/musicbrainz/search/servlet

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

r13737 - in search_server/trunk: index/src/main/java/org/musicbrainz/search/index servlet/src/test/java/org/musicbrainz/search/servlet

root-9
Author: ijabz
Date: 2014-04-25 11:07:40 +0000 (Fri, 25 Apr 2014)
New Revision: 13737

Modified:
   search_server/trunk/index/src/main/java/org/musicbrainz/search/index/WorkIndex.java
   search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindWorkTest.java
Log:
Reflect changes to work attributes in MMD-schema

Modified: search_server/trunk/index/src/main/java/org/musicbrainz/search/index/WorkIndex.java
===================================================================
--- search_server/trunk/index/src/main/java/org/musicbrainz/search/index/WorkIndex.java 2014-04-25 11:06:42 UTC (rev 13736)
+++ search_server/trunk/index/src/main/java/org/musicbrainz/search/index/WorkIndex.java 2014-04-25 11:07:40 UTC (rev 13737)
@@ -157,9 +157,9 @@
 
             if(linkId==lastLinkId) {
                 String attribute = rs.getString("attribute");
-                AttributeList attributeList=lastRelation.getAttributeList();
+                Relation.AttributeList attributeList=lastRelation.getAttributeList();
                 if(attributeList==null) {
-                    attributeList = new ObjectFactory().createAttributeList();
+                    attributeList = new ObjectFactory().createRelationAttributeList();
                     lastRelation.setAttributeList(attributeList);
                 }
                 attributeList.getAttribute().add(attribute);
@@ -185,12 +185,11 @@
                 relation.setType(rs.getString("link"));
                 relation.setDirection(DefDirection.BACKWARD);
                 list.getRelation().add(relation);
-
                 String attribute = rs.getString("attribute");
                 if(attribute!=null) {
-                    AttributeList attributeList=relation.getAttributeList();
+                    Relation.AttributeList attributeList=relation.getAttributeList();
                     if(attributeList==null) {
-                        attributeList = new ObjectFactory().createAttributeList();
+                        attributeList = new ObjectFactory().createRelationAttributeList();
                         relation.setAttributeList(attributeList);
                     }
                     attributeList.getAttribute().add(attribute);

Modified: search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindWorkTest.java
===================================================================
--- search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindWorkTest.java 2014-04-25 11:06:42 UTC (rev 13736)
+++ search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindWorkTest.java 2014-04-25 11:07:40 UTC (rev 13737)
@@ -89,7 +89,7 @@
             rl.setTargetType("artist");
             {
                 Relation relation = of.createRelation();
-                AttributeList al = of.createAttributeList();
+                Relation.AttributeList al = of.createRelationAttributeList();
                 Artist artist1 = of.createArtist();
                 artist1.setId("1f9df192-a621-4f54-8850-2c5373b7eac9");
                 artist1.setName("Пётр Ильич Чайковский");
@@ -103,7 +103,7 @@
             }
             {
                 Relation relation = of.createRelation();
-                AttributeList al = of.createAttributeList();
+                Relation.AttributeList al = of.createRelationAttributeList();
                 Artist artist1 = of.createArtist();
                 artist1.setId("abcdefgh-a621-4f54-8850-2c5373b7eac9");
                 artist1.setName("frank");
@@ -148,7 +148,7 @@
             rl.setTargetType("artist");
             {
                 Relation relation = of.createRelation();
-                AttributeList al = of.createAttributeList();
+                Relation.AttributeList al = of.createRelationAttributeList();
                 Artist artist = of.createArtist();
                 artist.setId("789f6768-5830-4b08-8b4f-f38566b2eb1d");
                 artist.setName("Black Francis");


_______________________________________________
MusicBrainz-commits mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-commits
Loading...