Comments (9)
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.
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.
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.
sounds good to me mate.. we'll get in touch again next week
from cap-net.
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.
@vgrigoriu ... do you support "thin" feeds ?
btw i cannot see the nuget pre-release to support EDXL-DE..
from cap-net.
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.
#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.
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)
- Make Circle a class
- Make Polygon a class
- Make the dll portable
- An alert can have more than one info
- base64 decode the derefUri property HOT 2
- TryParse should be used instead of Parse.
- Make alert.incidents a string list.
- Make alert.addresses a string list
- RestrictiveCharacters HOT 1
- Address, Incidents can contain spaces and be delimited by double quotes
- Milliseconds of info.Effective need to be stripped when serializing
- Rename Coordinate X, Y to latitude, longitude
- Add earthquake feed from USGS
- Add tsunami feed
- Add logo to nuget package HOT 1
- Coordinates should use decimal instead of double
- Use https://www.internetalerts.org/hub/subscriptions as a test feed
- convert to .net core / netstandard
- Version enum is not used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cap-net.