source: java/main/src/main/java/com/framsticks/model/f0/NeuroClassBuilder.java @ 88

Last change on this file since 88 was 88, checked in by psniegowski, 11 years ago

HIGHLIGHTS:

  • loading f0 schema with XmlLoader?
  • use XmlLoader? to load configuration
  • introduce unified fork-join model of various entities

(Instances, Connections, GUI Frames, etc.),
all those entities clean up gracefully on
shutdown, which may be initialized by user
or by some entity

  • basing on above, simplify several organizing classes

(Observer, main class)

(to host native frams server process from Java level)

CHANGELOG:
Remove redundant Observer class.

Clean up in AbstractJoinable?.

Update ExternalProcess? class to changes in joining model.

Another sweep through code with FindBugs?.

Find bug with not joining RemoteInstance?.

Joining almost works.

Much improved joining model.

More improvement to joining model.

Add logging messages around joinable operations.

Rename methods in AbstractJoinable?.

Improve Joinable.

Rewrite of entity structure.

More simplifications with entities.

Further improve joinables.

Let Frame compose from JFrame instead of inheriting.

Add join classes.

Improvements of closing.

Add Builder interface.

Add FramsServerTest?.xml

FramsServer? may be configured through xml.

Make Framsticks main class an Observer of Entities.

Make Observer a generic type.

Remove variables regarding to removed endpoint.

Simplify observer (remove endpoints).

More changes to Observer and Endpoint.

Minor improvements.

Add OutputListener? to ExternalProcess?.

Improve testing of ExternalProcess?.

Add ExternalProcess? runner.

Rename the Program class to Framsticks.

Migrate Program to use XmlLoader? configuration.

First steps with configuration using XmlLoader?.

Fix several bugs.

Move all f0 classes to apriopriate package.

XmlLoader? is able to load Schema.

XmlLoader? is loading classes and props.

Add GroupBuilder?.

File size: 2.7 KB
Line 
1package com.framsticks.model.f0;
2
3import com.framsticks.params.FramsClassBuilder;
4import com.framsticks.params.annotations.FramsClassAnnotation;
5import com.framsticks.params.annotations.ParamAnnotation;
6
7@FramsClassAnnotation(id = "neuroclass", name = "neuroclass")
8public class NeuroClassBuilder extends FramsClassBuilder {
9
10        /**
11         *
12         */
13        public NeuroClassBuilder() {
14                super();
15        }
16
17        protected Integer preferredInputs;
18
19        protected Integer preferredOutput;
20
21        protected Integer preferredLocation;
22
23        protected Integer visualHints;
24
25        protected String symbolGlyph;
26
27        /** That method is just an alias needed by f0def.xml in current shape.
28         *
29         */
30        @ParamAnnotation(id = "description")
31        public NeuroClassBuilder descriptionAlias(String description) {
32                description(description);
33                return this;
34        }
35
36        /** That method is just an alias needed by f0def.xml in current shape.
37         *
38         */
39        @ParamAnnotation(id = "description")
40        public String descriptionAlias() {
41                return description;
42        }
43
44        @Override
45        public NeuroClass finish() {
46                return new NeuroClass(this);
47        }
48
49        /**
50         * @return the preferredInputs
51         */
52        @ParamAnnotation(id = "inputs")
53        public Integer getPreferredInputs() {
54                return preferredInputs;
55        }
56
57        /**
58         * @param preferredInputs the preferredInputs to set
59         */
60        @ParamAnnotation(id = "inputs")
61        public void setPreferredInputs(Integer preferredInputs) {
62                this.preferredInputs = preferredInputs;
63        }
64
65        /**
66         * @return the preferredOutput
67         */
68        @ParamAnnotation(id = "output")
69        public Integer getPreferredOutput() {
70                return preferredOutput;
71        }
72
73        /**
74         * @param preferredOutput the preferredOutput to set
75         */
76        @ParamAnnotation(id = "output")
77        public void setPreferredOutput(Integer preferredOutput) {
78                this.preferredOutput = preferredOutput;
79        }
80
81        /**
82         * @return the preferredLocation
83         */
84        @ParamAnnotation(id = "location")
85        public Integer getPreferredLocation() {
86                return preferredLocation;
87        }
88
89        /**
90         * @param preferredLocation the preferredLocation to set
91         */
92        @ParamAnnotation(id = "location")
93        public void setPreferredLocation(Integer preferredLocation) {
94                this.preferredLocation = preferredLocation;
95        }
96
97        /**
98         * @return the visualHints
99         */
100        @ParamAnnotation(id = "visualhints")
101        public Integer getVisualHints() {
102                return visualHints;
103        }
104
105        /**
106         * @param visualHints the visualHints to set
107         */
108        @ParamAnnotation(id = "visualhints")
109        public void setVisualHints(Integer visualHints) {
110                this.visualHints = visualHints;
111        }
112
113        /**
114         * @return the symbolGlyph
115         */
116        @ParamAnnotation(id = "symbol")
117        public String getSymbolGlyph() {
118                return symbolGlyph;
119        }
120
121        /**
122         * @param symbolGlyph the symbolGlyph to set
123         */
124        @ParamAnnotation(id = "symbol")
125        public void setSymbolGlyph(String symbolGlyph) {
126                this.symbolGlyph = symbolGlyph;
127        }
128
129
130}
Note: See TracBrowser for help on using the repository browser.