<commit_before># Estivate

Mapping from DOM to POJO with CSS Query Syntax and annotations.

Estivate use <a href="http://jsoup.org/">JSoup API</a> for inside CSS queries.

# Getting Started

Giving this simple HTML, we want to the POJO's ```name``` field set with the body of ```#nameId``` element. 

```html
<html>
	<head></head>
	<body>
		<div id="nameId">This is my name</div>
	</body>
</html>
```

```java
public class Result {

	@Text(select="#nameId")
	public String name;

}
```

Mapping a DOM document to a POJO is very easy.

```java
InputStream document = ...

EstivateMapper mapper = new EstivateMapper();

Result result = mapper.map(document, Result.class);
```

Definition of Result class POJO definition which is:

1. Select an JSoup Element with cssQuery ``` "#nameId" ```  on the document.
* Apply JSoup ``` element.text() ``` on the Element selected.
* Set the result to the ``` name ``` field.


## Download

```xml
<dependency>
	<groupId>com.github.btheu.estivate</groupId>
	<artifactId>estivate</artifactId>
	<version>0.3.1</version>
</dependency>
```

### Mapping of collection
<commit_msg>readme: update version artifact<commit_after># Estivate

Mapping from DOM to POJO with CSS Query Syntax and annotations.

Estivate use <a href="http://jsoup.org/">JSoup API</a> for inside CSS queries.

# Getting Started

Giving this simple HTML, we want to the POJO's ```name``` field set with the body of ```#nameId``` element. 

```html
<html>
	<head></head>
	<body>
		<div id="nameId">This is my name</div>
	</body>
</html>
```

```java
public class Result {

	@Text(select="#nameId")
	public String name;

}
```

Mapping a DOM document to a POJO is very easy.

```java
InputStream document = ...

EstivateMapper mapper = new EstivateMapper();

Result result = mapper.map(document, Result.class);
```

Definition of Result class POJO definition which is:

1. Select an JSoup Element with cssQuery ``` "#nameId" ```  on the document.
* Apply JSoup ``` element.text() ``` on the Element selected.
* Set the result to the ``` name ``` field.


## Download

```xml
<dependency>
	<groupId>com.github.btheu.estivate</groupId>
	<artifactId>estivate</artifactId>
	<version>0.3.3</version>
</dependency>
```

### Mapping of collection

{'fraction_non_alphanumeric': 0.15223214285714284, 'fraction_numerical': 0.0035714285714285713, 'mean_word_length': 4.335714285714285, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2781142', 'n_tokens_mistral': 773, 'n_tokens_neox': 737, 'n_words': 253}