Mercurial > dive4elements > gnv-client
diff gnv/src/main/java/de/intevation/gnv/action/sessionmodel/DefaultSessionModel.java @ 36:ad381cc47217
Format Code to max 80 Chars per Row
gnv/trunk@172 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:54:13 +0000 |
parents | 0f4362d75e9e |
children | fccf90761825 |
line wrap: on
line diff
--- a/gnv/src/main/java/de/intevation/gnv/action/sessionmodel/DefaultSessionModel.java Fri Oct 02 08:49:18 2009 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/sessionmodel/DefaultSessionModel.java Fri Oct 02 08:54:13 2009 +0000 @@ -15,10 +15,9 @@ /** * @author Tim Englich <tim.englich@intevation.de> - * + * */ -public class DefaultSessionModel implements SessionModel{ - +public class DefaultSessionModel implements SessionModel { /** * the logger, used to log exceptions and additonaly information @@ -31,15 +30,14 @@ private static final long serialVersionUID = 3431484439985158311L; private Collection<ArtifactObject> artifactFactories = null; - + private ArtifactObject selectedArtifactFactory = null; - - private ArtifactObject currentArtifact =null; - - private DiagrammOptions diagrammOptions= null; - - private Collection<ArtifactStatisticValue> statistics= null; - + + private ArtifactObject currentArtifact = null; + + private DiagrammOptions diagrammOptions = null; + + private Collection<ArtifactStatisticValue> statistics = null; /** * Constructor @@ -52,21 +50,22 @@ * @see de.intevation.gnv.action.sessionmodel.SessionModel#selectArtifactFactory(java.lang.String) */ public void selectArtifactFactory(String artiFactFactoryId) { - Collection<ArtifactObject> artifactObjects = this.getArtifactFactories(); - if (artifactObjects != null){ + Collection<ArtifactObject> artifactObjects = this + .getArtifactFactories(); + if (artifactObjects != null) { Iterator<ArtifactObject> unselect = artifactObjects.iterator(); this.selectedArtifactFactory = null; - while (unselect.hasNext()){ + while (unselect.hasNext()) { unselect.next().setSelected(false); } Iterator<ArtifactObject> it = artifactObjects.iterator(); - while (it.hasNext()){ - ArtifactObject obj = it.next(); - if(obj.getId().equals(artiFactFactoryId)){ - obj.setSelected(true); - this.selectedArtifactFactory = obj; - break; - } + while (it.hasNext()) { + ArtifactObject obj = it.next(); + if (obj.getId().equals(artiFactFactoryId)) { + obj.setSelected(true); + this.selectedArtifactFactory = obj; + break; + } } } } @@ -78,7 +77,7 @@ Collection<ArtifactObject> artifactFactories) { this.artifactFactories = artifactFactories; } - + /** * @see de.intevation.gnv.action.sessionmodel.SessionModel#getAttributeFactories() */ @@ -125,8 +124,8 @@ * @see de.intevation.gnv.action.sessionmodel.SessionModel#getArtifactDescription() */ public ArtifactDescription getArtifactDescription() { - if (this.currentArtifact != null){ - return (ArtifactDescription)this.currentArtifact; + if (this.currentArtifact != null) { + return (ArtifactDescription) this.currentArtifact; } return null; } @@ -136,24 +135,24 @@ */ public OutputMode getOutputMode(String name) { ArtifactDescription ad = this.getArtifactDescription(); - if (ad != null){ - if (ad.getOutputModes() != null){ + if (ad != null) { + if (ad.getOutputModes() != null) { return ad.getOutputModes().get(name); } } return null; } - + /** * @see de.intevation.gnv.action.sessionmodel.SessionModel#resetModel() */ public void resetModel() { log.debug("DefaultSessionModel.resetModel"); this.selectedArtifactFactory = null; - this.currentArtifact =null; - this.diagrammOptions= null; + this.currentArtifact = null; + this.diagrammOptions = null; this.statistics = null; - + } /**