comparison artifacts/src/main/java/org/dive4elements/river/artifacts/SQRelationArtifact.java @ 7842:8d5ca5175038

Updated signature of artifacts setup method; Removed unnecessary setup overrides.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 30 Apr 2014 15:12:32 +0200
parents a9bd4a23a852
children e4606eae8ea5
comparison
equal deleted inserted replaced
7841:8036688f24e1 7842:8d5ca5175038
52 public void setup( 52 public void setup(
53 String identifier, 53 String identifier,
54 ArtifactFactory factory, 54 ArtifactFactory factory,
55 Object context, 55 Object context,
56 CallMeta callmeta, 56 CallMeta callmeta,
57 Document data 57 Document data,
58 ) { 58 List<Class> loadFacets)
59 {
59 logger.debug("SQRelationArtifact.setup()"); 60 logger.debug("SQRelationArtifact.setup()");
60 61
61 String code = getDatacageIDValue(data); 62 String code = getDatacageIDValue(data);
62 63
63 logger.debug("SQRelationDCArtifact.setup Id: " + code); 64 logger.debug("SQRelationDCArtifact.setup Id: " + code);
64 65
65 if (code != null && !code.isEmpty()) { 66 if (code != null && !code.isEmpty()) {
66 /* Case that we were instantiated from the datacage */ 67 /* Case that we were instantiated from the datacage */
67 addStringData("ids", code); 68 addStringData("ids", code);
68 super.setup(identifier, factory, context, callmeta, data); 69 super.setup(identifier, factory, context, callmeta, data, loadFacets);
69 return; 70 return;
70 } 71 }
71 72
72 String river = XMLUtils.xpathString( 73 String river = XMLUtils.xpathString(
73 data, 74 data,
90 new DefaultStateData( 91 new DefaultStateData(
91 "station", 92 "station",
92 Resources.getMsg(callmeta, "static.sq.station", "Station"), 93 Resources.getMsg(callmeta, "static.sq.station", "Station"),
93 "String", 94 "String",
94 station)); 95 station));
95 super.setup(identifier, factory, context, callmeta, data); 96 super.setup(identifier, factory, context, callmeta, data, loadFacets);
96 // When we are in this case we did not come from the datacage 97 // When we are in this case we did not come from the datacage
97 // e.g. had an ID string set. So we also did not have a template 98 // e.g. had an ID string set. So we also did not have a template
98 // set and initialize is not called. So we have to do this ourself. 99 // set and initialize is not called. So we have to do this ourself.
99 initialize(this, context, callmeta); 100 initialize(this, context, callmeta);
100 } 101 }

http://dive4elements.wald.intevation.org