<commit_before># java-stix 

The JAXB generated Java bindings for STIX with additional convenience
methods.  STIX is the Structured Threat Information eXpression (STIX),
a standardized language used to represent structured cyber threat
information.

This effort is being developed under the official [STIXProject](http://stixproject.github.io/).

For more information, see [http://stix.mitre.org/](http://stix.mitre.org/).

## Overview

A primary goal of java-stix is to remain faithful to both the STIX
specifications and to customary Java practices. java-stix is designed
to be intuitive both to Java developers and JAXB XML developers, but
it is not a one-for-one replacement for the [python-stix](https://github.com/STIXProject/python-stix) API.

## Versioning

Releases of java-stix will comply with the Semantic Versioning
specification at [http://semver.org/](http://semver.org/). Java-stix
is currently under active development; see TODO.txt for a tentative
roadmap.  Releases will be announced on the [STIX discussion list](http://stix.mitre.org/community/registration.html).

# Building

## Clone the repository

git clone https://github.com/nemonik/java_stix.git

A `git clone` command will not retrieve schemas project
automatically, but the Gradle Buildscript will attempt to
retrieve them on execution.

## Retrieve the schemas

The Gradle buildscript will attempt to retreive the schemas for 
you, but if it cannot for some reason you will need to retrieve 
them yourself.

The Buildscript executes either the retrieve_schemas.sh shell script
or the retreieve_schemas.bat batch script as appopriate for your 
platform.  You can find these in the root of the project, and try
executing them yourself or you can follow the steps enumerated in
the next section for retrieving the schemas.

### The STIX schemas

To manually retrieve the schemas, enter the project and run 
these  additonal git commands on the command line:

    git submodule init
    git submodule update
    
Your not done.  You'll also need to retrieve the CybOX schemas.

### The CybOX schemas

While in the project:
<commit_msg>info on patch and open cybOX Schema related issue<commit_after># java-stix 

The JAXB generated Java bindings for STIX with additional convenience
methods.  STIX is the Structured Threat Information eXpression (STIX),
a standardized language used to represent structured cyber threat
information.

This effort is being developed under the official [STIXProject](http://stixproject.github.io/).

For more information, see [http://stix.mitre.org/](http://stix.mitre.org/).

## Overview

A primary goal of java-stix is to remain faithful to both the STIX
specifications and to customary Java practices. java-stix is designed
to be intuitive both to Java developers and JAXB XML developers, but
it is not a one-for-one replacement for the [python-stix](https://github.com/STIXProject/python-stix) API.

## Versioning

Releases of java-stix will comply with the Semantic Versioning
specification at [http://semver.org/](http://semver.org/). Java-stix
is currently under active development; see TODO.txt for a tentative
roadmap.  Releases will be announced on the [STIX discussion list](http://stix.mitre.org/community/registration.html).

# Building

## Clone the repository

git clone https://github.com/nemonik/java_stix.git

A `git clone` command will not retrieve schemas project
automatically, but the Gradle Buildscript will attempt to
retrieve them on execution.

## Retrieve the schemas

The Gradle buildscript will attempt to retreive and patch the 
schemas for you, but if it cannot for some reason you will need
to retrieve them yourself.

The Buildscript executes either the retrieve_schemas.sh shell script
or the retreieve_schemas.bat batch script as appopriate for your 
platform.  You can find these in the root of the project, and try
executing them yourself or you can follow the steps enumerated in
the next section for retrieving the schemas.

Afterward, the cybOX schemas are patched for the flaw described in (cybOX Schema issue #340)[https://github.com/CybOXProject/schemas/issues/340].
Until the issue is resolved please be aware of the patch.  The
(patch)[https://raw.githubusercontent.com/nemonik/java_stix/master/cybox_object_archive_file_object.patch] is found at the root of the project.

### The STIX schemas

To manually retrieve the schemas, enter the project and run 
these  additonal git commands on the command line:

    git submodule init
    git submodule update
    
Your not done.  You'll also need to retrieve the CybOX schemas.

### The CybOX schemas

While in the project:

{'fraction_non_alphanumeric': 0.06294613887086307, 'fraction_numerical': 0.0012978585334198572, 'mean_word_length': 4.45926800472255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7671417', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1259, 'n_words': 594}