Refactors rdf.py

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Fixes bug with tag/value checksum writing.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Seperates representation of package verification code and excluded files.
Adds cardinality checking for extracted license fields.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Implements RDF Package builder.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Implements RDF Package parser.
Implements RDF License parser.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Adds package fields to RDF parsing example file

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Initial RDF file parser implementation.
Implements File name parsing.
Implements File type parsing.
Implements File checksum parsing.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Changes Examples/SPDXTagExample.tag to utf-8 encoding

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Implements RDF parser and fixes issues with unicode support.

Adds files property to spdx.document which is short hand for package.files.
Fixes bug with spdx.review not returning ISO format date.
Modifies spdx.file validations to handle unicode fields.
Fixes bug with spdx.file artifact of validation where it assumed both optional fields must be present.
Updates spdx.parsers.rdf documentation.
spdx.parsers.LicenseParser handle_lics function now handles extracted licenses.
spdx.parsers.FileParser changes:
    Implements p_file_lic_conc.
    Implements p_file_lic_info.
    Implements p_file_comments.
    Implements p_file_cr_text.
    Implements p_file_artifact.
    Implements p_file_comment.
    Implements p_file_notice.
    Implements p_file_contributer.
    Implements p_file_depends.
    Implements helper function get_file_name.

Implements spdx.parsers.ReviewParser.

spdx.parsers.Parser parse function now uses spdx.document validations to check
correctness of model.

spdx.parsers.tagvalue now correctly handles unicode files.

spdx.builders.rdfbuilders changes:
    Implements FileBuilder.
    Implements ReviewBuilder.

Fixes bug in spdx.builders.tagvaluebuiders where some characters were ignored in
person and organization name entity.

spdx.writers.tagvalue now correctly handles unicode.
spdx.parsers.validations now correctly handles unicode.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Updates README files and example files.
Adds new example file rdf_to_tv.py.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Adds __hash__ to spdx.document.License.
Fixes issue with spdx.parsers.rdf.BaseParser.to_special_value function, it now correctly checks for special terms
spdx:noassertion, spdx:unknown, spdx:none.

Fixes bug in spdx.parsers.rdf.LicenseParser.get_extr_lics_xref function where builtin function filter was improperly uused instead of map.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Improves spdx.package validations:
Now validates none str optional and mandatory fields.
Two helper functions added validate_optional_fields and validate_mandatory_fields.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Fixes issue with tagvalue parsing and whitespace:
	Lexer assumed no more than one whitespace with checksum values.
	Changed regex in spdx.lexers.tagvalue for checksum token.
	Changed regex in spdx.lexers.tagvalue for date token due to same issue.
Fixes issue with empty free form text (<text></text>):
	validation spdx.parsers.validations.validate_is_free_form_text will now return true if passed '<text></text>'.
Adds missing ERROR_MESSAGE key PKG_CPY_TEXT_VALUE in spdx.parsers.tagvalue.
Tag/value writer will now print new lines after free form text values.
Tag/value writer is now unicode aware with fields that could have special values (NoAssert and such).

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Modifies Examples/SPDXTagExample.tag to use LicenseCrossReference as interpreted from the standard.

Corrects mistake in spdx.document.Document doc string where type of field extracted_licenses was incorrect.

Implements validations for spdx.document.Document.extracted_licenses field.

spdx.lexers.tagvalue will now recover from errors correctly when in text state.

Fixes bug in tag/value parsing caused by mistaked assumption that if ArtifactOfProjectName exist then the other fields must follow.
Fixed by adding epsilon productions.

Modifies type checking in spdx.parsers.tagvaluebuilders, spdx.parsers.validations and spdx.writers.tagvalue to use
isinstance instead of type.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Implements spdx.writers.rdf module:
	Creates entry point function write_document
	Implements BaseWriter class which contains utility functions and shared fields.
	Implements LicenseWriter class which handles writing license information,
	used by other writers to handle license fields.
	Implements FileWriter class which handles writing spdx.file models.
	Implements ReviewInfoWriter class which handles writing document review information.
	Implements CreationInfoWriter class which handles writing document creation info.
	Implements PackageWriter class which handles writing spdx.document model.
	Implements WriterClass which utilizes all other writers to write the entire document.

Adds rdf pretty print example file rdf_pp.py.
Adds tests for conversion from tag/value to rdf and rdf to tag/value.
Updates README files.
Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>
Merge pull request #2 from ah450/master

latest from Ahmed