GithubHelp home page GithubHelp logo

ruraj / cap-library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/cap-library

0.0 2.0 0.0 11.47 MB

Common Alerting Protocol Library

License: Apache License 2.0

HTML 87.60% CSS 0.05% Java 11.88% Protocol Buffer 0.38% JavaScript 0.09%

cap-library's Introduction

Common Alerting Protocol Library Build Status

Copyright 2014 Google Inc.

http://github.com/google/cap-library/

===========

The CAP Library is a collection of code and tools to work with public alerting messages in the [Common Alerting Protocol] (http://en.wikipedia.org/wiki/Common_Alerting_Protocol) format.

Namely, a well-tested and easy-to-use Java library that supports

  • creation and parsing of feeds in the CAP format,
  • validating of feeds against common CAP profiles.

Moreover, it includes a simple [web application] (http://cap-validator.appspot.com/) to validate the correctness of CAP messages.

About

The CAP Library is designed to support CAP versions 1.0, 1.1, and 1.2. There are classes that can parse XML CAP messages as well as easily create new messages and write them to XML, JSON, (soon) ASN.1, and (soon) KML.

The main data structures are auto-generated from a Google protocol buffer implementation of the CAP spec in proto/cap.proto. Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data - think XML, but smaller, faster, and simpler.

The generated classes offer a clean API for creating and manipulating alert objects. The alert data structures are immutable; they provide only getters. New alerts are constructed via Builder classes. See javatests/com/google/publicalerts/cap/TestUtil.java, for an example.

javatests/com/google/publicalerts/cap/EndToEndTest.java provides a good overview of how to get started using the library.

To learn more about Google protocol buffers, see http://code.google.com/apis/protocolbuffers/ and http://code.google.com/apis/protocolbuffers/docs/reference/java-generated.html

Development

###Install ant You can download and install Apache Ant from http://ant.apache.org/.

###Run all tests

» APPENGINE_JAVA_SDK=/path/to/appengine-sdk ant test

###Compile the library into a jar

» cd java
» ant jar

###Compile and run the validator

» cd validator
» APPENGINE_JAVA_SDK=/path/to/appengine-sdk ant runserver

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.