Skip to content

Commit

Permalink
Merge pull request #130 from filip26/0_9
Browse files Browse the repository at this point in the history
Version 1.0.0
  • Loading branch information
filip26 authored Dec 11, 2020
2 parents 49baf46 + 6ca44ce commit 27e04af
Show file tree
Hide file tree
Showing 92 changed files with 227 additions and 230 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ Maven
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>titanium-json-ld</artifactId>
<version>0.8.6</version>
<version>1.0.0</version>
</dependency>

```

Gradle

```gradle
compile group: 'com.apicatalog', name: 'titanium-json-ld', version: '0.8.6'
compile group: 'com.apicatalog', name: 'titanium-json-ld', version: '1.0.0'
```

#### JSON-P Provider
Expand All @@ -82,14 +82,14 @@ Maven
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>1.1.6</version>
<version>2.0.0</version>
</dependency>
```

Gradle

```gradle
compile group: 'org.glassfish', name: 'jakarta.json', version: '1.1.6'
compile group: 'org.glassfish', name: 'jakarta.json', version: '2.0.0'
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.apicatalog</groupId>
<artifactId>titanium-json-ld</artifactId>
<version>0.9-SNAPSHOT</version>
<version>1.0.0</version>
<packaging>jar</packaging>

<name>Titanium JSON-LD 1.1</name>
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/apicatalog/jsonld/JsonLd.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

import java.net.URI;

import com.apicatalog.jsonld.api.impl.CompactionApi;
import com.apicatalog.jsonld.api.impl.ExpansionApi;
import com.apicatalog.jsonld.api.impl.FlatteningApi;
import com.apicatalog.jsonld.api.impl.FramingApi;
import com.apicatalog.jsonld.api.impl.FromRdfApi;
import com.apicatalog.jsonld.api.impl.ToRdfApi;
import com.apicatalog.jsonld.api.CompactionApi;
import com.apicatalog.jsonld.api.ExpansionApi;
import com.apicatalog.jsonld.api.FlatteningApi;
import com.apicatalog.jsonld.api.FramingApi;
import com.apicatalog.jsonld.api.FromRdfApi;
import com.apicatalog.jsonld.api.ToRdfApi;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.uri.UriUtils;
import com.apicatalog.rdf.RdfDataset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api;
package com.apicatalog.jsonld;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api;
package com.apicatalog.jsonld;

/**
* The {@link JsonLdError} type is used to report processing errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api;
package com.apicatalog.jsonld;

import static java.util.Map.entry;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api;
package com.apicatalog.jsonld;

import java.net.URI;

Expand All @@ -22,7 +22,6 @@
import com.apicatalog.jsonld.context.cache.LruCache;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.document.JsonDocument;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.loader.SchemeRouter;

Expand Down Expand Up @@ -80,7 +79,7 @@ public enum RdfDirection {

private boolean ordered;

private Version processingMode;
private JsonLdVersion processingMode;

private boolean produceGeneralizedRdf;

Expand Down Expand Up @@ -127,7 +126,7 @@ public JsonLdOptions(DocumentLoader loader) {
this.expandContext = null;
this.extractAllScripts = false;
this.ordered = false;
this.processingMode = Version.V1_1;
this.processingMode = JsonLdVersion.V1_1;
this.produceGeneralizedRdf = true;
this.rdfDirection = null;
this.useNativeTypes = false;
Expand All @@ -142,8 +141,8 @@ public JsonLdOptions(DocumentLoader loader) {

// custom
this.numericId = false;
this.contextCache = new LruCache<>(128);
this.documentCache =new LruCache<>(256);
this.contextCache = new LruCache<>(256);
this.documentCache = null;
}

public JsonLdOptions(JsonLdOptions options) {
Expand Down Expand Up @@ -246,7 +245,7 @@ public boolean isOrdered() {
return ordered;
}

public Version getProcessingMode() {
public JsonLdVersion getProcessingMode() {
return processingMode;
}

Expand Down Expand Up @@ -294,7 +293,7 @@ public void setOrdered(boolean ordered) {
this.ordered = ordered;
}

public void setProcessingMode(Version processingMode) {
public void setProcessingMode(JsonLdVersion processingMode) {
this.processingMode = processingMode;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.lang;
package com.apicatalog.jsonld;

public enum Version {
public enum JsonLdVersion {

V1_0("json-ld-1.0"), V1_1("json-ld-1.1");

private final String text;

Version(final String text) {
JsonLdVersion(final String text) {
this.text = text;
}

public static Version of(String text) {
public static JsonLdVersion of(String text) {

if (text == null) {
throw new IllegalArgumentException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;

public interface CommonApi<R> {

Expand All @@ -36,7 +36,7 @@ public interface CommonApi<R> {
* @param processingMode to set
* @return builder instance
*/
R mode(Version processingMode);
R mode(JsonLdVersion processingMode);

/**
* Set the base <code>IRI</code>. If set, this overrides the input document's IRI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdError;
import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdError;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.processor.CompactionProcessor;
import com.apicatalog.jsonld.uri.UriUtils;
Expand Down Expand Up @@ -74,7 +74,7 @@ public CompactionApi options(JsonLdOptions options) {
}

@Override
public CompactionApi mode(Version processingMode) {
public CompactionApi mode(JsonLdVersion processingMode) {
options.setProcessingMode(processingMode);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdError;
import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdError;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.document.JsonDocument;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.processor.ExpansionProcessor;
import com.apicatalog.jsonld.uri.UriUtils;
Expand Down Expand Up @@ -94,7 +94,7 @@ public ExpansionApi context(Document context) {
}

@Override
public ExpansionApi mode(Version processingMode) {
public ExpansionApi mode(JsonLdVersion processingMode) {
options.setProcessingMode(processingMode);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdError;
import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdError;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.document.JsonDocument;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.processor.FlatteningProcessor;
import com.apicatalog.jsonld.uri.UriUtils;
Expand Down Expand Up @@ -67,7 +67,7 @@ public FlatteningApi options(JsonLdOptions options) {
}

@Override
public FlatteningApi mode(Version processingMode) {
public FlatteningApi mode(JsonLdVersion processingMode) {
options.setProcessingMode(processingMode);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdEmbed;
import com.apicatalog.jsonld.api.JsonLdError;
import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdEmbed;
import com.apicatalog.jsonld.JsonLdError;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.document.JsonDocument;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.processor.FramingProcessor;
import com.apicatalog.jsonld.uri.UriUtils;
Expand Down Expand Up @@ -102,7 +102,7 @@ public FramingApi context(Document context) {
}

@Override
public FramingApi mode(Version processingMode) {
public FramingApi mode(JsonLdVersion processingMode) {
options.setProcessingMode(processingMode);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdError;
import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdError;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.processor.FromRdfProcessor;
import com.apicatalog.rdf.RdfDataset;
Expand Down Expand Up @@ -60,7 +60,7 @@ public FromRdfApi options(JsonLdOptions options) {
}

@Override
public FromRdfApi mode(Version processingMode) {
public FromRdfApi mode(JsonLdVersion processingMode) {
options.setProcessingMode(processingMode);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import com.apicatalog.jsonld.loader.DocumentLoader;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.apicatalog.jsonld.api.impl;
package com.apicatalog.jsonld.api;

import java.net.URI;

import com.apicatalog.jsonld.api.JsonLdError;
import com.apicatalog.jsonld.api.JsonLdOptions;
import com.apicatalog.jsonld.api.JsonLdOptions.RdfDirection;
import com.apicatalog.jsonld.JsonLdError;
import com.apicatalog.jsonld.JsonLdOptions;
import com.apicatalog.jsonld.JsonLdVersion;
import com.apicatalog.jsonld.JsonLdOptions.RdfDirection;
import com.apicatalog.jsonld.document.Document;
import com.apicatalog.jsonld.document.JsonDocument;
import com.apicatalog.jsonld.lang.Version;
import com.apicatalog.jsonld.loader.DocumentLoader;
import com.apicatalog.jsonld.processor.ToRdfProcessor;
import com.apicatalog.jsonld.uri.UriUtils;
Expand Down Expand Up @@ -126,7 +126,7 @@ public ToRdfApi rdfDirection(RdfDirection direction) {
}

@Override
public ToRdfApi mode(Version processingMode) {
public ToRdfApi mode(JsonLdVersion processingMode) {
options.setProcessingMode(processingMode);
return this;
}
Expand Down
Loading

0 comments on commit 27e04af

Please sign in to comment.