diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..bc54a723
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,54 @@
+# Declare text files with unix file ending
+*.conf text eol=lf
+*.config text eol=lf
+*.css text eol=lf
+*.dtd text eol=lf
+*.esp text eol=lf
+*.ecma text eol=lf
+*.groovy text eol=lf
+*.hbrs text eol=lf
+*.hbs text eol=lf
+*.htm text eol=lf
+*.html text eol=lf
+*.java text eol=lf
+*.jpage text eol=lf
+*.js text eol=lf
+*.json text eol=lf
+*.jsp text eol=lf
+*.mustache text eol=lf
+*.tld text eol=lf
+*.launch text eol=lf
+*.log text eol=lf
+*.php text eol=lf
+*.pl text eol=lf
+*.project text eol=lf
+*.properties text eol=lf
+*.props text eol=lf
+*.sass text eol=lf
+*.scss text eol=lf
+*.sh text eol=lf
+*.shtm text eol=lf
+*.shtml text eol=lf
+*.sql text eol=lf
+*.svg text eol=lf
+*.txt text eol=lf
+*.vm text eol=lf
+*.xml text eol=lf
+*.xsd text eol=lf
+*.xsl text eol=lf
+*.xslt text eol=lf
+*.yml text eol=lf
+*.yaml text eol=lf
+
+
+# Declare windows-specific text files with windows file ending
+*.asp text eol=crlf
+*.asax text eol=crlf
+*.asa text eol=crlf
+*.aspx text eol=crlf
+*.bat text eol=crlf
+*.cmd text eol=crlf
+*.cs text eol=crlf
+*.csproj text eol=crlf
+*.reg text eol=crlf
+*.sln text eol=crlf
diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml
new file mode 100644
index 00000000..6fc0b2ad
--- /dev/null
+++ b/.github/workflows/maven-build.yml
@@ -0,0 +1,34 @@
+# Build validation
+
+name: Build
+
+on:
+ push:
+ branches:
+ - develop
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+ build:
+
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ java: [17]
+ os: [ubuntu-latest]
+ distribution: [temurin]
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Setup JDK
+ uses: actions/setup-java@v5
+ with:
+ distribution: ${{ matrix.distribution }}
+ java-version: ${{ matrix.java }}
+ cache: maven
+
+ - name: Build and verify
+ run: mvn -Pcontinuous-integration -B -U clean verify
diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml
new file mode 100644
index 00000000..e218c2bd
--- /dev/null
+++ b/.github/workflows/maven-deploy.yml
@@ -0,0 +1,31 @@
+# Deploy snapshots to Sonatype OSS repository and deploy site to GitHub Pages
+
+name: Deploy
+
+on:
+ push:
+ branches:
+ - develop
+ workflow_dispatch:
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Setup JDK
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: 17
+ cache: maven
+
+ - name: Build, verify, deploy
+ env:
+ SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
+ SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
+ run: mvn -Pcontinuous-integration -B -U clean deploy
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
deleted file mode 100644
index c8aeb3a2..00000000
--- a/.github/workflows/maven.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# This workflow will build a Java project with Maven
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
-
-name: Java CI with Maven
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
- - name: Build with Maven
- run: mvn -B package --file pom.xml
diff --git a/.gitignore b/.gitignore
index a9fa1aee..cb0de5f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,32 +1,34 @@
-*.class
-*~
-.*.swp
-.*.swo
-.loadpath
-.buildpath
+target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+maven-eclipse.xml
+infinitest.filters
+
+node_modules/
+npm-debug.log
+
+.nodejs
.project
-.settings
.classpath
-.metadata
-.springBeans
+.settings
+.externalToolBuilders
+.pmd
+.eclipse-pmd
+.checkstyle
.idea
+.vagrant
*.iml
-*.ipr
-*.iws
-git.properties
-*.log
-.checkstyle
-nbproject
.DS_Store
-target
-test-output
-nbactions.xml
-build
-release.properties
-**/pom.xml.backup
-**/release.properties
-**/pom.xml.branch
-**/pom.xml.next
-**/pom.xml.releaseBackup
-**/pom.xml.tag
-atlassian-ide-plugin.xml
+*.retry
+.rubygems
+.sass-cache
+.rubygems-gem-maven-plugin
+*.sublime-*
+*nbactions*.xml
+.temp/
+.vlt
+.vlt-sync*
+.brackets.json
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 0190d89c..00000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "uritemplate-test"]
- path = uritemplate-test
-url=https://github.com/damnhandy/uritemplate-test.git
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b6c371a9..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-dist: trusty
-language: java
-jdk:
-# - openjdk7
-# - oraclejdk7 disabling due to the container not being able to set JAVA_HOME correctly
- - oraclejdk8
- - openjdk8
- - oraclejdk11
-sudo: false
-install: ./mvnw clean
-script: ./mvnw install site
-notifications:
- email: false
-before_install:
- - git submodule update --init --recursive
diff --git a/LICENSE.txt b/LICENSE
similarity index 97%
rename from LICENSE.txt
rename to LICENSE
index 308a5a55..5c304d1a 100644
--- a/LICENSE.txt
+++ b/LICENSE
@@ -1,11 +1,4 @@
-Copyright (c) 2012, Ryan J. McDonough
-All rights reserved.
-
-====================================================================
-Licensed under the Apache License, Version 2.0. Text as follows.
-
-
- Apache License
+Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -185,7 +178,7 @@ Licensed under the Apache License, Version 2.0. Text as follows.
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
+ boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -193,7 +186,7 @@ Licensed under the Apache License, Version 2.0. Text as follows.
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright [yyyy] [name of copyright owner]
+ Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -205,4 +198,4 @@ Licensed under the Apache License, Version 2.0. Text as follows.
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
+ limitations under the License.
diff --git a/README.md b/README.md
index a2fb3a89..739a153f 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,14 @@
-# Handy URI Templates
+# wcm.io Caravan Handy URI Templates
+[](https://github.com/wcm-io-caravan/wcm-io-handy-uri-templates/actions?query=workflow%3ABuild+branch%3Adevelop)
+[](https://repo1.maven.org/maven2/io/wcm/caravan/wcm-io-handy-uri-templates/)
-[](https://gitter.im/damnhandy/Handy-URI-Templates?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[](http://travis-ci.org/damnhandy/Handy-URI-Templates)
+> [!NOTE]
+> This project is a fork of [Handy URI Templates](https://github.com/damnhandy/Handy-URI-Templates) originally developed by Ryan McGeary.
+> We are grateful for the original implementation, which served as the foundation for this work.
+>
+> This fork fixes compatibility issues with JDK 21+ environments and otherwise can be used as drop-in replacement.
-[](https://maven-badges.herokuapp.com/maven-central/com.damnhandy/handy-uri-templates)
Handy URI Templates is a uritemplate processor implementing [RFC6570](http://tools.ietf.org/html/rfc6570) written in Java. If you are looking for a non-Java implementation, please check the [RFC6570 implementations page](http://code.google.com/p/uri-templates/wiki/Implementations). The current implementation is based on the final release of the uri template spec. The template processor supports the following features:
@@ -20,13 +24,9 @@ Handy URI Templates is a uritemplate processor implementing [RFC6570](http://too
As of version `1.1.1`, Handy URI Templates passes all tests defined by the [uritemplate-test](https://github.com/uri-templates/uritemplate-test) suite.
-You can view [code coverage here](https://damnhandy.github.io/Handy-URI-Templates/cobertura/).
-
-The complete [JavaDocs are here](http://damnhandy.github.io/Handy-URI-Templates/apidocs/).
-
## API Documentation
-JavaDocs are available on [Javadocs.io](http://www.javadoc.io/doc/com.damnhandy/handy-uri-templates)
+JavaDocs are available on [Javadocs.io](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates)
## Maven
@@ -34,37 +34,13 @@ To use the latest version of Handy URI Templates, you need to add the following
```xml
- com.damnhandy
- handy-uri-templates
- 2.1.7
-
-```
-
-The next version of Handy URI Templates includes some big changes to the API. If you want to be daring, you can use the `SNAPSHOT` release:
-
-```xml
-
- com.damnhandy
- handy-uri-templates
- 2.1.8-SNAPSHOT
+ io.wcm.caravan
+ wcm-io-handy-uri-templates
+
```
-
-In order to use a SNAPSHOT release, you'll have to add the Sonatype snapshots repository:
-
-```xml
-
- sonatype-nexus-snapshots
- sonatype-nexus-snapshots
- https://oss.sonatype.org/content/repositories/snapshots
-
-```
-
-You can also download the artifact directly at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Chandy-uri-templates)
-
-
## Basic Usage
Using the library is simple:
@@ -121,13 +97,13 @@ When `Request.getUrl()` is called, it will return:
"https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits"
-Please have a look at the example [test case](https://github.com/damnhandy/Handy-URI-Templates/blob/master/src/test/java/com/damnhandy/uri/template/examples/TestGitHubApis.java) for more details.
+Please have a look at the example [test case](https://github.com/wcm-io-caravan/wcm-io-handy-uri-templates/blob/develop/src/test/java/com/damnhandy/uri/template/examples/TestGitHubApis.java) for more details.
Usage with the [Apache HTTP Client](http://hc.apache.org/httpcomponents-client-ga/index.html) is just as similar.
## Supported Value Types
-While the `set()` method of the [UriTemplate](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/UriTemplate.html) accepts any Java object, the following Java types are preferred:
+While the `set()` method of the [UriTemplate](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/UriTemplate.html) accepts any Java object, the following Java types are preferred:
* Primitive and Object types such as:
* int & Integer
@@ -166,9 +142,9 @@ The URI Template spec supports [composite values](http://tools.ietf.org/html/rfc
## POJOs as Composite Values
-The template processor can treat simple Java objects as composite value. When a POJO is set on a template variable and the variable specifies the an explode modifier "*", a [VarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/VarExploder.html) is invoked. The purpose of the `VarExploder` is to expose the object properties as name/value pairs.
+The template processor can treat simple Java objects as composite value. When a POJO is set on a template variable and the variable specifies the an explode modifier "*", a [VarExploder](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/VarExploder.html) is invoked. The purpose of the `VarExploder` is to expose the object properties as name/value pairs.
-For most use cases, the [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/DefaultVarExploder.html) should be sufficient. The `DefaultVarExploder` is a VarExploder implementation that takes in a Java object and extracts the properties for use in a URI Template. This class is called by default when a POJO is passed into the UriTemplate and the explode modifier is present on the variable. Given the following URI template expression:
+For most use cases, the [DefaultVarExploder](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/DefaultVarExploder.html) should be sufficient. The `DefaultVarExploder` is a VarExploder implementation that takes in a Java object and extracts the properties for use in a URI Template. This class is called by default when a POJO is passed into the UriTemplate and the explode modifier is present on the variable. Given the following URI template expression:
/mapper{?address*}
@@ -187,7 +163,7 @@ The expanded URI will be:
/mapper?city=Newport%20Beach&state=CA
-The [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/DefaultVarExploder.html) breaks down the object properties as follows:
+The [DefaultVarExploder](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/DefaultVarExploder.html) breaks down the object properties as follows:
* All properties that contain a non-null return value will be included
* Getters or fields annotated with `@UriTransient` will be excluded
@@ -197,7 +173,7 @@ The [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs
Please refer to the JavaDoc for more details on how the `DefaultVarExploder` works.
-Should the [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/DefaultVarExploder.html) not be suitable for your needs, custom [VarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/VarExploder.html) implementations can be added by rolling your own implementation. A custom VarExploder implementation can be used by wrapping your object in your implementation:
+Should the [DefaultVarExploder](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/DefaultVarExploder.html) not be suitable for your needs, custom [VarExploder](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/VarExploder.html) implementations can be added by rolling your own implementation. A custom VarExploder implementation can be used by wrapping your object in your implementation:
```java
UriTemplate.fromTemplate("/mapper{?address*}")
@@ -205,7 +181,7 @@ UriTemplate.fromTemplate("/mapper{?address*}")
.expand();
```
-Note: All [VarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/VarExploder.html) implementations are ONLY invoked when the explode modifier "*" is declared in the URI Template expression. If the variable declaration does not specify the explode modifier, an exception is raised.
+Note: All [VarExploder](http://www.javadoc.io/doc/io.wcm.caravan/wcm-io-handy-uri-templates/latest/com/damnhandy/uri/template/VarExploder.html) implementations are ONLY invoked when the explode modifier "*" is declared in the URI Template expression. If the variable declaration does not specify the explode modifier, an exception is raised.
License
-------
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 3a04c231..00000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Maven
-# Build your Java project and run tests with Apache Maven.
-# Add steps that analyze code, save build artifacts, deploy, and more:
-# https://docs.microsoft.com/azure/devops/pipelines/languages/java
-
-trigger:
-- master
-
-pool:
- vmImage: 'Ubuntu-16.04'
-
-steps:
-- task: Maven@3
- inputs:
- mavenPomFile: 'pom.xml'
- mavenOptions: '-Xmx3072m'
- javaHomeOption: 'JDKVersion'
- jdkVersionOption: '1.11'
- jdkArchitectureOption: 'x64'
- publishJUnitResults: false
- testResultsFiles: '**/surefire-reports/TEST-*.xml'
- goals: 'package'
diff --git a/buildtools/bin/submodule.sh b/buildtools/bin/submodule.sh
deleted file mode 100644
index 1b0c74c9..00000000
--- a/buildtools/bin/submodule.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-git submodule update --init --recursive
\ No newline at end of file
diff --git a/config/checkstyle.xml b/config/checkstyle.xml
deleted file mode 100644
index 71155689..00000000
--- a/config/checkstyle.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/config/eclipse/code-format.xml b/config/eclipse/code-format.xml
deleted file mode 100755
index 080378f6..00000000
--- a/config/eclipse/code-format.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/config/eclipse/code-template.xml b/config/eclipse/code-template.xml
deleted file mode 100755
index bf845755..00000000
--- a/config/eclipse/code-template.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-/*
- *
- *
- */
-${package_declaration}
-
-${typecomment}
-${type_declaration}// FIXME
-log.error("Error", ${exception_var});// FIXME ${enclosing_method}
-${body_statement}// FIXME ${enclosing_type} constructor
-${body_statement}return ${field};${field} = ${param};
\ No newline at end of file
diff --git a/maven/maven-wrapper.jar b/maven/maven-wrapper.jar
deleted file mode 100644
index 18ba302c..00000000
Binary files a/maven/maven-wrapper.jar and /dev/null differ
diff --git a/maven/maven-wrapper.properties b/maven/maven-wrapper.properties
deleted file mode 100644
index 650545ad..00000000
--- a/maven/maven-wrapper.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Maven download properties
-#Thu Dec 17 16:24:38 EST 2015
-distributionUrl=https\://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
diff --git a/mvnw b/mvnw
deleted file mode 100755
index 2275ac76..00000000
--- a/mvnw
+++ /dev/null
@@ -1,234 +0,0 @@
-#!/bin/sh
-# ----------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
-#
-# Required ENV vars:
-# ------------------
-# JAVA_HOME - location of a JDK home dir
-#
-# Optional ENV vars
-# -----------------
-# M2_HOME - location of maven2's installed home dir
-# MAVEN_OPTS - parameters passed to the Java VM when running Maven
-# e.g. to debug Maven itself, use
-# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
-
-if [ -z "$MAVEN_SKIP_RC" ] ; then
-
- if [ -f /etc/mavenrc ] ; then
- . /etc/mavenrc
- fi
-
- if [ -f "$HOME/.mavenrc" ] ; then
- . "$HOME/.mavenrc"
- fi
-
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-mingw=false
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- MINGW*) mingw=true;;
- Darwin*) darwin=true
- #
- # Look for the Apple JDKs first to preserve the existing behaviour, and then look
- # for the new JDKs provided by Oracle.
- #
- if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
- #
- # Apple JDKs
- #
- export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
- fi
-
- if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
- #
- # Apple JDKs
- #
- export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
- fi
-
- if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
- #
- # Oracle JDKs
- #
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
- fi
-
- if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
- #
- # Apple JDKs
- #
- export JAVA_HOME=`/usr/libexec/java_home`
- fi
- ;;
-esac
-
-if [ -z "$JAVA_HOME" ] ; then
- if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=`java-config --jre-home`
- fi
-fi
-
-if [ -z "$M2_HOME" ] ; then
- ## resolve links - $0 may be a link to maven's home
- PRG="$0"
-
- # need this for relative symlinks
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
-
- saveddir=`pwd`
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd "$saveddir"
- # echo Using m2 at $M2_HOME
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --unix "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For Migwn, ensure paths are in UNIX format before anything is touched
-if $mingw ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME="`(cd "$M2_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
- # TODO classpath?
-fi
-
-if [ -z "$JAVA_HOME" ]; then
- javaExecutable="`which javac`"
- if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
- if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
- if $darwin ; then
- javaHome="`dirname \"$javaExecutable\"`"
- javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
- else
- javaExecutable="`readlink -f \"$javaExecutable\"`"
- fi
- javaHome="`dirname \"$javaExecutable\"`"
- javaHome=`expr "$javaHome" : '\(.*\)/bin'`
- JAVA_HOME="$javaHome"
- export JAVA_HOME
- fi
- fi
-fi
-
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD="`which java`"
- fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly." >&2
- echo " We cannot execute $JAVACMD" >&2
- exit 1
-fi
-
-if [ -z "$JAVA_HOME" ] ; then
- echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-fi
-
-# traverses directory structure from process work directory to filesystem root
-# first directory with .mvn subdirectory is considered project base directory
-find_maven_basedir() {
- local basedir=$(pwd)
- local wdir=$(pwd)
- while [ "$wdir" != '/' ] ; do
- wdir=$(cd "$wdir/.."; pwd)
- if [ -d "$wdir"/.mvn ] ; then
- basedir=$wdir
- break
- fi
- done
- echo "${basedir}"
-}
-
-# concatenates all lines of a file
-concat_lines() {
- if [ -f "$1" ]; then
- echo "$(tr -s '\n' ' ' < "$1")"
- fi
-}
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
-
-# Provide a "standardized" way to retrieve the CLI args that will
-# work with both Windows and non-Windows executions.
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
-export MAVEN_CMD_LINE_ARGS
-
-WRAPPER_LAUNCHER="org.apache.maven.wrapper.MavenWrapperMain"
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- -classpath \
-"$MAVEN_PROJECTBASEDIR/maven/maven-wrapper.jar" \
- ${WRAPPER_LAUNCHER} "$@"
diff --git a/mvnw.bat b/mvnw.bat
deleted file mode 100755
index f8ede7fc..00000000
--- a/mvnw.bat
+++ /dev/null
@@ -1,174 +0,0 @@
-@REM ----------------------------------------------------------------------------
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM ----------------------------------------------------------------------------
-
-@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
-@REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
-@REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-@REM ----------------------------------------------------------------------------
-
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
-@echo off
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
-
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-
-@REM Execute a user defined script before this one
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
-:skipRcPre
-
-@setlocal
-
-set ERROR_CODE=0
-
-@REM To isolate internal variables from possible post scripts, we use another setlocal
-@setlocal
-
-@REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo Error: JAVA_HOME not found in your environment. >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-:OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
-
-echo.
-echo Error: JAVA_HOME is set to an invalid directory. >&2
-echo JAVA_HOME = "%JAVA_HOME%" >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-:chkMHome
-if not "%M2_HOME%"=="" goto valMHome
-
-SET "M2_HOME=%~dp0.."
-if not "%M2_HOME%"=="" goto valMHome
-
-echo.
-echo Error: M2_HOME not found in your environment. >&2
-echo Please set the M2_HOME variable in your environment to match the >&2
-echo location of the Maven installation. >&2
-echo.
-goto error
-
-:valMHome
-
-:stripMHome
-if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd
-set "M2_HOME=%M2_HOME:~0,-1%"
-goto stripMHome
-
-:checkMCmd
-if exist "%M2_HOME%\bin\mvn.cmd" goto init
-
-echo.
-echo Error: M2_HOME is set to an invalid directory. >&2
-echo M2_HOME = "%M2_HOME%" >&2
-echo Please set the M2_HOME variable in your environment to match the >&2
-echo location of the Maven installation >&2
-echo.
-goto error
-@REM ==== END VALIDATION ====
-
-:init
-
-set MAVEN_CMD_LINE_ARGS=%*
-
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
-@REM Fallback to current working directory if not found.
-
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
-
-set EXEC_DIR=%CD%
-set WDIR=%EXEC_DIR%
-:findBaseDir
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
-cd ..
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
-set WDIR=%CD%
-goto findBaseDir
-
-:baseDirFound
-set MAVEN_PROJECTBASEDIR=%WDIR%
-cd "%EXEC_DIR%"
-goto endDetectBaseDir
-
-:baseDirNotFound
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
-cd "%EXEC_DIR%"
-
-:endDetectBaseDir
-
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
-
-@setlocal EnableExtensions EnableDelayedExpansion
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
-
-:endReadAdditionalConfig
-
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\maven\maven-wrapper.jar"
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
-
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index e648205c..b5b24ed7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,38 +1,51 @@
-
+
+
4.0.0
+
- org.sonatype.oss
- oss-parent
- 7
+ io.wcm.maven
+ io.wcm.maven.global-parent
+ 75
- com.damnhandy
- handy-uri-templates
- 2.1.9-SNAPSHOT
- bundle
- Handy URI Templates
- Handy URI Templates is a RFC6570 compliant URI template processor. The library allows clients to
+
+ io.wcm.caravan
+ wcm-io-handy-uri-templates
+ 2.2.0-SNAPSHOT
+
+ wcm.io Caravan Handy URI Templates
+
+ Handy URI Templates is a RFC6570 compliant URI template processor. The library allows clients to
utilize templatized URIs and inject replacement variables to expand the template into a URI. The library sports
a fluent API, ability to plugin custom object renderers, and supports all levels of URI templates.
-
- 4.5.12
+ 11
+ 7.2.3
2.11.0
- UTF-8
- 4.0.0
- 0.8.5
- 3.2.0
- 2.10.6
- https://github.com/damnhandy/Handy-URI-Templates
+ https://github.com/wcm-io-caravan/Handy-URI-Templates
+
- https://github.com/damnhandy/Handy-URI-Templates.git
- scm:git:git@github.com:damnhandy/Handy-URI-Templates.git
- scm:git:git@github.com:damnhandy/Handy-URI-Templates.git
- handy-uri-templates-2.1.7
-
+ https://github.com/wcm-io-caravan/Handy-URI-Templates.git
+ scm:git:git@github.com:wcm-io-caravan/Handy-URI-Templates.git
+ scm:git:git@github.com:wcm-io-caravan/Handy-URI-Templates.git
+ HEAD
+
+
+
+ Github Issues
+ https://github.com/wcm-io-caravan/Handy-URI-Templates/issues
+
+
+
+ GitHub Actions
+ https://github.com/wcm-io-caravan/Handy-URI-Templates/actions
+
+
The Apache Software License, Version 2.0
@@ -40,559 +53,116 @@
repo
- 2012-04-30
+
+ 2012
+
- https://github.com/damnhandy/Handy-URI-Templates
- Ryan J. McDonough
+ wcm.io Caravan
+ https://caravan.wcm.io
-
- travis-ci
- https://travis-ci.org/damnhandy/Handy-URI-Templates
-
-
- Github Issues
- https://github.com/damnhandy/Handy-URI-Templates/issues
-
+
Ryan J. McDonough
ryan@damnhandy.com
http://www.damnhandy.com/
+
+ wcm.io Community
+ wcm.io
+ https://wcm.io
+
-
-
- sonatype-nexus-staging
- Sonatype Release
- https://oss.sonatype.org/service/local/staging/deploy/maven2
-
-
- sonatype-nexus-snapshots
- sonatype-nexus-snapshots
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- github.com
- gitsite:git@github.com/damnhandy/Handy-URI-Templates.git
-
-
-
-
-
-
- org.apache.maven.scm
- maven-scm-provider-gitexe
- 1.11.2
-
-
- org.apache.maven.scm
- maven-scm-manager-plexus
- 1.11.2
-
-
- org.kathrynhuxtable.maven.wagon
- wagon-gitsite
- 0.3.1
-
-
-
-
- org.apache.maven.plugins
- maven-release-plugin
- 2.5.3
-
-
- pl.project13.maven
- git-commit-id-plugin
- 4.0.0
-
-
-
- revision
-
-
-
-
- git
- false
- true
- ${project.build.outputDirectory}/git.properties
-
- git.build.host
-
-
-
-
-
- com.rimerosolutions.maven.plugins
- wrapper-maven-plugin
- 0.7.7
- false
-
- 3.6.1
-
-
-
- org.apache.maven.plugins
- maven-doap-plugin
- 1.2
+ biz.aQute.bnd
+ bnd-maven-plugin
+ ${bnd.version}
-
-
- ${project.issueManagement.url}
- library
- ${project.inceptionYear}-01-01
- ${project.description}
- ${project.distributionManagement.downloadUrl}
- ${project.url}
- ${project.licenses[0].url}
- ${project.url}/mail-lists.html
- ${project.name}
- Java
- ${project.description}
- ${project.organization.name}
-
+
+
+ Bundle-Developers:
+
+ -exportcontents: ${packages;VERSIONED}
+
+ -snapshot: SNAPSHOT
+
+ -removeheaders: Private-Package
+
+ -noextraheaders: true
+
+ -noimportjava: true
+
-
-
-
- org.jacoco
- jacoco-maven-plugin
- ${jacoco.version}
- default-prepare-agent
-
- prepare-agent
-
-
-
- default-report
-
- report
-
-
-
- default-check
-
- check
-
-
-
-
- BUNDLE
-
-
- COMPLEXITY
- COVEREDRATIO
- 0.76
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- 2.8.2
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 1.6.0
-
-
- initialize
- invoke_build
-
- exec
-
-
-
-
- /bin/sh
-
- buildtools/bin/submodule.sh
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- 4.2.0
- true
-
-
- ${project.groupId}.${project.artifactId}
- ${project.artifactId}
-
-
-
-
-
- org.apache.maven.plugins
- maven-site-plugin
- 3.9.0
-
-
- lt.velykis.maven.skins
- reflow-velocity-tools
- 1.1.1
-
-
-
- org.apache.velocity
- velocity
- 1.7
-
-
-
- org.apache.maven.doxia
- doxia-module-markdown
- 1.8
-
-
-
-
-
- attach-descriptor
-
- attach-descriptor
-
+ bnd-process
+
+ bnd-process
+
+
+
+
org.apache.maven.plugins
maven-jar-plugin
- 3.2.0
-
- true
-
- false
-
-
- development
- ${project.url}
- value
- com.damnhandy.uri.template
-
-
-
+
+ ${project.build.outputDirectory}/META-INF/MANIFEST.MF
+
+
+
org.apache.maven.plugins
maven-javadoc-plugin
- ${javadoc.plugin}
- 1.7
- UTF-8
- 1g
-
- http://docs.oracle.com/javase/7/docs/api/
-
+ none
+ false
-
-
- com.github.spotbugs
- spotbugs-maven-plugin
- ${spotbugs.plugin}
-
-
-
- com.github.spotbugs
- spotbugs
- ${spotbugs.plugin}
-
-
-
- Max
- Max
- true
-
-
-
-
- check
-
-
-
-
-
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
-
- org.codehaus.mojo
-
-
- exec-maven-plugin
-
-
- [1.2.1,)
-
-
- exec
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
org.apache.maven.plugins
- maven-project-info-reports-plugin
- 2.9
-
-
-
- summary
- modules
- project-team
- mailing-list
- cim
- issue-tracking
- license
- scm
-
-
-
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
- 3.13.0
-
-
-
- /rulesets/java/android.xml
- /rulesets/java/design.xml
- /rulesets/java/basic.xml
- /rulesets/java/braces.xml
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${javadoc.plugin}
-
-
- org.jacoco
- jacoco-maven-plugin
- ${jacoco.version}
-
-
-
-
- report
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-report-plugin
- 2.22.1
-
-
-
-
- org.codehaus.mojo
- jdepend-maven-plugin
- 2.0
-
-
- org.codehaus.mojo
- taglist-maven-plugin
- 2.4
-
-
- com.github.spotbugs
- spotbugs-maven-plugin
- ${spotbugs.plugin}
+ maven-surefire-plugin
- true
-
- target/site
+
+ **/*Test.java
+ **/Test*.java
+ **/*Tests.java
+
-
-
-
-
-
-
- buildWithJava8
-
- [1.8,)
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${javadoc.plugin}
-
- -Xdoclint:none
- 1.7
- UTF-8
- 1g
-
- http://docs.oracle.com/javase/7/docs/api/
-
-
-
-
- attach-javadocs
-
- jar
-
-
- -Xdoclint:none
-
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${javadoc.plugin}
-
- -Xdoclint:none
- 1.7
- UTF-8
- 1g
-
- http://docs.oracle.com/javase/7/docs/api/
-
-
-
-
-
-
-
-
- release-sign-artifacts
-
-
- performRelease
- true
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 1.6
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
-
-
+
@@ -600,17 +170,17 @@
junit
junit
- 4.13.1
+ 4.13.2
test
-
com.fasterxml.jackson.core
jackson-core
${jackson.version}
true
+ compile
@@ -618,6 +188,7 @@
jackson-databind
${jackson.version}
true
+ compile
@@ -625,15 +196,9 @@
jackson-annotations
${jackson.version}
true
+ compile
-
-
-
-
-
-
-
com.ning
@@ -644,7 +209,7 @@
org.apache.httpcomponents
httpclient
- ${http.client}
+ 4.5.12
test
@@ -652,7 +217,61 @@
joda-time
joda-time
- ${joda.version}
+ 2.10.6
+ compile
+
+
+
+
+ org.osgi
+ org.osgi.annotation.versioning
+ 1.1.2
+ provided
+
+
+
+
+
+ release-profile
+
+
+ performRelease
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ true
+
+
+ sign-artifacts
+
+ sign
+
+ verify
+
+
+
+
+
+ org.sonatype.central
+ central-publishing-maven-plugin
+ true
+ true
+
+ sonatype-central
+ ${project.artifactId} ${project.version}
+
+
+
+
+
+
+
diff --git a/src/main/java/com/damnhandy/uri/template/jackson/datatype/package-info.java b/src/main/java/com/damnhandy/uri/template/jackson/datatype/package-info.java
index ebf560bc..fff760dd 100644
--- a/src/main/java/com/damnhandy/uri/template/jackson/datatype/package-info.java
+++ b/src/main/java/com/damnhandy/uri/template/jackson/datatype/package-info.java
@@ -29,6 +29,5 @@
* @author Ryan J. McDonough
* @version $Revision: 1.1 $
*/
-package com.damnhandy.uri.template.jackson.datatype;
-
-
+@org.osgi.annotation.versioning.Version("2.1.8")
+package com.damnhandy.uri.template.jackson.datatype;
\ No newline at end of file
diff --git a/src/main/java/com/damnhandy/uri/template/package-info.java b/src/main/java/com/damnhandy/uri/template/package-info.java
index 1014c16c..50a97ba9 100644
--- a/src/main/java/com/damnhandy/uri/template/package-info.java
+++ b/src/main/java/com/damnhandy/uri/template/package-info.java
@@ -8,4 +8,5 @@
* @since 1.0.0
* @author Ryan J. McDonough
*/
+@org.osgi.annotation.versioning.Version("2.1.8")
package com.damnhandy.uri.template;
\ No newline at end of file
diff --git a/src/site/markdown/basic_usage.md b/src/site/markdown/basic_usage.md
deleted file mode 100644
index e51d10ae..00000000
--- a/src/site/markdown/basic_usage.md
+++ /dev/null
@@ -1 +0,0 @@
-## Basic Usage
\ No newline at end of file
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
deleted file mode 100644
index 0b3c6d85..00000000
--- a/src/site/markdown/index.md
+++ /dev/null
@@ -1,185 +0,0 @@
-## What is it?
-
-Handy URI Templates is a uritemplate processor implementing [RFC6570](http://tools.ietf.org/html/rfc6570) written in
-Java. If you are looking for a non-Java implementation, please check the
-[RFC6570 implementations page](http://code.google.com/p/uri-templates/wiki/Implementations). The current
-implementation is based on final realease of the uri template spec. The template processor supports the
-following features:
-
-* Fluent Java API for manipulating uritemplates
-* Supports up to [level 4 template expressions](http://tools.ietf.org/html/rfc6570#section-1.2) including prefix and explode modifiers
-* Java objects as template values
-* Support for rendering date values
-* Template expression validation
-* Custom object expanders
-
-As of version `1.1.1`, Handy URI Templates is passes all tests defined by the
-[uritemplate-test](https://github.com/uri-templates/uritemplate-test) suite.
-
-## What's it used for?
-
-URI Templates are useful if your building a client or server application that is a using a media type that leverages
-URI Templates. Some examples are:
-
-* [JSON Hyper Schema](http://json-schema.org/)
-* [JSON Home Documents](http://tools.ietf.org/html/draft-nottingham-json-home-03)
-* [HAL - Hypertext Application Language](http://stateless.co/hal_specification.html)
-* [OpenSearch](http:/opensearch.org)
-
-URI Templates can even used by themselves as a convenient means of parameterizing URLs.
-
-## Usage
-
-### Project Set Up
-
-To use the library in your project, simply add the following to your projects pom:
-
-```xml
-
- com.damnhandy
- handy-uri-templates
- ${version}
-
-```
-
-The latest version is: [](https://maven-badges.herokuapp.com/maven-central/com.damnhandy/handy-uri-templates)
-
-
-You can also download the artifact directly at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Chandy-uri-templates)
-
-
-### Using the API
-
-Using the library is simple:
-
-```java
-String uri = UriTemplate.fromTemplate("/{foo:1}{/foo,thing*}{?query,test2}")
- .set("foo", "houses")
- .set("query", "Ask something")
- .set("test2", "something else")
- .set("thing", "A test")
- .expand();
-```
-
-This will result in the following URI:
-
- "/h/houses/A%20test?query=Ask%20something&test2=someting%20else"
-
-You can see more examples in some of the [unit tests](https://github.com/damnhandy/Handy-URI-Templates/blob/master/src/test/java/com/damnhandy/uri/template/TestBasicUsage.java) or
-you can read more in the [JavaDocs](http://damnhandy.github.com/Handy-URI-Templates/apidocs/index.html).
-
-### Using with HTTP Clients
-
-The API can be used with existing HTTP frameworks like the most excellent [Async Http Client](https://github.com/sonatype/async-http-client). Using the [GitHub API](http://developer.github.com/v3/repos/commits/), we can use the a `UriTemplate` to create a URI to look at this repository:
-
-```java
-RequestBuilder builder = new RequestBuilder("GET");
-Request request = builder.setUrl(
- UriTemplate.fromTemplate("https://api.github.com/repos{/user,repo,function,id}")
- .set("user", "damnhandy")
- .set("repo", "Handy-URI-Templates")
- .set("function","commits")
- .expand()).build();
-```
-
-When `Request.getUrl()` is called, it will return:
-
- "https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits"
-
-Please have a look at the example [test case](https://github.com/damnhandy/Handy-URI-Templates/blob/master/src/test/java/com/damnhandy/uri/template/examples/TestGitHubApis.java) for more details.
-
-Usage with the [Apache HTTP Client](http://hc.apache.org/httpcomponents-client-ga/index.html) is just as similar.
-
-### Supported Value Types
-
-While the `set()` method of the [UriTemplate](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/UriTemplate.html) accepts any Java object, the following Java types are preferred:
-
-* primitive and Object types such as:
- * int & Integer
- * double & Double
- * char & Character
- * float & Float
- * double & Double
- * short & Short
- * long & Long
-* Arrays of the above types
-* java.util.List<Object>
-* java.util.Map<String, Object%gt;
-* java.util.Date. Dates will be formatted using the templates default formatter.
-* Anything with a `toString()` method
-
-Values that are not strings are rendered into the URI by calling its `toString()` method. Java objects can be treated as composite objects (as name/value pairs) when the variable specifies the explode modifier (see Composite Value below). A `char[]` or `Character[]` array will be treated as String. A multi dimensional character array will be treated as a List of Strings.
-
-### Unsupported Value Types
-
-The template processor will not accept the following types of value combinations:
-
-* with the exception of character arrays, multi dimensional arrays are not supported.
-* Collections of Collections
-* Maps that have values of type array, Collection, or Map.
-
-If you need such data structures in a URI, consider implementing your own `VarExploder` to handle it.
-
-### Composite Values
-
-The URI Template spec supports [composite values](http://tools.ietf.org/html/rfc6570#section-2.4.2) where the variable may be a list of values of an associative array of (name, value) pairs. The template processor always treats lists as java.util.List and name/value pairs as a java.util.Map. Lists and Maps work with any supported type that is not anoth List, Map, or array.
-
-### POJOs as Composite Values
-
-The template process can treat simple Java objects as composite value. When a POJO is set on a template variable and the variable specifies the an explode modifier "*", a [VarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/VarExploder.html) is invoked. The purpose of the `VarExploder` is to expose the object properties as name/value pairs.
-
-For most use cases, the [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/DefaultVarExploder.html) should be sufficient. The `DefaultVarExploder` is a VarExploder implementation that takes in a Java object and extracts the properties for use in a URI Template. This class is called by default when a POJO is passed into the UriTemplate and the explode modifier is present on the variable. Given the following URI template expression:
-
- /mapper{?address*}
-
-And this Java object for an address:
-
-```java
-Address address = new Address();
-address.setState("CA");
-address.setCity("Newport Beach");
-String result = UriTemplate.fromTemplate("/mapper{?address*}")
- .set("address", address)
- .expand();
-```
-
-The expanded URI will be:
-
- /mapper?city=Newport%20Beach&state=CA
-
-The [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/DefaultVarExploder.html) breaks down the object properties as follows:
-
-* All properties that contain a non-null return value will be included
-* Getters or fields annotated with `@UriTransient` will be excluded
-* By default, the property name is used as the label in the URI. This can be overridden by placing the `@VarName` annotation on the field or getter method and specifying a name.
-* Field level annotation take priority of getter annotations
-* Property names are sorted in the order that they are found in the target class.
-
-Please refer to the JavaDoc for more details on how the `DefaultVarExploder` works.
-
-Should the [DefaultVarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/DefaultVarExploder.html) not be suitable for your needs, custom [VarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/VarExploder.html) implementations can be added by rolling your own implementation. A custom VarExploder implementation can be used by wrapping your object in your implementation:
-
-```java
-UriTemplate.fromTemplate("/mapper{?address*}")
- .set("address", new MyCustomVarExploder(address))
- .expand();
-```
-
-Note: All [VarExploder](http://damnhandy.github.com/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/VarExploder.html) implementations are ONLY invoked when the explode modifier "*" is declared in the URI Template expression. If the variable declaration does not specify the explode modifier, an exception is raised.
-
-License
--------
-
- Copyright 2011-2016 Ryan J. McDonough
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/src/site/markdown/uri_template_builder.md b/src/site/markdown/uri_template_builder.md
deleted file mode 100644
index 5dfb4585..00000000
--- a/src/site/markdown/uri_template_builder.md
+++ /dev/null
@@ -1,42 +0,0 @@
-## URI Template Builder
-
-
-The `UriTemplateBuilder` API was added to make it easier to programatically construct URI templates. It's used like this:
-
-```java
-UriTemplate template =
- UriTemplate.buildFromTemplate("http://example.com")
- .literal("/foo")
- .path(var("thing1"),var("explodedThing", true))
- .fragment(var("prefix", 2))
- .build();
-```
-
-This will yield the following URL template string:
-
- "http://example.com/foo{/thing1,explodedThing*}{#prefix:2}"
-
-
-You can also use the `UriTemplateBuilder` to build new templates from other templates like so:
-
-```java
- UriTemplate rootTemplate = UriTemplate.fromTemplate("http://example.com/foo{/thing1}");
-
- UriTemplate template = UriTemplate.buildFromTemplate(rootTemplate)
- .path(var("explodedThing", true))
- .fragment(var("prefix", 2))
- .build();
-
- Assert.assertEquals("http://example.com/foo{/thing1}{/explodedThing*}{#prefix:2}", template.getTemplate());
-```
-
-This will get you:
-
- "http://example.com/foo{/thing1}{/explodedThing*}{#prefix:2}"
-
-The API is fairly flexible and pretty useful for constructing URI templates. Have a gander at the
-[Java Docs](http://damnhandy.github.io/Handy-URI-Templates/apidocs/com/damnhandy/uri/template/UriTemplateBuilder.html) for more
-details.
-
-
-
diff --git a/src/site/site.xml b/src/site/site.xml
deleted file mode 100644
index 54bd737e..00000000
--- a/src/site/site.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
- Handy URI Templates
- http://github.com/damnhandy/Handy-URI-Templates/
-
-
-
-
- UA-1402675-6
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.5
-
-
-
- true
- false
-
-
-
- false
- true
- bootswatch-cyborg
- true
- github
- http://damnhandy.github.io/Handy-URI-Templates/
-
-
- Handy URI Templates
- ]]>
- http://damnhandy.github.io/Handy-URI-Templates/
-
- Handy URI Templates is a RFC6570 compliant URI template
- processor.
-
- %2$s | %1$s
-
- top
- 6
-
- Documentation|Tools|Contribute
-
-
- Main|Tools
- Download|Contribute
- Documentation
- reports
-
-
- RFC6570 compliant URI
- template processor. The library allows clients to
- utilize templatized URIs and inject replacement variables to expand the template into a URI.
- The library sports a fluent API, ability to plugin custom object renderers, and supports all
- levels of URI templates.
- ]]>
-
-
-
-
- Handy URI Templates
-
- false
-
- false
- false
-
-
- 2
-
-
-
-
-
- false
-
-
-
- false
-
-
- false
- false
-
-
- false
- false
-
-
-
- false
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/test/java/com/damnhandy/uri/template/examples/TestTwitterSearchApi.java b/src/test/java/com/damnhandy/uri/template/examples/TestTwitterSearchApi.java
index 8358c234..cae11002 100644
--- a/src/test/java/com/damnhandy/uri/template/examples/TestTwitterSearchApi.java
+++ b/src/test/java/com/damnhandy/uri/template/examples/TestTwitterSearchApi.java
@@ -21,6 +21,7 @@
import org.junit.Assert;
import org.junit.Assume;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import java.net.InetAddress;
@@ -32,6 +33,7 @@
* @author Ryan J. McDonough
* @version $Revision: 1.1 $
*/
+@Ignore
public class TestTwitterSearchApi extends AbstractExampleTest
{
diff --git a/uritemplate-test b/uritemplate-test
deleted file mode 160000
index 520fdd8b..00000000
--- a/uritemplate-test
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 520fdd8b0f78779d12178c357a986e0e727f4bd0
diff --git a/uritemplate-test/README.md b/uritemplate-test/README.md
new file mode 100644
index 00000000..3eb519da
--- /dev/null
+++ b/uritemplate-test/README.md
@@ -0,0 +1,90 @@
+
+URI Template Tests
+==================
+
+This is a set of tests for implementations of
+[RFC6570](http://tools.ietf.org/html/rfc6570) - URI Template. It is designed
+to be reused by any implementation, to improve interoperability and
+implementation quality.
+
+If your project uses Git for version control, you can make uritemplate-tests into a [submodule](http://help.github.com/submodules/).
+
+Test Format
+-----------
+
+Each test file is a [JSON](http://tools.ietf.org/html/RFC6627) document
+containing an object whose properties are groups of related tests.
+Alternatively, all tests are available in XML as well, with the XML files
+being generated by transform-json-tests.xslt which uses json2xml.xslt as a
+general-purpose JSON-to-XML parsing library.
+
+Each group, in turn, is an object with three children:
+
+* level - the level of the tests covered, as per the RFC (optional; if absent,
+ assume level 4).
+* variables - an object representing the variables that are available to the
+ tests in the suite
+* testcases - a list of testcases, where each case is a two-member list, the
+ first being the template, the second being the result of expanding the
+ template with the provided variables.
+
+Note that the result string can be a few different things:
+
+* string - if the second member is a string, the result of expansion is
+ expected to match it, character-for-character.
+* list - if the second member is a list of strings, the result of expansion
+ is expected to match one of them; this allows for templates that can
+ expand into different, equally-acceptable URIs.
+* false - if the second member is boolean false, expansion is expected to
+ fail (i.e., the template was invalid).
+
+For example:
+
+ {
+ "Level 1 Examples" :
+ {
+ "level": 1,
+ "variables": {
+ "var" : "value",
+ "hello" : "Hello World!"
+ },
+ "testcases" : [
+ ["{var}", "value"],
+ ["{hello}", "Hello%20World%21"]
+ ]
+ }
+ }
+
+
+Tests Included
+--------------
+
+The following test files are included:
+
+* spec-examples.json - The complete set of example templates from the RFC
+* spec-examples-by-section.json - The examples, section by section
+* extended-tests.json - more complex test cases
+* negative-tests.json - invalid templates
+
+For all these test files, XML versions with the names *.xml can be
+generated with the transform-json-tests.xslt XSLT stylesheet. The XSLT
+contains the names of the above test files as a parameter, and can be
+started with any XML as input (i.e., the XML input is ignored).
+
+License
+-------
+
+ Copyright 2011-2012 The Authors
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/uritemplate-test/extended-tests.json b/uritemplate-test/extended-tests.json
new file mode 100644
index 00000000..300345e7
--- /dev/null
+++ b/uritemplate-test/extended-tests.json
@@ -0,0 +1,147 @@
+{
+ "Additional Examples 1":{
+ "level":4,
+ "variables":{
+ "id" : "person",
+ "token" : "12345",
+ "fields" : ["id", "name", "picture"],
+ "format" : "json",
+ "q" : "URI Templates",
+ "page" : "5",
+ "lang" : "en",
+ "geocode" : ["37.76","-122.427"],
+ "first_name" : "John",
+ "last.name" : "Doe",
+ "Some%20Thing" : "foo",
+ "number" : 6,
+ "long" : 37.76,
+ "lat" : -122.427,
+ "group_id" : "12345",
+ "query" : "PREFIX dc: SELECT ?book ?who WHERE { ?book dc:creator ?who }",
+ "uri" : "http://example.org/?uri=http%3A%2F%2Fexample.org%2F",
+ "word" : "drücken",
+ "Stra%C3%9Fe" : "Grüner Weg",
+ "random" : "šö䟜ñꀣ¥‡ÑÒÓÔÕÖרÙÚàáâãäåæçÿ",
+ "assoc_special_chars" :
+ { "šö䟜ñꀣ¥‡ÑÒÓÔÕ" : "ÖרÙÚàáâãäåæçÿ" }
+ },
+ "testcases":[
+
+ [ "{/id*}" , "/person" ],
+ [ "{/id*}{?fields,first_name,last.name,token}" , [
+ "/person?fields=id,name,picture&first_name=John&last.name=Doe&token=12345",
+ "/person?fields=id,picture,name&first_name=John&last.name=Doe&token=12345",
+ "/person?fields=picture,name,id&first_name=John&last.name=Doe&token=12345",
+ "/person?fields=picture,id,name&first_name=John&last.name=Doe&token=12345",
+ "/person?fields=name,picture,id&first_name=John&last.name=Doe&token=12345",
+ "/person?fields=name,id,picture&first_name=John&last.name=Doe&token=12345"]
+ ],
+ ["/search.{format}{?q,geocode,lang,locale,page,result_type}",
+ [ "/search.json?q=URI%20Templates&geocode=37.76,-122.427&lang=en&page=5",
+ "/search.json?q=URI%20Templates&geocode=-122.427,37.76&lang=en&page=5"]
+ ],
+ ["/test{/Some%20Thing}", "/test/foo" ],
+ ["/set{?number}", "/set?number=6"],
+ ["/loc{?long,lat}" , "/loc?long=37.76&lat=-122.427"],
+ ["/base{/group_id,first_name}/pages{/page,lang}{?format,q}","/base/12345/John/pages/5/en?format=json&q=URI%20Templates"],
+ ["/sparql{?query}", "/sparql?query=PREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%20SELECT%20%3Fbook%20%3Fwho%20WHERE%20%7B%20%3Fbook%20dc%3Acreator%20%3Fwho%20%7D"],
+ ["/go{?uri}", "/go?uri=http%3A%2F%2Fexample.org%2F%3Furi%3Dhttp%253A%252F%252Fexample.org%252F"],
+ ["/service{?word}", "/service?word=dr%C3%BCcken"],
+ ["/lookup{?Stra%C3%9Fe}", "/lookup?Stra%C3%9Fe=Gr%C3%BCner%20Weg"],
+ ["{random}" , "%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"],
+ ["{?assoc_special_chars*}", "?%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95=%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"]
+ ]
+ },
+ "Additional Examples 2":{
+ "level":4,
+ "variables":{
+ "id" : ["person","albums"],
+ "token" : "12345",
+ "fields" : ["id", "name", "picture"],
+ "format" : "atom",
+ "q" : "URI Templates",
+ "page" : "10",
+ "start" : "5",
+ "lang" : "en",
+ "geocode" : ["37.76","-122.427"]
+ },
+ "testcases":[
+
+ [ "{/id*}" , ["/person/albums","/albums/person"] ],
+ [ "{/id*}{?fields,token}" , [
+ "/person/albums?fields=id,name,picture&token=12345",
+ "/person/albums?fields=id,picture,name&token=12345",
+ "/person/albums?fields=picture,name,id&token=12345",
+ "/person/albums?fields=picture,id,name&token=12345",
+ "/person/albums?fields=name,picture,id&token=12345",
+ "/person/albums?fields=name,id,picture&token=12345",
+ "/albums/person?fields=id,name,picture&token=12345",
+ "/albums/person?fields=id,picture,name&token=12345",
+ "/albums/person?fields=picture,name,id&token=12345",
+ "/albums/person?fields=picture,id,name&token=12345",
+ "/albums/person?fields=name,picture,id&token=12345",
+ "/albums/person?fields=name,id,picture&token=12345"]
+ ]
+ ]
+ },
+ "Additional Examples 3: Empty Variables":{
+ "variables" : {
+ "empty_list" : [],
+ "empty_assoc" : {}
+ },
+ "testcases":[
+ [ "{/empty_list}", [ "" ] ],
+ [ "{/empty_list*}", [ "" ] ],
+ [ "{?empty_list}", [ ""] ],
+ [ "{?empty_list*}", [ "" ] ],
+ [ "{?empty_assoc}", [ "" ] ],
+ [ "{?empty_assoc*}", [ "" ] ]
+ ]
+ },
+ "Additional Examples 4: Numeric Keys":{
+ "variables" : {
+ "42" : "The Answer to the Ultimate Question of Life, the Universe, and Everything",
+ "1337" : ["leet", "as","it", "can","be"],
+ "german" : {
+ "11": "elf",
+ "12": "zwölf"
+ }
+ },
+ "testcases":[
+ [ "{42}", "The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"],
+ [ "{?42}", "?42=The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"],
+ [ "{1337}", "leet,as,it,can,be"],
+ [ "{?1337*}", "?1337=leet&1337=as&1337=it&1337=can&1337=be"],
+ [ "{?german*}", [ "?11=elf&12=zw%C3%B6lf", "?12=zw%C3%B6lf&11=elf"] ]
+ ]
+ },
+ "Additional Examples 5: Explode Combinations":{
+ "variables" : {
+ "id" : "admin",
+ "token" : "12345",
+ "tab" : "overview",
+ "keys" : {
+ "key1": "val1",
+ "key2": "val2"
+ }
+ },
+ "testcases":[
+ [ "{?id,token,keys*}", [
+ "?id=admin&token=12345&key1=val1&key2=val2",
+ "?id=admin&token=12345&key2=val2&key1=val1"]
+ ],
+ [ "{/id}{?token,keys*}", [
+ "/admin?token=12345&key1=val1&key2=val2",
+ "/admin?token=12345&key2=val2&key1=val1"]
+ ],
+ [ "{?id,token}{&keys*}", [
+ "?id=admin&token=12345&key1=val1&key2=val2",
+ "?id=admin&token=12345&key2=val2&key1=val1"]
+ ],
+ [ "/user{/id}{?token,tab}{&keys*}", [
+ "/user/admin?token=12345&tab=overview&key1=val1&key2=val2",
+ "/user/admin?token=12345&tab=overview&key2=val2&key1=val1"]
+ ]
+ ]
+ }
+}
diff --git a/uritemplate-test/json2xml.xslt b/uritemplate-test/json2xml.xslt
new file mode 100644
index 00000000..59b3548c
--- /dev/null
+++ b/uritemplate-test/json2xml.xslt
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \b
+
+
+
+
+
+
+
+
+
+
+ \v
+
+
+
+
+ \f
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uritemplate-test/negative-tests.json b/uritemplate-test/negative-tests.json
new file mode 100644
index 00000000..552a6bf0
--- /dev/null
+++ b/uritemplate-test/negative-tests.json
@@ -0,0 +1,57 @@
+{
+ "Failure Tests":{
+ "level":4,
+ "variables":{
+ "id" : "thing",
+ "var" : "value",
+ "hello" : "Hello World!",
+ "with space" : "fail",
+ " leading_space" : "Hi!",
+ "trailing_space " : "Bye!",
+ "empty" : "",
+ "path" : "/foo/bar",
+ "x" : "1024",
+ "y" : "768",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "example" : "red",
+ "searchTerms" : "uri templates",
+ "~thing" : "some-user",
+ "default-graph-uri" : ["http://www.example/book/","http://www.example/papers/"],
+ "query" : "PREFIX dc: SELECT ?book ?who WHERE { ?book dc:creator ?who }"
+
+ },
+ "testcases":[
+ [ "{/id*", false ],
+ [ "/id*}", false ],
+ [ "{/?id}", false ],
+ [ "{var:prefix}", false ],
+ [ "{hello:2*}", false ] ,
+ [ "{??hello}", false ] ,
+ [ "{!hello}", false ] ,
+ [ "{with space}", false],
+ [ "{ leading_space}", false],
+ [ "{trailing_space }", false],
+ [ "{=path}", false ] ,
+ [ "{$var}", false ],
+ [ "{|var*}", false ],
+ [ "{*keys?}", false ],
+ [ "{?empty=default,var}", false ],
+ [ "{var}{-prefix|/-/|var}" , false ],
+ [ "?q={searchTerms}&c={example:color?}" , false ],
+ [ "x{?empty|foo=none}" , false ],
+ [ "/h{#hello+}" , false ],
+ [ "/h#{hello+}" , false ],
+ [ "{keys:1}", false ],
+ [ "{+keys:1}", false ],
+ [ "{;keys:1*}", false ],
+ [ "?{-join|&|var,list}" , false ],
+ [ "/people/{~thing}", false],
+ [ "/{default-graph-uri}", false ],
+ [ "/sparql{?query,default-graph-uri}", false ],
+ [ "/sparql{?query){&default-graph-uri*}", false ],
+ [ "/resolution{?x, y}" , false ]
+
+ ]
+ }
+}
\ No newline at end of file
diff --git a/uritemplate-test/spec-examples-by-section.json b/uritemplate-test/spec-examples-by-section.json
new file mode 100644
index 00000000..5aef1820
--- /dev/null
+++ b/uritemplate-test/spec-examples-by-section.json
@@ -0,0 +1,439 @@
+{
+ "3.2.1 Variable Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{count}", "one,two,three"],
+ ["{count*}", "one,two,three"],
+ ["{/count}", "/one,two,three"],
+ ["{/count*}", "/one/two/three"],
+ ["{;count}", ";count=one,two,three"],
+ ["{;count*}", ";count=one;count=two;count=three"],
+ ["{?count}", "?count=one,two,three"],
+ ["{?count*}", "?count=one&count=two&count=three"],
+ ["{&count*}", "&count=one&count=two&count=three"]
+ ]
+ },
+ "3.2.2 Simple String Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{var}", "value"],
+ ["{hello}", "Hello%20World%21"],
+ ["{half}", "50%25"],
+ ["O{empty}X", "OX"],
+ ["O{undef}X", "OX"],
+ ["{x,y}", "1024,768"],
+ ["{x,hello,y}", "1024,Hello%20World%21,768"],
+ ["?{x,empty}", "?1024,"],
+ ["?{x,undef}", "?1024"],
+ ["?{undef,y}", "?768"],
+ ["{var:3}", "val"],
+ ["{var:30}", "value"],
+ ["{list}", "red,green,blue"],
+ ["{list*}", "red,green,blue"],
+ ["{keys}", [
+ "comma,%2C,dot,.,semi,%3B",
+ "comma,%2C,semi,%3B,dot,.",
+ "dot,.,comma,%2C,semi,%3B",
+ "dot,.,semi,%3B,comma,%2C",
+ "semi,%3B,comma,%2C,dot,.",
+ "semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{keys*}", [
+ "comma=%2C,dot=.,semi=%3B",
+ "comma=%2C,semi=%3B,dot=.",
+ "dot=.,comma=%2C,semi=%3B",
+ "dot=.,semi=%3B,comma=%2C",
+ "semi=%3B,comma=%2C,dot=.",
+ "semi=%3B,dot=.,comma=%2C"
+ ]]
+ ]
+ },
+ "3.2.3 Reserved Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{+var}", "value"],
+ ["{/var,empty}", "/value/"],
+ ["{/var,undef}", "/value"],
+ ["{+hello}", "Hello%20World!"],
+ ["{+half}", "50%25"],
+ ["{base}index", "http%3A%2F%2Fexample.com%2Fhome%2Findex"],
+ ["{+base}index", "http://example.com/home/index"],
+ ["O{+empty}X", "OX"],
+ ["O{+undef}X", "OX"],
+ ["{+path}/here", "/foo/bar/here"],
+ ["{+path:6}/here", "/foo/b/here"],
+ ["here?ref={+path}", "here?ref=/foo/bar"],
+ ["up{+path}{var}/here", "up/foo/barvalue/here"],
+ ["{+x,hello,y}", "1024,Hello%20World!,768"],
+ ["{+path,x}/here", "/foo/bar,1024/here"],
+ ["{+list}", "red,green,blue"],
+ ["{+list*}", "red,green,blue"],
+ ["{+keys}", [
+ "comma,,,dot,.,semi,;",
+ "comma,,,semi,;,dot,.",
+ "dot,.,comma,,,semi,;",
+ "dot,.,semi,;,comma,,",
+ "semi,;,comma,,,dot,.",
+ "semi,;,dot,.,comma,,"
+ ]],
+ ["{+keys*}", [
+ "comma=,,dot=.,semi=;",
+ "comma=,,semi=;,dot=.",
+ "dot=.,comma=,,semi=;",
+ "dot=.,semi=;,comma=,",
+ "semi=;,comma=,,dot=.",
+ "semi=;,dot=.,comma=,"
+ ]]
+ ]
+ },
+ "3.2.4 Fragment Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{#var}", "#value"],
+ ["{#hello}", "#Hello%20World!"],
+ ["{#half}", "#50%25"],
+ ["foo{#empty}", "foo#"],
+ ["foo{#undef}", "foo"],
+ ["{#x,hello,y}", "#1024,Hello%20World!,768"],
+ ["{#path,x}/here", "#/foo/bar,1024/here"],
+ ["{#path:6}/here", "#/foo/b/here"],
+ ["{#list}", "#red,green,blue"],
+ ["{#list*}", "#red,green,blue"],
+ ["{#keys}", [
+ "#comma,,,dot,.,semi,;",
+ "#comma,,,semi,;,dot,.",
+ "#dot,.,comma,,,semi,;",
+ "#dot,.,semi,;,comma,,",
+ "#semi,;,comma,,,dot,.",
+ "#semi,;,dot,.,comma,,"
+ ]]
+ ]
+ },
+ "3.2.5 Label Expansion with Dot-Prefix" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{.who}", ".fred"],
+ ["{.who,who}", ".fred.fred"],
+ ["{.half,who}", ".50%25.fred"],
+ ["www{.dom*}", "www.example.com"],
+ ["X{.var}", "X.value"],
+ ["X{.var:3}", "X.val"],
+ ["X{.empty}", "X."],
+ ["X{.undef}", "X"],
+ ["X{.list}", "X.red,green,blue"],
+ ["X{.list*}", "X.red.green.blue"],
+ ["{#keys}", [
+ "#comma,,,dot,.,semi,;",
+ "#comma,,,semi,;,dot,.",
+ "#dot,.,comma,,,semi,;",
+ "#dot,.,semi,;,comma,,",
+ "#semi,;,comma,,,dot,.",
+ "#semi,;,dot,.,comma,,"
+ ]],
+ ["{#keys*}", [
+ "#comma=,,dot=.,semi=;",
+ "#comma=,,semi=;,dot=.",
+ "#dot=.,comma=,,semi=;",
+ "#dot=.,semi=;,comma=,",
+ "#semi=;,comma=,,dot=.",
+ "#semi=;,dot=.,comma=,"
+ ]],
+ ["X{.empty_keys}", "X"],
+ ["X{.empty_keys*}", "X"]
+ ]
+ },
+ "3.2.6 Path Segment Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{/who}", "/fred"],
+ ["{/who,who}", "/fred/fred"],
+ ["{/half,who}", "/50%25/fred"],
+ ["{/who,dub}", "/fred/me%2Ftoo"],
+ ["{/var}", "/value"],
+ ["{/var,empty}", "/value/"],
+ ["{/var,undef}", "/value"],
+ ["{/var,x}/here", "/value/1024/here"],
+ ["{/var:1,var}", "/v/value"],
+ ["{/list}", "/red,green,blue"],
+ ["{/list*}", "/red/green/blue"],
+ ["{/list*,path:4}", "/red/green/blue/%2Ffoo"],
+ ["{/keys}", [
+ "/comma,%2C,dot,.,semi,%3B",
+ "/comma,%2C,semi,%3B,dot,.",
+ "/dot,.,comma,%2C,semi,%3B",
+ "/dot,.,semi,%3B,comma,%2C",
+ "/semi,%3B,comma,%2C,dot,.",
+ "/semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{/keys*}", [
+ "/comma=%2C/dot=./semi=%3B",
+ "/comma=%2C/semi=%3B/dot=.",
+ "/dot=./comma=%2C/semi=%3B",
+ "/dot=./semi=%3B/comma=%2C",
+ "/semi=%3B/comma=%2C/dot=.",
+ "/semi=%3B/dot=./comma=%2C"
+ ]]
+ ]
+ },
+ "3.2.7 Path-Style Parameter Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{;who}", ";who=fred"],
+ ["{;half}", ";half=50%25"],
+ ["{;empty}", ";empty"],
+ ["{;hello:5}", ";hello=Hello"],
+ ["{;v,empty,who}", ";v=6;empty;who=fred"],
+ ["{;v,bar,who}", ";v=6;who=fred"],
+ ["{;x,y}", ";x=1024;y=768"],
+ ["{;x,y,empty}", ";x=1024;y=768;empty"],
+ ["{;x,y,undef}", ";x=1024;y=768"],
+ ["{;list}", ";list=red,green,blue"],
+ ["{;list*}", ";list=red;list=green;list=blue"],
+ ["{;keys}", [
+ ";keys=comma,%2C,dot,.,semi,%3B",
+ ";keys=comma,%2C,semi,%3B,dot,.",
+ ";keys=dot,.,comma,%2C,semi,%3B",
+ ";keys=dot,.,semi,%3B,comma,%2C",
+ ";keys=semi,%3B,comma,%2C,dot,.",
+ ";keys=semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{;keys*}", [
+ ";comma=%2C;dot=.;semi=%3B",
+ ";comma=%2C;semi=%3B;dot=.",
+ ";dot=.;comma=%2C;semi=%3B",
+ ";dot=.;semi=%3B;comma=%2C",
+ ";semi=%3B;comma=%2C;dot=.",
+ ";semi=%3B;dot=.;comma=%2C"
+ ]]
+ ]
+ },
+ "3.2.8 Form-Style Query Expansion" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{?who}", "?who=fred"],
+ ["{?half}", "?half=50%25"],
+ ["{?x,y}", "?x=1024&y=768"],
+ ["{?x,y,empty}", "?x=1024&y=768&empty="],
+ ["{?x,y,undef}", "?x=1024&y=768"],
+ ["{?var:3}", "?var=val"],
+ ["{?list}", "?list=red,green,blue"],
+ ["{?list*}", "?list=red&list=green&list=blue"],
+ ["{?keys}", [
+ "?keys=comma,%2C,dot,.,semi,%3B",
+ "?keys=comma,%2C,semi,%3B,dot,.",
+ "?keys=dot,.,comma,%2C,semi,%3B",
+ "?keys=dot,.,semi,%3B,comma,%2C",
+ "?keys=semi,%3B,comma,%2C,dot,.",
+ "?keys=semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{?keys*}", [
+ "?comma=%2C&dot=.&semi=%3B",
+ "?comma=%2C&semi=%3B&dot=.",
+ "?dot=.&comma=%2C&semi=%3B",
+ "?dot=.&semi=%3B&comma=%2C",
+ "?semi=%3B&comma=%2C&dot=.",
+ "?semi=%3B&dot=.&comma=%2C"
+ ]]
+ ]
+ },
+ "3.2.9 Form-Style Query Continuation" :
+ {
+ "variables": {
+ "count" : ["one", "two", "three"],
+ "dom" : ["example", "com"],
+ "dub" : "me/too",
+ "hello" : "Hello World!",
+ "half" : "50%",
+ "var" : "value",
+ "who" : "fred",
+ "base" : "http://example.com/home/",
+ "path" : "/foo/bar",
+ "list" : ["red", "green", "blue"],
+ "keys" : { "semi" : ";", "dot" : ".", "comma" : ","},
+ "v" : "6",
+ "x" : "1024",
+ "y" : "768",
+ "empty" : "",
+ "empty_keys" : [],
+ "undef" : null
+ },
+ "testcases" : [
+ ["{&who}", "&who=fred"],
+ ["{&half}", "&half=50%25"],
+ ["?fixed=yes{&x}", "?fixed=yes&x=1024"],
+ ["{&var:3}", "&var=val"],
+ ["{&x,y,empty}", "&x=1024&y=768&empty="],
+ ["{&x,y,undef}", "&x=1024&y=768"],
+ ["{&list}", "&list=red,green,blue"],
+ ["{&list*}", "&list=red&list=green&list=blue"],
+ ["{&keys}", [
+ "&keys=comma,%2C,dot,.,semi,%3B",
+ "&keys=comma,%2C,semi,%3B,dot,.",
+ "&keys=dot,.,comma,%2C,semi,%3B",
+ "&keys=dot,.,semi,%3B,comma,%2C",
+ "&keys=semi,%3B,comma,%2C,dot,.",
+ "&keys=semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{&keys*}", [
+ "&comma=%2C&dot=.&semi=%3B",
+ "&comma=%2C&semi=%3B&dot=.",
+ "&dot=.&comma=%2C&semi=%3B",
+ "&dot=.&semi=%3B&comma=%2C",
+ "&semi=%3B&comma=%2C&dot=.",
+ "&semi=%3B&dot=.&comma=%2C"
+ ]]
+ ]
+ }
+}
diff --git a/uritemplate-test/spec-examples.json b/uritemplate-test/spec-examples.json
new file mode 100644
index 00000000..2e8e942d
--- /dev/null
+++ b/uritemplate-test/spec-examples.json
@@ -0,0 +1,218 @@
+{
+ "Level 1 Examples" :
+ {
+ "level": 1,
+ "variables": {
+ "var" : "value",
+ "hello" : "Hello World!"
+ },
+ "testcases" : [
+ ["{var}", "value"],
+ ["{hello}", "Hello%20World%21"]
+ ]
+ },
+ "Level 2 Examples" :
+ {
+ "level": 2,
+ "variables": {
+ "var" : "value",
+ "hello" : "Hello World!",
+ "path" : "/foo/bar"
+ },
+ "testcases" : [
+ ["{+var}", "value"],
+ ["{+hello}", "Hello%20World!"],
+ ["{+path}/here", "/foo/bar/here"],
+ ["here?ref={+path}", "here?ref=/foo/bar"]
+ ]
+ },
+ "Level 3 Examples" :
+ {
+ "level": 3,
+ "variables": {
+ "var" : "value",
+ "hello" : "Hello World!",
+ "empty" : "",
+ "path" : "/foo/bar",
+ "x" : "1024",
+ "y" : "768"
+ },
+ "testcases" : [
+ ["map?{x,y}", "map?1024,768"],
+ ["{x,hello,y}", "1024,Hello%20World%21,768"],
+ ["{+x,hello,y}", "1024,Hello%20World!,768"],
+ ["{+path,x}/here", "/foo/bar,1024/here"],
+ ["{#x,hello,y}", "#1024,Hello%20World!,768"],
+ ["{#path,x}/here", "#/foo/bar,1024/here"],
+ ["X{.var}", "X.value"],
+ ["X{.x,y}", "X.1024.768"],
+ ["{/var}", "/value"],
+ ["{/var,x}/here", "/value/1024/here"],
+ ["{;x,y}", ";x=1024;y=768"],
+ ["{;x,y,empty}", ";x=1024;y=768;empty"],
+ ["{?x,y}", "?x=1024&y=768"],
+ ["{?x,y,empty}", "?x=1024&y=768&empty="],
+ ["?fixed=yes{&x}", "?fixed=yes&x=1024"],
+ ["{&x,y,empty}", "&x=1024&y=768&empty="]
+ ]
+ },
+ "Level 4 Examples" :
+ {
+ "level": 4,
+ "variables": {
+ "var": "value",
+ "hello": "Hello World!",
+ "path": "/foo/bar",
+ "list": ["red", "green", "blue"],
+ "keys": {"semi": ";", "dot": ".", "comma":","}
+ },
+ "testcases": [
+ ["{var:3}", "val"],
+ ["{var:30}", "value"],
+ ["{list}", "red,green,blue"],
+ ["{list*}", "red,green,blue"],
+ ["{keys}", [
+ "comma,%2C,dot,.,semi,%3B",
+ "comma,%2C,semi,%3B,dot,.",
+ "dot,.,comma,%2C,semi,%3B",
+ "dot,.,semi,%3B,comma,%2C",
+ "semi,%3B,comma,%2C,dot,.",
+ "semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{keys*}", [
+ "comma=%2C,dot=.,semi=%3B",
+ "comma=%2C,semi=%3B,dot=.",
+ "dot=.,comma=%2C,semi=%3B",
+ "dot=.,semi=%3B,comma=%2C",
+ "semi=%3B,comma=%2C,dot=.",
+ "semi=%3B,dot=.,comma=%2C"
+ ]],
+ ["{+path:6}/here", "/foo/b/here"],
+ ["{+list}", "red,green,blue"],
+ ["{+list*}", "red,green,blue"],
+ ["{+keys}", [
+ "comma,,,dot,.,semi,;",
+ "comma,,,semi,;,dot,.",
+ "dot,.,comma,,,semi,;",
+ "dot,.,semi,;,comma,,",
+ "semi,;,comma,,,dot,.",
+ "semi,;,dot,.,comma,,"
+ ]],
+ ["{+keys*}", [
+ "comma=,,dot=.,semi=;",
+ "comma=,,semi=;,dot=.",
+ "dot=.,comma=,,semi=;",
+ "dot=.,semi=;,comma=,",
+ "semi=;,comma=,,dot=.",
+ "semi=;,dot=.,comma=,"
+ ]],
+ ["{#path:6}/here", "#/foo/b/here"],
+ ["{#list}", "#red,green,blue"],
+ ["{#list*}", "#red,green,blue"],
+ ["{#keys}", [
+ "#comma,,,dot,.,semi,;",
+ "#comma,,,semi,;,dot,.",
+ "#dot,.,comma,,,semi,;",
+ "#dot,.,semi,;,comma,,",
+ "#semi,;,comma,,,dot,.",
+ "#semi,;,dot,.,comma,,"
+ ]],
+ ["{#keys*}", [
+ "#comma=,,dot=.,semi=;",
+ "#comma=,,semi=;,dot=.",
+ "#dot=.,comma=,,semi=;",
+ "#dot=.,semi=;,comma=,",
+ "#semi=;,comma=,,dot=.",
+ "#semi=;,dot=.,comma=,"
+ ]],
+ ["X{.var:3}", "X.val"],
+ ["X{.list}", "X.red,green,blue"],
+ ["X{.list*}", "X.red.green.blue"],
+ ["X{.keys}", [
+ "X.comma,%2C,dot,.,semi,%3B",
+ "X.comma,%2C,semi,%3B,dot,.",
+ "X.dot,.,comma,%2C,semi,%3B",
+ "X.dot,.,semi,%3B,comma,%2C",
+ "X.semi,%3B,comma,%2C,dot,.",
+ "X.semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{/var:1,var}", "/v/value"],
+ ["{/list}", "/red,green,blue"],
+ ["{/list*}", "/red/green/blue"],
+ ["{/list*,path:4}", "/red/green/blue/%2Ffoo"],
+ ["{/keys}", [
+ "/comma,%2C,dot,.,semi,%3B",
+ "/comma,%2C,semi,%3B,dot,.",
+ "/dot,.,comma,%2C,semi,%3B",
+ "/dot,.,semi,%3B,comma,%2C",
+ "/semi,%3B,comma,%2C,dot,.",
+ "/semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{/keys*}", [
+ "/comma=%2C/dot=./semi=%3B",
+ "/comma=%2C/semi=%3B/dot=.",
+ "/dot=./comma=%2C/semi=%3B",
+ "/dot=./semi=%3B/comma=%2C",
+ "/semi=%3B/comma=%2C/dot=.",
+ "/semi=%3B/dot=./comma=%2C"
+ ]],
+ ["{;hello:5}", ";hello=Hello"],
+ ["{;list}", ";list=red,green,blue"],
+ ["{;list*}", ";list=red;list=green;list=blue"],
+ ["{;keys}", [
+ ";keys=comma,%2C,dot,.,semi,%3B",
+ ";keys=comma,%2C,semi,%3B,dot,.",
+ ";keys=dot,.,comma,%2C,semi,%3B",
+ ";keys=dot,.,semi,%3B,comma,%2C",
+ ";keys=semi,%3B,comma,%2C,dot,.",
+ ";keys=semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{;keys*}", [
+ ";comma=%2C;dot=.;semi=%3B",
+ ";comma=%2C;semi=%3B;dot=.",
+ ";dot=.;comma=%2C;semi=%3B",
+ ";dot=.;semi=%3B;comma=%2C",
+ ";semi=%3B;comma=%2C;dot=.",
+ ";semi=%3B;dot=.;comma=%2C"
+ ]],
+ ["{?var:3}", "?var=val"],
+ ["{?list}", "?list=red,green,blue"],
+ ["{?list*}", "?list=red&list=green&list=blue"],
+ ["{?keys}", [
+ "?keys=comma,%2C,dot,.,semi,%3B",
+ "?keys=comma,%2C,semi,%3B,dot,.",
+ "?keys=dot,.,comma,%2C,semi,%3B",
+ "?keys=dot,.,semi,%3B,comma,%2C",
+ "?keys=semi,%3B,comma,%2C,dot,.",
+ "?keys=semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{?keys*}", [
+ "?comma=%2C&dot=.&semi=%3B",
+ "?comma=%2C&semi=%3B&dot=.",
+ "?dot=.&comma=%2C&semi=%3B",
+ "?dot=.&semi=%3B&comma=%2C",
+ "?semi=%3B&comma=%2C&dot=.",
+ "?semi=%3B&dot=.&comma=%2C"
+ ]],
+ ["{&var:3}", "&var=val"],
+ ["{&list}", "&list=red,green,blue"],
+ ["{&list*}", "&list=red&list=green&list=blue"],
+ ["{&keys}", [
+ "&keys=comma,%2C,dot,.,semi,%3B",
+ "&keys=comma,%2C,semi,%3B,dot,.",
+ "&keys=dot,.,comma,%2C,semi,%3B",
+ "&keys=dot,.,semi,%3B,comma,%2C",
+ "&keys=semi,%3B,comma,%2C,dot,.",
+ "&keys=semi,%3B,dot,.,comma,%2C"
+ ]],
+ ["{&keys*}", [
+ "&comma=%2C&dot=.&semi=%3B",
+ "&comma=%2C&semi=%3B&dot=.",
+ "&dot=.&comma=%2C&semi=%3B",
+ "&dot=.&semi=%3B&comma=%2C",
+ "&semi=%3B&comma=%2C&dot=.",
+ "&semi=%3B&dot=.&comma=%2C"
+ ]]
+ ]
+ }
+}
diff --git a/uritemplate-test/transform-json-tests.xslt b/uritemplate-test/transform-json-tests.xslt
new file mode 100644
index 00000000..d956b6bd
--- /dev/null
+++ b/uritemplate-test/transform-json-tests.xslt
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file