<commit_before>hecate
======


Mapping a Pojo Class -

    A Java object can be utilized, it will handle Collections and Dictionaries.
    For complex object graphs the fields will utilize Serialization.

```Java
public class Segment {

    private String expression;
    private String id;
    private String name;
    private Map<String, String> properties = new HashMap<>();

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map<String, String> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, String> properties) {
        this.properties = properties;
    }

    public String getProperty(String property) {
        return properties.get(property);
    }

    public void setProperty(String key, String value) {
        properties.put(key, value);
    }
}
```

And a DAO to utilize the Java

```Java
public class SegmentPersistenceTest {



    @Before
    public void start() throws ConfigurationException, IOException, TTransportException {
        Map<String, String> credentials = new HashMap<String, String>();

        credentials.put(IAuthenticator.USERNAME_KEY, "admin");
        credentials.put(IAuthenticator.PASSWORD_KEY, "secret");

        persistence.setMasterHost("localhost:9175");

        EmbeddedCassandraServerHelper.startEmbeddedCassandra("cassandra.yaml", credentials);
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }

    @Test
    public void testStartupAndSystem() throws InvalidPersistenceData {

        Segment segment = new Segment();
        segment.setId("1");<commit_msg>Readme.<commit_after>hecate
======


Mapping a Pojo Class -

    A Java object can be utilized, it will handle Collections and Dictionaries.
    For complex object graphs the fields will utilize Serialization.

```Java
public class Segment {

    private String expression;
    private String id;
    private String name;
    private Map<String, String> properties = new HashMap<>();

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map<String, String> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, String> properties) {
        this.properties = properties;
    }

    public String getProperty(String property) {
        return properties.get(property);
    }

    public void setProperty(String key, String value) {
        properties.put(key, value);
    }
}
```

And a DAO to utilize the Java Object.

```Java
public class SegmentPersistenceTest {



    @Before
    public void start() throws ConfigurationException, IOException, TTransportException {
        Map<String, String> credentials = new HashMap<String, String>();

        credentials.put(IAuthenticator.USERNAME_KEY, "admin");
        credentials.put(IAuthenticator.PASSWORD_KEY, "secret");

        persistence.setMasterHost("localhost:9175");

        EmbeddedCassandraServerHelper.startEmbeddedCassandra("cassandra.yaml", credentials);
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }

    @Test
    public void testStartupAndSystem() throws InvalidPersistenceData {

        Segment segment = new Segment();
        segment.setId("1");
{'fraction_non_alphanumeric': 0.09016393442622951, 'fraction_numerical': 0.0025614754098360654, 'mean_word_length': 2.9285714285714284, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, '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': '276847', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1007, 'n_words': 298}