Skip to content

Commit

Permalink
Renamed namespace to be able to deploy with central maven repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jansoren committed Apr 4, 2024
1 parent f0484d9 commit 7ab35a8
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 48 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ To integrate Filelize into your project, you have two options:
1. **Using Maven:** Add the following dependency to your pom.xml file and follow the guide for [Working with the Apache Maven registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)
````xml
<dependency>
<groupId>org.filelize</groupId>
<groupId>io.github.filelize</groupId>
<artifactId>filelize-java</artifactId>
<version>1.0.0</version>
<version>0.9.0</version>
</dependency>
````
2. **Manual Build:** Alternatively, you can download this repository and build it locally.
Expand All @@ -28,10 +28,11 @@ Filelizer filelizer = new Filelizer("src/test/resources/");
````

### Saving to a single file
To save an object to a single file, annotate your model class with `@Filelize` and set the `type` parameter to `FilelizeType.SINGLE_FILE`. Additionally, mark the identifying attribute with `@Id`.
To save an object to a single file, annotate your model class with `@Filelize` and set the `type` parameter to `FilelizeType.SINGLE_FILE`. Additionally, mark the identifying attribute with `@Id`.

````java
import org.filelize.Filelize;
import org.filelize.Id;
import io.github.filelize.Filelize;
import io.github.filelize.Id;

@Filelize(name = "something_single", type = FilelizeType.SINGLE_FILE, directory = "something_single")
public class Something {
Expand All @@ -44,9 +45,10 @@ public class Something {

### Saving to multiple files
For saving objects to multiple files, follow the same steps as for single-file saving, but set the type parameter to `FilelizeType.MULTIPLE_FILES`.

````java
import org.filelize.Filelize;
import org.filelize.Id;
import io.github.filelize.Filelize;
import io.github.filelize.Id;

@Filelize(name = "my_something", type = FilelizeType.MULTIPLE_FILES, directory = "something_multiple/mydirectory")
public class Something {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.filelize</groupId>
<groupId>io.github.filelize</groupId>
<artifactId>filelize-java</artifactId>
<version>2.0.0</version>
<version>0.9.0</version>
<packaging>jar</packaging>

<name>filelize-java</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

public enum FilelizeType {
SINGLE_FILE, MULTIPLE_FILES
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
Expand All @@ -7,8 +7,8 @@
import java.util.List;
import java.util.Map;

import static org.filelize.FilelizeUtil.getFilelizeType;
import static org.filelize.FilelizeUtil.getFilelizeTypeOfList;
import static io.github.filelize.FilelizeUtil.getFilelizeType;
import static io.github.filelize.FilelizeUtil.getFilelizeTypeOfList;

public class Filelizer implements IFilelizer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.filelize;
package io.github.filelize;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.filelize.file.FileHandler;
import org.filelize.path.PathHandler;
import io.github.filelize.file.FileHandler;
import io.github.filelize.path.PathHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -12,7 +12,7 @@
import java.util.List;
import java.util.Map;

import static org.filelize.FilelizeUtil.*;
import static io.github.filelize.FilelizeUtil.*;

public class FilelizerMultiple implements IFilelizer {
private final Logger log = LoggerFactory.getLogger(FilelizerMultiple.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.filelize;
package io.github.filelize;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.filelize.file.FileHandler;
import org.filelize.path.PathHandler;
import io.github.filelize.file.FileHandler;
import io.github.filelize.path.PathHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.nio.file.NoSuchFileException;
import java.util.*;

import static org.filelize.FilelizeUtil.*;
import static io.github.filelize.FilelizeUtil.*;

public class FilelizerSingle implements IFilelizer {
private final Logger log = LoggerFactory.getLogger(FilelizerSingle.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize.file;
package io.github.filelize.file;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonNode;
Expand All @@ -16,8 +16,8 @@
import java.util.HashMap;
import java.util.Map;

import static org.filelize.FilelizeUtil.getFilelizeId;
import static org.filelize.file.FilesUtil.ensureFile;
import static io.github.filelize.FilelizeUtil.getFilelizeId;
import static io.github.filelize.file.FilesUtil.ensureFile;

public class FileHandler {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize.file;
package io.github.filelize.file;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.filelize.path;
package io.github.filelize.path;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.filelize.FilelizeType;
import org.filelize.FilelizeUtil;
import org.filelize.file.FilesUtil;
import io.github.filelize.file.FilesUtil;
import io.github.filelize.FilelizeType;
import io.github.filelize.FilelizeUtil;

import java.util.HashMap;
import java.util.Map;

import static org.filelize.FilelizeUtil.*;
import static io.github.filelize.FilelizeUtil.*;

public class PathHandler {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

public class SomethingElse {
private String id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

@Filelize(name = "something_multiple", type = FilelizeType.MULTIPLE_FILES, directory = "something_multiple/mydirectory")
public class SomethingMultiple {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.filelize;
package io.github.filelize;

@Filelize(name = "something_single", type = FilelizeType.SINGLE_FILE, directory = "something_single")
public class SomethingSingle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.filelize.file;
package io.github.filelize.file;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.filelize.SomethingElse;
import io.github.filelize.SomethingElse;
import org.junit.Test;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.filelize.path;
package io.github.filelize.path;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.filelize.FilelizeType;
import org.filelize.SomethingMultiple;
import io.github.filelize.FilelizeType;
import io.github.filelize.SomethingMultiple;
import org.junit.Test;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.filelize.path;
package io.github.filelize.path;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.filelize.FilelizeType;
import org.filelize.SomethingSingle;
import io.github.filelize.FilelizeType;
import io.github.filelize.SomethingSingle;
import org.junit.Test;

import java.util.HashMap;
Expand Down

0 comments on commit 7ab35a8

Please sign in to comment.