This will be a FAQ in future....

needs reformatting
> Recently, I ran into a problem when I tried to publish alerts with
> geo-locations. I got an Exception "the AnyScalarPropertyType is an
> unsupported type:simple". The attached xml file contains the requests and
> responses I got. Do you have any idea what cause the exception?

Yes, not every type in swecommon has been implemented yet. There is some 
effort ongoing to create a swecommon lib for this purpose, but as you may 
know, swesommon is quite complex....

It is unlikely that I'll add more types in future. But I'd appreciate if you 
would add some. Which type(s) do you need?

Implementing the types is done in two steps: First, have a look at 
sas-dao/src/main/java/org/n52/swe/sas/dao/model/Sensor#fillAlertItems

That method does the parsing. If you don not understand the code, take a 
diagram of swe:AnyData. All the if-clauses are needed to parse the different 
subtypes.

Once the correct type is found, it has to be added with 
alert.addAlertItem(..) where a simplified datatype is created.

Example:
                if (scalar.isSetBoolean()) {
                        definition = scalar.getBoolean().getDefinition();
                        uom = "";
                        item = new AlertItem.Boolean(uom, definition);
                }
This code adds a new AlertItem.Boolean to the list of alerts.

> Also, does 52north SAS support "DescribeAlert" request? It seems to me not
> implemented. And I tried to add "DescribeAlert" to
> core.listener.ogcoperations package but looks like the listener couldn't be
> found. Could you tell me how to add this "DescribeAlert" listener?

yes, DescribeAlert hasn't been implemented, yet. If you did it you can add the 
the Listener to the class RequestHandler:

        public void init(IRegistry registry) {
                /* log only WARNINGS and above */
                LOGGER.setLevel(Level.INFO);
                dispatcher = (RequestsAndMessagesDispatcher) 
registry.getModule(Modules.Dispatcher);

                validate = registry.isPropertyTrue(Registry.VALIDATE_XML_PROPERTY);
                version = registry.getProperty(Registry.VERSION);
                
                dispatcher.addListener(new AlertListener(registry));
                try {
                        dispatcher.addListener(new Capabilites(registry));
                        dispatcher.addListener(new Advertisement(registry));
                        dispatcher.addListener(new Subscription(registry));
                        dispatcher.addListener(new DescribeSensor(registry));
                } catch (SASCommunicationException e) {
                        LOGGER.log(Level.SEVERE,"error while restoring channels!", e);
                }

        }

-- JanTorbenHeuer - 04 Mar 2008

This topic: SensorWeb > WebHome > SensorAlertService > SweSasFAQ
Topic revision: 04 Mar 2008, JanTorbenHeuer
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback