Giter VIP home page Giter VIP logo

Comments (9)

vgrigoriu avatar vgrigoriu commented on June 30, 2024

Multiple alerts can be wrapped in EDXL-DE (but they can also be wrapped in Atom or anything else). The focus of this project, for now, is just the CAP protocol. If you only want to produce (not consume) multiple alerts wrapped in EDXL-DE, you can use something like this:

    IEnumerable<Alert> alerts = GetAlerts();

    XNamespace edxldens = "urn:oasis:names:tc:emergency:EDXL:DE:2.0";
    var root = new XElement(edxldens + "EDXLDistribution",
        new XElement(edxldens + "distributionID", "test message"),
        new XElement(edxldens + "senderID", "some sender"),
        alerts.Select(alert =>
            new XElement(edxldens + "contentObject",
                new XElement(edxldens + "contentDescription", "This is a list of alerts"),
                new XElement(edxldens + "xmlContent", new XElement(edxldens + "embeddedXMLContent", XmlCreator.Create(alert))))));

Do you feel it would be useful to have this code wrapped in some utility class/method in CAP.NET?

from cap-net.

ronalds1 avatar ronalds1 commented on June 30, 2024

thanks.. yes it would be very useful.. this is what we use in Australia. Also within the "Info" section, i cannot see a way to add "language" element..

from cap-net.

vgrigoriu avatar vgrigoriu commented on June 30, 2024

The Info class has a Language property. No promises for the EDXL code, it's a busy period but maybe I'll whip something up in the weekend.

from cap-net.

ronalds1 avatar ronalds1 commented on June 30, 2024

sounds good to me mate.. we'll get in touch again next week

from cap-net.

vgrigoriu avatar vgrigoriu commented on June 30, 2024

I implemented the bare minimum of EDXL-DE. It's published as a pre-release NuGet package. For an example of how to use it, take a look at this test.

Your example uses EDXL-DE 1.0, but I decided to go with 2.0.

Let me know if this works for you.

from cap-net.

ronalds1 avatar ronalds1 commented on June 30, 2024

@vgrigoriu ... do you support "thin" feeds ?

btw i cannot see the nuget pre-release to support EDXL-DE..

from cap-net.

vgrigoriu avatar vgrigoriu commented on June 30, 2024

By thin clients do you mean Atom or RSS?

What do you mean you "cannot see" the nuget? Is the link above not working for you? Or is it that you can't see the package in Visual Studio?

from cap-net.

ronalds1 avatar ronalds1 commented on June 30, 2024

@vgrigoriu

#1 nuget. Yes i cannot see the new prerelease in nuget explorer in Visual Studio.

#2 thin feed. for example, please refer to http://publicalert.pagasa.dost.gov.ph/feeds/ and http://publicalert.pagasa.dost.gov.ph/output/acp/e38557be-567a-4a1d-b4c7-7f821ebc666b.cap

As you can see each alerts are generated in its own file with having one link file pointing to each alert CAP file.

from cap-net.

vgrigoriu avatar vgrigoriu commented on June 30, 2024

There's a drop down at the top of the nuget window where you can select "Stable Only" or "Include Prerelease". When I search for edxl, I can see this package only when "Include Prerelease" is selected.

Those feeds are Atom, a separate standard. To generate those you can use, for example, the SyndicationFeed class from the .NET Framework: https://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed%28v=vs.110%29.aspx

from cap-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.