tagging 1.1.1 to re-deploy a new stable version of JAX-RS 1.1


svn path=/tags/jsr311-api-1.1.1/; revision=605
diff --git a/src/jsr311-api/.cvsignore b/.cvsignore
similarity index 100%
rename from src/jsr311-api/.cvsignore
rename to .cvsignore
diff --git a/src/jsr311-api/README.txt b/README.txt
similarity index 100%
rename from src/jsr311-api/README.txt
rename to README.txt
diff --git a/src/jsr311-api/docs/manifest/manifest.mf b/docs/manifest/manifest.mf
similarity index 100%
rename from src/jsr311-api/docs/manifest/manifest.mf
rename to docs/manifest/manifest.mf
diff --git a/src/jsr311-api/pom.xml b/pom.xml
similarity index 100%
rename from src/jsr311-api/pom.xml
rename to pom.xml
diff --git a/spec/chapters/annotations.tex b/spec/chapters/annotations.tex
deleted file mode 100644
index 9a47e75..0000000
--- a/spec/chapters/annotations.tex
+++ /dev/null
@@ -1,48 +0,0 @@
-\chapter{Summary of Annotations}
-%\begin{center}
-\begin{longtable}{|l|p{1.2in}|p{3.5in}|}
-\hline
-\bfseries Annotation & \bfseries Target & \bfseries Description \tabularnewline
-\hline\hline\endhead
-\code{Consumes} & \raggedright Type or method & \raggedright Specifies a list of media types that can be consumed. \tabularnewline
-\hline
-\code{Produces} & \raggedright Type or method & \raggedright Specifies a list of media types that can be produced. \tabularnewline
-\hline
-\code{GET} & \raggedright Method & \raggedright Specifies that the annotated method handles HTTP GET requests.  \tabularnewline
-\hline
-\code{POST} & \raggedright Method & \raggedright Specifies that the annotated method handles HTTP POST requests.  \tabularnewline
-\hline
-\code{PUT} & \raggedright Method & \raggedright Specifies that the annotated method handles HTTP PUT requests.  \tabularnewline
-\hline
-\code{DELETE} & \raggedright Method & \raggedright Specifies that the annotated method handles HTTP DELETE requests.  \tabularnewline
-\hline
-\code{HEAD} & \raggedright Method & \raggedright Specifies that the annotated method handles HTTP HEAD requests. Note that HEAD may be automatically handled, see section \ref{head_and_options}. \tabularnewline
-\hline
-\code{ApplicationPath} & \raggedright Type & \raggedright Specifies the resource-wide application path that forms the base URI of all root resource classes. \tabularnewline
-\hline
-\code{Path} & \raggedright Type or method & \raggedright Specifies a relative path for a resource. When used on a class this annotation identifies that class as a root resource. When used on a method this annotation identifies a sub-resource method or locator. \tabularnewline
-\hline
-\code{PathParam} & \raggedright Parameter, field or method & \raggedright Specifies that the value of a method parameter, class field, or bean property is to be extracted from the request URI path. The value of the annotation identifies the name of a URI template parameter.\tabularnewline
-\hline
-\code{QueryParam} & \raggedright Parameter, field or method & \raggedright Specifies that the value of a method parameter, class field, or bean property is to be extracted from a URI query parameter. The value of the annotation identifies the name of a query parameter. \tabularnewline
-\hline
-\code{FormParam} & \raggedright Parameter, field or method & \raggedright Specifies that the value of a method parameter is to be extracted from a form parameter in a request entity body. The value of the annotation identifies the name of a form parameter. Note that whilst the annotation target allows use on fields and methods, the specification only requires support for use on resource method parameters.\tabularnewline
-\hline
-\code{MatrixParam} & \raggedright Parameter, field or method & \raggedright Specifies that the value of a method parameter, class field, or bean property is to be extracted from a URI matrix parameter. The value of the annotation identifies the name of a matrix parameter. \tabularnewline
-\hline
-\code{CookieParam} & \raggedright Parameter, field or method & \raggedright Specifies that the value of a method parameter, class field, or bean property is to be extracted from a HTTP cookie. The value of the annotation identifies the name of a the cookie. \tabularnewline
-\hline
-\code{HeaderParam} & \raggedright Parameter, field or method & \raggedright Specifies that the value of a method parameter, class field, or bean property is to be extracted from a HTTP header. The value of the annotation identifies the name of a HTTP header. \tabularnewline
-\hline
-\code{Encoded} & \raggedright Type, constructor, method, field or parameter & \raggedright Disables automatic URI decoding for path, query, form and matrix parameters. \tabularnewline
-\hline
-\code{DefaultValue} & \raggedright Parameter, field or method & \raggedright Specifies a default value for a field, property or method parameter annotated with \QueryParam, \MatrixParam, \CookieParam, \FormParam\ or \HeaderParam. The specified value will be used if the corresponding query or matrix parameter is not present in the request URI, if the corresponding form parameter is not in the request entity body, or if the corresponding HTTP header is not included in the request.\tabularnewline
-\hline
-\code{Context} & \raggedright Field, method or parameter & \raggedright Identifies an injection target for one of the types listed in section \ref{contexttypes} or the applicable section of chapter \ref{environment}. \tabularnewline
-\hline
-\code{HttpMethod} & \raggedright Annotation & \raggedright Specifies the HTTP method for a request method designator annotation. \tabularnewline
-\hline
-\code{Provider} & \raggedright Type & \raggedright Specifies that the annotated class implements a \jaxrs\ extension interface. \tabularnewline
-\hline
-\end{longtable}
-%\end{center}
diff --git a/spec/chapters/applications.tex b/spec/chapters/applications.tex
deleted file mode 100644
index 4a1c290..0000000
--- a/spec/chapters/applications.tex
+++ /dev/null
@@ -1,52 +0,0 @@
-\chapter{Applications}
-\label{applications}
-
-A \jaxrs\ application consists of one or more resources (see chapter \ref{resources}) and zero or more providers (see chapter \ref{providers}). This chapter describes aspects of \jaxrs\ that apply to an application as a whole, subsequent chapters describe particular aspects of a \jaxrs\ application and requirements on \jaxrs\ implementations.
-
-\section{Configuration}
-\label{config}
-
-The resources and providers that make up a \jaxrs\ application are configured via an application-supplied subclass of \code{Application}. An implementation MAY provide alternate mechanisms for locating resource classes and providers (e.g. runtime class scanning) but use of \code{Application} is the only portable means of configuration.
-
-\section{Validation}
-
-Specific validation requirements are detailed throughout this specification and the \jaxrs\ Javadocs. Implementations MAY perform additional validation where feasible and SHOULD report any issues arising from such validation to the user.
-
-\section{Publication}
-
-Applications are published in different ways depending on whether the application is run in a Java SE environment or within a container. This section describes the alternate means of publication.
-
-\subsection{Java SE}
-
-In a Java SE environment a configured instance of an endpoint class can be obtained using the \code{create\-Endpoint} method of \rd. The application supplies an instance of \code{Application} and the type of endpoint required. An implementation MAY support zero or more endpoint types of any desired type.
-
-How the resulting endpoint class instance is used to publish the application is outside the scope of this specification.
-
-\subsubsection{JAX-WS}
-
-An implementation that supports publication via JAX-WS MUST support \code{create\-Endpoint} with an endpoint type of \code{javax\-.xml\-.ws\-.Provider}. JAX-WS describes how a \code{Provider} based endpoint can be published in an SE environment.
-
-\subsection{Servlet}
-\label{servlet}
-
-A \jaxrs\ application is packaged as a Web application in a \code{.war} file. The application classes are packaged in \code{WEB-INF/classes} or \code{WEB-INF/lib} and required libraries are packaged in \code{WEB-INF/lib}. See the Servlet specification for full details on packaging of web applications.
-
-It is RECOMMENDED that implementations support the Servlet 3 framework pluggability mechanism to enable portability between containers and to avail themselves of container-supplied class scanning facilities. When using the pluggability mechanism the following conditions MUST be met:
-
-\begin{itemize}
-\item If no \code{Application} subclass is present the added servlet MUST be named:
-\begin{quote}\code{javax.\-ws.\-rs.\-core.\-Application}\end{quote} and all root resource classes and providers packaged in the web application MUST be included in the published \jaxrs\ application. The application MUST be packaged with a \code{web.xml} that specifies a servlet mapping for the added servlet.
-
-\item If an \code{Application} subclass is present and there is already a servlet defined that has a servlet initialization parameter named: \begin{quote}\code{javax.ws.rs.Application}\end{quote} whose value is the fully qualified name of the \code{Application} subclass then no new servlet should be added by the \jaxrs\ implementation's \code{ContainerInitializer} since the application is already being handled by an existing servlet.
-
-\item If an \code{Application} subclass is present that is not being handled by an existing servlet then the servlet added by the \code{ContainerInitializer} MUST be named with the fully qualified name of the \code{Application} subclass. If the \code{Application} subclass is annotated with \code{@ApplicationPath} and no servlet-mapping exists for the added servlet then a new servlet mapping is added with the value of the \code{@ApplicationPath} annotation with "/*" appended otherwise the existing mapping is used. If the \code{Application }subclass is not annotated with \code{@ApplicationPath}\ then the application MUST be packaged with a \code{web.xml} that specifies a servlet mapping for the added servlet. It is an error for more than one application to be deployed at the same effective servlet mapping
-\end{itemize}
-
-In either of the latter two cases, if both \code{Application.getClasses} and \code{Application.getSingletons} return an empty list then all root resource classes and providers packaged in the web application MUST be included in the published \jaxrs\ application. If either \code{getClasses} or \code{getSingletons} return a non-empty list then only those classes or singletons returned MUST be included in the published \jaxrs\ application.
-
-If not using the Servlet 3 framework pluggability mechanism (e.g. in a pre-Servet 3.0 container), the \code{servlet-class} or \code{filter-class} element of the \code{web.xml} descriptor SHOULD name the \jaxrs\ implementation-supplied servlet or filter class respectively. The \code{Application} subclass SHOULD be identified using an \code{init-param} with a \code{param-name} of \code{javax.\-ws.\-rs.\-Application}.
-
-
-\subsection{Other Container}
-
-An implementation MAY provide facilities to host a \jaxrs\ application in other types of container, such facilities are outside the scope of this specification.
\ No newline at end of file
diff --git a/spec/chapters/changes.tex b/spec/chapters/changes.tex
deleted file mode 100644
index aed316e..0000000
--- a/spec/chapters/changes.tex
+++ /dev/null
@@ -1,45 +0,0 @@
-\chapter{Change Log}
-
-\section{Changes Since 1.0 Release}
-
-\begin{itemize}
-\item Section \ref{servlet}: new requirements for Servlet 3 containers.
-\item Section \ref{javaee}: requirements for Java EE 6 containers.
-\item Section \ref{standard_entity_providers}: requirements on standard entity providers when presented with an empty request entity.
-\item Section \ref{message_body_writer}: add closeness of generic type as secondary sort key.
-\item Section \ref{message_body_reader}: default to application/octet-stream if a request does not contain a content-type header.
-\item Section \ref{resource_field}: add support for static fromString method.
-\item Section \ref{annotationinheritance}: clarify annotation inheritance.
-\item Section \ref{security_context}: fix typo.
-\item Section \ref{servlet_container}: additional considerations related to filters consuming request bodies.
-\end{itemize}
-
-\section{Changes Since Proposed Final Draft}
-
-\begin{itemize}
-\item Section \ref{request_matching}: Additional sort criteria so that templates with explicit regexs are sorted ahead of those with the default.
-\item Sections \ref{request_matching}, \ref{determine_response_type}, \ref{declaring_provider_capabilities} and \ref{context_media_type}: Q-values not used in \Consumes\ or \Produces.
-\item Section \ref{message_body_writer}: Fixed algorithm to refer to section \ref{determine_response_type} instead of restating it. Fixed status code returned when the media type has been determined but an appropriate message body writer cannot be located.
-\item Chapter \ref{runtimedelegate}: Clarify that an implementation can supply an alternate \rd\ API class.
-\end{itemize}
-
-\section{Changes Since Public Review Draft}
-
-\begin{itemize}
-\item Chapter \ref{applications}: Renamed ApplicationConfig class to Application.
-\item Chapter \ref{resources}: UriBuilder reworked to always encode components.
-\item Sections \ref{resource_class_constructor} and \ref{provider_class_constructor}: Added requirement to warn when choice of constructor is ambiguous.
-\item Section \ref{resource_field}: \code{FormParam} no longer required to be supported on fields or properties.
-\item Section \ref{resource_method_return}: Added text describing how to determine raw and generic types from method return type and returned instance.
-\item Section \ref{uritemplates}: Template parameters can specify the regular expression that forms their capturing group.
-\item Section \ref{reqpreproc}: Make pre-processed URIs available rather than original request URI. Added URI normalization.
-\item Section \ref{reqpreproc}: Removed URI-based content negotiation.
-\item Section \ref{request_matching}: Reorganized the request matching algorithm to remove redundancy and improve readability, no functional change.
-\item Section \ref{template_to_regex}: Changes to regular expressions to eliminate edge cases.
-\item Section \ref{entity_providers}: Added requirement to use JavaBean Activation Framework when no entity provider can be found.
-\item Section \ref{standard_entity_providers}: Require standard JAXB entity providers to use application-supplied JAXB contexts in preference to their own.
-\item Section \ref{contextprovider}: Added support for specifying media type capabilities of context providers.
-\item Section \ref{contexttypes}: Removed \code{ContextResolver} from list of injectable resources.
-\item Section \ref{providercontext}: Changed name to Providers, removed entity provider-specific text to reflect more generic capabilities.
-\item Chapter \ref{headersupport}: New appendix describing where particular HTTP headers are supported.
-\end{itemize}
\ No newline at end of file
diff --git a/spec/chapters/context.tex b/spec/chapters/context.tex
deleted file mode 100644
index 10c6c55..0000000
--- a/spec/chapters/context.tex
+++ /dev/null
@@ -1,90 +0,0 @@
-\chapter{Context}
-\label{context}
-
-\jaxrs\ provides facilities for obtaining and processing information about the application deployment context and the context of individual requests. Such information is available to \code{Application} subclasses (see section \ref{config}), root resource classes (see chapter \ref{resources}), and providers (see chapter \ref{providers}). This chapter describes these facilities.
-
-\section{Concurrency}
-
-Context is specific to a particular request but instances of certain \jaxrs\ components (providers and resource classes with a lifecycle other than per-request) may need to support multiple concurrent requests. When injecting an instance of one of the types listed in section \ref{contexttypes}, the instance supplied MUST be capable of selecting the correct context for a particular request. Use of a thread-local proxy is a common way to achieve this.
-
-\section{Context Types}
-\label{contexttypes}
-
-This section describes the types of context available to resource classes, providers and \code{Application} subclasses.
-
-\subsection{Application}
-
-The instance of the application-supplied \code{Application} subclass can be injected into a class field or method parameter using the \Context\ annotation. Access to the \code{Application} subclass instance allows configuration information to be centralized in that class. Note that this cannot be injected into the \code{Application} subclass itself since this would create a circular dependency.
-
-\subsection{URIs and URI Templates}
-
-An instance of \UriInfo\ can be injected into a class field or method parameter using the \Context\ annotation. \UriInfo\ provides both static and dynamic, per-request information, about the components of a request URI. E.g. the following would return the names of any query parameters in a request:
-
-\begin{listing}{1}
-@GET
-@Produces{"text/plain"}
-public String listQueryParamNames(@Context UriInfo info) {
-  StringBuilder buf = new StringBuilder();
-  for (String param: info.getQueryParameters().keySet()) {
-    buf.append(param);
-    buf.append("\n");
-  }
-  return buf.toString();
-}
-\end{listing}
-
-Note that the methods of \UriInfo\ provide access to request URI information following the pre-processing described in section \ref{reqpreproc}.
-
-\subsection{Headers}
-\label{httpheaders}
-
-An instance of \HttpHeaders\ can be injected into a class field or method parameter using the \Context\ annotation. \HttpHeaders\ provides access to request header information either in map form or via strongly typed convenience methods. E.g. the following would return the names of all the headers in a request:
-
-\begin{listing}{1}
-@GET
-@Produces{"text/plain"}
-public String listHeaderNames(@Context HttpHeaders headers) {
-  StringBuilder buf = new StringBuilder();
-  for (String header: headers.getRequestHeaders().keySet()) {
-    buf.append(header);
-    buf.append("\n");
-  }
-  return buf.toString();
-}
-\end{listing}
-
-Note that the methods of \HttpHeaders\ provide access to request information following the pre-processing described in section \ref{reqpreproc}.
-
-Response headers may be provided using the \Response\ class, see \ref{resource_method_return} for more details.
-
-\subsection{Content Negotiation and Preconditions}
-\label{conneg_and_preconditions}
-
-\jaxrs\ simplifies support for content negotiation and preconditions using the \Request\ interface. An instance of \Request\ can be injected into a class field or method parameter using the \Context\ annotation. The methods of \Request\ allow a caller to determine the best matching representation variant and to evaluate whether the current state of the resource matches any preconditions in the request. Precondition support methods return a \ResponseBuilder\ that can be returned to the client to inform it that the request preconditions were not met. E.g. the following checks if the current entity tag matches any preconditions in the request before updating the resource:
-
-\begin{listing}{1}
-@PUT
-public Response updateFoo(@Context Request request, Foo foo) {
-	EntityTag tag = getCurrentTag();
-	ResponseBuilder responseBuilder = request.evaluatePreconditions(tag);
-	if (responseBuilder != null)
-	  return responseBuilder.build();
-	else
-	  return doUpdate(foo);
-}
-\end{listing}
-
-
-The application could also set the content location, expiry date and cache control information into the returned \code{ResponseBuilder} before building the response.
-
-\subsection{Security Context}
-\label{security_context}
-
-The \SecurityContext\ interface provides access to information about the security context of the current request. An instance of \SecurityContext\ can be injected into a class field or method parameter using the \Context\ annotation. The methods of \SecurityContext\ provide access to the current user principal, information about roles assumed by the requester, whether the request arrived over a secure channel and the authentication scheme used.
-
-\subsection{Providers}
-\label{providercontext}
-
-The \code{Providers} interface allows for lookup of provider instances based on a set of search criteria. An instance of \code{Providers} can be injected into a class field or method parameter using the \Context\ annotation.
-
-This interface is expected to be primarily of interest to provider authors wishing to use other providers functionality.
diff --git a/spec/chapters/delegate.tex b/spec/chapters/delegate.tex
deleted file mode 100644
index 459e930..0000000
--- a/spec/chapters/delegate.tex
+++ /dev/null
@@ -1,26 +0,0 @@
-\chapter{Runtime Delegate}
-\label{runtimedelegate}
-
-\rd\ is an abstract factory class that provides various methods for the creation of objects that implement \jaxrs\ APIs. These methods are designed for use by other \jaxrs\ API classes and are not intended to be called directly by applications. \rd\ allows the standard \jaxrs\ API classes to use different \jaxrs\ implementations without any code changes.
-
-An implementation of \jaxrs\ MUST provide a concrete subclass of \rd. Using the supplied \rd\ this can be provided to \jaxrs\ in one of two ways:
-
-\begin{enumerate}
-\item An instance of \rd\ can be instantiated and injected using its static method \code{set\-Instance}. In this case the implementation is responsible for creating the instance; this option is intended for use with implementations based on IoC frameworks.
-\item The class to be used can be configured, see section \ref{rdconfig}. In this case \jaxrs\ is responsible for instantiating an instance of the class and the configured class MUST have a public constructor which takes no arguments.
-\end{enumerate}
-
-Note that an implementation MAY supply an alternate implementation of the \rd\ API class (provided it passes the TCK signature test and behaves according to the specification) that supports alternate means of locating a concrete subclass.
-
-A \jaxrs\ implementation may rely on a particular implementation of \rd\ being used -- applications SHOULD NOT override the supplied \rd\ instance with an application-supplied alternative and doing so may cause unexpected problems. 
-
-\section{Configuration}\label{rdconfig}
-
-If not supplied by injection, the supplied \rd\ API class obtains the concrete implementation class using the following algorithm. The steps listed below 
-are performed in sequence and, at each step, at most one candidate implementation class name will be produced. The implementation will then attempt to load the class with the given class name using the current context class loader or, missing one, the java.lang.Class.forName(String) method. As soon as a step results in an implementation class being successfully loaded, the algorithm terminates.
-\begin{enumerate}
-\item If a resource with the name of \code{META-INF/services/javax.ws.rs.ext.RuntimeDelegate} exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. 
-\item If the \code{\$\{java.home\}/lib/jaxrs.properties} file exists and it is readable by the \code{java\-.util\-.Properties\-.load(\-InputStream)} method and it contains an entry whose key is \code{javax\-.ws\-.rs\-.ext\-.Runtime\-Delegate}, then the value of that entry is used as the name of the implementation class. 
-\item If a system property with the name \code{javax\-.ws\-.rs\-.ext\-.Runtime\-Delegate} is defined, then its value is used as the name of the implementation class. 
-\item Finally, a default implementation class name is used. 
-\end{enumerate}
\ No newline at end of file
diff --git a/spec/chapters/environment.tex b/spec/chapters/environment.tex
deleted file mode 100644
index a4c6977..0000000
--- a/spec/chapters/environment.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-\chapter{Environment}
-\label{environment}
-
-The container-managed resources available to a \jaxrs\ root resource class or provider depend on the environment in which it is deployed. Section \ref{contexttypes} describes the types of context available regardless of container. The following sections describe the additional container-managed resources available to a \jaxrs\ root resource class or provider deployed in a variety of environments.
-
-\section{Servlet Container}
-\label{servlet_container}
-
-The \Context\ annotation can be used to indicate a dependency on a Servlet-defined resource. A Servlet-based implementation MUST support injection of the following Servlet-defined types: \code{Servlet\-Config}, \code{Servlet\-Context}, \code{Http\-Servlet\-Request} and \code{Http\-Servlet\-Response}.
-
-An injected \code{Http\-Servlet\-Request} allows a resource method to stream the contents of a request entity. If the resource method has a parameter whose value is derived from the request entity then the stream will have already been consumed and an attempt to access it MAY result in an exception.
-
-An injected \code{Http\-Servlet\-Response} allows a resource method to commit the HTTP response prior to returning. An implementation MUST check the committed status and only process the return value if the response is not yet committed.
-
-Servlet filters may trigger consumption of a request body by accessing request parameters. In a servlet container the @FormParam annotation and the standard entity provider for \code{application\-/x-\-www-\-form-\-urlencoded} MUST obtain their values from the servlet request parameters if the request body has already been consumed. Servlet APIs do not differentiate between parameters in the URI and body of a request so URI-based query parameters may be included in the entity parameter.
-
-\section{Java EE Container}
-\label{javaee}
-
-This section describes the additional requirements that apply to a \jaxrs\ implementation when combined in a product that supports these other Java specifications:
-
-\begin{itemize}
-\item In a product that also supports the Servlet specification, implementations MUST support \jaxrs\ applications that are packaged as a web application. Implementations MUST behave as if built using the Servlet 3 pluggability mechanism, see section \ref{servlet}.
-\item In a product that also supports Managed Beans, implementations MUST support use of Managed Beans as root resource classes, providers and \code{Application} subclasses. In a product that also supports JSR 299, implementations MUST similarly support use of JSR299-style managed beans. Providers and \code{Application} subclasses MUST be singletons or use application scope.
-\item In a product that also supports EJB, an implementation MUST support use of stateless and singleton session beans as root resource classes, providers and \code{Application} subclasses. \jaxrs\ annotations MAY be applied to a bean's local interface or directly to a no-interface bean. If an \code{Exception\-Mapper} for a \code{EJBException} or subclass is not included with an application then exceptions thrown by an EJB resource class or provider method MUST be treated as EJB application exceptions: the embedded cause of the \code{EJBException} MUST be unwrapped and processed as described in section \ref{method_exc}.
-\end{itemize}
-
-The following additional requirements apply when using Managed Beans, JSR299-style Managed Beans or EJBs as resource classes, providers or \code{Application} subclasses:
-
-\begin{itemize}
-\item Field and property injection of \jaxrs\ resources MUST be performed prior to the container invoking any \code{@PostConstruct} annotated method.
-\item Support for constructor injection of \jaxrs\ resources is OPTIONAL. Portable applications MUST instead use fields or bean properties in conjunction with a \code{@PostConstruct} annotated method. Implementations SHOULD warn users about use of non-portable constructor injection.
-\item Implementations MUST NOT require use of \code{@Inject} or \code{@Resource} to trigger injection of \jaxrs\ annotated fields or properties. Implementations MAY support such usage but SHOULD warn users about non-portability.
-\end{itemize}
-
-\section{Other}
-
-Other container technologies MAY specify their own set of injectable resources but MUST, at a minimum, support access to the types of context listed in section \ref{contexttypes}.
\ No newline at end of file
diff --git a/spec/chapters/headers.tex b/spec/chapters/headers.tex
deleted file mode 100644
index fc4b5d2..0000000
--- a/spec/chapters/headers.tex
+++ /dev/null
@@ -1,64 +0,0 @@
-\chapter{HTTP Header Support}
-\label{headersupport}
-
-The following table lists HTTP headers that are directly supported, either automatically by a \jaxrs\ implementation runtime or by an application using the \jaxrs\ API. Any request header may be obtained using \HttpHeaders, see section \ref{httpheaders}; response headers not listed here may set using the \ResponseBuilder\-\code{.header} method.
-
-%\begin{center}
-\begin{longtable}{|l|p{4.5in}|}
-\hline
-\bfseries Header & \bfseries Description \tabularnewline
-\hline\hline\endhead
-\code{Accept} & \raggedright Used by runtime when selecting a resource method, compared to value of \Produces\ annotation, see section \ref{declaring_method_capabilities}. \tabularnewline
-\hline
-\code{Accept-Charset} & \raggedright Processed by runtime if application uses \Request\code{.selectVariant} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{Accept-Encoding} & \raggedright Processed by runtime if application uses \Request\code{.selectVariant} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{Accept-Language} & \raggedright Processed by runtime if application uses \Request\code{.selectVariant} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{Allow} & \raggedright Included in automatically generated 405 error responses (see section \ref{request_matching}) and automatically generated responses to OPTIONS requests (see section \ref{head_and_options}).\tabularnewline
-\hline
-\code{Authorization} & \raggedright Depends on container, information available via \SecurityContext, see section \ref{security_context}. \tabularnewline
-\hline
-\code{Cache-Control} & \raggedright See \code{CacheControl} class and \ResponseBuilder\code{.cacheControl} method. \tabularnewline
-\hline
-\code{Content-Encoding} & \raggedright Response header set by application using  \Response\code{.ok} or \ResponseBuilder\code{.variant}. \tabularnewline
-\hline
-\code{Content-Language} & \raggedright Response header set by application using \Response\code{.ok}, \ResponseBuilder\code{.language}, or \ResponseBuilder\code{.variant}. \tabularnewline
-\hline
-\code{Content-Length} & \raggedright Processed automatically for requests, set automatically in responses if value is provided by the \MsgWrite\ used to serialize the response entity. \tabularnewline
-\hline
-\code{Content-Type} & \raggedright Request header used by runtime when selecting a resource method, compared to value of \Consumes\ annotation, see section \ref{declaring_method_capabilities}. Response header either set by application using \Response\code{.ok}, \ResponseBuilder\code{.type}, or \ResponseBuilder\code{.variant}, or set automatically by runtime (see section \ref{determine_response_type}).\tabularnewline
-\hline
-\code{Cookie} & \raggedright See \code{Cookie} class and \HttpHeaders\code{.getCookies} method. \tabularnewline
-\hline
-\code{Date} & \raggedright Included in responses automatically as per HTTP/1.1. \tabularnewline
-\hline
-\code{ETag} & \raggedright See \code{EntityTag} class,  \Response\code{.notModified} method and \ResponseBuilder\code{.tag} method. \tabularnewline
-\hline
-\code{Expect} & \raggedright Depends on underlying container. \tabularnewline
-\hline
-\code{Expires} & \raggedright Set by application using  the \ResponseBuilder\code{.expires} method. \tabularnewline
-\hline
-\code{If-Match} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{If-Modified-Since} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{If-None-Match} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{If-Unmodified-Since} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
-\hline
-\code{Last-Modified} & \raggedright Set by application using  the \ResponseBuilder\code{.lastModified} method. \tabularnewline
-\hline
-\code{Location} & \raggedright Set by application using the applicable \Response\ method or directly using the \ResponseBuilder\code{.location} method.\tabularnewline
-\hline
-\code{Set-Cookie} & \raggedright See \code{NewCookie} class and \ResponseBuilder\code{.cookie} method. \tabularnewline
-\hline
-\code{Transfer-Encoding} & \raggedright See section \ref{transfer_encoding}. \tabularnewline
-\hline
-\code{Vary} & \raggedright Set by application using \Response\code{.notAcceptable} method or \ResponseBuilder\code{.variants} method. \tabularnewline
-\hline
-\code{WWW-Authenticate} & \raggedright Depends on container. \tabularnewline
-\hline
-\end{longtable}
-%\end{center}
diff --git a/spec/chapters/intro.tex b/spec/chapters/intro.tex
deleted file mode 100644
index cc513c0..0000000
--- a/spec/chapters/intro.tex
+++ /dev/null
@@ -1,153 +0,0 @@
-\chapter{Introduction}
-
-This specification defines a set of Java APIs for the development of Web services built according to the Representational State Transfer\cite{rest} (REST) architectural style. Readers are assumed to be familiar with 
-REST; for more information about the REST architectural style and RESTful Web services, see:
-
-\begin{itemize}
-\item Architectural Styles and the Design of Network-based Software Architectures\cite{rest}
-\item The REST Wiki\cite{restwiki}
-\item Representational State Transfer on Wikipedia\cite{restwikipedia}
-\end{itemize}
-
-\section{Status}
-
-This is an editors draft; this specification is not yet complete. A list of open issues can be found at:
-%This is a JCP public review draft; this specification is not yet final. A list of open issues can be found at:
-%This is a JCP final specification. A list of open issues can be found at:
-
-\begin{quote}
-https://jsr311.dev.java.net/servlets/ProjectIssues
-\end{quote}
-
-The corresponding Javadocs can be found online at:
-
-\begin{quote}
-%https://jsr311.dev.java.net/nonav/javadoc/index.html
-https://jsr311.dev.java.net/nonav/releases/1.1/index.html
-\end{quote}
-
-The reference implementation can be obtained from:
-
-\begin{quote}
-https://jersey.dev.java.net/
-\end{quote}
-
-The expert group seeks feedback from the community on any aspect of this specification, please send comments to:
-
-\begin{quote}
-users@jsr311.dev.java.net
-\end{quote}
-
-\section{Goals}
-
-The following are the goals of the API:
-
-\begin{description}
-
-\item[POJO-based] The API will provide a set of annotations and associated classes/interfaces that may be used with POJOs in order to expose them as Web resources. The specification will define object lifecycle and scope.
-
-\item[HTTP-centric] The specification will assume HTTP\cite{http11} is the underlying network protocol and will provide a clear mapping between HTTP and URI\cite{uri} elements and the corresponding API classes and annotations. The API will provide high level support for common HTTP usage patterns and will be sufficiently flexible to support a variety of HTTP applications including WebDAV\cite{webdav} and the Atom Publishing Protocol\cite{atompub}.
-
-\item[Format independence] The API will be applicable to a wide variety of HTTP entity body content types. It will provide the necessary pluggability to allow additional types to be added by an application in a standard manner.
-
-\item[Container independence] Artifacts using the API will be deployable in a variety of Web-tier containers. The specification will define how artifacts are deployed in a Servlet\cite{servlet} container and as a JAX-WS\cite{jsr224} Provider.
-
-\item[Inclusion in Java EE] The specification will define the environment for a Web resource class hosted in a Java EE container and will specify how to use Java EE features and components within a Web resource class.
-
-\end{description}
-
-\section{Non-Goals}
-
-The following are non-goals:
-
-\begin{description}
-
-\item[Support for Java versions prior to J2SE 5.0] The API will make extensive use of annotations and will require J2SE 5.0 or later.
-
-\item[Description, registration and discovery] The specification will neither define nor require any service description, registration or discovery capability.
-
-\item[Client APIs] The specification will not define client-side APIs. Other specifications are expected to provide such functionality.
-
-\item[HTTP Stack] The specification will not define a new HTTP stack. HTTP protocol support is provided by a container that hosts artifacts developed using the API.
-
-\item[Data model/format classes] The API will not define classes that support manipulation of entity body content, rather it will provide pluggability to allow such classes to be used by artifacts developed using the API.
-
-\end{description}
-
-\section{Conventions}
-
-The keywords `MUST', `MUST NOT', `REQUIRED', `SHALL', `SHALL NOT', `SHOULD', `SHOULD NOT', `RECOMMENDED', `MAY', and `OPTIONAL' in this document are to be interpreted as described in RFC 2119\cite{rfc2119}. 
-
-Java code and sample data fragments are formatted as shown in figure \ref{ex1}:
-
-\begin{figure}[hbtp]
-\caption{Example Java Code}
-\label{ex1}
-\begin{listing}{1}
-package com.example.hello;
-
-public class Hello {
-    public static void main(String args[]) {
-        System.out.println("Hello World");
-    }
-}\end{listing}
-\end{figure}
-
-URIs of the general form `http://example.org/...' and `http://example.com/...' represent application or context-dependent URIs.
-
-All parts of this specification are normative, with the exception of examples, notes and sections explicitly marked as `Non-Normative'. Non-normative notes are formatted as shown below.
-
-\begin{nnnote*}
-This is a note.
-\end{nnnote*}
-
-\section{Terminology}
-
-\begin{description}
-\item[Resource class] A Java class that uses \jaxrs\ annotations to implement a corresponding Web resource, see chapter \ref{resources}.
-\item[Root resource class] A {\em resource class} annotated with \Path. Root resource classes provide the roots of the resource class tree and provide access to sub-resources, see chapter \ref{resources}.
-\item[Request method designator] A runtime annotation annotated with \HttpMethod. Used to identify the HTTP request method to be handled by a {\em resource method}.
-\item[Resource method] A method of a {\em resource class} annotated with a {\em request method designator} that is used to handle requests on the corresponding resource, see section \ref{resource_method}.
-\item[Sub-resource locator] A method of a {\em resource class} that is used to locate sub-resources of the corresponding resource, see section \ref{sub_resources}.
-\item[Sub-resource method] A method of a {\em resource class} that is used to handle requests on a sub-resource of the corresponding resource, see section \ref{sub_resources}.
-\item[Provider] An implementation of a \jaxrs\ extension interface. Providers extend the capabilities of a \jaxrs\ runtime and are described in chapter \ref{providers}.
-\end{description}
-
-\section{Expert Group Members} 
-
-This specification is being developed as part of JSR 311 under the Java Community Process. This specification is the result of the collaborative work of the members of the JSR 311 Expert Group. The following are the present and former expert group members:
-
-Jan Algermissen (Individual Member) \\
-Heiko Braun (Red Hat Middleware LLC) \\
-Bill Burke (Red Hat Middleware LLC) \\
-Larry Cable (BEA Systems) \\
-Bill De Hora (Individual Member) \\ 
-Roy Fielding (Day Software, Inc.) \\
-Harpreet Geekee (Nortel) \\
-Nickolas Grabovas (Individual Member) \\
-Mark Hansen (Individual Member) \\
-John Harby (Individual Member) \\
-Hao He (Individual Member) \\
-Ryan Heaton (Individual Member) \\
-David Hensley (Individual Member) \\
-Stephan Koops (Individual Member) \\
-Changshin Lee (NCsoft Corporation) \\
-Francois Leygues (Alcatel-Lucent) \\
-Jerome Louvel (Individual Member) \\
-Hamid Ben Malek (Fujitsu Limited) \\
-Ryan J. McDonough (Individual Member) \\
-Felix Meschberger (Day Software, Inc.) \\
-David Orchard (BEA Systems) \\
-Dhanji R. Prasanna (Individual Member) \\
-Julian Reschke (Individual Member) \\
-Jan Schulz-Hofen (Individual Member) \\
-Joel Smith (IBM) \\
-Stefan Tilkov (innoQ Deutschland GmbH)
-
-\section{Acknowledgements}
-
-During the course of the JSR we received many excellent suggestions on the JSR and Jersey (RI) mailing lists, thanks in particular to James Manger (Telstra) and Reto Bachmann-Gm\"{u}r (Trialox) for their contributions. 
-
-The \code{GenericEntity} class was inspired by the Google Guice \code{Type\-Literal} class. Our thanks to Bob Lee and Google for donating this class to \jaxrs.
-
-The following individuals (all Sun Microsystems) have also made invaluable technical contributions: Roberto Chinnici, Dianne Jiao (TCK), Ron Monzillo, Rajiv Mordani, Eduardo Pelegri-Llopart, Jakub Podlesak (RI) and Bill Shannon.
diff --git a/spec/chapters/license.tex b/spec/chapters/license.tex
deleted file mode 100644
index 93e984a..0000000
--- a/spec/chapters/license.tex
+++ /dev/null
@@ -1,73 +0,0 @@
-\begin{flushleft}
-
-{\bfseries Specification: JAX-RS - Java\texttrademark\ API for RESTful Web Services (\lq\lq Specification\rq\rq)\\
-Version: 1.1-editors-draft\\
-Status: Pre-FCS Public Release\\
-Release: \today\\
-Copyright 2007 Sun Microsystems, Inc.\\
-4150 Network Circle, Santa Clara, California 95054, U.S.A\\
-180, Avenue de L'Europe, 38330 Montbonnot Saint Martin, France\\
-All rights reserved.
-}
-
-{\bfseries NOTICE}
-
-The Specification is protected by copyright and the information described therein may be protected by one or more U.S. patents, foreign patents, or pending applications.  Except as provided under the following license, no part of the Specification may be reproduced in any form by any means without the prior written authorization of Sun Microsystems, Inc. (\lq\lq Sun\rq\rq) and its licensors, if any.  Any use of the Specification and the information described therein will be governed by the terms and conditions of this Agreement. 
-
-Subject to the terms and conditions of this license, including your compliance with Paragraphs 1 and 2 below, Sun hereby grants you a fully-paid, non-exclusive, non-transferable, limited license (without the right to sublicense) under Sun's intellectual property rights to:
-
-\begin{enumerate}
-\item Review the Specification for the purposes of evaluation. This includes: 
-(i) developing implementations of the Specification for your internal, non-commercial use;
-(ii) discussing the Specification with any third party; and 
-(iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Technology.
-
-\item Distribute implementations of the Specification to third parties for their testing and evaluation use, provided that any such implementation:
-(i) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented;
-(ii) is clearly and prominently marked with the word \lq\lq UNTESTED\rq\rq\ or \lq\lq EARLY ACCESS\rq\rq\ or \lq\lq INCOMPATIBLE\rq\rq\  or \lq\lq UNSTABLE\rq\rq\ or \lq\lq BETA\rq\rq\ in any list of available builds and in proximity to every link initiating its download, where the list or link is under LicenseeÕs control; and
-(iii) includes the following notice:
-\lq\lq This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP.\rq\rq\
-\end{enumerate}
-
-The grant set forth above concerning your distribution of implementations of the specification is contingent upon your agreement to terminate development and distribution of your Òearly draftÓ implementation as soon as feasible following final completion of the specification.  If you fail to do so, the foregoing grant shall be considered null and void. 
- 
-No provision of this Agreement shall be understood to restrict your ability to make and distribute to third parties applications written to the Specification.
-Other than this limited license, you acquire no right, title or interest in or to the Specification or any other Sun intellectual property, and the Specification may only be used in accordance with the license terms set forth herein. This license will expire on the earlier of: (a) two (2) years from the date of Release listed above; (b) the date on which the final version of the Specification is publicly released; or (c) the date on which the Java Specification Request (JSR) to which the Specification corresponds is withdrawn.  In addition, this license will terminate immediately without notice from Sun if you fail to comply with any provision of this license.  Upon termination, you must cease use of or destroy the Specification.
- 
-\lq\lq Licensor Name Space\rq\rq\ means the public class or interface declarations whose names begin with \lq\lq java\rq\rq\ , \lq\lq javax\rq\rq\ , \lq\lq com.sun\rq\rq\  or their equivalents in any subsequent naming convention adopted by Sun through the Java Community Process, or any recognized successors or replacements thereof
-
-
-{\bfseries TRADEMARKS}
-
-No right, title, or interest in or to any trademarks, service marks, or trade names of Sun or Sun's licensors is granted hereunder.  Sun, Sun Microsystems, the Sun logo, Java,  are trademarks or registered trademarks of Sun Microsystems, Inc. in the
-U.S. and other countries.
-
-{\bfseries DISCLAIMER OF WARRANTIES}
-
-THE SPECIFICATION IS PROVIDED "AS IS" AND IS EXPERIMENTAL AND MAY CONTAIN DEFECTS OR DEFICIENCIES WHICH CANNOT OR WILL NOT BE CORRECTED BY SUN.  SUN MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT THAT THE CONTENTS OF THE SPECIFICATION ARE
-SUITABLE FOR ANY PURPOSE OR THAT ANY PRACTICE OR IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER RIGHTS.  This document does not represent any commitment to release or implement any portion of the Specification in any product.
-
-THE SPECIFICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.  CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION THEREIN; THESE CHANGES WILL BE INCORPORATED INTO NEW VERSIONS OF THE SPECIFICATION, IF ANY.  SUN MAY MAKE IMPROVEMENTS AND/OR CHANGES TO THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THE SPECIFICATION AT ANY TIME.  Any use of such changes in the Specification will be governed by the then-current license for the applicable version of the Specification.
-
-{\bfseries LIMITATION OF LIABILITY}
-
-TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO ANY FURNISHING, PRACTICING, MODIFYING OR ANY USE OF THE SPECIFICATION, EVEN IF SUN AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-You will hold Sun (and its licensors) harmless from any claims based on your use of the Specification for any purposes other than the limited right of evaluation as described above, and from any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license.
-
-{\bfseries RESTRICTED RIGHTS LEGEND}
-
-If this Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
-
-{\bfseries REPORT}
-
-You may wish to report any ambiguities, inconsistencies or inaccuracies you may find in connection with your evaluation of the Specification (\lq\lq Feedback\rq\rq).  To the extent that you provide Sun with any Feedback, you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Sun a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose related to the Specification and future versions, implementations, and test suites thereof.
-
-{\bfseries GENERAL TERMS}
-
-Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply.
-
-The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
-
-This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
-\end{flushleft}
\ No newline at end of file
diff --git a/spec/chapters/license_final.tex b/spec/chapters/license_final.tex
deleted file mode 100644
index 9d5dc1e..0000000
--- a/spec/chapters/license_final.tex
+++ /dev/null
@@ -1,82 +0,0 @@
-\begin{flushleft}
-
-{\bfseries Specification: JSR-000311 - Java\texttrademark\ API for RESTful Web Services (\lq\lq Specification\rq\rq)\\
-Version: 1.1\\
-Status: Final Release\\
-Release: \today\\
-Copyright 2007 Sun Microsystems, Inc.\\
-4150 Network Circle, Santa Clara, California 95054, U.S.A\\
-180, Avenue de L'Europe, 38330 Montbonnot Saint Martin, France\\
-All rights reserved.
-}
-
-{\bfseries LIMITED LICENSE GRANTS}
-
-\begin{enumerate}
-\item License for Evaluation Purposes. Sun hereby grants you a fully-paid, non-exclusive, non-transferable, worldwide, limited license (without the right to sublicense), under Sun's Êapplicable intellectual property rights to view, download, use and reproduce the Specification only for the purpose of internal evaluation. ÊThis includes (i) developing applications intended to run on an implementation of the Specification, provided that such applications do not themselves implement any portion(s) of the Specification, and (ii) discussing the Specification with any third party; and (iii) excerpting brief portions of the Specification in oral or written communications which discuss the Specification provided that such excerpts do not in the aggregate constitute a significant portion of the Specification.
-
-\item License for the Distribution of Compliant Implementations. Sun Êalso grants you a perpetual, non-exclusive, non-transferable, worldwide, fully paid-up, royalty free, limited license (without the right to sublicense) under any applicable copyrights or, subject to the provisions of subsection 4 below, patent rights it may have covering the Specification to create and/or distribute an Independent Implementation of the Specification that: (a) fully implements the Specification including all its required interfaces and functionality; (b) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented; and (c) passes the Technology Compatibility Kit (including satisfying the requirements of the applicable TCK Users Guide) for such Specification (\lq\lq Compliant Implementation\rq\rq). ÊIn addition, the foregoing license is expressly conditioned on your not acting outside its scope. ÊNo license is granted hereunder for any other purpose (including, for example, modifying the Specification, other than to the extent of your fair use rights, or distributing the Specification to third parties). ÊAlso, no right, title, or interest in or to any trademarks, service marks, or trade names of Sun or Sun's licensors is granted hereunder. ÊJava, and Java-related logos, marks and names are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
-
-\item Pass-through Conditions. You need not include limitations (a)-(c) from the previous paragraph or any other particular \lq\lq pass through\rq\rq\ requirements in any license You grant concerning the use of your Independent Implementation or products derived from it. ÊHowever, except with respect to Independent Implementations (and products derived from them) that satisfy limitations (a)-(c) from the previous paragraph, You may neither: Ê(a) grant or otherwise pass through to your licensees any licenses under Sun's Êapplicable intellectual property rights; nor (b) authorize your licensees to make any claims concerning their implementation's compliance with the Specification in question.
-
-\item Reciprocity Concerning Patent Licenses. Ê
-\begin{enumerate}
-\itemÊWith respect to any patent claims covered by the license granted under subparagraph 2 above that would be infringed by all technically feasible implementations of the Specification, such license is conditioned upon your offering on fair, reasonable and non-discriminatory terms, to any party seeking it from You, a perpetual, non-exclusive, non-transferable, worldwide license under Your patent rights which are or would be infringed by all technically feasible implementations of the Specification to develop, distribute and use a Compliant Implementation.
-
-\itemÊWith respect to any patent claims owned by Sun and covered by the license granted under subparagraph 2, whether or not their infringement can be avoided in a technically feasible manner when implementing the Specification, such license shall terminate with respect to such claims if You initiate a claim against Sun that it has, in the course of performing its responsibilities as the Specification Lead, induced any other entity to infringe Your patent rights.
-
-\itemÊAlso with respect to any patent claims owned by Sun and covered by the license granted under subparagraph 2 above, where the infringement of such claims can be avoided in a technically feasible manner when implementing the Specification such license, with respect to such claims, shall terminate if You initiate a claim against Sun Êthat its making, having made, using, offering to sell, selling or importing a Compliant Implementation infringes Your patent rights.
-\end{enumerate}
-
-\item Definitions. For the purposes of this Agreement: Ê\lq\lq Independent 
-Implementation\rq\rq\ shall mean an implementation of the Specification that 
-neither derives from any of Sun's Êsource code or binary code materials nor, 
-except with an appropriate and separate license from Sun, includes any of Sun's 
-source code or binary code materials; \lq\lq Licensor Name Space\rq\rq\ shall 
-mean the public class or interface declarations whose names begin with \lq\lq 
-java\rq\rq, \lq\lq javax\rq\rq, \lq\lq com.sun\rq\rq\ or their equivalents in 
-any subsequent naming convention adopted by Sun Êthrough the Java Community 
-Process, or any recognized successors or replacements thereof; and \lq\lq 
-Technology Compatibility Kit\rq\rq\ or \lq\lq TCK\rq\rq\ shall mean the test 
-suite and accompanying TCK User's Guide provided by Sun Êwhich corresponds to 
-the Specification and that was available either (i) from Sun's 120 days before 
-the first release of Your Independent Implementation that allows its use for 
-commercial purposes, or (ii) more recently than 120 days from such release but 
-against which You elect to test Your implementation of the Specification.
-\end{enumerate}
-
-This Agreement will terminate immediately without notice from Sun if you breach the Agreement or act outside the scope of the licenses granted above.
-
-{\bfseries TRADEMARKS}
-
-No right, title, or interest in or to any trademarks, service marks, or trade names of Sun or Sun's licensors is granted hereunder.  Sun, Sun Microsystems, the Sun logo, Java,  are trademarks or registered trademarks of Sun Microsystems, Inc. in the
-U.S. and other countries.
-
-{\bfseries DISCLAIMER OF WARRANTIES}
-
-THE SPECIFICATION IS PROVIDED \lq\lq AS IS\rq\rq. SUN MAKES NO REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT (INCLUDING AS A CONSEQUENCE OF ANY PRACTICE OR IMPLEMENTATION OF THE SPECIFICATION), OR THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE. ÊThis document does not represent any commitment to release or implement any portion of the Specification in any product. In addition, the Specification could include technical inaccuracies or typographical errors.
-
-{\bfseries LIMITATION OF LIABILITY}
-
-TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED IN ANY WAY TO YOUR HAVING, IMPELEMENTING OR OTHERWISE USING USING ÊTHE SPECIFICATION, EVEN IF SUN AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-You will indemnify, hold harmless, and defend Sun and its licensors from any claims arising or resulting from: (i) your use of the Specification; (ii) the use or distribution of your Java application, applet and/or implementation; and/or (iii) any claims that later versions or releases of any Specification furnished to you are incompatible with the Specification provided to you under this license. 
-
-{\bfseries RESTRICTED RIGHTS LEGEND}
-
-U.S. Government: If this Specification is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).
-
-{\bfseries REPORT}
-
-If you provide Sun with any comments or suggestions concerning the Specification (\lq\lq Feedback\rq\rq), you hereby: (i) agree that such Feedback is provided on a non-proprietary and non-confidential basis, and (ii) grant Sun a perpetual, non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to sublicense through multiple levels of sublicensees, to incorporate, disclose, and use without limitation the Feedback for any purpose.
-
-{\bfseries GENERAL TERMS}
-
-Any action related to this Agreement will be governed by California law and controlling U.S. federal law. The U.N. Convention for the International Sale of Goods and the choice of law rules of any jurisdiction will not apply.
-
-The Specification is subject to U.S. export control laws and may be subject to export or import regulations in other countries. Licensee agrees to comply strictly with all such laws and regulations and acknowledges that it has the responsibility to obtain such licenses to export, re-export or import as may be required after delivery to Licensee.
-
-This Agreement is the parties' entire agreement relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, conditions, representations and warranties and prevails over any conflicting or additional terms of any quote, order, Êacknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification to this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
-
-Rev. April, 2006
-\end{flushleft}
\ No newline at end of file
diff --git a/spec/chapters/providers.tex b/spec/chapters/providers.tex
deleted file mode 100644
index 7e3a5b5..0000000
--- a/spec/chapters/providers.tex
+++ /dev/null
@@ -1,128 +0,0 @@
-\chapter{Providers}
-\label{providers}
-
-The \jaxrs\ runtime is extended using application-supplied provider classes. A provider is annotated with \Provider\ and implements one or more interfaces defined by \jaxrs.
-
-\section{Lifecycle and Environment}
-
-By default a single instance of each provider class is instantiated for each \jaxrs\ application. First the constructor (see section \ref{provider_class_constructor}) is called, then any requested dependencies are injected (see chapter \ref{context}), then the appropriate provider methods may be called multiple times (simultaneously), and finally the object is made available for garbage collection. Section \ref{providercontext} describes how a provider obtains access to other providers via dependency injection.
-
-An implementation MAY offer other provider lifecycles, mechanisms for specifying these are outside the scope of this specification. E.g. an implementation based on an inversion-of-control framework may support all of the lifecycle options provided by that framework.
-
-\subsection{Constructors}
-\label{provider_class_constructor}
-
-Provider classes are instantiated by the \jaxrs\ runtime and MUST have a public constructor for which the \jaxrs\ runtime can provide all parameter values. Note that a zero argument constructor is permissible under this rule.
-
-A public constructor MAY include parameters annotated with \Context - chapter \ref{context} defines the parameter types permitted for this annotation. Since providers may be created outside the scope of a particular request, only deployment-specific properties may be available from injected interfaces at construction time - request-specific properties are available when a provider method is called. If more than one public constructor can be used then an implementation MUST use the one with the most parameters. Choosing amongst constructors with the same number of parameters is implementation specific, implementations SHOULD generate a warning about such ambiguity.
-
-\section{Entity Providers}
-\label{entity_providers}
-
-Entity providers supply mapping services between representations and their associated Java types. Entity providers come in two flavors: \MsgRead\ and \MsgWrite\ described below. In the absence of a suitable entity provider, \jaxrs\ implementations are REQUIRED to use to the JavaBeans Activation Framework\cite{jaf} to try to obtain a suitable data handler to perform the mapping instead.
-
-\subsection{Message Body Reader}
-\label{message_body_reader}
-
-The \MsgRead\ interface defines the contract between the \jaxrs\ runtime and components that provide mapping services from representations to a corresponding Java type. A class wishing to provide such a service implements the \MsgRead\ interface and is annotated with \Provider.
-
-The following describes the logical\footnote{Implementations are free to optimize their processing provided the results are equivalent to those that would be obtained if these steps are followed.} steps taken by a \jaxrs\ implementation when mapping a request entity body to a Java method parameter:
-
-\begin{enumerate}
-\item Obtain the media type of the request. If the request does not contain a \code{Content-Type} header then use \code{application/octet-stream}.
-\item Identify the Java type of the parameter whose value will be mapped from the entity body. Section \ref{mapping_requests_to_java_methods} describes how the Java method is chosen.
-\item Select the set of \MsgRead\ classes that support the media type of the request, see section \ref{declaring_provider_capabilities}.
-\item\label{findreader} Iterate through the selected \MsgRead\ classes and, utilizing the \code{isReadable} method of each, choose a \MsgRead\ provider that supports the desired Java type.
-\item If step \ref{findreader} locates a suitable \MsgRead\ then use its \code{readFrom} method to map the entity body to the desired Java type.
-\item Else if a suitable data handler can be found using the JavaBeans Activation Framework\cite{jaf} then use it to map the entity body to the desired Java type.
-\item Else generate a \WebAppExc\ that contains an unsupported media type response (HTTP 415 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}.
-\end{enumerate}
-
-A \MsgRead\code{.readFrom} method MAY throw \WebAppExc. If thrown, the resource method is not invoked and the exception is treated as if it originated from a resource method, see section \ref{method_exc}.
-
-\subsection{Message Body Writer}
-\label{message_body_writer}
-
-The \MsgWrite\ interface defines the contract between the \jaxrs\ runtime and components that provide mapping services from a Java type to a representation. A class wishing to provide such a service implements the \MsgWrite\ interface and is annotated with \Provider.
-
-The following describes the logical steps taken by a \jaxrs\ implementation when mapping a return value to a response entity body:
-
-\begin{enumerate}
-\item Obtain the object that will be mapped to the response entity body. For a return type of \Response\ or subclasses the object is the value of the \code{entity} property, for other return types it is the returned object.
-\item Determine the media type of the response, see section \ref{determine_response_type}.
-\item Select the set of \MsgWrite\ providers that support (see section \ref{declaring_provider_capabilities}) the object and media type of the response entity body.
-\item Sort the selected \MsgWrite\ providers with a primary key of media type (see section \ref{declaring_provider_capabilities}) and a secondary key of generic type where providers whose generic type is the nearest superclass of the object class are sorted first.
-\item\label{findwriter} Iterate through the sorted \MsgWrite\ providers and, utilizing the \code{isWriteable} method of each, choose an \MsgWrite\ that supports the object that will be mapped to the entity body.
-\item If step \ref{findwriter} locates a suitable \MsgWrite\ then use its \code{writeTo} method to map the object to the entity body.
-\item Else if a suitable data handler can be found using the JavaBeans Activation Framework\cite{jaf} then use it to map the object to the entity body.
-\item Else generate a \WebAppExc\ with an internal server error response (HTTP 500 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}.
-\end{enumerate}
-
-A \MsgWrite\code{.write} method MAY throw \WebAppExc. If thrown before the response is committed, the exception is treated as if it originated from a resource method, see section \ref{method_exc}. To avoid an infinite loop, implementations SHOULD NOT attempt to map exceptions thrown during serialization of an response previously mapped from an exception and SHOULD instead simply return a server error (status code 500) response.
-
-\subsection{Declaring Media Type Capabilities}
-\label{declaring_provider_capabilities}
-
-Message body readers and writers MAY restrict the media types they support using the \Consumes\ and \Produces\ annotations respectively. The absence of these annotations is equivalent to their inclusion with media type (\lq\lq*/*\rq\rq), i.e. absence implies that any media type is supported. An implementation MUST NOT use an entity provider for a media type that is not supported by that provider.
-
-When choosing an entity provider an implementation sorts the available providers according to the media types they declare support for. Sorting of media types follows the general rule: x/y $<$ x/* $<$ */*, i.e. a provider that explicitly lists a media types is sorted before a provider that lists */*.
-
-\subsection{Standard Entity Providers}
-\label{standard_entity_providers}
-
-An implementation MUST include pre-packaged \MsgRead\ and \MsgWrite\ implementations for the following Java and media type combinations:
-
-\begin{description}
-\item[\code{byte[]}] All media types (\code{*/*}).
-\item[\code{java.lang.String}] All media types (\code{*/*}).
-\item[\code{java.io.InputStream}] All media types (\code{*/*}).
-\item[\code{java.io.Reader}] All media types (\code{*/*}).
-\item[\code{java.io.File}] All media types (\code{*/*}).
-\item[\code{javax.activation.DataSource}] All media types (\code{*/*}).
-\item[\code{javax.xml.transform.Source}] XML types (\code{text/xml}, \code{application\-/\-xml} and \code{application\-/\-*+xml}).
-\item[\code{javax.xml.bind.JAXBElement} and application-supplied JAXB classes] XML media types (\code{text\-/\-xml}, \code{application/xml} and \code{application/*+xml}).
-\item[\code{MultivaluedMap<String,String>}] Form content (\code{application/x-www-form-urlencoded}).
-\item[\code{StreamingOutput}] All media types (\code{*/*}), \MsgWrite\ only.
-\end{description}
-
-When reading zero-length request entities, all implementation-supplied \MsgRead\ implementations except the JAXB-related one MUST create a corresponding Java object that represents zero-length data; they MUST NOT return null. The implementation-supplied JAXB \MsgRead\ implementation MUST throw a \WebAppExc\ with a client error response (HTTP 400) for zero-length request entities.
-
-The implementation-supplied entity provider(s) for \code{javax\-.xml\-.bind\-.JAXBElement} and application-supplied JAXB classes MUST use \code{JAXBContext} instances provided by application-supplied context resolvers, see section \ref{contextprovider}. If an application does not supply a \code{JAXBContext} for a particular type, the implementation-supplied entity provider MUST use its own default context instead.
-
-When writing responses, implementations SHOULD respect application-supplied character set metadata and SHOULD use UTF-8 if a character set is not specified by the application or if the application specifies a character set that is unsupported.
-
-An implementation MUST support application-provided entity providers and MUST use those in preference to its own pre-packaged providers when either could handle the same request.
-
-\subsection{Transfer Encoding}
-\label{transfer_encoding}
-
-Transfer encoding for inbound data is handled by a component of the container or the \jaxrs\ runtime. \MsgRead\ providers always operate on the decoded HTTP entity body rather than directly on the HTTP message body.
-
-A JAX-RS runtime or container MAY transfer encode outbound data or this MAY be done by application code.
-
-\subsection{Content Encoding}
-
-Content encoding is the responsibility of the application. Application-supplied entity providers MAY perform such encoding and manipulate the HTTP headers accordingly.
-
-\section{Context Providers}
-\label{contextprovider}
-
-Context providers supply context to resource classes and other providers. A context provider class implements the \code{ContextResolver<T>} interface and is annotated with \Provider. E.g. an application wishing to provide a customized \code{JAXBContext} to the default JAXB entity providers would supply a class implementing \code{ContextResolver<JAXBContext>}.
-
-Context providers MAY return \code{null} from the \code{getContext} method if they do not wish to provide their context for a particular Java type. E.g. a JAXB context provider may wish to only provide the context for certain JAXB classes. Context providers MAY also manage multiple contexts of the same type keyed to different Java types.
-
-\subsection{Declaring Media Type Capabilities}
-\label{context_media_type}
-
-Context provider implementations MAY restrict the media types they support using the \Produces\ annotation. The absence of this annotation is equivalent to its inclusion with media type (\lq\lq*/*\rq\rq), i.e. absence implies that any media type is supported.
-
-When choosing a context provider an implementation sorts the available providers according to the media types they declare support for. Sorting of media types follows the general rule: x/y $<$ x/* $<$ */*, i.e. a provider that explicitly lists a media type is sorted before a provider that lists */*.
-
-\section{Exception Mapping Providers}
-\label{exceptionmapper}
-
-When a resource class or provider method throws an exception, the \jaxrs\ runtime will attempt to map the exception to a suitable HTTP response - see section \ref{method_exc}. An application can supply exception mapping providers to customize this mapping.
-
-Exception mapping providers map a checked or runtime exception to an instance of \Response. An exception mapping provider implements the \code{ExceptionMapper<T>} interface and is annotated with \Provider. When a resource method throws an exception for which there is an exception mapping provider, the matching provider is used to obtain a \Response\ instance. The resulting \Response\ is processed as if the method throwing the exception had instead returned the \Response, see section \ref{resource_method_return}.
-
-When choosing an exception mapping provider to map an exception, an implementation MUST use the provider whose generic type is the nearest superclass of the exception.
diff --git a/spec/chapters/refs.tex b/spec/chapters/refs.tex
deleted file mode 100644
index a8054a8..0000000
--- a/spec/chapters/refs.tex
+++ /dev/null
@@ -1,5 +0,0 @@
-\raggedright
-\bibliographystyle{unsrt}
-\addcontentsline{toc}{chapter}{Bibliography}
-\bibliography{references}
-
diff --git a/spec/chapters/resources.tex b/spec/chapters/resources.tex
deleted file mode 100644
index e25d2db..0000000
--- a/spec/chapters/resources.tex
+++ /dev/null
@@ -1,460 +0,0 @@
-\chapter{Resources}
-\label{resources}
-
-Using \jaxrs\, a Web resource is implemented as a resource class and requests are handled by resource methods. This chapter describes resource classes and resource methods in detail.
-
-\section{Resource Classes}
-
-A resource class is a Java class that uses \jaxrs\ annotations to implement a corresponding Web resource. Resource classes are POJOs that have at least one method annotated with \Path\ or a request method designator.
-
-\subsection{Lifecycle and Environment}
-
-By default a new resource class instance is created for each request to that resource. First the constructor (see section \ref{resource_class_constructor}) is called, then any requested dependencies are injected (see section \ref{resource_field}), then the appropriate method (see section \ref{resource_method}) is invoked and finally the object is made available for garbage collection.
-
-An implementation MAY offer other resource class lifecycles, mechanisms for specifying these are outside the scope of this specification. E.g. an implementation based on an inversion-of-control framework may support all of the lifecycle options provided by that framework.
-
-\subsection{Constructors}
-\label{resource_class_constructor}
-
-Root resource classes are instantiated by the \jaxrs\ runtime and MUST have a public constructor for which the \jaxrs\ runtime can provide all parameter values. Note that a zero argument constructor is permissible under this rule.
-
-A public constructor MAY include parameters annotated with one of the following: \Context, \HeaderParam, \CookieParam, \MatrixParam, \QueryParam\ or \PathParam. However, depending on the resource class lifecycle and concurrency, per-request information may not make sense in a constructor. If more than one public constructor is suitable then an implementation MUST use the one with the most parameters. Choosing amongst suitable constructors with the same number of parameters is implementation specific, implementations SHOULD generate a warning about such ambiguity.
-
-Non-root resource classes are instantiated by an application and do not require the above-described public constructor.
-
-\section{Fields and Bean Properties}
-\label{resource_field}
-
-When a resource class is instantiated, the values of fields and bean properties annotated with one the following annotations are set according to the semantics of the annotation:
-
-\begin{description}
-\item[\MatrixParam] Extracts the value of a URI matrix parameter.
-\item[\QueryParam] Extracts the value of a URI query parameter.
-\item[\PathParam] Extracts the value of a URI template parameter.
-\item[\CookieParam] Extracts the value of a cookie.
-\item[\HeaderParam] Extracts the value of a header.
-\item[\Context] Injects an instance of a supported resource, see chapters \ref{context} and \ref{environment} for more details.
-\end{description}
-
-Because injection occurs at object creation time, use of these annotations (with the exception of \Context) on resource class fields and bean properties is only supported for the default per-request resource class lifecycle. An implementation SHOULD warn if resource classes with other lifecycles use these annotations on resource class fields or bean properties.
-
-An implementation is only required to set the annotated field and bean property values of instances created by the implementation runtime. Objects returned by sub-resource locators (see section \ref{sub_resources}) are expected to be initialized by their creator and field and bean properties are not modified by the implementation runtime.
-
-Valid parameter types for each of the above annotations are listed in the corresponding Javadoc, however in general (excluding \Context) the following types are supported:
-
-\begin{enumerate}
-\item Primitive types.
-\item\label{stringctor} Types that have a constructor that accepts a single \code{String} argument.
-\item\label{valueofmethod} Types that have a static method named \code{valueOf} or \code{fromString} with a single \code{String} argument that return an instance of the type. If both methods are present then \code{valueOf} MUST be used unless the type is an enum in which case \code{fromString} MUST be used.
-\item \code{List<{\em T}>}, \code{Set<{\em T}>}, or \code{SortedSet<{\em T}>}, where \code{{\em T}} satisfies \ref{stringctor} or \ref{valueofmethod} above.
-\end{enumerate}
-
-The \code{Default\-Value} annotation may be used to supply a default value for some of the above, see the Javadoc for \code{Default\-Value} for usage details and rules for generating a value in the absence of this annotation and the requested data. The \code{Encoded} annotation may be used to disable automatic URI decoding for \MatrixParam, \QueryParam, and \PathParam\ annotated fields and properties.
-
-A \WebAppExc\ thrown during construction of field or property values using \ref{stringctor} or \ref{valueofmethod} above is processed directly as described in section \ref{method_exc}. Other exceptions thrown during construction of field or property values using \ref{stringctor} or \ref{valueofmethod} above are treated as client errors: if the field or property is annotated with \MatrixParam, \QueryParam\ or \PathParam\ then an implementation MUST generate a \WebAppExc\ that wraps the thrown exception with a not found response (404 status) and no entity; if the field or property is annotated with \HeaderParam\ or \CookieParam\ then an implementation MUST generate a \WebAppExc\ that wraps the thrown exception with  a client error response (400 status) and no entity. The \WebAppExc\ MUST be then be processed as described in section \ref{method_exc}.
-
-\section{Resource Methods}
-\label{resource_method}
-
-Resource methods are methods of a resource class annotated with a request method designator. They are used to handle requests and MUST conform to certain restrictions described in this section.
-
-A request method designator is a runtime annotation that is annotated with the \HttpMethod\ annotation. \jaxrs\ defines a set of request method designators for the common HTTP methods: \code{@GET}, \code{@POST}, \code{@PUT}, \code{@DELETE}, \code{@HEAD}. Users may define their own custom request method designators including alternate designators for the common HTTP methods.
-
-\subsection{Visibility}
-
-Only \code{public} methods may be exposed as resource methods. An implementation SHOULD warn users if a non-\code{public} method carries a method designator or \Path\ annotation.
-
-\subsection{Parameters}
-\label{resource_method_params}
-
-When a resource method is invoked, parameters annotated with \FormParam\ or one of the  annotations listed in section \ref{resource_field} are mapped from the request according to the semantics of the annotation. Similar to fields and bean properties:
-\begin{itemize}
-\item The \code{Default\-Value} annotation may be used to supply a default value for parameters
-\item The \code{Encoded} annotation may be used to disable automatic URI decoding of parameter values
-\item Exceptions thrown during construction of parameter values are treated the same as exceptions thrown during construction of field or bean property values, see section \ref{resource_field}. Exceptions thrown during construction of \FormParam\ annotated parameter values are treated the same as if the parameter were annotated with \HeaderParam.
-\end{itemize}
-
-\subsubsection{Entity Parameters}
-
-The value of a non-annotated parameter, called the entity parameter, is mapped from the request entity body. Conversion between an entity body and a Java type is the responsibility of an entity provider, see section \ref{entity_providers}.
-
-Resource methods MUST NOT have more than one parameter that is not annotated with one of the above-listed annotations.
-
-\subsection{Return Type}
-\label{resource_method_return}
-
-Resource methods MAY return \code{void}, \Response, \code{Generic\-Entity}, or another Java type, these return types are mapped to a response entity body as follows:
-
-\begin{description}
-\item[\code{void}] Results in an empty entity body with a 204 status code.
-\item[\Response] Results in an entity body mapped from the entity property of the \Response\ with the status code specified by the status property of the \Response. A \code{null} return value results in a 204 status code. If the status property of the \Response\ is not set: a 200 status code is used for a non-\code{null} entity property and a 204 status code is used if the entity property is \code{null}.
-\item[\code{Generic\-Entity}] Results in an entity body mapped from the \code{Entity} property of the \code{Generic\-Entity}. If the return value is not \code{null} a 200 status code is used, a \code{null} return value results in a 204 status code.
-\item[Other] Results in an entity body mapped from the class of the returned instance. If the return value is not \code{null} a 200 status code is used, a \code{null} return value results in a 204 status code.
-\end{description}
-
-Methods that need to provide additional metadata with a response should return an instance of \Response, the \Response\code{Builder} class provides a convenient way to create a \Response\ instance using a builder pattern.
-
-Conversion between a Java object and an entity body is the responsibility of an entity provider, see section \ref{entity_providers}. The return type of a resource method and the type of the returned instance are used to determine the raw type and generic type supplied to the \code{isWritable} method of \MsgWrite as follows:
-
-\begin{longtable}{|l|l|l|l|}
-\hline
-\bfseries Return Type & \bfseries Returned Instance\footnotemark & \bfseries Raw Type  & \bfseries Generic Type 
-\tabularnewline
-\hline\hline\endhead
-\code{GenericEntity} & \code{GenericEntity} or subclass & \code{RawType} property & \code{Type} property \tabularnewline
-\hline
-\code{Response} & \code{GenericEntity} or subclass & \code{RawType} property & \code{Type} property \tabularnewline
-\hline
-\code{Response} & \code{Object} or subclass & Class of instance & Class of instance \tabularnewline
-\hline
-\code{Other} & Return type or subclass & Class of instance & Generic type of return type \tabularnewline
-\hline
-\caption{Determining raw and generic types of return values}
-\end{longtable}
-\footnotetext{Or \code{Entity} property of returned instance if return type is \Response\ or a subclass thereof.}
-
-To illustrate the above consider a method that always returns an instance of \code{ArrayList<String>} either directly or wrapped in some combination of \Response\ and \code{GenericEntity}. The resulting raw and generic types are shown below.
-
-\begin{longtable}{|l|l|l|l|}
-\hline
-\bfseries Return Type & \bfseries Returned Instance & \bfseries Raw Type  & \bfseries Generic Type 
-\tabularnewline
-\hline\hline\endhead
-\code{GenericEntity} & \code{GenericEntity<List<String>>} & \code{ArrayList<?>} & \code{List<String>} \tabularnewline
-\hline
-\code{Response} & \code{GenericEntity<List<String>>} & \code{ArrayList<?>} & \code{List<String>} \tabularnewline
-\hline
-\code{Response} & \code{ArrayList<String>} & \code{ArrayList<?>} & \code{ArrayList<?>} \tabularnewline
-\hline
-\code{List<String>} & \code{ArrayList<String>} & \code{ArrayList<?>} & \code{List<String>} \tabularnewline
-\hline
-\caption{Example raw and generic types of return values}
-\end{longtable}
-
-\subsection{Exceptions}
-\label{method_exc}
-
-A resource method, sub-resource method or sub-resource locator may throw any checked or unchecked exception. An implementation MUST catch all exceptions and process them as follows:
-
-\begin{enumerate}
-\item Instances of \WebAppExc\ MUST be mapped to a response as follows. If the \code{response} property of the exception does not contain an entity and an exception mapping provider (see section \ref{exceptionmapper}) is available for \WebAppExc\, an implementation MUST use the provider to create a new \Response\ instance, otherwise the \code{response} property is used directly. The resulting \Response\ instance is then processed according to section \ref{resource_method_return}.
-\item If an exception mapping provider (see section \ref{exceptionmapper}) is available for the exception or one of its superclasses, an implementation MUST use the provider whose generic type is the nearest superclass of the exception to create a \Response\ instance that is then processed according to section \ref{resource_method_return}. If the exception mapping provider throws an exception while creating a \Response\ then return a server error (status code 500) response to the client.
-\item\label{runtimeexc} Unchecked exceptions and errors MUST be re-thrown and allowed to propagate to the underlying container.
-\item\label{checkedexc} Checked exceptions and throwables that cannot be thrown directly MUST be wrapped in a container-specific exception that is then thrown and allowed to propagate to the underlying container. Servlet-based implementations MUST use \code{Servlet\-Exception} as the wrapper. JAX-WS \code{Provider}-based implementations MUST use \code{Web\-Service\-Exception} as the wrapper.
-\end{enumerate}
-
-\begin{nnnote}Items \ref{runtimeexc} and \ref{checkedexc} allow existing container facilities (e.g. a Servlet filter or error pages) to be used to handle the error if desired.\end{nnnote}
-
-\subsection{HEAD and OPTIONS}
-\label{head_and_options}
-
-\code{HEAD} and \code{OPTIONS} requests receive additional automated support. On receipt of a \code{HEAD} request an implementation MUST either:
-
-\begin{enumerate}
-\item Call a method annotated with a request method designator for \code{HEAD} or, if none present,
-\item\label{get_not_head} Call a method annotated with a request method designator for \code{GET} and discard any returned entity.
-\end{enumerate}
-
-Note that option \ref{get_not_head} may result in reduced performance where entity creation is significant.
-
-On receipt of an \code{OPTIONS} request an implementation MUST either:
-
-\begin{enumerate}
-\item Call a method annotated with a request method designator for \code{OPTIONS} or, if none present,
-\item Generate an automatic response using the metadata provided by the \jaxrs\ annotations on the matching class and its methods.
-\end{enumerate}
-
-\section{URI Templates}
-\label{uritemplates}
-
-A root resource class is anchored in URI space using the \Path\ annotation. The value of the annotation is a relative URI path template whose base URI is provided by the combination of the deployment context and the application path (see the \code{@Application\-Path} annotation).
-
-A URI path template is a string with zero or more embedded parameters that, when values are substituted for all the parameters, is a valid URI\cite{uri} path. The Javadoc for the \Path\ annotation describes their syntax. E.g.:
-
-\begin{listing}{1}
-@Path("widgets/{id}")
-public class Widget {
-  ...
-}\end{listing}
-
-In the above example the \code{Widget} resource class is identified by the relative URI path \code{widgets/{\em xxx}} where \code{\em xxx} is the value of the \code{id} parameter.
-
-\begin{nnnote}Because \lq\{\rq and \lq\}\rq\ are not part of either the reserved or unreserved productions of URI\cite{uri} they will not appear in a valid URI.\end{nnnote}
-
-The value of the annotation is automatically encoded, e.g. the following two lines are equivalent:
-
-\begin{listing}{1}
-@Path("widget list/{id}")
-@Path("widget%20list/{id}")
-\end{listing}
-
-Template parameters can optionally specify the regular expression used to match their values. The default value matches any text and terminates at the end of a path segment but other values can be used to alter this behavior, e.g.:
-
-\begin{listing}{1}
-@Path("widgets/{path:.+}")
-public class Widget {
-  ...
-}\end{listing}
-
-In the above example the \code{Widget} resource class will be matched for any request whose path starts with \code{widgets} and contains at least one more path segment; the value of the \code{path} parameter will be the request path following \code{widgets}. E.g. given the request path \code{widgets/small/a} the value of \code{path} would be \code{small/a}.
-
-\subsection{Sub Resources}
-\label{sub_resources}
-
-Methods of a resource class that are annotated with \Path\ are either sub-resource methods or sub-resource locators. Sub-resource methods handle a HTTP request directly whilst sub-resource locators return an object that will handle a HTTP request. The presence or absence of a request method designator (e.g. @GET) differentiates between the two:
-
-\begin{description}
-\item[Present] Such methods, known as {\em sub-resource methods}, are treated like a normal resource method (see section \ref{resource_method}) except the method is only invoked for request URIs that match a URI template created by concatenating the URI template of the resource class with the URI template of the method\footnote{If the resource class URI template does not end with a \lq/\rq\ character then one is added during the concatenation.}.
-\item[Absent] Such methods, known as {\em sub-resource locators}, are used to dynamically resolve the object that will handle the request. Any returned object is treated as a resource class instance and used to either handle the request or to further resolve the object that will handle the request, see \ref{mapping_requests_to_java_methods} for further details. An implementation MUST dynamically determine the class of object returned rather than relying on the static sub-resource locator return type since the returned instance may be a subclass of the declared type with potentially different annotations, see section \ref{annotationinheritance} for rules on annotation inheritance. Sub-resource locators may have all the same parameters as a normal resource method (see section \ref{resource_method}) except that they MUST NOT have an entity parameter. 
-\end{description}
-
-The following example illustrates the difference:
-
-\begin{listing}{1}
-@Path("widgets")
-public class WidgetsResource {
-  @GET
-  @Path("offers")
-  public WidgetList getDiscounted() {...}
-  
-  @Path("{id}")
-  public WidgetResource findWidget(@PathParam("id") String id) {
-    return new WidgetResource(id);
-  }
-}
-
-public class WidgetResource {
-  public WidgetResource(String id) {...}
-
-  @GET
-  public Widget getDetails() {...}
-}\end{listing}
-
-In the above a \code{GET} request for the \code{widgets/offers} resource is handled directly by the \code{get\-Discounted} sub-resource method of the resource class \code{Widgets\-Resource} whereas a \code{GET} request for \code{widgets/{\em xxx}} is handled by the \code{get\-Details} method of the \code{Widget\-Resource} resource class.
-
-\begin{nnnote}A set of sub-resource methods annotated with the same URI template value are functionally equivalent to a similarly annotated sub-resource locator that returns an instance of a resource class with the same set of resource methods.\end{nnnote}
-
-\section{Declaring Media Type Capabilities}
-\label{declaring_method_capabilities}
-
-Application classes can declare the supported request and response media types using the \Consumes\ and \Produces\ annotations respectively. These annotations MAY be applied to a resource method, a resource class, or to an entity provider (see section \ref{declaring_provider_capabilities}). Use of these annotations on a resource method overrides any on the resource class or on an entity provider for a method argument or return type. In the absence of either of these annotations, support for any media type (\lq\lq*/*\rq\rq) is assumed.
-
-The following example illustrates the use of these annotations:
-
-\begin{listing}{1}
-@Path("widgets")
-@Produces("application/widgets+xml")
-public class WidgetsResource {
-  
-  @GET
-  public Widgets getAsXML() {...}
-  
-  @GET
-  @Produces("text/html")
-  public String getAsHtml() {...}
-  
-  @POST
-  @Consumes("application/widgets+xml")
-  public void addWidget(Widget widget) {...}
-}
-
-@Provider
-@Produces("application/widgets+xml")
-public class WidgetsProvider implements MessageBodyWriter<Widgets> {...}
-
-@Provider
-@Consumes("application/widgets+xml")
-public class WidgetProvider implements MessageBodyReader<Widget> {...}
-\end{listing}
-
-In the above:
-\begin{itemize}
-\item The \code{getAsXML} resource method will be called for \code{GET} requests that specify a response media type of \code{application/widgets+xml}. It returns a \code{Widgets} instance that will be mapped to that format using the \code{WidgetsProvider} class (see section \ref{entity_providers} for more information on \MsgWrite).
-\item The \code{getAsHtml} resource method will be called for \code{GET} requests that specify a response media type of \code{text/html}. It returns a \code{String} containing \code{text/html} that will be written using the default implementation of \code{MessageBodyWriter<String>}.
-\item The \code{addWidget} resource method will be called for \code{POST} requests that contain an entity of the media type \code{application/widgets+xml}. The value of the \code{widget} parameter will be mapped from the request entity using the \code{WidgetProvider} class (see section \ref{entity_providers} for more information on \MsgRead).
-\end{itemize}
-
-An implementation MUST NOT invoke a method whose effective value of \Produces\ does not match the request \code{Accept} header. An implementation MUST NOT invoke a method whose effective value of \Consumes\ does not match the request \code{Content-Type} header.
-
-\section{Annotation Inheritance}
-\label{annotationinheritance}
-
-\jaxrs\ annotations MAY be used on the methods and method parameters of a super-class or an implemented interface. Such annotations are inherited by a corresponding sub-class or implementation class method provided that method and its parameters do not have any \jaxrs\ annotations of its own. Annotations on a super-class take precedence over those on an implemented interface. If a subclass or implementation method has any \jaxrs\ annotations then {\em all} of the annotations on the super class or interface method are ignored. E.g.:
-
-\begin{listing}{1}
-public interface ReadOnlyAtomFeed {
-  @GET @Produces("application/atom+xml")
-  Feed getFeed();
-}
-
-@Path("feed")
-public class ActivityLog implements ReadOnlyAtomFeed {
-  public Feed getFeed() {...}
-}
-\end{listing}
-
-In the above, \code{ActivityLog.getFeed} inherits the \code{@GET} and \Produces\ annotations from the interface. Conversely:
-
-\begin{listing}{1}
-@Path("feed")
-public class ActivityLog implements ReadOnlyAtomFeed {
-  @Produces("application/atom+xml")
-  public Feed getFeed() {...}
-}
-\end{listing}
-
-In the above, the \code{@GET} annotation on \code{ReadOnlyAtomFeed.getFeed} is not inherited by \code{Activity-Log\-.get\-Feed} and it would require its own request method designator since it redefines the \Produces\ annotation.
-
-\section{Matching Requests to Resource Methods}
-\label{mapping_requests_to_java_methods}
-
-This section describes how a request is matched to a resource class and method. Implementations are not required to use the algorithm as written but MUST produce results equivalent to those produced by the algorithm.
-
-\subsection{Request Preprocessing}
-\label{reqpreproc}
-
-Prior to matching, request URIs are normalized\footnote{Note: some containers might perform this functionality prior to passing the request to an implementation.} by following the rules for case, path segment, and percent encoding normalization described in section 6.2.2 of RFC 3986\cite{uri}. The normalized request URI MUST be reflected in the URIs obtained from an injected \code{UriInfo}.
-
-\subsection{Request Matching}
-\label{request_matching}
-
-A request is matched to the corresponding resource method or sub-resource method by comparing the normalized request URI (see section \ref{reqpreproc}), the media type of any request entity, and the requested response entity format to the metadata annotations on the resource classes and their methods. If no matching resource method or sub-resource method can be found then an appropriate error response is returned. Matching of requests to resource methods proceeds in three stages as follows:
-
-\begin{enumerate}
-\item Identify the root resource class:
-
-\begin{enumerate}
-\item Set $U=\mbox{request URI path}, C=\{\mbox{root resource classes}\}, E=\{\}$
-
-\item For each class in $C$ add a regular expression (computed using the function $R(A)$ described in section \ref{template_to_regex}) to $E$ as follows:
-\begin{itemize}
-\item Add $R(T_{\mbox{class}})$ where $T_{\mbox{class}}$ is the URI path template specified for the class.
-\end{itemize}
-
-\item Filter $E$ by matching each member against $U$ as follows:
-\begin{itemize}
-\item Remove members that do not match $U$.
-\item Remove members for which the final regular expression capturing group (henceforth simply referred to as a capturing group) value is neither empty nor \lq/\rq\ and the class associated with $R(T_{\mbox{class}})$ had no sub-resource methods or locators.
-\end{itemize}
-
-\item If $E$ is empty then no matching resource can be found, the algorithm terminates and an implementation MUST generate a \WebAppExc\ with a not found response (HTTP 404 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}.
-
-\item Sort $E$ using the number of literal characters\footnote{Here, literal characters means those not resulting from template variable substitution.} in each member as the primary key (descending order), the number of capturing groups as a secondary key (descending order) and the number of capturing groups with non-default regular expressions (i.e. not \lq([\^{ }/]+?)\rq) as the tertiary key (descending order).
-
-\item Set $R_{\mbox{match}}$ to be the first member of $E$, set $U$ to be the value of the final capturing group of $R_{\mbox{match}}$ when matched against $U$, and instantiate an object $O$ of the associated class.
-
-\end{enumerate}
-
-\item \label{find_object} Obtain the object that will handle the request and a set of candidate methods:
-
-\begin{enumerate}
-\item \label{check_null} If $U$ is null or \lq/\rq, set
-$$M = \{\mbox{resource methods of } O \mbox{ (excluding sub resource methods)}\}$$
-and go to step \ref{find_method}
-
-\item Set $C=\mbox{class of } O, E=\{\}$
-
-\item For class $C$ add regular expressions to $E$ for each sub-resource method and locator as follows:
-\begin{enumerate}
-\item \label{t_method_items} For each sub-resource method, add $R(T_{\mbox{method}})$ where $T_{\mbox{method}}$ is the URI path template of the sub-resource method.
-\item For each sub-resource locator, add $R(T_{\mbox{locator}})$ where $T_{\mbox{locator}}$ is the  URI path template of the sub-resource locator.
-\end{enumerate}
-
-\item Filter $E$ by matching each member against $U$ as follows:
-\begin{itemize}
-\item Remove members that do not match $U$.
-\item Remove members derived from $T_{\mbox{method}}$ (those added in step \ref{t_method_items}) for which the final capturing group value is neither empty nor \lq/\rq.
-\end{itemize}
-
-\item If $E$ is empty then no matching resource can be found, the algorithm terminates and an implementation MUST generate a \WebAppExc\ with a not found response (HTTP 404 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}.
-
-\item Sort $E$ using the number of literal characters in each member as the primary key (descending order), the number of capturing groups as a secondary key (descending order), the number of capturing groups with non-default regular expressions (i.e. not \lq([\^{ }/]+?)\rq) as the tertiary key (descending order), and the source of each member as quaternary key sorting those derived from $T_{\mbox{method}}$ ahead of those derived from $T_{\mbox{locator}}$.
-
-\item Set $R_{\mbox{match}}$ to be the first member of $E$
-
-\item If $R_{\mbox{match}}$ was derived from $T_{\mbox{method}}$, then set 
-$$M = \{\mbox{subresource methods of }O \mbox{ where } R(T_{\mbox{method}}) = R_{\mbox{match}}\}$$ and go to step \ref{find_method}.
-
-\item Set $U$ to be the value of the final capturing group of $R(T_{\mbox{match}})$ when matched against $U$,  invoke the sub-resource locator method of $O$ and set $O$ to the value returned from that method.
-
-\item Go to step \ref{check_null}.
-
-\end{enumerate}
-
-\item \label{find_method} Identify the method that will handle the request:
-
-\begin{enumerate}
-\item \label{filter_methods} Filter $M$ by removing members that do not meet the following criteria:
-\begin{itemize}
-\item The request method is supported. If no methods support the request method an implementation MUST generate a \WebAppExc\ with a method not allowed response (HTTP 405 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}. Note the additional support for \code{HEAD} and \code{OPTIONS} described in section \ref{head_and_options}.
-\item The media type of the request entity body (if any) is a supported input data format (see section \ref{declaring_method_capabilities}). If no methods support the media type of the request entity body an implementation MUST generate a \WebAppExc\ with an unsupported media type response (HTTP 415 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}.
-\item At least one of the acceptable response entity body media types is a supported output data format (see section \ref{declaring_method_capabilities}). If no methods support one of the acceptable response entity body media types an implementation MUST generate a \WebAppExc\ with a not acceptable response (HTTP 406 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}.
-\end{itemize} 
-\item Sort $M$ in descending order as follows:
-\begin{itemize}
-\item The primary key is the media type of input data. Methods whose \Consumes\ value is the best match for the media type of the request are sorted first.
-\item The secondary key is the \Produces\ value. Methods whose value of \Produces\ best matches the value of the request accept header are sorted first.
-\end{itemize}
-
-Determining the best matching media types follows the general rule: $\mbox{n/m} > \mbox{n/*} > \mbox{*/*}$, i.e. a method that explicitly consumes the request media type or produces one of the requested media types is sorted before a method that consumes or produces */*. Quality parameter values in the accept header are also considered such that methods that produce media types with a higher acceptable q-value are sorted ahead of those with a lower acceptable q-value (i.e. n/m;q=1.0 $>$ n/m;q=0.7) - see section 14.1 of \cite{http11} for more details.
-
-\item \label{dispatch_method} The request is dispatched to the first Java method in the set\footnote{Step \ref{filter_methods} ensures the set contains at least one member.}.
-\end{enumerate}
-
-\end{enumerate}
-
-\subsection{Converting URI Templates to Regular Expressions}
-\label{template_to_regex}
-
-The function $R(A)$ converts a URI path template annotation $A$ into a regular expression as follows:
-\begin{enumerate}
-\item URI encode the template, ignoring URI template variable specifications.
-\item Escape any regular expression characters in the URI template, again ignoring URI template variable specifications.
-\item Replace each URI template variable with a capturing group containing the specified regular expression or \lq([\^{ }/]+?)\rq\ if no regular expression is specified.
-\item If the resulting string ends with \lq/\rq\ then remove the final character.
-\item Append \lq(/.*)?\rq\ to the result.
-\end{enumerate}
-
-Note that the above renders the name of template variables irrelevant for template matching purposes. However, implementations will need to retain template variable names in order to facilitate the extraction of template variable values via \PathParam\ or \UriInfo\code{.getPathParameters}.
-
-\section{Determining the MediaType of Responses}
-\label{determine_response_type}
-
-In many cases it is not possible to statically determine the media type of a response. The following algorithm is used to determine the response media type, $M_{\mbox{selected}}$, at run time:
-
-\begin{enumerate}
-\item If the method returns an instance of \Response\ whose metadata includes the response media type ($M_{\mbox{specified}}$) then set $M_{\mbox{selected}} = M_{\mbox{specified}}$, finish.
-\item Gather the set of producible media types $P$:
-\begin{itemize}
-\item If the method is annotated with \Produces, set $P = \{ V(\mbox{method}) \}$ where $V(t)$ represents the values of \Produces\ on the specified target $t$.
-\item Else if the class is annotated with \Produces, set $P = \{ V(\mbox{class}) \}$.
-\item Else set $P = \{ V(\mbox{writers}) \}$ where \lq writers\rq\ is the set of \MsgWrite\ that support the class of the returned entity object.
-\end{itemize}
-
-\item If $P = \{\}$, set $P = \{\mbox{\lq*/*\rq}\}$
-
-\item Obtain the acceptable media types $A$. If $A = \{\}$, set $A = \{\mbox{\lq*/*\rq}\}$
-
-\item Set $M=\{\}$. For each member of $A, a$:
-\begin{itemize}
-\item For each member of $P, p$:
-\begin{itemize}
-\item If $a$ is compatible with $p$, add $S(a,p)$ to $M$, where the function $S$ returns the most specific media type of the pair with the q-value of $a$.
-\end{itemize}
-\end{itemize}
-
-\item If $M = \{\}$ then generate a \WebAppExc\ with a not acceptable response (HTTP 406 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}. Finish.
-
-\item Sort $M$ in descending order, with a primary key of specificity ($\mbox{n/m} > \mbox{n/*} > \mbox{*/*}$)  and secondary key of q-value.
-
-\item For each member of $M, m$:
-\begin{itemize}
-\item If $m$ is a concrete type, set $M_{\mbox{selected}} = m$, finish.
-\end{itemize}
-
-\item If $M$ contains \lq*/*\rq\ or \lq application/*\rq, set $M_{\mbox{selected}} = \mbox{\lq application/octet-stream\rq}$, finish.
-
-\item Generate a \WebAppExc\ with a not acceptable response (HTTP 406 status) and no entity. The exception MUST be processed as described in section \ref{method_exc}. Finish.
-\end{enumerate}
-
-Note that the above renders a response with a default media type of \lq application/octet-stream\rq\ when a concrete type cannot be determined. It is RECOMMENDED that \MsgWrite\ implementations specify at least one concrete type via \Produces.
\ No newline at end of file
diff --git a/spec/chapters/titlepage.tex b/spec/chapters/titlepage.tex
deleted file mode 100644
index 5360cd5..0000000
--- a/spec/chapters/titlepage.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-\begin{titlepage}
-\raggedleft
-
-\vspace*{60pt}
-
-{\Huge
-\textsf{JAX-RS: Java\texttrademark\ API for RESTful\\\vspace{10pt}
- Web Services}}
-
-\vspace{20pt}
-
-{
-%\Large\textit{Version 1.1\\
-\Large\textit{Version 1.1 Draft\\
-\today}
-}
-
-\vspace{40pt}
-
-{\large Editors:\\
-Marc\ Hadley\\
-Paul\ Sandoz\\
-\vspace{10pt}Comments to: users@jsr311.dev.java.net
-}
-
-\vspace{80pt}
-
-{\small\textit{Sun Microsystems, Inc.\\
-4150 Network Circle, Santa Clara, CA 95054 USA.\\
-180, Avenue de L'Europe, 38330 Montbonnot Saint Martin, France}
-}
-\end{titlepage} 
diff --git a/spec/references.bib b/spec/references.bib
deleted file mode 100644
index ad25703..0000000
--- a/spec/references.bib
+++ /dev/null
@@ -1,390 +0,0 @@
-%% This BibTeX bibliography file was created using BibDesk.
-%% http://bibdesk.sourceforge.net/
-
-
-%% Created for Marc Hadley at 2008-12-08 16:37:14 -0500 
-
-
-%% Saved with string encoding Unicode (UTF-8) 
-
-
-
-@techreport{xml10,
-	Author = {Tim Bray and Jean Paoli and C. M. Sperberg-McQueen and Eve Maler},
-	Institution = {W3C},
-	Month = {October},
-	Note = {See http://www.w3.org/TR/2000/REC-xml-20001006},
-	Title = {Extensible {Markup} {Language} ({XML}) 1.0 ({Second} {Edition})},
-	Type = {{Recommendation}},
-	Year = 2000}
-
-@techreport{soap11,
-	Author = {Don Box and David Ehnebuske and Gopal Kakivaya and Andrew Layman and Noah Mendelsohn and Henrik Nielsen and Satish Thatte and Dave Winer},
-	Institution = {W3C},
-	Month = {May},
-	Note = {See http://www.w3.org/TR/SOAP/},
-	Title = {Simple {Object} {Access} {Protocol} ({SOAP}) 1.1},
-	Type = {{Note}},
-	Year = 2000}
-
-@techreport{soap12p1,
-	Author = {Martin Gudgin and Marc Hadley and Noah Mendelsohn and Jean-Jacques Moreau and Henrik {Frystyk Nielsen}},
-	Institution = {W3C},
-	Month = {June},
-	Note = {See http://www.w3.org/TR/2003/REC-soap12-part1-20030624},
-	Title = {{SOAP} {Version} 1.2 {Part} 1: {Messaging} {Framework}},
-	Type = {{Recommendation}},
-	Year = 2003}
-
-@techreport{soap12p2,
-	Author = {Martin Gudgin and Marc Hadley and Noah Mendelsohn and Jean-Jacques Moreau and Henrik {Frystyk Nielsen}},
-	Institution = {W3C},
-	Month = {June},
-	Note = {See http://www.w3.org/TR/2003/REC-soap12-part2-20030624},
-	Title = {{SOAP} {Version} 1.2 {Part} 2: {Adjuncts}},
-	Type = {{Recommendation}},
-	Year = 2003}
-
-@techreport{wsdl11,
-	Author = {Erik Christensen and Francisco Curbera and Greg Meredith and Sanjiva Weerawarana},
-	Institution = {W3C},
-	Month = {March},
-	Note = {See http://www.w3.org/TR/2001/NOTE-wsdl-20010315},
-	Title = {Web {Services} {Description} {Language} ({WSDL}) 1.1},
-	Type = {{Note}},
-	Year = 2001}
-
-@techreport{jaxrpc10,
-	Author = {Rahul Sharma},
-	Institution = {JCP},
-	Month = {June},
-	Note = {See http://jcp.org/en/jsr/detail?id=101},
-	Title = {The {Java} {API} for {XML} {Based} {RPC} ({JAX-RPC}) 1.0},
-	Type = {{JSR}},
-	Year = 2002}
-
-@techreport{jaxrpc11,
-	Author = {Roberto Chinnici},
-	Institution = {JCP},
-	Month = {August},
-	Note = {See http://jcp.org/en/jsr/detail?id=101},
-	Title = {The {Java} {API} for {XML} {Based} {RPC} ({JAX-RPC}) 1.1},
-	Type = {{Maintenance JSR}},
-	Year = 2003}
-
-@techreport{jaxb10,
-	Author = {Joseph Fialli and Sekhar Vajjhala},
-	Institution = {JCP},
-	Month = {January},
-	Note = {See http://jcp.org/en/jsr/detail?id=31},
-	Title = {The {Java} {Architecture} for {XML} {Binding} ({JAXB})},
-	Type = {{JSR}},
-	Year = 2003}
-
-@techreport{jaxb20,
-	Author = {Joseph Fialli and Sekhar Vajjhala},
-	Institution = {JCP},
-	Month = {August},
-	Note = {See http://jcp.org/en/jsr/detail?id=222},
-	Title = {The {Java} {Architecture} for {XML} {Binding} ({JAXB}) 2.0},
-	Type = {{JSR}},
-	Year = 2003}
-
-@techreport{wsdl20p1,
-	Author = {Roberto Chinnici and Martin Gudgin and Jean-Jacques Moreau and Jeffrey Schlimmer and Sanjiva Weerawarana},
-	Institution = {W3C},
-	Month = {August},
-	Note = {See http://www.w3.org/TR/2004/WD-wsdl20-20040803},
-	Title = {Web {Services} {Description} {Language} ({WSDL}) {Version} 2.0 {Part} 1: {Core} {Language} },
-	Type = {{Working Draft}},
-	Year = 2004}
-
-@techreport{wsdl20p2,
-	Author = {Martin Gudgin and Amy Lewis and Jeffrey Schlimmer},
-	Institution = {W3C},
-	Month = {August},
-	Note = {See http://www.w3.org/TR/2004/WD-wsdl20-extensions-20040803},
-	Title = {Web {Services} {Description} {Language} ({WSDL}) {Version} 2.0 {Part} 2: {Predefined} {Extensions}},
-	Type = {{Working Draft}},
-	Year = 2004}
-
-@techreport{wsdl20p3,
-	Author = {Hugo Haas and Philippe Le H\'egaret and Jean-Jacques Moreau and David Orchard and Jeffrey Schlimmer and Sanjiva Weerawarana},
-	Institution = {W3C},
-	Month = {August},
-	Note = {See http://www.w3.org/TR/2004/WD-wsdl20-bindings-20040803},
-	Title = {Web {Services} {Description} {Language} ({WSDL}) {Version} 2.0 {Part} 3: {Bindings} },
-	Type = {{Working Draft}},
-	Year = 2004}
-
-@techreport{stax,
-	Author = {Christopher Fry},
-	Institution = {JCP},
-	Month = {March},
-	Note = {See http://jcp.org/en/jsr/detail?id=173},
-	Title = {Streaming {API} for {XML} (StAX)},
-	Type = {{JSR}},
-	Year = 2003}
-
-@techreport{wsibp10,
-	Author = {Keith Ballinger and David Ehnebuske and Martin Gudgin and Mark Nottingham and Prasad Yendluri},
-	Institution = {WS-I},
-	Month = {April},
-	Note = {See http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html},
-	Title = {Basic {Profile} {Version} 1.0},
-	Type = {{Final Material}},
-	Year = 2004}
-
-@techreport{wsibp11,
-	Author = {Keith Ballinger and David Ehnebuske and Chris Ferris and Martin Gudgin and Canyang Kevin Liu and Mark Nottingham and Jorgen Thelin and Prasad Yendluri},
-	Institution = {WS-I},
-	Month = {August},
-	Note = {See http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html},
-	Title = {Basic {Profile} {Version} 1.1},
-	Type = {{Final Material}},
-	Year = 2004}
-
-@techreport{wsiap10,
-	Author = {Chris Ferris and Anish Karmarkar and Canyang Kevin Liu},
-	Institution = {WS-I},
-	Month = {August},
-	Note = {See http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html},
-	Title = {Attachments {Profile} {Version} 1.0},
-	Type = {{Final Material}},
-	Year = 2004}
-
-@techreport{swa,
-	Author = {John Barton and Satish Thatte and Henrik Frystyk Nielsen},
-	Institution = {W3C},
-	Month = {December},
-	Note = {http://www.w3.org/TR/SOAP-attachments},
-	Title = {{SOAP} {Messages} {With} {Attachments}},
-	Type = {Note},
-	Year = 2000}
-
-@techreport{mtom,
-	Author = {Martin Gudgin and Noah Mendelsohn and Mark Nottingham and Herve Ruellan},
-	Institution = {W3C},
-	Month = {January},
-	Note = {http://www.w3.org/TR/soap12-mtom/},
-	Title = {{SOAP} {Message} {Transmission} {Optimization} {Mechanism}},
-	Type = {Recommendation},
-	Year = 2005}
-
-@techreport{xop,
-	Author = {Martin Gudgin and Noah Mendelsohn and Mark Nottingham and Herve Ruellan},
-	Institution = {W3C},
-	Month = {January},
-	Note = {http://www.w3.org/TR/xop10/},
-	Title = {{XML-binary} {Optimized} {Packaging}},
-	Type = {Recommendation},
-	Year = 2005}
-
-@techreport{wsissbp10,
-	Author = {Mark Nottingham},
-	Institution = {WS-I},
-	Month = {August},
-	Note = {See http://www.ws-i.org/Profiles/SimpleSoapBindingProfile-1.0-2004-08-24.html},
-	Title = {Simple {SOAP} {Binding} {Profile} {Version} 1.0},
-	Type = {{Working Group Draft}},
-	Year = 2004}
-
-@techreport{jaxr,
-	Author = {Farrukh Najmi},
-	Institution = {JCP},
-	Month = {June},
-	Note = {See http://www.jcp.org/en/jsr/detail?id=93},
-	Title = {Java {API} for {XML} {Registries} 1.0 ({JAXR}) },
-	Type = {{JSR}},
-	Year = 2002}
-
-@techreport{xmlinfoset,
-	Author = {John Cowan and Richard Tobin},
-	Institution = {W3C},
-	Month = {October},
-	Note = {See http://www.w3.org/TR/2001/REC-xml-infoset-20011024/},
-	Title = {{XML} {Information} {Set}},
-	Type = {{Recommendation}},
-	Year = 2001}
-
-@techreport{rfc2119,
-	Author = {S. Bradner},
-	Institution = {IETF},
-	Month = {March},
-	Note = {See http://www.ietf.org/rfc/rfc2119.txt},
-	Title = {{RFC} 2119: {Keywords} for use in {RFCs} to {Indicate} {Requirement} {Levels}},
-	Type = {{RFC}},
-	Year = 1997}
-
-@techreport{xsdp1,
-	Author = {Henry S. Thompson and David Beech and Murray Maloney and Noah Mendelsohn},
-	Institution = {W3C},
-	Month = {May},
-	Note = {See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/},
-	Title = {{XML} {Schema} {Part} 1: {Structures}},
-	Type = {{Recommendation}},
-	Year = 2001}
-
-@techreport{xsdp2,
-	Author = {Paul V. Biron and Ashok Malhotra},
-	Institution = {W3C},
-	Month = {May},
-	Note = {See http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/},
-	Title = {{XML} {Schema} {Part} 2: {Datatypes}},
-	Type = {{Recommendation}},
-	Year = 2001}
-
-@techreport{uri,
-	Author = {T. Berners-Lee and R. Fielding and L. Masinter},
-	Institution = {IETF},
-	Month = {January},
-	Note = {See http://www.ietf.org/rfc/rfc3986.txt},
-	Title = {{RFC} 3986: {Uniform} {Resource} {Identifier} ({URI}): {Generic} {Syntax}},
-	Type = {{RFC}},
-	Year = 2005}
-
-@techreport{jsr109,
-	Author = {Jim Knutson and Heather Kreger},
-	Institution = {JCP},
-	Month = {September},
-	Note = {See http://jcp.org/en/jsr/detail?id=109},
-	Title = {Web {Services} for {J2EE}},
-	Type = {{JSR}},
-	Year = 2002}
-
-@techreport{jaf,
-	Author = {Bill Shannon},
-	Institution = {JCP},
-	Month = {May},
-	Note = {See http://jcp.org/en/jsr/detail?id=925},
-	Title = {{JavaBeans} {Activation} {Framework}},
-	Type = {{JSR}},
-	Year = 2006}
-
-@techreport{jsr175,
-	Author = {Joshua Bloch},
-	Date-Modified = {2008-12-08 16:37:00 -0500},
-	Institution = {JCP},
-	Keywords = {java},
-	Month = {August},
-	Note = {See http://jcp.org/en/jsr/detail?id=175},
-	Title = {A {Metadata} {Facility} for the {Java} {Programming} {Language}},
-	Type = {{JSR}},
-	Year = 2003}
-
-@techreport{jsr181,
-	Author = {Jim Trezzo},
-	Institution = {JCP},
-	Month = {August},
-	Note = {See http://jcp.org/en/jsr/detail?id=181},
-	Title = {Web {Services} {Metadata} for the {Java} {Platform}},
-	Type = {{JSR}},
-	Year = 2003}
-
-@techreport{jsr183,
-	Author = {Nataraj Nagaratnam},
-	Institution = {JCP},
-	Month = {April},
-	Note = {See http://jcp.org/en/jsr/detail?id=183},
-	Title = {Web {Services} {Message} {Security} {APIs} },
-	Type = {{JSR}},
-	Year = 2002}
-
-@techreport{javalang,
-	Author = {James Gosling and Bill Joy and Guy Steele and Gilad Bracha},
-	Institution = {Sun Microsystems, Inc},
-	Note = {http://java.sun.com/docs/books/jls/second\_edition/html/j.title.doc.html},
-	Title = {The {Java} {Language} {Specification} - Second Edition},
-	Type = {{Book}},
-	Year = 2000}
-
-@techreport{servlet,
-	Author = {G. Murray},
-	Institution = {JCP},
-	Month = {October},
-	Note = {See http://java.sun.com/products/servlet},
-	Title = {Java {Servlet} {Specification} {Version} {2.5} },
-	Type = {{JSR}},
-	Year = 2006}
-
-@techreport{jsr244,
-	Author = {Bill Shannon},
-	Institution = {JCP},
-	Month = {August},
-	Note = {See http://jcp.org/en/jsr/detail?id=244},
-	Title = {{Java} {Platform} {Enterprise} {Edition} 5 {Specification}},
-	Type = {{JSR}},
-	Year = 2005}
-
-@techreport{jsr224,
-	Author = {R. Chinnici and M. Hadley and R. Mordani},
-	Institution = {JCP},
-	Month = {August},
-	Note = {See http://jcp.org/en/jsr/detail?id=224},
-	Title = {{Java} {API} {for} {XML} {Web} {Services}},
-	Type = {{JSR}},
-	Year = 2005}
-
-@techreport{jsr250,
-	Author = {Rajiv Mordani},
-	Institution = {JCP},
-	Month = {July},
-	Note = {See http://jcp.org/en/jsr/detail?id=250},
-	Title = {{Common} {Annotations} for the {Java} {Platform}},
-	Type = {{JSR}},
-	Year = 2005}
-
-@techreport{xmlcatalogs,
-	Author = {Norm Walsh},
-	Institution = {OASIS},
-	Month = {July},
-	Note = {See http://www.oasis-open.org/committees/download.php/14041/xml-catalogs.html},
-	Title = {{XML} {Catalogs} 1.1},
-	Type = {{OASIS Committee Specification}},
-	Year = 2005}
-
-@techreport{atompub,
-	Author = {J.C. Gregorio and B. de hOra},
-	Institution = {IETF},
-	Month = {March},
-	Note = {See http://bitworking.org/projects/atom/draft-ietf-atompub-protocol-14.html},
-	Title = {{The} {Atom} {Publishing} {Protocol}},
-	Type = {{Internet Draft}},
-	Year = 2007}
-
-@techreport{http11,
-	Author = {R. Fielding and J. Gettys and J. C. Mogul and H. Frystyk and T. Berners-Lee},
-	Institution = {IETF},
-	Month = {January},
-	Note = {See http://www.ietf.org/rfc/rfc2616.txt},
-	Title = {{RFC} 2616: {Hypertext} {Transfer} {Protocol} -- {HTTP/1.1}},
-	Type = {{RFC}},
-	Year = 1997}
-
-@techreport{rest,
-	Author = {R. Fielding},
-	Institution = {University of California, Irvine},
-	Note = {See http://roy.gbiv.com/pubs/dissertation/top.htm},
-	Title = {{Architectural} {Styles} and the {Design} of {Network-based} {Software} {Architectures}},
-	Type = {Ph.D Dissertation},
-	Year = 2000}
-
-@techreport{webdav,
-	Author = {L. Dusseault},
-	Institution = {IETF},
-	Month = {June},
-	Note = {See http://www.ietf.org/rfc/rfc4918.txt},
-	Title = {{RFC} 4918: {HTTP} {Extensions} for {Web} {Distributed} {Authoring} and {Versioning} ({WebDAV})},
-	Type = {{RFC}},
-	Year = 2007}
-
-@techreport{restwiki,
-	Note = {See http://rest.blueoxen.net/cgi-bin/wiki.pl},
-	Title = {{REST} {Wiki}},
-	Type = {Web Site}}
-
-@techreport{restwikipedia,
-	Institution = {Wikipedia},
-	Note = {See http://en.wikipedia.org/wiki/Representational\_State\_Transfer},
-	Title = {{Representational} {State} {Transfer}},
-	Type = {Web Site}}
diff --git a/spec/spec.tex b/spec/spec.tex
deleted file mode 100644
index e836a86..0000000
--- a/spec/spec.tex
+++ /dev/null
@@ -1,100 +0,0 @@
-\documentclass[11pt, dvips]{book}
-\usepackage[hyperref, thmmarks]{styles/ntheorem}
-\usepackage{framed}
-\usepackage{times}
-\usepackage{textcomp}
-\usepackage{tabularx}
-\usepackage{moreverb}
-\usepackage[dvips]{graphicx}
-\usepackage[dvips,
-  pdftitle={JAX-RS: Java API for RESTful Web Services},
-  pdfauthor={Marc Hadley and Paul Sandoz, Sun Microsystems Inc.},
-  pdfsubject={JAX-RS: Java API for RESTful Web Services},
-  pdfkeywords={Java XML Web Services API REST RESTful},
-  pdftex,
-  colorlinks=true,
-  linkcolor=black,
-  citecolor=black,
-  pdfstartview=FitH,
-  letterpaper=true,
-  bookmarksnumbered=true
-]{hyperref}
-
-% set up page dimensions
-\textwidth = 6.5 in
-\textheight = 9.33 in
-\oddsidemargin = 0.0 in
-\evensidemargin = 0.0 in
-\topmargin = -0.75 in
-\headheight = 15pt
-\headsep = 0.33 in
-\parskip = 6pt
-\parindent = 0.0in
-\footskip=0.5in
-
-\usepackage{fancyhdr}
-\pagestyle{fancy}
-\usepackage{styles/jsr}
-\theoremstyle{plain}
-%\setlength{\theorempostskipamount}{0pt}
-\newtheorem{ednote}{Editors Note}[chapter]
-
-\theoremstyle{nonumberplain}
-\theoremindent0cm
-\theoremseparator{:}
-\newtheorem{nnnote}{Note}[chapter]
-
-%\usepackage[pagewise, right]{styles/lineno}
-%\usepackage[dvips]{changebar}
-\usepackage{longtable}
-
-%\renewcommand{\today}{September 8, 2008}
-
-\begin{document}
-
-\frontmatter
-\include{styles/macros}
-\include{styles/jsrfrontstyle}
-
-\include{chapters/titlepage}
-
-\cleardoublepage
-{
-\small
-\include{chapters/license}
-%\include{chapters/license_final}
-}
-
-\pdfbookmark[0]{Contents}{toc}
-\tableofcontents
-
-\mainmatter
-\include{styles/jsrmainstyle}
-
-%\linenumbers
-%\nochangebars
-
-\setcounter{secnumdepth}{4}
-
-\include{chapters/intro}
-\include{chapters/applications}
-\include{chapters/resources}
-\include{chapters/providers}
-\include{chapters/context}
-\include{chapters/environment}
-\include{chapters/delegate}
-
-\appendix
-\renewcommand{\chaptermark}[1]{
-  \markboth{\appendixname
-  \ \thechapter.\ #1}{}}
-
-\include{chapters/annotations}
-\include{chapters/headers}
-\include{chapters/changes}
-
-\backmatter
-
-\include{chapters/refs}
-
-\end{document}
diff --git a/spec/styles/jsr.sty b/spec/styles/jsr.sty
deleted file mode 100644
index 8e94092..0000000
--- a/spec/styles/jsr.sty
+++ /dev/null
@@ -1,75 +0,0 @@
-\NeedsTeXFormat{LaTeX2e}[1996/06/01]
-\ProvidesPackage{styles/jsr}[2003/04/29 v1.0 (MJH)]
-
-\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
-                       \if@mainmatter
-                         \refstepcounter{chapter}%
-                         \typeout{\@chapapp\space\thechapter.}%
-                         \addcontentsline{toc}{chapter}%
-                                   {\protect\numberline{\thechapter}#1}%
-                       \else
-                         \addcontentsline{toc}{chapter}{#1}%
-                       \fi
-                    \else
-                      \addcontentsline{toc}{chapter}{#1}%
-                    \fi
-                    \chaptermark{#1}%
-                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
-                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
-                    \if@twocolumn
-                      \@topnewpage[\@makechapterhead{#2}]%
-                    \else
-                      \@makechapterhead{#2}%
-                      \@afterheading
-                    \fi}
-\def\@makechapterhead#1{%
-  \vspace*{50\p@}%
-  {\parindent \z@ \raggedleft \sffamily
-    \ifnum \c@secnumdepth >\m@ne
-      \if@mainmatter
-        \huge\bfseries \@chapapp\space \thechapter
-        \par\nobreak
-        \vskip 20\p@
-      \fi
-    \fi
-    \interlinepenalty\@M
-    \Huge \bfseries #1\par\nobreak
-    \vskip 40\p@
-  }}
-\def\@schapter#1{\if@twocolumn
-                   \@topnewpage[\@makeschapterhead{#1}]%
-                 \else
-                   \@makeschapterhead{#1}%
-                   \@afterheading
-                 \fi}
-\def\@makeschapterhead#1{%
-  \vspace*{50\p@}%
-  {\parindent \z@ \raggedleft
-    \sffamily
-    \interlinepenalty\@M
-    \Huge \bfseries  #1\par\nobreak
-    \vskip 40\p@
-  }}  
-
-\def\verbatim@font{\small\ttfamily}
-
-\renewcommand{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi
-                    \thispagestyle{plain}%
-                    \global\@topnum\z@
-                    \@afterindentfalse
-                    \secdef\@chapter\@schapter}
-\renewcommand{\section}{\@startsection {section}{1}{0pt}%
-                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
-                                   {2.3ex \@plus.2ex}%
-                                   {\sffamily\Large\bfseries}}
-                                   
-\renewcommand{\subsection}{\@startsection{subsection}{2}{0pt}%
-                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
-                                     {1.5ex \@plus .2ex}%
-                                     {\sffamily\large\bfseries}}
-                                     
-\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0pt}%
-                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
-                                     {1.5ex \@plus .2ex}%
-                                     {\sffamily\normalsize\bfseries}}
-                                     
\ No newline at end of file
diff --git a/spec/styles/jsrfrontstyle.tex b/spec/styles/jsrfrontstyle.tex
deleted file mode 100644
index 74a7abc..0000000
--- a/spec/styles/jsrfrontstyle.tex
+++ /dev/null
@@ -1,14 +0,0 @@
-% set up page styles for frontmatter, no page headers, normal footer
-\fancyhf{}
-\fancyfoot[CO,CE]{JAX-RS}
-\fancyfoot[LE,RO]{\thepage}
-\fancyfoot[RE,LO]{\today} 
-\fancypagestyle{plain}{
-  \fancyhf{}
-  \fancyfoot[CO,CE]{JAX-RS}
-  \fancyfoot[LE,RO]{\thepage}
-  \fancyfoot[RE,LO]{\today} 
-  \renewcommand{\footrulewidth}{0pt}
-  \renewcommand{\headrulewidth}{0pt}
-}
-\renewcommand{\headrulewidth}{0pt}
diff --git a/spec/styles/jsrmainstyle.tex b/spec/styles/jsrmainstyle.tex
deleted file mode 100644
index 762819d..0000000
--- a/spec/styles/jsrmainstyle.tex
+++ /dev/null
@@ -1,21 +0,0 @@
-% set up page styles for mainmatter, page headers and normal footer
-\renewcommand{\chaptermark}[1]{
-  \markboth{\chaptername
-  \ \thechapter.\ #1}{}}
-\renewcommand{\sectionmark}[1]{
-  \markright{\thesection.\ #1}{}}
-\fancyhf{}
-\fancyhead[RO]{\slshape \rightmark}
-\fancyhead[LE]{\slshape \leftmark}
-\fancyfoot[CO,CE]{JAX-RS}
-\fancyfoot[LE,RO]{\thepage}
-\fancyfoot[RE,LO]{\today} 
-\fancypagestyle{plain}{
-  \fancyhf{}
-  \fancyfoot[CO,CE]{JAX-RS}
-  \fancyfoot[LE,RO]{\thepage}
-  \fancyfoot[RE,LO]{\today} 
-  \renewcommand{\footrulewidth}{0pt}
-  \renewcommand{\headrulewidth}{0pt}
-}
-\renewcommand{\headrulewidth}{0.4pt}
diff --git a/spec/styles/lineno.sty b/spec/styles/lineno.sty
deleted file mode 100644
index 590896b..0000000
--- a/spec/styles/lineno.sty
+++ /dev/null
@@ -1,1531 +0,0 @@
-\iffalse;                               awk '/S[H]ELL/' lineno.sty|sh;exit;\fi
-%%%                        To pretty-print this file, feed it to a unix shell!
-%%%
-%%% $Id: lineno.sty,v 1.1.1.1 2005/05/13 16:03:16 mh124079 Exp $
-%%%
-%%% Copyright 1995--2003 Stephan I. B"ottcher <boettcher@physik.uni-kiel.de>
-%%%
-%%% This program can be redistributed and/or modified under the terms
-%%% of the LaTeX Project Public License Distributed from CTAN
-%%% archives in directory macros/latex/base/lppl.txt; either
-%%% version 1 of the License, or any later version.
-%%%
-%                                      \documentclass[a4paper,12pt]{article}%D
-%                                                        \usepackage{lineno}%D
-%
-%                                                                      \title{
-%                                                             \texttt{\itshape
-%         lineno.sty \ v3.10a 2003/11/12
-%                                                                      }\\\ \\
-%          A \LaTeX\ package  to attach                  
-% \\        Line numbers to paragraphs
-%                                                                    }\author{
-%              Stephan I. B\"ottcher                    
-%                                                                      }\date{
-%            boettcher@physik.uni-kiel.de
-%% \\        stephan@nevis.columbia.edu
-%% \\        Stephan.Boettcher@cern.ch                     
-%                                                                          \\}
-%
-%
-%                                                                \def~{\verb~}
-%                                                       \catcode`\<\catcode`\~
-%                                   \def<#1>{$\langle${\itshape#1}\/$\rangle$}
-%                                                       \catcode`\|\catcode`\~
-%                                                \def|#1{{\ttfamily\string#1}}
-%                                                        \newenvironment{code}
-%                                                     {\par\runninglinenumbers
-%                                                        \modulolinenumbers[1]
-%                                                           \linenumbersep.3em
-%                                                                \footnotesize
-%                                                          \def\linenumberfont
-%                                                  {\normalfont\tiny\itshape}}
-%                                                                           {}
-%
-%                                                           \begin{document}%D
-%%                                                     \DocInput{lineno.doc}%D
-%                                                         \pagewiselinenumbers
-%                                                                   \maketitle
-%                                                             \tableofcontents
-%                                                                      \sloppy
-%
-%
-%
-%                                                                    \section{
-%                    Introduction
-%                                                                            }
-% This package provides line numbers on paragraphs.
-% After \TeX\ has broken a paragraph into lines there will
-% be line numbers attached to them, with the possibility to
-% make references  through the \LaTeX\ ~\ref~, ~\pageref~
-% cross reference mechanism.  This includes four issues:
-%                                                              \begin{itemize}
-% \item   attach a line number on each line,
-% \item   create references to a line number,
-% \item   control line numbering mode,
-% \item   count the lines and print the numbers.
-%                                                                \end{itemize}
-% The first two points are implemented through patches to
-% the output routine.  The third by redefining ~\par~, ~\@par~
-% and ~\@@par~.  The counting is easy, as long as you want
-% the line numbers run through the text.  If they shall
-% start over at the top of each page, the aux-file as well
-% as \TeX s memory have to carry a load for each counted line.
-%
-% I wrote this package for my wife Petra, who needs it for
-% transcriptions of interviews.  This allows her to
-% precisely refer to passages in the text.  It works well
-% together with ~\marginpar~s, but not to well with displaymath. 
-% ~\footnote~s are a problem, especially when they
-% are split, but we may get there. 
-%
-% lineno.sty works
-% surprisingly well with other packages, for
-% example, ~wrapfig.sty~.  So please try if it
-% works with whatever you need, and if it does,
-% please tell me, and if it does not, tell me as
-% well, so I can try to fix it.
-%
-% This style option is written for \LaTeXe, later than November 1994,
-% since we need the ~\protected@write~ macro.
-
-\NeedsTeXFormat{LaTeX2e}[1994/11/04]
-\ProvidesPackage{styles/lineno}
-  [2003/11/12 line numbers on paragraphs v3.10a]
-
-%% v1.00 1995/03/31  SIB: first release for Petras interview transcriptions
-%% v1.01 1995/10/28  SIB: added ~pagewise~ mode
-%% v1.02 1995/11/15  SIB: added ~modulo~ option  
-%% v1.03 1995/12/05  SIB: pagewise: try to reduce the hash-size requirements
-%% v2.00 1995/12/06  SIB:   .. it works, new user interface
-%% v2.01 1996/09/17  SIB: put into CVS
-%% v2.02 1997/03/17  SIB: add: \@reinserts, for footnotes
-%% v2.04 1998/03/09  SIB: add: linenomath environment
-%% v2.05 1998/04/26  SIB: add: prevgraf test
-%% v2.06 1999/03/02  SIB: LPPL added
-%% v3.00 1999/06/11  SiB: include the extension in the main file
-%% v3.01 1999/08/28  SiB: \@reinserts -> \holdinginserts
-%% v3.02 2000/03/10  SiB: \@LN@output
-%% v3.03 2000/07/01  SiB: \@LN@ExtraLabelItems, hyperref
-%% v3.04 2000/12/17  SiB: longtable compatibility.
-%% v3.05 2001/01/02  SiB: [fleqn] detection. 
-%% v3.05a 2001/01/04 SiB: [fleqn] detection reverted for eqnarray. 
-%% v3.06 2001/01/17  SiB: [twocolumn] mode support.
-%% v3.07 2001/07/30  SiB: [hyperref] option obsoleted.
-%% v3.08 2001/08/02  SiB: linenomath wrapping for \[ \]
-%% v3.08a 2001/08/04  SiB: linenomath wrapping for \[ \] fixed
-%% v3.08b 2002/01/27  SiB: enquotation typo fix
-%% v3.09 2003/01/14  SIB: hyperref detection fix
-%% v3.10 2003/04/15  FMi: \MakeLineNo fix for deep boxes
-%% v3.10a 2003/11/12  Uwe Lück: \lineref typo fix
-%%
-%% Acknowledgements:
-%% v3.06:  Donald Arseneau, pointed to mparhack.sty.
-%% v3.07+: Frank Mittelbach, points out inconsistencies in the
-%%         user interface.
-%% v3.10: Frank Mittelbach \MakeLineNo fix for deep boxes
-%
-%                                                                    \section{
-%          Put the line numbers to the lines
-%                                                                            }
-% The line numbers have to be attached by the output
-% routine.  We simply set the ~\interlinepenalty~ to -100000.
-% The output routine will be called after each line in the
-% paragraph,  except the last,  where we trigger by ~\par~.
-% The ~\linenopenalty~ is small enough to compensate a bunch of
-% penalties (e.g., with ~\samepage~).
-%
-% (New v3.04)            Longtable uses 
-% ~\penaly~-30000.  The lineno penalty range was 
-% shrunk to $-188000 \dots -32000$.  (/New v3.04)
-
-\newcount\linenopenalty\linenopenalty=-100000
-\mathchardef\linenopenaltypar=32000
-
-% So let's make a hook to ~\output~,  the direct way. The \LaTeX\ 
-% macro ~\@reinserts~ puts the footnotes back on the page.
-%
-% (New v3.01)                ~\@reinserts~ badly
-% screws up split footnotes.  The bottom part is
-% still on the recent contributions list, and the
-% top part will be put back there after the bottom
-% part. Thus, since lineno.sty does not play well
-% with ~\inserts~ anyway, we can safely experiment
-% with ~\holdinginserts~, without making things
-% much worse.    
-%
-% Or that's what I thought, but:  Just activating
-% ~\holdinginserts~ while doing the ~\par~ will
-% not do the trick:  The ~\output~ routine may be
-% called for a real page break before all line
-% numbers are done, and how can we get control
-% over ~\holdinginserts~ at that point?
-%
-% Let's try this:  When the ~\output~ routine is
-% run with ~\holdinginserts=3~ for a real page
-% break, then we reset ~\holdinginserts~ and
-% restart ~\output~.
-%
-% Then, again, how do we keep the remaining
-% ~\inserts~ while doing further line numbers? 
-%
-% If we find ~\holdinginserts~=-3 we activate it again 
-% after doing ~\output~.             (/New v3.01)
-%
-% (New v3.02)                    To work with
-% multicol.sty, the original output routine is now
-% called indirectly, instead of being replaced.
-% When multicol.sty changes ~\output~, it is a
-% toks register, not the real thing. (/New v3.02)
-
-\let\@LN@output\output
-\newtoks\output
-\output=\expandafter{\the\@LN@output}
-\@LN@output={%
-            \LineNoTest
-            \if@tempswa
-              \LineNoHoldInsertsTest
-              \if@tempswa
-                 \if@twocolumn\let\@makecol\@LN@makecol\fi
-                 \the\output
-                 \ifnum\holdinginserts=-3
-                   \global\holdinginserts 3
-                 \fi
-              \else
-                 \global\holdinginserts-3
-                 \unvbox\@cclv
-                 \ifnum\outputpenalty=10000\else
-                   \penalty\outputpenalty
-                 \fi
-              \fi
-            \else  
-              \MakeLineNo
-            \fi
-            }
-
-% The float mechanism inserts ~\interlinepenalty~s during
-% ~\output~.  So carefully reset it before going on.  Else
-% we get doubled line numbers on every float placed in
-% horizontal mode, e.g, from ~\linelabel~.  
-%
-% Sorry, neither a ~\linelabel~ nor a ~\marginpar~ should
-% insert a penalty, else the following linenumber
-% could go to the next page. Nor should any other
-% float.  So let us suppress the ~\interlinepenalty~ 
-% altogether with the ~\@nobreak~ switch.
-%
-% Since (ltspace.dtx, v1.2p)[1996/07/26], the ~\@nobreaktrue~ does
-% it's job globally.  We need to do it locally here.
-
-\def\LineNoTest{%
-  \let\@@par\@@@par
-  \ifnum\interlinepenalty<-\linenopenaltypar
-     \advance\interlinepenalty-\linenopenalty
-     \my@nobreaktrue
-     \fi
-  \@tempswatrue
-  \ifnum\outputpenalty>-\linenopenaltypar\else
-     \ifnum\outputpenalty>-188000\relax
-       \@tempswafalse
-       \fi
-     \fi
-  }
-
-\def\my@nobreaktrue{\let\if@nobreak\iftrue}
-
-\def\LineNoHoldInsertsTest{%
-  \ifnum\holdinginserts=3\relax
-    \@tempswafalse
-  \fi
-  }
-     
-% We have to return all the page to the current page, and
-% add a box with the line number, without adding
-% breakpoints, glue or space.  The depth of our line number
-% should be equal to the previous depth of the page, in
-% case the page breaks here,  and the box has to be moved up
-% by that depth.  
-%
-% The ~\interlinepenalty~ comes after the ~\vadjust~ from a
-% ~\linelabel~,  so we increment the line number \emph{after}
-% printing it. The macro ~\makeLineNumber~ produces the
-% text of the line number, see section \ref{appearance}.
-%
-% Finally we put in the natural ~\interlinepenalty~, except
-% after the last line. 
-%
-% (New v3.10) Frank Mittelbach points out that box255 may be 
-% less deep than the last box inside, so he proposes to 
-% measure the page depth with ~\boxmaxdepth=\maxdimen~.
-% (/New v3.10)
-
-\def\MakeLineNo{%
-   \boxmaxdepth\maxdimen\setbox\z@\vbox{\unvbox\@cclv}%
-   \@tempdima\dp\z@ \unvbox\z@
-   \sbox\@tempboxa{\hbox to\z@{\makeLineNumber}}%
-   \stepcounter{linenumber}%
-   \dp\@tempboxa=\@tempdima\ht\@tempboxa=\z@
-   \nointerlineskip\kern-\@tempdima\box\@tempboxa
-   \ifnum\outputpenalty=-\linenopenaltypar\else
-       \@tempcnta\outputpenalty
-       \advance\@tempcnta -\linenopenalty
-       \penalty\@tempcnta
-   \fi
-   }
-
-%
-%
-%                                                                    \section{
-%               Control line numbering
-%                                                                            }
-% The line numbering is controlled via ~\par~.  \LaTeX\
-% saved the \TeX-primitive ~\par~ in ~\@@par~.  We push it
-% one level further out, and redefine ~\@@par~ to insert
-% the ~\interlinepenalty~ needed to trigger the
-% line numbering. And we need to allow pagebreaks after a
-% paragraph. 
-% 
-% New (2.05beta): the prevgraf test.  A paragraph that ends with a
-% displayed equation, a ~\noindent\par~ or ~wrapfig.sty~ produce empty
-% paragraphs. These should not get a spurious line number via
-% ~\linenopenaltypar~. 
-
-\let\@@@par\@@par
-\newcount\linenoprevgraf
-
-\def\linenumberpar{\ifvmode\@@@par\else\ifinner\@@@par\else
-     \advance\interlinepenalty \linenopenalty
-        \linenoprevgraf\prevgraf
-        \global\holdinginserts3%
-        \@@@par
-        \ifnum\prevgraf>\linenoprevgraf
-           \penalty-\linenopenaltypar
-           \fi
-        \kern\z@
-        \global\holdinginserts0%
-     \advance\interlinepenalty -\linenopenalty
-     \fi\fi
-     }
-
-% The basic commands to enable and disable line numbers.
-% ~\@par~ and ~\par~ are only touched, when they are ~\let~ 
-% to ~\@@@par~/~\linenumberpar~.  The line number may be
-% reset to 1 with the star-form, or set by an optional
-% argument ~[~<number>~]~. 
-
-\def\linenumbers{\let\@@par\linenumberpar
-     \ifx\@par\@@@par\let\@par\linenumberpar\fi
-     \ifx\par\@@@par\let\par\linenumberpar\fi
-     \@ifnextchar[{\resetlinenumber}%]
-                 {\@ifstar{\resetlinenumber}{}}%
-     }
-
-\def\nolinenumbers{\let\@@par\@@@par
-  \ifx\@par\linenumberpar\let\@par\@@@par\fi
-  \ifx\par\linenumberpar\let\par\@@@par\fi
-  }
-
-% What happens with a display math?  Since ~\par~ is not executed,
-% when breaking the lines before a display, they will not get
-% line numbers.  Sorry, but I do not dare to change
-% ~\interlinepenalty~ globally, nor do I want to redefine
-% the display math environments here.
-%   \begin{displaymath}
-%                       display \ math
-%   \end{displaymath}
-% See the subsection below, for a wrapper enviroment to make
-% it work.  But that requires to wrap each and every display
-% in your LaTeX source.
-%
-% The next two commands are provided to turn on line
-% numbering in a specific mode. Please note the difference:
-% for pagewise numbering, ~\linenumbers~ comes first to
-% inhibit it from seeing optional arguments, since
-% re-/presetting the counter is useless. 
-
-\def\pagewiselinenumbers{\linenumbers\setpagewiselinenumbers}
-\def\runninglinenumbers{\setrunninglinenumbers\linenumbers}
-
-% Finally, it is a \LaTeX\ style, so we provide for the use
-% of environments, including the suppression of the
-% following paragraph's indentation.
-
-%%% TO DO: add \par to \linenumbers, if called from an environment.
-%%% To DO: add an \@endpe hack if \linenumbers are turned on
-%%%        in horizontal mode. {\par\parskip\z@\noindent} or
-%%%        something.
-
-\@namedef{linenumbers*}{\par\linenumbers*}
-\@namedef{runninglinenumbers*}{\par\runninglinenumbers*}
-
-\def\endlinenumbers{\par\@endpetrue}
-\let\endrunninglinenumbers\endlinenumbers
-\let\endpagewiselinenumbers\endlinenumbers
-\expandafter\let\csname endlinenumbers*\endcsname\endlinenumbers
-\expandafter\let\csname endrunninglinenumbers*\endcsname\endlinenumbers
-\let\endnolinenumbers\endlinenumbers
-
-%
-%                                                                 \subsection{
-%                  Display math
-%                                                                            }
-%
-% Now we tackle the problem to get display math working.  
-% There are different options.
-%                                                      \begin{enumerate}\item[
-% 1.]  Precede every display math with a ~\par~.  
-%      Not too good.
-%                                                                       \item[
-% 2.]  Change ~\interlinepenalty~ and associates globally.  
-%      Unstable.
-%                                                                       \item[
-% 3.]  Wrap each display math with a ~{linenomath}~  
-%      environment. 
-%                                                              \end{enumerate}
-% We'll go for option 3.  See if it works:  
-% \begin{linenomath}
-%   \begin{equation}
-%      display \ math
-%   \end{equation}
-% \end{linenomath}
-% The star form ~{linenomath*}~ should also number the lines
-% of the display itself,
-% \begin{linenomath*}
-%   \begin{eqnarray}
-%     multi   && line \\
-%     display && math \\
-%     & 
-%     \begin{array}{c}
-%       with \\
-%       array
-%     \end{array}
-%     &
-%   \end{eqnarray}
-% \end{linenomath*}
-% including multline displays.
-% 
-% First, here are two macros to turn
-% on linenumbering on paragraphs preceeding displays, with
-% numbering the lines of the display itself, or without.
-% The ~\ifx..~ tests if line numbering is turned on.  It
-% does not harm to add these wrappers in sections that are
-% not numbered.  Nor does it harm to wrap a display
-% twice, e.q, in case you have some ~{equation}~s wrapped
-% explicitely, and later you redefine ~\equation~ to do it
-% automatically. 
-
-\newcommand\linenomathNonumbers{%
-  \ifx\@@par\@@@par\else  
-    \ifnum\interlinepenalty>-\linenopenaltypar
-      \global\holdinginserts3%
-      \advance\interlinepenalty \linenopenalty
-      \advance\predisplaypenalty \linenopenalty
-    \fi
-  \fi
-  \ignorespaces
-  }
-
-\newcommand\linenomathWithnumbers{%
-  \ifx\@@par\@@@par\else
-    \ifnum\interlinepenalty>-\linenopenaltypar
-      \global\holdinginserts3%
-      \advance\interlinepenalty \linenopenalty
-      \advance\predisplaypenalty \linenopenalty
-      \advance\postdisplaypenalty \linenopenalty
-      \advance\interdisplaylinepenalty \linenopenalty
-    \fi
-  \fi
-  \ignorespaces
-  }
-
-% The ~{linenomath}~ environment has two forms, with and
-% without a star.  The following two macros define the
-% environment, where the stared/non-stared form does/doesn't number the
-% lines of the display or vice versa.
-
-\newcommand\linenumberdisplaymath{%
-  \def\linenomath{\linenomathWithnumbers}%
-  \@namedef{linenomath*}{\linenomathNonumbers}%
-  }
-
-\newcommand\nolinenumberdisplaymath{%
-  \def\linenomath{\linenomathNonumbers}%
-  \@namedef{linenomath*}{\linenomathWithnumbers}%
-  }
-
-\def\endlinenomath{%
-   \global\holdinginserts0
-   \@ignoretrue
-}
-\expandafter\let\csname endlinenomath*\endcsname\endlinenomath
-
-% The default is not to number the lines of a display.  But
-% the package option ~mathlines~ may be used to switch
-% that behavior.
-
-\nolinenumberdisplaymath
-
-%
-%
-%                                                                    \section{
-%               Line number references
-%                                                                            }
-% The only way to get a label to a line number in a
-% paragraph is to ask the output routine to mark it.
-%
-% We use the marginpar mechanism to hook to ~\output~ for a
-% second time.  Marginpars are floats with number $-1$, we
-% fake marginpars with No $-2$. Originally, every negative
-% numbered float was considered to be a marginpar.
-%
-% The float box number ~\@currbox~ is used to transfer the
-% label name in a macro called ~\@LNL@~<box-number>.
-%
-% A ~\newlabel~ is written to the aux-file.  The reference
-% is to ~\theLineNumber~, \emph{not} ~\thelinenumber~.
-% This allows to hook in, as done below for pagewise line
-% numbering. 
-%
-% (New v3.03) The ~\@LN@ExtraLabelItems~ are added for a hook
-% to keep packages like ~{hyperref}~ happy.      (/New v3.03)
-
-\let\@LN@addmarginpar\@addmarginpar
-\def\@addmarginpar{%
-   \ifnum\count\@currbox>-2\relax
-     \expandafter\@LN@addmarginpar
-   \else
-     \@cons\@freelist\@currbox
-     \protected@write\@auxout{}{%
-         \string\newlabel
-            {\csname @LNL@\the\@currbox\endcsname}%
-            {{\theLineNumber}{\thepage}\@LN@ExtraLabelItems}}%
-   \fi}
-
-\let\@LN@ExtraLabelItems\@empty
-
-%                                                                 \subsection{
-%       The linelabel command
-%                                                                            }
-% To refer to a place in line ~\ref{~<foo>~}~ at page
-% ~\pageref{~<foo>~}~ you place a ~\linelabel{~<foo>~}~ at
-% that place.
-%
-%                   \linelabel{demo}
-%                   \marginpar{\tiny\raggedright
-%                       See if it works: This paragraph
-%                       starts on page \pageref{demo}, line
-%                       \ref{demo}.  
-%                       }%
-% If you use this command outside a ~\linenumbers~
-% paragraph, you will get references to some bogus
-% line numbers, sorry.  But we don't disable the command,
-% because only the ~\par~ at the end of a paragraph  may
-% decides whether to print line numbers on this paragraph
-% or not.  A ~\linelabel~ may legally appear earlier than
-% ~\linenumbers~.
-%
-% ~\linelabel~, via a fake float number $-2$, puts a
-% ~\penalty~ into a ~\vadjust~, which triggers the
-% pagebuilder after putting the current line to the main
-% vertical list.  A ~\write~ is placed on the main vertical
-% list, which prints a reference to the current value of
-% ~\thelinenumber~ and ~\thepage~ at the time of the
-% ~\shipout~.
-%
-% A ~\linelabel~ is allowed only in outer horizontal mode.
-% In outer vertical mode we start a paragraph, and ignore
-% trailing spaces (by fooling ~\@esphack~).
-%
-% The argument of ~\linelabel~ is put into a macro with a
-% name derived from the number of the allocated float box.
-% Much of the rest is dummy float setup.
-
-\def\linelabel#1{%
-   \ifvmode
-       \ifinner \else 
-          \leavevmode \@bsphack \@savsk\p@
-       \fi
-   \else
-       \@bsphack
-   \fi
-   \ifhmode
-     \ifinner
-       \@parmoderr
-     \else
-       \@floatpenalty -\@Mii
-       \@next\@currbox\@freelist
-           {\global\count\@currbox-2%
-            \expandafter\gdef\csname @LNL@\the\@currbox\endcsname{#1}}%
-           {\@floatpenalty\z@ \@fltovf \def\@currbox{\@tempboxa}}%
-       \begingroup
-           \setbox\@currbox \color@vbox \vbox \bgroup \end@float
-       \endgroup
-       \@ignorefalse \@esphack
-     \fi
-   \else
-     \@parmoderr
-   \fi
-   }
-
-%                                                        \modulolinenumbers[3]
-%                                                                    \section{
-%               The appearance of the line numbers
-%                                                          }\label{appearance}
-% The line numbers are set as ~\tiny\sffamily\arabic{linenumber}~,
-% $10pt$ left of the text.  With options to place it
-% right of the text, or . . .
-%
-%      . . . here are the hooks:
-
-\def\makeLineNumberLeft{\hss\linenumberfont\LineNumber\hskip\linenumbersep}
-
-\def\makeLineNumberRight{\linenumberfont\hskip\linenumbersep\hskip\columnwidth
-                         \hbox to\linenumberwidth{\hss\LineNumber}\hss}
-
-\def\linenumberfont{\normalfont\tiny\sffamily}
-
-\newdimen\linenumbersep
-\newdimen\linenumberwidth
-
-\linenumberwidth=10pt
-\linenumbersep=10pt
-
-% Margin switching requires ~pagewise~ numbering mode, but
-% choosing the left or right margin for the numbers always
-% works. 
-
-\def\switchlinenumbers{\@ifstar
-    {\let\makeLineNumberOdd\makeLineNumberRight
-     \let\makeLineNumberEven\makeLineNumberLeft}%
-    {\let\makeLineNumberOdd\makeLineNumberLeft
-     \let\makeLineNumberEven\makeLineNumberRight}%
-    }
-
-\def\setmakelinenumbers#1{\@ifstar
-  {\let\makeLineNumberRunning#1%
-   \let\makeLineNumberOdd#1%
-   \let\makeLineNumberEven#1}%
-  {\ifx\c@linenumber\c@runninglinenumber
-      \let\makeLineNumberRunning#1%
-   \else
-      \let\makeLineNumberOdd#1%
-      \let\makeLineNumberEven#1%
-   \fi}%
-  }
-
-\def\leftlinenumbers{\setmakelinenumbers\makeLineNumberLeft}
-\def\rightlinenumbers{\setmakelinenumbers\makeLineNumberRight}
-
-\leftlinenumbers*
-
-% ~\LineNumber~ is a hook which is used for the modulo stuff.
-% It is the command to use for the line number, when you
-% customizes ~\makeLineNumber~.  Use ~\thelinenumber~ to
-% change the outfit of the digits.
-%
-%
-% We will implement two modes of operation:
-%                                                              \begin{itemize}
-% \item  numbers ~running~ through (parts of) the text
-% \item  ~pagewise~ numbers starting over with one on top of
-%        each page.
-%                                                                \end{itemize}
-% Both modes have their own count register, but only one is
-% allocated as a \LaTeX\ counter, with the attached
-% facilities serving both.
-
-\newcounter{linenumber}
-\newcount\c@pagewiselinenumber
-\let\c@runninglinenumber\c@linenumber
-
-% Only the running mode counter may be reset, or preset,
-% for individual paragraphs.  The pagewise counter must
-% give a unique anonymous number for each line.
-
-\newcommand\resetlinenumber[1][1]{\c@runninglinenumber#1}
-
-%                                                                 \subsection{
-%               Running line numbers
-%                                                                            }
-% Running mode is easy,  ~\LineNumber~ and ~\theLineNumber~
-% produce ~\thelinenumber~, which defaults to
-% ~\arabic{linenumber}~, using the ~\c@runninglinenumber~
-% counter.  This is the default mode of operation.
-
-\def\makeRunningLineNumber{\makeLineNumberRunning}
-
-\def\setrunninglinenumbers{%
-   \def\theLineNumber{\thelinenumber}%
-   \let\c@linenumber\c@runninglinenumber
-   \let\makeLineNumber\makeRunningLineNumber
-   }
-
-\setrunninglinenumbers\resetlinenumber
-
-%
-%
-%                                                                 \subsection{
-%               Pagewise line numbers
-%                                                                            }
-% Difficult, if you think about it.  The number has to be
-% printed when there is no means to know on which page it
-% will end up,  except through the aux-file.  My solution  
-% is really expensive, but quite robust.  
-%
-% With version ~v2.00~ the hashsize requirements are
-% reduced, because we do not need one controlsequence for
-% each line any more.  But this costs some computation time
-% to find out on which page we are.
-%
-% ~\makeLineNumber~ gets a hook to log the line and page
-% number to the aux-file.  Another hook tries to find out
-% what the page offset is, and subtracts it from the counter
-% ~\c@linenumber~.  Additionally, the switch
-% ~\ifoddNumberedPage~ is set true for odd numbered pages,
-% false otherwise.
-
-\def\setpagewiselinenumbers{%
-   \let\theLineNumber\thePagewiseLineNumber
-   \let\c@linenumber\c@pagewiselinenumber
-   \let\makeLineNumber\makePagewiseLineNumber
-   }
-
-\def\makePagewiseLineNumber{\logtheLineNumber\getLineNumber
-  \ifoddNumberedPage
-     \makeLineNumberOdd
-  \else
-     \makeLineNumberEven
-  \fi
-  }
-
-% Each numbered line gives a line to the aux file
-%                                                                \begin{verse}
-%     ~\@LN{~<line>~}{~<page>~}~
-%                                                                  \end{verse}
-% very similar to the ~\newlabel~ business, except that we need
-% an arabic representation of the page number, not what
-% there might else be in ~\thepage~.
-
-\def\logtheLineNumber{\protected@write\@auxout{}{%
-   \string\@LN{\the\c@linenumber}{\noexpand\the\c@page}}}
-
-% From the aux-file we get one macro ~\LN@P~<page> for each
-% page with line numbers on it.  This macro calls four other
-% macros with one argument each.  These macros are
-% dynamically defined to do tests and actions, to find out
-% on which page the current line number is located.
-%
-% We need sort of a pointer to the first page with line
-% numbers, initiallized to point to nothing:
-
-\def\LastNumberedPage{first} 
-\def\LN@Pfirst{\nextLN\relax}
-
-% The four dynamic macros are initiallized to reproduce
-% themselves in an ~\xdef~
-
-\let\lastLN\relax  % compare to last line on this page
-\let\firstLN\relax % compare to first line on this page
-\let\pageLN\relax  % get the page number, compute the linenumber
-\let\nextLN\relax  % move to the next page
-
-% During the end-document run through the aux-files, we
-% disable ~\@LN~.  I may put in a check here later, to give
-% a rerun recommendation.  
-
-\AtEndDocument{\let\@LN\@gobbletwo}
-
-% Now, this is the tricky part.  First of all, the whole
-% definition of ~\@LN~ is grouped, to avoid accumulation
-% on the save stack. Somehow ~\csname~<cs>~\endcsname~ pushes
-% an entry, which stays after an ~\xdef~ to that <cs>.
-%
-% If ~\LN@P~<page> is undefined, initialize it with the
-% current page and line number, with the
-% \emph{pointer-to-the-next-page} pointing to nothing.  And
-% the macro for the previous page will be redefined to point
-% to the current one. 
-%
-% If the macro for the current page already exists, just
-% redefine the \emph{last-line-number} entry.
-%
-% Finally, save the current page number, to get the pointer to the
-% following page later.
-
-\def\@LN#1#2{{\expandafter\@@LN
-                 \csname LN@P#2C\@LN@column\expandafter\endcsname
-                 \csname LN@PO#2\endcsname
-                 {#1}{#2}}}
-
-\def\@@LN#1#2#3#4{\ifx#1\relax
-    \ifx#2\relax\gdef#2{#3}\fi
-    \expandafter\@@@LN\csname LN@P\LastNumberedPage\endcsname#1
-    \xdef#1{\lastLN{#3}\firstLN{#3}\pageLN{#4}{\@LN@column}{#2}\nextLN\relax}%
-  \else
-    \def\lastLN##1{\noexpand\lastLN{#3}}%
-    \xdef#1{#1}%
-  \fi
-  \xdef\LastNumberedPage{#4C\@LN@column}}
-
-% The previous page macro gets its pointer to the
-% current one, replacing the ~\relax~ with the cs-token
-% ~\LN@P~<page>.  
-
-\def\@@@LN#1#2{{\def\nextLN##1{\noexpand\nextLN\noexpand#2}%
-                \xdef#1{#1}}}
-
-% Now, to print a line number, we need to find the page,
-% where it resides.  This will most probably be the page where
-% the last one came from, or maybe the next page.  However, it can
-% be a completely different one.  We maintain a cache,
-% which is ~\let~ to the last page's macro.  But for now
-% it is initialized to expand ~\LN@first~, where the poiner
-% to the first numbered page has been stored in. 
-
-\def\NumberedPageCache{\LN@Pfirst}
-
-% To find out on which page the current ~\c@linenumber~ is, 
-% we define the four dynamic macros to do something usefull
-% and execute the current cache macro.  ~\lastLN~ is run
-% first, testing if the line number in question may be on a
-% later page.  If so, disable ~\firstLN~, and go on to the
-% next page via ~\nextLN~.
-
-\def\testLastNumberedPage#1{\ifnum#1<\c@linenumber
-      \let\firstLN\@gobble
-  \fi}
-
-% Else, if ~\firstLN~ finds out that we need an earlier
-% page,  we start over from the beginning. Else, ~\nextLN~
-% will be disabled, and ~\pageLN~ will run
-% ~\gotNumberedPage~ with four arguments: the first line
-% number on this column, the page number, the column 
-% number, and the first line on the page.
-
-\def\testFirstNumberedPage#1{\ifnum#1>\c@linenumber
-     \def\nextLN##1{\testNextNumberedPage\LN@Pfirst}%
-  \else
-      \let\nextLN\@gobble
-      \def\pageLN{\gotNumberedPage{#1}}%
-  \fi}
-
-% We start with ~\pageLN~ disabled and ~\nextLN~ defined to
-% continue the search with the next page.
-
-\long\def \@gobblethree #1#2#3{}
-
-\def\testNumberedPage{%
-  \let\lastLN\testLastNumberedPage
-  \let\firstLN\testFirstNumberedPage
-  \let\pageLN\@gobblethree
-  \let\nextLN\testNextNumberedPage
-  \NumberedPageCache
-  }
-
-% When we switch to another page, we first have to make
-% sure that it is there.  If we are done with the last 
-% page, we probably need to run \TeX\ again, but for the
-% rest of this run, the cache macro will just return four
-% zeros. This saves a lot of time, for example if you have
-% half of an aux-file from an aborted run,  in the next run
-% the whole page-list would be searched in vain again and
-% again for the second half of the document.
-%
-% If there is another page, we iterate the search. 
-
-\def\testNextNumberedPage#1{\ifx#1\relax
-     \global\def\NumberedPageCache{\gotNumberedPage0000}%
-     \PackageWarningNoLine{lineno}%
-                    {Linenumber reference failed,
-      \MessageBreak  rerun to get it right}%
-   \else
-     \global\let\NumberedPageCache#1%
-   \fi
-   \testNumberedPage
-   }
-
-%                             \linelabel{demo2}
-%                             \marginpar{\tiny\raggedright
-%                                 Let's see if it finds the label
-%                                 on page \pageref{demo}, 
-%                                 line \ref{demo}, and back here
-%                                 on page \pageref{demo2}, line
-%                                 \ref{demo2}. 
-%                                 }%
-% To separate the official hooks from the internals there is
-% this equivalence, to hook in later for whatever purpose:
-
-\let\getLineNumber\testNumberedPage
-
-% So, now we got the page where the number is on.  We
-% establish if we are on an odd or even page, and calculate
-% the final line number to be printed.
-
-\newif\ifoddNumberedPage
-\newif\ifcolumnwiselinenumbers
-\columnwiselinenumbersfalse
-
-\def\gotNumberedPage#1#2#3#4{\oddNumberedPagefalse
-  \ifodd \if@twocolumn #3\else #2\fi\relax\oddNumberedPagetrue\fi
-  \advance\c@linenumber 1\relax
-  \ifcolumnwiselinenumbers
-     \subtractlinenumberoffset{#1}%
-  \else
-     \subtractlinenumberoffset{#4}%
-  \fi
-  }
-
-% You might want to run the pagewise mode with running line
-% numbers, or you might not.  It's your choice:
-
-\def\runningpagewiselinenumbers{%
-  \let\subtractlinenumberoffset\@gobble
-  }
-
-\def\realpagewiselinenumbers{%
-  \def\subtractlinenumberoffset##1{\advance\c@linenumber-##1\relax}%
-  }
-
-\realpagewiselinenumbers
-
-% For line number references, we need a protected call to
-% the whole procedure, with the requested line number stored
-% in the ~\c@linenumber~ counter.  This is what gets printed
-% to the aux-file to make a label:
-
-\def\thePagewiseLineNumber{\protect
-       \getpagewiselinenumber{\the\c@linenumber}}%
-
-% And here is what happens when the label is refered to:
-
-\def\getpagewiselinenumber#1{{%
-  \c@linenumber #1\relax\testNumberedPage
-  \thelinenumber
-  }}
-
-%                                                                            %
-% A summary of all per line expenses:
-%                                                     \begin{description}\item
-% [CPU:]  The ~\output~ routine is called for each line,
-%         and the page-search is done.
-%                                                                        \item
-% [DISK:] One line of output to the aux-file for each
-%         numbered line
-%                                                                        \item
-% [MEM:]  One macro per page. Great improvement over v1.02,
-%         which had one control sequence per line in
-%         addition.  It blew the hash table after some five
-%         thousand lines. 
-%                                                            \end{description}
-%
-%
-%
-%                                                                 \subsection{
-%                  Twocolumn mode (New v3.06)
-%                                                                            }
-%
-% Twocolumn mode requires another patch to the ~\output~ 
-% routine, in order to print a column tag to the .aux 
-% file.
-
-\let\@LN@orig@makecol\@makecol
-\def\@LN@makecol{%
-   \@LN@orig@makecol
-   \setbox\@outputbox \vbox{%
-      \boxmaxdepth \@maxdepth
-      \protected@write\@auxout{}{%
-          \string\@LN@col{\if@firstcolumn1\else2\fi}%
-      }%
-      \box\@outputbox
-   }% \vbox
-}
-
-\def\@LN@col#1{\def\@LN@column{#1}}
-\@LN@col{1}
-
-%
-%
-%
-%                                                                 \subsection{
-%                  Numbering modulo 5
-%                                                                            }
-% Most users want to have only one in five lines numbered.
-% ~\LineNumber~ is supposed to produce the outfit of the
-% line number attached to the line,  while ~\thelinenumber~
-% is used also for references, which should appear even if
-% they are not multiples of five.   
-
-\newcount\c@linenumbermodulo
-
-\def\themodulolinenumber{{\@tempcnta\c@linenumber
-  \divide\@tempcnta\c@linenumbermodulo
-  \multiply\@tempcnta\c@linenumbermodulo
-  \ifnum\@tempcnta=\c@linenumber\thelinenumber\fi
-  }}
-
-% The user command to set the modulo counter:
-
-\newcommand\modulolinenumbers[1][0]{%
- \let\LineNumber\themodulolinenumber
- \ifnum#1>1\relax
-   \c@linenumbermodulo#1\relax
- \else\ifnum#1=1\relax
-   \def\LineNumber{\thelinenumber}%
- \fi\fi
- }
-
-\setcounter{linenumbermodulo}{5}
-\modulolinenumbers[1]
-
-%
-%                                                           \switchlinenumbers
-%                                                        \modulolinenumbers[1]
-%                                                                    \section{
-%                   Package options
-%                                                                            }
-% There is a bunch of package options, all of them
-% executing only user commands (see below).
-%
-% Options ~left~ (~right~) put the line numbers on the left
-% (right) margin.  This works in all modes.  ~left~ is the
-% default.
-
-\DeclareOption{left}{\leftlinenumbers*}
-
-\DeclareOption{right}{\rightlinenumbers*}
-
-% Option ~switch~ (~switch*~) puts the line numbers on the
-% outer (inner) margin of the text.   This requires running
-% the pagewise mode,  but we turn off the page offset
-% subtraction, getting sort of running numbers again.  The
-% ~pagewise~ option may restore true pagewise mode later.
-
-\DeclareOption{switch}{\setpagewiselinenumbers
-                       \switchlinenumbers
-                       \runningpagewiselinenumbers}
-
-\DeclareOption{switch*}{\setpagewiselinenumbers
-                        \switchlinenumbers*%
-                        \runningpagewiselinenumbers}
-
-% In twocolumn mode, we can switch the line numbers to 
-% the outer margin, and/or start with number 1 in each
-% column.  Margin switching is covered by the ~switch~ 
-% options.
-
-\DeclareOption{columnwise}{\setpagewiselinenumbers
-                           \columnwiselinenumberstrue
-                           \realpagewiselinenumbers}
-
-% The options ~pagewise~ and ~running~ select the major
-% linenumber mechanism.  ~running~ line numbers refer to a real
-% counter value, which can be reset for any paragraph,
-% even getting  multiple paragraphs on one page starting
-% with line number one.  ~pagewise~ line numbers get a
-% unique hidden number within the document,  but with the
-% opportunity to establish the page on which they finally
-% come to rest.  This allows the subtraction of the page
-% offset, getting the numbers starting with 1 on top of each
-% page, and margin switching in twoside formats becomes
-% possible.  The default mode is ~running~.  
-%
-% The order of declaration of the options is important here
-% ~pagewise~ must come after ~switch~, to overide running
-% pagewise mode. ~running~ comes last, to reset the running
-% line number mode, e.g, after selecting margin switch mode
-% for ~pagewise~ running.  Once more, if you specify all
-% three of the options ~[switch,pagewise,running]~, the
-% result is almost nothing, but if you later say
-% ~\pagewiselinenumbers~,  you get margin switching, with
-% real pagewise line numbers.
-%
-\DeclareOption{pagewise}{\setpagewiselinenumbers
-                         \realpagewiselinenumbers}
-
-\DeclareOption{running}{\setrunninglinenumbers}
-
-% The option ~modulo~ causes only those linenumbers to be
-% printed which are multiples of five. 
-
-\DeclareOption{modulo}{\modulolinenumbers\relax}
-
-% The package option ~mathlines~ switches the behavior of
-% the ~{linenomath}~ environment with its star-form.
-% Without this option, the ~{linenomath}~ environment does
-% not number the lines of the display, while the star-form
-% does.  With this option, its just the opposite.
-%
-%%% 1999-06-10: renamed ~displaymath~ to ~mathlines~.
-
-\DeclareOption{mathlines}{\linenumberdisplaymath}
-
-% ~displaymath~ now calls for wrappers of the standard 
-% LaTeX display math environment.  This was previously 
-% done by ~mlineno.sty~.
-
-\let\do@mlineno\relax
-\DeclareOption{displaymath}{\let\do@mlineno\@empty}
-
-% The ~hyperref~ package, via ~nameref~, requires three more 
-% groups in the second argment of a ~\newlabel~.  Well, why 
-% shouldn't it get them?  (New v3.07) The presencs of the
-% ~nameref~ package is now detected automatically
-% ~\AtBeginDocument~. (/New v3.07) (Fixed in v3.09)  We try
-% to be smart, and test ~\AtBeginDocument~ if the ~nameref~
-% package is loaded, but ~hyperref~ postpones the loading of
-% ~nameref~ too, so this is all in vain.
-
-\DeclareOption{hyperref}{\PackageWarningNoLine{lineno}{%
-                Option [hyperref] is obsolete. 
-  \MessageBreak The hyperref package is detected automatically.}}
-
-\AtBeginDocument{%
-  \@ifpackageloaded{nameref}{%
-    \def\@LN@ExtraLabelItems{{}{}{}}}{}}
-
-\ProcessOptions
-
-%                                                                 \subsection{
-%              Package Extensions
-%                                                                            }
-%
-%  The extensions in this section were previously supplied 
-%  in seperate ~.sty~ files.
-%
-%                                                              \subsubsection{
-%              $display math$
-%                                                                            }
-%
-%  The standard \LaTeX\ display math environments are
-%  wrapped in a ~{linenomath}~ environment.
-%
-% (New 3.05)  The ~[fleqn]~ option of the standard
-% \LaTeX\ classes defines the display math
-% environments such that line numbers appear just
-% fine.  Thus, we need not do any tricks when
-% ~[fleqn]~ is loaded, as indicated by presents of
-% the ~\mathindent~ register.           (/New 3.05)
-%
-% (New 3.05a)  for ~{eqnarray}~s we rather keep the
-% old trick.                            (/New 3.05a)
-%
-% (New 3.08) Wrap ~\[~ and ~\]~ into ~{linenomath}~, 
-% instead of ~{displaymath}~.  Also save the definition
-% of ~\equation~, instead of replicating the current 
-% \LaTeX\ definition.                    (/New 3.08)
-
-\ifx\do@mlineno\@empty
- \@ifundefined{mathindent}{
-
-  \let\LN@displaymath\[
-  \let\LN@enddisplaymath\]
-  \renewcommand\[{\begin{linenomath}\LN@displaymath}
-  \renewcommand\]{\LN@enddisplaymath\end{linenomath}}
-
-  \let\LN@equation\equation
-  \let\LN@endequation\endequation
-  \renewenvironment{equation}
-     {\linenomath\LN@equation}
-     {\LN@endequation\endlinenomath}
-
-  }% \@ifundefined{mathindent}
-
-  \let\LN@eqnarray\eqnarray
-  \let\LN@endeqnarray\endeqnarray
-  \renewenvironment{eqnarray}
-     {\linenomath\LN@eqnarray}
-     {\LN@endeqnarray\endlinenomath}
-  
-\fi
-
-%                                                              \subsubsection{
-%      Line numbers in internal vertical mode
-%                                                                            }
-%
-% The command ~\internallinenumbers~ adds line numbers in 
-% internal vertical mode, but with limitations: we assume
-% fixed baseline skip.
-
-\def\internallinenumbers{\setrunninglinenumbers 
-     \let\@@par\internallinenumberpar
-     \ifx\@par\@@@par\let\@par\internallinenumberpar\fi
-     \ifx\par\@@@par\let\par\internallinenumberpar\fi
-     \ifx\@par\linenumberpar\let\@par\internallinenumberpar\fi
-     \ifx\par\linenumberpar\let\par\internallinenumberpar\fi
-     \@ifnextchar[{\resetlinenumber}%]
-                 {\@ifstar{\let\c@linenumber\c@internallinenumber
-                           \c@linenumber\@ne}{}}%
-     }
-
-\let\endinternallinenumbers\endlinenumbers
-\@namedef{internallinenumbers*}{\internallinenumbers*}
-\expandafter\let\csname endinternallinenumbers*\endcsname\endlinenumbers
-
-\newcount\c@internallinenumber
-\newcount\c@internallinenumbers
-
-\def\internallinenumberpar{\ifvmode\@@@par\else\ifinner\@@@par\else\@@@par
-     \begingroup
-        \c@internallinenumbers\prevgraf
-        \setbox\@tempboxa\hbox{\vbox{\makeinternalLinenumbers}}%
-        \dp\@tempboxa\prevdepth
-        \ht\@tempboxa\z@
-        \nobreak\vskip-\prevdepth
-        \nointerlineskip\box\@tempboxa
-     \endgroup 
-     \fi\fi
-     }
-
-\def\makeinternalLinenumbers{\ifnum\c@internallinenumbers>0\relax
-   \hbox to\z@{\makeLineNumber}\global\advance\c@linenumber\@ne
-   \advance\c@internallinenumbers\m@ne
-   \expandafter\makeinternalLinenumbers\fi
-   }
-
-%                                                              \subsubsection{
-%      Line number references with offset
-%                                                                            }
-%
-% This extension defines macros to refer to line
-% numbers with an offset, e.g., to refer to a line
-% which cannot be labeled directly (display math).
-% This was formerly knows as ~rlineno.sty~.
-%
-% To refer to a pagewise line number with offset:
-%                                                                \begin{quote}
-%   ~\linerefp[~<OFFSET>~]{~<LABEL>~}~
-%                                                                  \end{quote}
-% To refer to a running line number with offset:
-%                                                                \begin{quote}
-%   ~\linerefr[~<OFFSET>~]{~<LABEL>~}~
-%                                                                  \end{quote}
-% To refer to a line number labeled in the same mode as currently
-% selected:
-%                                                                \begin{quote}
-%   ~\lineref[~<OFFSET>~]{~<LABEL>~}~
-%                                                                  \end{quote}
-
-\newcommand\lineref{%
-  \ifx\c@linenumber\c@runninglinenumber
-     \expandafter\linerefr
-  \else
-     \expandafter\linerefp
-  \fi
-}
-
-\newcommand\linerefp[2][\z@]{{%
-   \let\@thelinenumber\thelinenumber
-   \edef\thelinenumber{\advance\c@linenumber#1\relax\noexpand\@thelinenumber}%
-   \ref{#2}%
-}}
-
-% This goes deep into \LaTeX s internals.
-
-\newcommand\linerefr[2][\z@]{{%
-   \def\@@linerefadd{\advance\c@linenumber#1}%
-   \expandafter\@setref\csname r@#2\endcsname
-   \@linerefadd{#2}%
-}}
-
-\newcommand\@linerefadd[2]{\c@linenumber=#1\@@linerefadd\relax
-                           \thelinenumber}
-
-%                                                              \subsubsection{
-%      Numbered quotation environments
-%                                                                            }
-%
-% The ~{numquote}~ and ~{numquotation}~
-% environments are like ~{quote}~ and
-% ~{quotation}~, except there will be line
-% numbers.  
-% 
-% An optional argument gives the number to count
-% from.  A star ~*~ (inside or outside the closing
-% ~}~) prevent the reset of the line numbers.
-% Default is to count from one.
-
-\newcommand\quotelinenumbers
-   {\@ifstar\linenumbers{\@ifnextchar[\linenumbers{\linenumbers*}}}
-
-\newdimen\quotelinenumbersep
-\quotelinenumbersep=\linenumbersep
-\let\quotelinenumberfont\linenumberfont
-
-\newcommand\numquotelist
-   {\leftlinenumbers
-    \linenumbersep\quotelinenumbersep
-    \let\linenumberfont\quotelinenumberfont
-    \addtolength{\linenumbersep}{-\@totalleftmargin}%
-    \quotelinenumbers
-   }
-
-\newenvironment{numquote}     {\quote\numquotelist}{\endquote}
-\newenvironment{numquotation} {\quotation\numquotelist}{\endquotation}
-\newenvironment{numquote*}    {\quote\numquotelist*}{\endquote}
-\newenvironment{numquotation*}{\quotation\numquotelist*}{\endquotation}
-
-%                                                              \subsubsection{
-%      Frame around a paragraph
-%                                                                            }
-%
-% The ~{bframe}~ environment draws a frame around
-% some text, across page breaks, if necessary.
-%
-% This works only for plain text paragraphs,
-% without special height lines. All lines must be
-% ~\baselineskip~ apart, no display math.
-
-\newenvironment{bframe}
-  {\par
-   \@tempdima\textwidth
-   \advance\@tempdima 2\bframesep
-   \setbox\bframebox\hbox to\textwidth{%
-      \hskip-\bframesep
-      \vrule\@width\bframerule\@height\baselineskip\@depth\bframesep
-      \advance\@tempdima-2\bframerule
-      \hskip\@tempdima
-      \vrule\@width\bframerule\@height\baselineskip\@depth\bframesep
-      \hskip-\bframesep
-   }%
-   \hbox{\hskip-\bframesep
-         \vrule\@width\@tempdima\@height\bframerule\@depth\z@}%
-   \nointerlineskip
-   \copy\bframebox
-   \nobreak
-   \kern-\baselineskip
-   \runninglinenumbers
-   \def\makeLineNumber{\copy\bframebox\hss}%
-  }
-  {\par
-   \kern-\prevdepth
-   \kern\bframesep
-   \nointerlineskip
-   \@tempdima\textwidth
-   \advance\@tempdima 2\bframesep
-   \hbox{\hskip-\bframesep
-         \vrule\@width\@tempdima\@height\bframerule\@depth\z@}%
-  }
-
-\newdimen\bframerule
-\bframerule=\fboxrule
-
-\newdimen\bframesep
-\bframesep=\fboxsep
-
-\newbox\bframebox
-
-%                                                                    \section{
-%                   The final touch
-%                                                                            }
-% There is one deadcycle for each line number.
-
-\advance\maxdeadcycles 100
-
-\endinput
-
-%                                                                    \section{
-%              The user commands
-%                                                                            }
-% The user command to turn on and off line numbering 
-% are 
-%                                                     \begin{description}\item
-% [|\linenumbers]                                                       \ \par
-%     Turn on line numbering in the current mode.
-%                                                                        \item
-% [|\linenumbers*]                                              \ \par$\qquad$
-%        and reset the line number to 1.
-%                                                      \def\NL{<number>]}\item
-% [|\linenumbers[\NL]                                           \ \par$\qquad$
-%        and start with <number>.  
-%                                                                        \item
-% [|\nolinenumbers]                                                     \ \par
-%     Turn off line numbering.
-%                                                                        \item
-% [|\runninglinenumbers*[\NL]                                           \ \par
-%     Turn on ~running~ line numbers, with the same optional
-%     arguments as ~\linenumbers~.  The numbers are running
-%     through the text over pagebreaks.  When you turn
-%     numbering off and on again, the numbers will continue,
-%     except, of cause, if you ask to reset or preset the
-%     counter.
-%                                                                        \item
-% [|\pagewiselinenumbers]                                               \ \par
-%     Turn on ~pagewise~ line numbers.  The lines on each
-%     page are numbered beginning with one at the first
-%     ~pagewise~ numbered line.
-%                                                                        \item
-% [|\resetlinenumber[\NL]                                               \ \par
-%     Reset ~[~Set~]~ the line number to 1
-%     ~[~<number>~]~.
-%                                                                        \item
-% [|\setrunninglinenumbers]                                             \ \par
-%     Switch to ~running~ line number mode. Do \emph{not}
-%     turn it on or off.
-%                                                                        \item
-% [|\setpagewiselinenumbers]                                            \ \par
-%     Switch to ~pagewise~ line number mode. Do \emph{not}
-%     turn it on or off.
-%                                                                        \item
-% [|\switchlinenumbers*]                                                \ \par
-%     Causes margin switching in pagewise modes. With the
-%     star,  put the line numbers on the inner margin.
-%                                                                        \item
-% [|\leftlinenumbers*]                                                  \ \par
-%                                                                        \item
-% [|\rightlinenumbers*]                                                 \ \par
-%     Set the line numbers in the left/right margin. With the
-%     star this works for both modes of operation, without
-%     the star only for the currently selected mode. 
-%                                                                        \item
-% [|\runningpagewiselinenumbers]                                        \ \par
-%     When using the pagewise line number mode,  do not
-%     subtract the page offset.  This results in running
-%     line numbers again,  but with the possibility to switch
-%     margins.  Be careful when doing line number
-%     referencing,  this mode status must be the same while
-%     setting the paragraph and during references.
-%                                                                        \item
-% [|\realpagewiselinenumbers]                                           \ \par
-%     Reverses the effect of ~\runningpagewiselinenumbers~.
-%                                                                        \item
-% [|\modulolinenumbers[\NL]                                             \ \par
-%     Give a number only to lines which are multiples of
-%     ~[~<number>~]~.  If <number> is not specified, the
-%     current value in the counter ~linenumbermodulo~ is
-%     retained.  <number>=1 turns this off without changing
-%     ~linenumbermodulo~.  The counter is initialized to 5.
-%                                                                        \item
-% [|\linenumberdisplaymath]                                             \ \par
-%     Number the lines of a display math in a ~{linenomath}~
-%     environment, but do not in a ~{linenomath*}~
-%     environment.  This is used by the package option
-%     ~[mathlines]~. 
-%                                                                        \item
-% [|\nolinenumberdisplaymath]                                           \ \par
-%     Do not Number the lines of a display math in a
-%     ~{linenomath}~ environment, but do in a
-%     ~{linenomath*}~ environment.  This is the default.
-%                                                                        \item
-% [|\linelabel]                                                         \ \par
-%     Set a ~\linelabel{~<foo>~}~ to the line number where
-%     this commands is in.  Refer to it with the \LaTeX\
-%     referencing commands ~\ref{~<foo>~}~ and
-%     ~\pageref{~<foo>~}~.
-%                                                            \end{description}
-% The commands can be used globally, locally within groups
-% or as environments.  It is important to know that they 
-% take action only when the ~\par~ is executed.  The
-% ~\end{~<mode>~linenumbers}~ commands provide a ~\par~.
-% Examples:
-%                                                                \begin{verse}
-%   ~{\linenumbers~  <text> ~\par}~                                         \\
-%                                                                         \ \\
-%   ~\begin{linenumbers}~                                                   \\
-%       <text>                                                              \\
-%   ~\end{linenumbers}~                                                     \\
-%                                                                         \ \\
-%   <paragraph> ~{\linenumbers\par}~                                        \\
-%                                                                         \ \\
-%   ~\linenumbers~                                                          \\
-%     <text> ~\par~                                                         \\
-%   ~\nolinenumbers~                                                        \\
-%                                                                         \ \\
-%   ~\linenumbers~                                                          \\
-%   <paragraph> ~{\nolinenumbers\par}~                                      \\
-%                                                                  \end{verse}
-%
-%
-%                                                                 \subsection{
-%                 Customization hooks
-%                                                                            }
-% There are several hooks to customize the appearance of the
-% line numbers, and some low level hooks for special
-% effects. 
-%                                                     \begin{description}\item
-% [|\thelinenumber]                                                     \ \par
-%     This macro should give the representation of the line
-%     number in the \LaTeX-counter ~linenumber~.  The
-%     default is provided by \LaTeX:                              \par$\qquad$
-%         ~\arabic{linenumber}~
-%                                                                        \item
-% [|\makeLineNumberLeft]                                                \ \par
-%     This macro is used to attach a line number to the left
-%     of the text page.  This macro should fill an ~\hbox to 0pt~ 
-%     which will be placed at the left margin of the
-%     page, with the reference point aligned to the line to
-%     which it should give a number.  Please use the macro
-%     ~\LineNumber~ to refer to the line number. 
-%
-%     The default definition is                                   \par$\qquad$
-%         ~\hss\linenumberfont\LineNumber\hskip\linenumbersep~
-%                                                                        \item
-% [|\makeLineNumberRight]                                               \ \par
-%     Like ~\makeLineNumberLeft~, but for line numbers on
-%     the right margin.
-%
-%     The default definition is                                   \par$\qquad$
-%        ~\linenumberfont\hskip\linenumbersep\hskip\textwidth~    \par$\qquad$
-%        ~\hbox to\linenumberwidth{\hss\LineNumber}\hss~
-%                                                                        \item
-% [|\linenumberfont]                                                    \ \par
-%     This macro is initialized to                                \par$\qquad$
-%         ~\normalfont\tiny\sffamily~
-%                                                                        \item
-% [|\linenumbersep]                                                     \ \par
-%     This dimension register sets the separation of the
-%     linenumber to the text. Default value is ~10pt~.
-%                                                                        \item
-% [|\linenumberwidth]                                                   \ \par
-%     This dimension register sets the width of the line
-%     number box on the right margin.  The distance of the
-%     right edge of the text to the right edge of the line
-%     number is ~\linenumbersep~ + ~\linenumberwidth~. The
-%     default value is ~10pt~.  
-%                                                                        \item
-% [|\theLineNumber] (for wizards)                                       \ \par
-%     This macro is called for printing a ~\newlabel~ entry
-%     to the aux-file.  Its definition depends on the mode.
-%     For running line numbers it's just ~\thelinenumber~,
-%     while in pagewise mode, the page offset subtraction
-%     is done in here.
-%                                                                        \item
-% [|\makeLineNumber] (for wizards)                                      \ \par
-%     This macro produces the line numbers.  The definition
-%     depends on the mode.  In the running line numbers
-%     mode it just expands ~\makeLineNumberLeft~.
-%                                                                        \item
-% [|\LineNumber] (for wizards)                                          \ \par
-%     This macro is called by ~\makeLineNumber~ to typeset
-%     the line number.  This hook is changed by the modulo
-%     mechanism.
-%                                                            \end{description}
-%                                                             \end{document}%D
-------------------------------------------------------------------------------
-
-echo "expect errors for unknown commands 'iffalse' and 'fi'";# SHELL
-awk '/A[W]K/' lineno.sty | awk -f - lineno.sty >lineno.tex;  # SHELL
-latex lineno; latex lineno; latex lineno; latex lineno;      # SHELL
-
-awk '/DOC A [W] K/' lineno.sty | awk -f - lineno.sty >lineno.doc; # DOC SH
-
-BEGIN{DOC=-1;                                     # AWK DOC A W K
- BEGINCODE = "\\begin{code}\\begin{verbatim}";    # AWK
- ENDCODE   = "\\end{verbatim}\n\\end{code}";   }  # AWK
- BEGINCODE = "%    \\begin{macrocode}";           #     DOC A W K
- ENDCODE   = "%    \\end{macrocode}";          }  #     DOC A W K
-/^[ \t]*$/ { ECNT++; next; }                      # AWK DOC A W K
-/\\documentclass/{ sub("article","ltxdoc") }      #     DOC A W K
-/%D$/      { sub("^%* *",""); sub("%D$","");      #     DOC A W K
-             print > "lineno.drv"; next        }  #     DOC A W K
-/^%%/      { next; }                              # AWK DOC A W K
-/^%/       { if (!DOC) { print ENDCODE; }         # AWK DOC A W K
-             DOC=1; ECNT=0;                       # AWK DOC A W K
-             sub("^% *","");                      # AWK
-             sub("^% *","% ");                    #     DOC A W K
-             print; next;                      }  # AWK DOC A W K
-DOC<0      { next }                               # AWK DOC A W K
-/^-+-$/    { if (!DOC) print ENDCODE; exit }      # AWK DOC A W K
-{ if (DOC) { ECNT=DOC=0; print BEGINCODE; }       # AWK DOC A W K
-  while (ECNT>0) { print " "; ECNT--; }           # AWK DOC A W K
-  print $0;                                    }  # AWK DOC A W K
-
diff --git a/spec/styles/macros.tex b/spec/styles/macros.tex
deleted file mode 100644
index 8de5c36..0000000
--- a/spec/styles/macros.tex
+++ /dev/null
@@ -1,29 +0,0 @@
-\newtheorem{note}{Note}[chapter]
-\newcommand{\code}[1]{\texttt{\small #1}}
-\renewcommand\verbatimtabsize{4\relax}
-\newcommand{\jaxrs}{JAX-RS}
-
-\newcommand{\Consumes}{\code{@Consumes}}
-\newcommand{\Encoded}{\code{@Encoded}}
-\newcommand{\HeaderParam}{\code{@Header\-Param}}
-\newcommand{\Context}{\code{@Context}}
-\newcommand{\SecurityContext}{\code{Security\-Context}}
-\newcommand{\HttpHeaders}{\code{Http\-Headers}}
-\newcommand{\HttpMethod}{\code{@Http\-Method}}
-\newcommand{\MatrixParam}{\code{@Matrix\-Param}}
-\newcommand{\MsgRead}{\code{Message\-Body\-Reader}}
-\newcommand{\MsgWrite}{\code{Message\-Body\-Writer}}
-\newcommand{\Path}{\code{@Path}}
-\newcommand{\PathParam}{\code{@Path\-Param}}
-\newcommand{\Produces}{\code{@Produces}}
-\newcommand{\Provider}{\code{@Provider}}
-\newcommand{\QueryParam}{\code{@Query\-Param}}
-\newcommand{\FormParam}{\code{@Form\-Param}}
-\newcommand{\CookieParam}{\code{@Cookie\-Param}}
-\newcommand{\Request}{\code{Request}}
-\newcommand{\Response}{\code{Response}}
-\newcommand{\ResponseBuilder}{\code{Response\-Builder}}
-\newcommand{\rd}{\code{Runtime\-Delegate}}
-\newcommand{\UriInfo}{\code{Uri\-Info}}
-\newcommand{\WebAppExc}{\code{Web\-Application\-Exception}}
-\newcommand{\Resource}{\code{javax.\-annotation.\-Resource}}
diff --git a/spec/styles/ntheorem.sty b/spec/styles/ntheorem.sty
deleted file mode 100644
index e3c6b27..0000000
--- a/spec/styles/ntheorem.sty
+++ /dev/null
@@ -1,1036 +0,0 @@
-%%
-%% This is file `ntheorem.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% ntheorem.dtx  (with options: `package')
-%% 
-%% IMPORTANT NOTICE:
-%% 
-%% For the copyright see the source file.
-%% 
-%% Any modified versions of this file must be renamed
-%% with new filenames distinct from ntheorem.sty.
-%% 
-%% For distribution of the original source see the terms
-%% for copying and modification in the file ntheorem.dtx.
-%% 
-%% This generated file may be distributed as long as the
-%% original source files, as listed above, are part of the
-%% same distribution. (The sources need not necessarily be
-%% in the same archive or directory.)
-\def\filedate{2003/06/25}
-\def\docdate{2003/06/25}
-\def\fileversion{1.22}
-\def\basename{ntheorem}
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.2
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%%    http://www.latex-project.org/lppl.txt
-%% and version 1.2 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
-%% \CharacterTable
-%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%%   Digits        \0\1\2\3\4\5\6\7\8\9
-%%   Exclamation   \!     Double quote  \"     Hash (number) \#
-%%   Dollar        \$     Percent       \%     Ampersand     \&
-%%   Acute accent  \'     Left paren    \(     Right paren   \)
-%%   Asterisk      \*     Plus          \+     Comma         \,
-%%   Minus         \-     Point         \.     Solidus       \/
-%%   Colon         \:     Semicolon     \;     Less than     \<
-%%   Equals        \=     Greater than  \>     Question mark \?
-%%   Commercial at \@     Left bracket  \[     Backslash     \\
-%%   Right bracket \]     Circumflex    \^     Underscore    \_
-%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
-%%   Right brace   \}     Tilde         \~}
-\typeout{Style `\basename', Version \fileversion\space <\filedate>}
-\ProvidesPackage{styles/ntheorem}[\filedate \space\fileversion]
-\newif\if@thmmarks\@thmmarksfalse
-\newif\if@thref\@threffalse
-\newif\ifthm@tempif
-\DeclareOption{thmmarks}{%*********************************
-\PackageInfo{\basename}{Option `thmmarks' loaded}%
-\@thmmarkstrue
-\newcounter{endNonectr}
-\newcounter{currNonectr}
-\newif\ifsetendmark\setendmarktrue
-\gdef\endtrivlist{%
-  \@endtrivlist{\PotEndMark{\unskip\nobreak\hfill\nobreak}}}
-\gdef\@endtrivlist#1{%  % from \endtrivlist
-  \if@inlabel \indent\fi
-  \if@newlist \@noitemerr\fi
-  \ifhmode
-     \ifdim\lastskip >\z@ #1\unskip \par  %<<<<<<<<<<<<<<<<<<<<<<
-           \else \unskip \par \fi
-     \fi
-  \if@noparlist \else
-    \ifdim\lastskip >\z@
-       \@tempskipa\lastskip \vskip -\lastskip
-      \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip
-      \vskip\@tempskipa
-    \fi
-    \@endparenv
-  \fi}
-\gdef\SetMark@endeqn{\quad}%  as default, cf. option leqno
-\gdef\endequation{\eqno \hbox{\@eqnnum \PotEndMark{\SetMark@endeqn}}%
-    $$\global\@ignoretrue}
-\gdef\[{%
-   \relax\ifmmode
-      \@badmath
-   \else
-      \ifvmode
-         \nointerlineskip
-         \makebox[.6\linewidth]%
-      \fi
-      $$\stepcounter{end\InTheoType ctr}%
-        \@ifundefined{mark\roman{curr\InTheoType ctr}%
-                      \InTheoType\roman{end\InTheoType ctr}}{\relax}%
-          {\ifx\csname\InTheoType Symbol\endcsname\@empty\else
-             \boxmaxdepth=.5ex\begin{array}[b]{l}%
-             \boxmaxdepth=\maxdimen\displaystyle\fi}%
-        \addtocounter{end\InTheoType ctr}{-1}%
-        %%$$ BRACE MATCH HACK
-   \fi}
-\gdef\]{%
-      \stepcounter{end\InTheoType ctr}%
-        \@ifundefined{mark\roman{curr\InTheoType ctr}%
-                      \InTheoType\roman{end\InTheoType ctr}}{\relax}%
-          {\ifx\csname\InTheoType Symbol\endcsname\@empty\else
-              \end{array}\fi}%
-        \addtocounter{end\InTheoType ctr}{-1}%
-   \relax\ifmmode
-      \ifinner
-         \@badmath
-      \else
-          \PotEndMark{\eqno}\global\@ignoretrue$$%%$$ BRACE MATCH HACK
-      \fi
-   \else
-      \@badmath
-   \fi
-   \ignorespaces}
-\gdef\SetMark@endeqnarray#1{\llap{\raisebox{-1.3em}{#1}}}
-\gdef\endeqnarray{%
-      \global\let\Oldeqnnum=\@eqnnum
-      \gdef\@eqnnum{\Oldeqnnum\PotEndMark{\SetMark@endeqnarray}}%
-      \@@eqncr
-      \egroup
-      \global\advance\c@equation\m@ne
-   $$\global\@ignoretrue
-      \global\let\@eqnnum\Oldeqnnum}
-\@namedef{endeqnarray*}{%
-     %    from \@@eqncr:
-    \let\reserved@a\relax
-    \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
-     \or \def\reserved@a{&}\else
-       \let\reserved@a\@empty
-       \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
-     \reserved@a {\normalfont \normalcolor \PotEndMark{}}%
-     \global\@eqnswtrue\global\@eqcnt\z@\cr
-     %
-      \egroup
-      \global\advance\c@equation\m@ne
-   $$\global\@ignoretrue}
-\gdef\endtabbing{%
-  \PotEndMark{\`}\@stopline\ifnum\@tabpush >\z@ \@badpoptabs
-  \fi\endtrivlist}
-\gdef\endcenter{%
-  \@endtrivlist
-    {\PotEndMark{\rightskip0pt%
-         \settowidth{\leftskip}%
-          { \csname mark\roman{curr\InTheoType ctr}\InTheoType
-                   \roman{end\InTheoType ctr}\endcsname}%
-         \advance\leftskip\@flushglue\hskip\@flushglue}}}
-\gdef\@empty{}
-\gdef\@endtheorem{%
-  \expandafter
-  \ifx\csname\InTheoType Symbol\endcsname\@empty\setendmarkfalse\fi
-  \@endtrivlist
-    {\ifsetendmark
-     \unskip\nobreak\hfill\nobreak\csname\InTheoType Symbol\endcsname
-     \setendmarkfalse \fi}%
-  \ifsetendmark\OrganizeTheoremSymbol\else\global\setendmarktrue\fi
-  \csname\InTheoType @postwork\endcsname
-  }
-\gdef\NoEndMark{\global\setendmarkfalse}
-\gdef\qed{\expandafter\def\csname \InTheoType Symbol\endcsname
-          {\the\qedsymbol}}%
-\gdef\PotEndMark#1{\SetEndMark{\InTheoType}{#1}}%
-\gdef\SetEndMark#1#2{%
-   \stepcounter{end#1ctr}%
-   \@ifundefined{mark\roman{curr#1ctr}#1\roman{end#1ctr}}%
-   {\relax}%
-   {#2{\csname mark\roman{curr#1ctr}#1\roman{end#1ctr}\endcsname
-       \ifdim\rightmargin>\z@\hskip-\rightmargin\fi
-       \hbox to 0cm{}}}}%
-\newskip\mysavskip
-\gdef\@bbsphack{%
-    \ifvmode\else\mysavskip\lastskip
-    \unskip\fi}
-\gdef\@eesphack{%
-    \ifdim\mysavskip>\z@
-    \vskip\mysavskip \else\fi}
-\gdef\OrganizeTheoremSymbol{%
-  \@bbsphack
-  \edef\thm@tmp{\expandafter\expandafter\expandafter\thm@meaning
-         \expandafter\meaning\csname\InTheoType Symbol\endcsname\relax}%
-  \protected@write\@auxout{}%
-     {\string\global\string\def\string\mark%
-      \roman{curr\InTheoType ctr}\InTheoType \roman{end\InTheoType ctr}%
-      {\thm@tmp}}%
-  \@eesphack}
-} % end of option [thmmarks]
-\DeclareOption{leqno}{% *********************************************
-  \if@thmmarks
-  \PackageInfo{\basename}{Option `leqno' loaded}%
-   \gdef\SetMark@endeqn#1{\hss\llap{#1}}
-   \gdef\SetMark@endeqnarray#1{\hss\llap{#1}}
-  \fi}%
-\DeclareOption{fleqn}{% *********************************************
-\if@thmmarks
- \PackageInfo{\basename}{Option `fleqn' loaded}%
- \renewcommand\[{\relax
-    \ifmmode\@badmath
-    \else
-     \begin{trivlist}%
-        \@beginparpenalty\predisplaypenalty
-        \@endparpenalty\postdisplaypenalty
-        \item[]\leavevmode
-        \hb@xt@\linewidth\bgroup $\m@th\displaystyle %$
-        \hskip\mathindent\bgroup
-          \stepcounter{end\InTheoType ctr}%
-          \@ifundefined{mark\roman{curr\InTheoType ctr}%
-                        \InTheoType\roman{end\InTheoType ctr}}{\relax}%
-            {\ifx\csname\InTheoType Symbol\endcsname\@empty\else
-              \boxmaxdepth=.5ex\begin{array}[b]{l}%
-              \boxmaxdepth=\maxdimen\displaystyle\fi}%
-          \addtocounter{end\InTheoType ctr}{-1}%
-    \fi}
- \renewcommand\]{%
-    \stepcounter{end\InTheoType ctr}%
-    \@ifundefined{mark\roman{curr\InTheoType ctr}%
-                  \InTheoType\roman{end\InTheoType ctr}}{\relax}%
-      {\ifx\csname\InTheoType Symbol\endcsname\@empty\else
-          \end{array}\fi}%
-    \addtocounter{end\InTheoType ctr}{-1}%
-    \relax\ifmmode
-                  \egroup $\hfil\PotEndMark{}% $
-                \egroup
-              \end{trivlist}%
-            \else \@badmath
-            \fi}
-\gdef\endequation{%
-     $\hfil % $
-         \displaywidth\linewidth\hbox{\@eqnnum \PotEndMark{\SetMark@endeqn}}%
-       \egroup
-      \endtrivlist}
-\gdef\endeqnarray{%
-    \global\let\Oldeqnnum=\@eqnnum
-    \gdef\@eqnnum{\Oldeqnnum\PotEndMark{\SetMark@endeqnarray}}%
-    \@@eqncr
-    \egroup
-    \global\advance\c@equation\m@ne$$% $$
-    \global\@ignoretrue
-    \global\let\@eqnnum\Oldeqnnum}
-\fi}% end of option fleqn
-\DeclareOption{thref}{%**********************************************
-  \PackageInfo{\basename}{Option `thref' loaded}%
-\@threftrue
-\newskip\mysavskip
-\gdef\@bbsphack{%
-    \ifvmode\else\mysavskip\lastskip
-    \unskip\fi}
-\gdef\@eesphack{%
-    \ifdim\mysavskip>\z@
-    \vskip\mysavskip \else\fi}
-\def\label#1{%
-  \@ifnextchar[%]
-     {\label@optarg{#1}}%
-     {\thm@makelabel{#1}}}
-\def\thm@makelabel#1{%
-  \@bbsphack
-  \edef\thm@tmp{\expandafter\expandafter\expandafter\thm@meaning
-         \expandafter\meaning\csname\InTheoType Keyword\endcsname\relax}%
-  \protected@write\@auxout{}%
-     {\string\newlabel{#1}{{\@currentlabel}{\thepage}}[\thm@tmp]}%
-  \@eesphack}
-\def\label@optarg#1[#2]{%
-  \@bsphack
-  \protected@write\@auxout{}%
-     {\string\newlabel{#1}{{\@currentlabel}{\thepage}}[#2]}%
-  \@esphack}
-\def\@newl@bel#1#2#3{%
-  \@ifpackageloaded{babel}{\@safe@activestrue}\relax%
-  \@ifundefined{#1@#2}%
-    \relax
-    {\gdef \@multiplelabels {%
-       \@latex@warning@no@line{There were multiply-defined labels}}%
-     \@latex@warning@no@line{Label `#2' multiply defined}}%
-  \global\@namedef{#1@#2}{#3}%
-  \@ifnextchar[{\set@label@type{#1}{#2}}%]
-               \relax}%
-\def\set@label@type#1#2[#3]{%
-  \global\@namedef{#1@#2@type}{#3}}
-
-\newcommand\org@testdef{}
-\let\org@testdef\@testdef
-\def\@testdef#1#2#3{%
-  \org@testdef{#1}{#2}{#3}%
-  \@ifnextchar[{\@gobbleopt}{}%
-}
-\newcommand\@gobbleopt{}
-\long\def\@gobbleopt[#1]{}
-\def\thref#1{%
-   \expandafter\ifx\csname r@#1@type\endcsname\None
-     \PackageWarning{\basename}{thref: Reference Type of `#1' on page
-      \thepage \space undefined}\G@refundefinedtrue
-     \else\csname r@#1@type\endcsname~\fi%
-   \expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
-}% end of option thref ************************************************
-\DeclareOption{amsmath}{% ***************************************************
-\if@thref
- \PackageInfo{\basename}{option `amsmath' handling for `thref' loaded}%
-\let\ltx@label\label
-\global\let\thm@df@label@optarg\@empty
-\def\label@in@display#1{%
-    \ifx\df@label\@empty\else
-        \@amsmath@err{Multiple \string\label's:
-            label '\df@label' will be lost}\@eha
-    \fi
-    \gdef\df@label{#1}%
-    \@ifnextchar[{\thm@label@in@display@optarg}{\thm@label@in@display@noarg}%]
-}
-\def\thm@label@in@display@noarg{%
-    \global\let\thm@df@label@optarg\@empty
-}
-\def\thm@label@in@display@optarg[#1]{%
-    \gdef\thm@df@label@optarg{#1}%
-}
-\def\endmathdisplay@a{%
-  \if@eqnsw \gdef\df@tag{\tagform@\theequation}\fi
-  \if@fleqn \@xp\endmathdisplay@fleqn
-  \else \ifx\df@tag\@empty \else \veqno \alt@tag \df@tag \fi
-    \ifx\df@label\@empty \else
-      \ifx\thm@df@label@optarg\@empty \@xp\ltx@label\@xp{\df@label}
-                \else \@xp\ltx@label\@xp{\df@label}[\thm@df@label@optarg]\fi
-       \fi
-  \fi
-  \ifnum\dspbrk@lvl>\m@ne
-    \postdisplaypenalty -\@getpen\dspbrk@lvl
-    \global\dspbrk@lvl\m@ne
-  \fi
-}
-\def\make@display@tag{%
-    \if@eqnsw
-        \refstepcounter{equation}%
-        \tagform@\theequation
-    \else
-        \iftag@
-            \df@tag
-            \global\let\df@tag\@empty
-        \fi
-    \fi
-    \ifmeasuring@
-    \else
-      \ifx\df@label\@empty\else
-        \ifx\thm@df@label@optarg\@empty \@xp\ltx@label\@xp{\df@label}
-                \else \@xp\ltx@label\@xp{\df@label}[\thm@df@label@optarg]\fi
-        \global\let\df@label\@empty
-      \fi
-    \fi
-}
-\def\endmathdisplay@fleqn{%
-  $\hfil\hskip\@mathmargin\egroup
-  \ifnum\badness<\inf@bad \let\too@wide\@ne \else \let\too@wide\z@ \fi
-  \ifx\@empty\df@tag
-  \else
-    \setbox4\hbox{\df@tag
-        \ifx\thm@df@label@optarg\@empty \@xp\ltx@label\@xp{\df@label}
-                \else \@xp\ltx@label\@xp{\df@label}[\thm@df@label@optarg]\fi
-    }%
-  \fi
-  \csname emdf@%
-    \ifx\df@tag\@empty U\else \iftagsleft@ L\else R\fi\fi
-  \endcsname
-}
-\fi
-\if@thmmarks
- \PackageInfo{\basename}{option `amsmath' handling for `thmmarks' loaded}%
-\newdimen\thm@amstmpdepth
-\gdef\TagsPlusEndmarks{%
-      \global\let\Old@maketag@@@=\maketag@@@
-      \global\let\Old@df@tag=\df@tag
-      \if@eqnsw\SetTagPlusEndMark
-        \else
-          \iftag@\SetTagPlusEndMark
-            \else\SetOnlyEndMark
-          \fi
-      \fi}
-\gdef\SetOnlyEndMark{%
-      \global\tag@true
-        \iftagsleft@
-           \gdef\df@tag{\hbox
-                       to \displaywidth{\hss\PotEndMark{\maketag@@@}}}%
-        \else
-            \gdef\df@tag{\PotEndMark{\maketag@@@}}%
-        \fi}
-\gdef\SetTagPlusEndMark{%
-        \iftagsleft@
-          \gdef\maketag@@@##1{%
-               \hbox to \displaywidth{\m@th\normalfont##1%
-                                      \hss\PotEndMark{\hss}}}%
-        \else
-          \gdef\maketag@@@##1{\hbox{\m@th\normalfont##1%
-                           \llap{\hss\PotEndMark{\raisebox{-1.3em}}}}}%
-        \fi}
-\gdef\RestoreTags{%
-    \global\let\maketag@@@=\Old@maketag@@@
-    \global\let\df@tag=\Old@df@tag}
-\gdef\endgather{%
-      \TagsPlusEndmarks % <<<<<<<<<
-      \math@cr
-      \black@\totwidth@
-    \egroup
-    $$%
-    \RestoreTags        % <<<<<<<<<
-    \ignorespacesafterend}
-\expandafter\let\csname endgather*\endcsname\endgather
-\def\endalign{%
-        \ifingather@\else       % <<<<<<<<<
-           \TagsPlusEndmarks\fi % <<<<<<<<<
-        \math@cr
-        \black@\totwidth@
-    \egroup
-    \ifingather@
-        \restorealignstate@
-        \egroup
-        \nonumber
-        \ifnum0=`{\fi\iffalse}\fi
-    \else
-        $$%
-        \RestoreTags            % <<<<<<<<<
-    \fi
-    \ignorespacesafterend}
-\expandafter\let\csname endalign*\endcsname\endalign
-\let\endxalignat\endalign
-\expandafter\let\csname endxalignat*\endcsname\endalign
-\let\endxxalignat\endalign
-\let\endalignat\endalign
-\expandafter\let\csname endalignat*\endcsname\endalign
-\let\endflalign\endalign
-\expandafter\let\csname endflalign*\endcsname\endalign
-\def\lendmultline@{%
-        \global\@eqnswfalse\tag@false\tagsleft@false
-        \rendmultline@}
-\def\rendmultline@{%
-    \TagsPlusEndmarks           % <<<<<<<<<
-    \iftag@
-        $\let\endmultline@math\relax
-            \ifshifttag@
-                \hskip\multlinegap
-                \llap{\vtop{%
-                    \raise@tag
-                    \normalbaselines
-                    \setbox\@ne\null
-                    \dp\@ne\lineht@
-                    \box\@ne
-                    \hbox{\strut@\make@display@tag}%
-                }}%
-            \else
-                \hskip\multlinetaggap
-                \make@display@tag
-            \fi
-    \else
-        \hskip\multlinegap
-    \fi
-    \hfilneg
-        \math@cr
-    \egroup$$%
-    \RestoreTags}                % <<<<<<<<<
-\def\endmathdisplay#1{%
-     \ifmmode \else \@badmath \fi
-     \TagsPlusEndmarks % <<<<<<<<<
-     \endmathdisplay@a
-     $$%
-     \RestoreTags        % <<<<<<<<<
-     \global\let\df@label\@empty \global\let\df@tag\@empty
-     \global\tag@false \global\let\alt@tag\@empty
-     \global\@eqnswfalse
-}
-\renewenvironment{equation}{%
-  \edef\reset@equation{%
-    \@nx\setcounter{equation}{\number\c@equation}}%
-  \refstepcounter{equation}%
-  \st@rredfalse \global\@eqnswtrue
-  \mathdisplay{equation}%
-}{%
-  \endmathdisplay{equation}%
-  \ignorespacesafterend
-}
-\renewenvironment{equation*}{%
-  \st@rredtrue \global\@eqnswfalse
-  \mathdisplay{equation*}%
-}{%
-  \endmathdisplay{equation*}%
-  \ignorespacesafterend
-}
-\fi
-}% end of option amsmath/thmmarks **************************************
-\let\thm@usestd\@undefined
-\DeclareOption{standard}{\let\thm@usestd\relax}
-\let\thm@noconfig\@undefined
-\DeclareOption{noconfig}{\let\thm@noconfig\relax}
-\gdef\InTheoType{None}
-\gdef\NoneKeyword{None}
-\gdef\NoneSymbol{None}
-\gdef\None{None}
-\gdef\newtheoremstyle#1#2#3{%
-  \expandafter\@ifundefined{th@#1}%
-   {\expandafter\gdef\csname th@#1\endcsname{%
-    \def\@begintheorem####1####2{#2}%
-    \def\@opargbegintheorem####1####2####3{#3}}}%
-   {\PackageError{\basename}{Theorem style #1 already defined}\@eha}}
-\gdef\renewtheoremstyle#1#2#3{%
-  \expandafter\@ifundefined{th@#1}%
-   {\PackageError{\basename}{Theorem style #1 undefined}\@ehc}%
-     {}%
-  \expandafter\let\csname th@#1\endcsname\relax
-  \newtheoremstyle{#1}{#2}{#3}}
-\newtheoremstyle{plain}%
-  {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]}%
-  {\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ (##3)\theorem@separator]}
-\newtheoremstyle{break}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
-          ##1\ ##2\theorem@separator}\hbox{\strut}}}]}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
-          ##1\ ##2\ (##3)\theorem@separator}\hbox{\strut}}}]}
-\newtheoremstyle{change}%
-  {\item[\hskip\labelsep \theorem@headerfont ##2\ ##1\theorem@separator]}%
-  {\item[\hskip\labelsep \theorem@headerfont ##2\ ##1\ (##3)\theorem@separator]}
-\newtheoremstyle{changebreak}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
-          ##2\ ##1\theorem@separator}\hbox{\strut}}}]}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
-          ##2\ ##1\ (##3)\theorem@separator}\hbox{\strut}}}]}
-\newtheoremstyle{margin}%
-  {\item[\theorem@headerfont \llap{##2}\hskip\labelsep ##1\theorem@separator]}%
-  {\item[\theorem@headerfont \llap{##2}\hskip\labelsep ##1\ (##3)\theorem@separator]}
-\newtheoremstyle{marginbreak}%
-  {\item[\rlap{\vbox{\hbox{\theorem@headerfont
-    \llap{##2}\hskip\labelsep\relax ##1\theorem@separator}\hbox{\strut}}}]}
-  {\item[\rlap{\vbox{\hbox{\theorem@headerfont
-    \llap{##2}\hskip\labelsep\relax ##1\
-    (##3)\theorem@separator}\hbox{\strut}}}]}
-\newtheoremstyle{nonumberplain}%
-  {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
-  {\item[\theorem@headerfont\hskip \labelsep ##1\ (##3)\theorem@separator]}
-\newtheoremstyle{nonumberbreak}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
-          ##1\theorem@separator}\hbox{\strut}}}]}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
-          ##1\ (##3)\theorem@separator}\hbox{\strut}}}]}
-\newtheoremstyle{empty}%
-  {\item[]}%
-  {\item[\theorem@headerfont \hskip\labelsep\relax ##3]}
-\newtheoremstyle{emptybreak}%
-  {\item[]}%
-  {\item[\rlap{\vbox{\hbox{\hskip\labelsep\relax \theorem@headerfont
-          ##3\theorem@separator}\hbox{\strut}}}]}
-\@namedef{th@nonumbermargin}{\th@nonumberplain}
-\@namedef{th@nonumberchange}{\th@nonumberplain}
-\@namedef{th@nonumbermarginbreak}{\th@nonumberbreak}
-\@namedef{th@nonumberchangebreak}{\th@nonumberbreak}
-\@namedef{th@plainNo}{\th@nonumberplain}
-\@namedef{th@breakNo}{\th@nonumberplain}
-\@namedef{th@marginNo}{\th@nonumberplain}
-\@namedef{th@changeNo}{\th@nonumberplain}
-\@namedef{th@marginbreakNo}{\th@nonumberbreak}
-\@namedef{th@changebreakNo}{\th@nonumberbreak}
-\gdef\theoremstyle#1{%
-   \@ifundefined{th@#1}{\@warning
-          {Unknown theoremstyle `#1'. Using `plain'}%
-          \theorem@style{plain}}%
-      {\theorem@style{#1}}}
-\newtoks\theorem@style
-\newtoks\theorem@@style
-\global\theorem@style{plain}
-\newtoks\theorembodyfont
-\global\theorembodyfont{\itshape}
-\newtoks\theoremnumbering
-\global\theoremnumbering{arabic}
-\newskip\theorempreskipamount
-\newskip\theorempostskipamount
-\global\theorempreskipamount\topsep
-\global\theorempostskipamount\topsep
-\newdimen\theoremindent
-\global\theoremindent0cm
-\newdimen\theorem@indent
-\newtoks\theoremheaderfont
-\global\theoremheaderfont{\normalfont\bfseries}
-\def\theorem@headerfont{\normalfont\bfseries}
-\newtoks\theoremseparator
-\global\theoremseparator{}
-\def\theorem@separator{}
-\newtoks\theoremprework
-\global\theoremprework{\relax}
-\newtoks\theorempostwork
-\global\theorempostwork{\relax}
-\def\theorem@prework{}
-\newtoks\theoremsymbol
-\global\theoremsymbol{}
-\newtoks\qedsymbol
-\global\qedsymbol{}
-\newtoks\theoremkeyword
-\global\theoremkeyword{None}
-\gdef\theoremclass#1{%
-     \csname th@class@#1\endcsname}
-\gdef\th@class@LaTeX{%
-     \theoremstyle{plain}
-     \theoremheaderfont{\normalfont\bfseries}
-     \theorembodyfont{\itshape}
-     \theoremseparator{}
-     \theoremprework{\relax}
-     \theorempostwork{\relax}
-     \theoremindent0cm
-     \theoremnumbering{arabic}
-     \theoremsymbol{}}
-\newtoks\qedsymbol
-\global\qedsymbol{}
-\DeclareOption{amsthm}{% *********************************************
-  \PackageInfo{\basename}{Option `amsthm' loaded}%
-\def\swapnumbers{\PackageError{\basename}{swapnumbers not implemented.
-  Use theoremstyle change instead.}\@eha}
-
-\gdef\th@plain{%
-  \def\theorem@headerfont{\normalfont\bfseries}\itshape%
-  \def\@begintheorem##1##2{%
-      \item[\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%
-  \def\@opargbegintheorem##1##2##3{%
-     \item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ (##3).]}}
-\gdef\th@nonumberplain{%
-  \def\theorem@headerfont{\normalfont\bfseries}\itshape%
-  \def\@begintheorem##1##2{%
-      \item[\hskip\labelsep \theorem@headerfont ##1.]}%
-  \def\@opargbegintheorem##1##2##3{%
-     \item[\hskip\labelsep \theorem@headerfont ##1\ (##3).]}}
-\gdef\th@definition{%
-  \th@plain\def\theorem@headerfont{\normalfont\bfseries}\itshape}
-\gdef\th@nonumberdefinition{%
-  \th@nonumberplain\def\theorem@headerfont{\normalfont\bfseries}\itshape}
-\gdef\th@remark{%
-  \th@plain\def\theorem@headerfont{\itshape}\normalfont}
-\gdef\th@nonumberremark{%
-  \th@nonumberplain\def\theorem@headerfont{\itshape}\normalfont}
-\newcounter{proof}%
-\if@thmmarks
- \newcounter{currproofctr}%
- \newcounter{endproofctr}%
-\fi
-\newcommand{\openbox}{\leavevmode
-  \hbox to.77778em{%
-  \hfil\vrule
-  \vbox to.675em{\hrule width.6em\vfil\hrule}%
-  \vrule\hfil}}
-\gdef\proofSymbol{\openbox}
-\newcommand{\proofname}{Proof}
-\newenvironment{proof}[1][\proofname]{
-  \th@nonumberplain
-  \def\theorem@headerfont{\itshape}%
-  \normalfont
-  \theoremsymbol{\ensuremath{_\blacksquare}}
-  \@thm{proof}{proof}{#1}}%
-  {\@endtheorem}
-}% end of option amsthm **********************************************
-\newskip\thm@topsepadd
-\gdef\newtheorem{%
-   \@ifstar
-     {\expandafter\@ifundefined{th@nonumber\the\theorem@style}%
-   {\PackageError{\basename}{Theorem style {nonumber\the\theorem@style}
-            undefined (you need it here for newtheorem*) }\@ehc}%
-     {}%
-     \edef\@tempa{{nonumber\the\theorem@style}}%
-      \expandafter\theorem@@style\@tempa\@newtheorem}%
-     {\edef\@tempa{{\the\theorem@style}}%
-      \expandafter\theorem@@style\@tempa\@newtheorem}}
-
-\gdef\renewtheorem{%
-   \@ifstar
-     {\expandafter\@ifundefined{th@nonumber\the\theorem@style}%
-   {\PackageError{\basename}{Theorem style {nonumber\the\theorem@style}
-            undefined (you need it here for newtheorem*) }\@ehc}%
-     {}%
-     \edef\@tempa{{nonumber\the\theorem@style}}%
-      \expandafter\theorem@@style\@tempa\@renewtheorem}%
-     {\edef\@tempa{{\the\theorem@style}}%
-      \expandafter\theorem@@style\@tempa\@renewtheorem}}
-\gdef\@newtheorem#1{%
-  \thm@tempiffalse
-  \expandafter\@ifdefinable\csname #1\endcsname
-  {\expandafter\@ifdefinable\csname #1*\endcsname
-   {\thm@tempiftrue
-    \thm@definelthm{#1}% for lists
-    \if@thmmarks
-      \expandafter\@ifundefined{c@curr#1ctr}%
-        {\newcounter{curr#1ctr}}{}%
-      \expandafter\@ifundefined{c@end#1ctr}%
-        {\newcounter{end#1ctr}}{}%
-    \fi
-    \expandafter\protected@xdef\csname #1Symbol\endcsname{\the\theoremsymbol}%
-    \expandafter\protected@xdef\csname #1@postwork\endcsname{%
-       \the\theorempostwork}%
-    \expandafter\gdef\csname#1\endcsname{%
-       \let\thm@starredenv\@undefined
-       \csname mkheader@#1\endcsname}%
-    \expandafter\gdef\csname#1*\endcsname{%
-       \let\thm@starredenv\relax
-       \csname mkheader@#1\endcsname}%
-    \def\@tempa{\expandafter\noexpand\csname end#1\endcsname}%
-    \expandafter\xdef\csname end#1*\endcsname{\@tempa}%
-    \expandafter\xdef\csname setparms@#1\endcsname
-     {\noexpand \def \noexpand \theorem@headerfont
-        {\the\theoremheaderfont\noexpand\theorem@checkbold}%
-      \noexpand \def \noexpand \theorem@separator
-        {\the\theoremseparator}%
-      \noexpand \def \noexpand \theorem@prework
-        {\the\theoremprework}%
-      \noexpand \def \noexpand \theorem@indent
-        {\the\theoremindent}%
-      \the \theorembodyfont
-      \noexpand\csname th@\the \theorem@@style \endcsname}%
-    \expandafter\xdef\csname th@class@#1\endcsname
-     {\noexpand\theoremstyle{\the\theorem@style}%
-      \noexpand\theoremheaderfont{\the\theoremheaderfont}%
-      \noexpand\theorembodyfont{\the \theorembodyfont}%
-      \noexpand\theoremseparator{\the\theoremseparator}%
-      \noexpand\theoremprework{\the\theoremprework}%
-      \noexpand\theorempostwork{\the\theorempostwork}%
-      \noexpand\theoremindent\the\theoremindent%
-      \noexpand\theoremnumbering{\the\theoremnumbering}%
-      \noexpand\theoremsymbol{\the\theoremsymbol}}%
-    }}%
-  \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}}% MUST NOT BE IN ANY IF !!!
-\gdef\@renewtheorem#1{%
-  \expandafter\@ifundefined{#1}%
-   {\PackageError{\basename}{Theorem style #1 undefined}\@ehc}%
-     {}%
-  \expandafter\let\csname #1\endcsname\relax
-  \expandafter\let\csname #1*\endcsname\relax
-  \@newtheorem{#1}}
-\gdef\@nthm#1#2{%
-  \expandafter\protected@xdef\csname num@addtheoremline#1\endcsname{%
-              \noexpand\@num@addtheoremline{#1}{#2}}%
-  \expandafter\protected@xdef\csname nonum@addtheoremline#1\endcsname{%
-              \noexpand\@nonum@addtheoremline{#1}{#2}}%
-  \theoremkeyword{#2}%
-  \expandafter\protected@xdef\csname #1Keyword\endcsname
-              {\the\theoremkeyword}%
-  \@ifnextchar[{\@xnthm{#1}{#2}}{\@ynthm{#1}{#2}}}
-\gdef\@othm#1[#2]#3{%
-  \@ifundefined{c@#2}{\@nocounterr{#2}}%
-   {\ifthm@tempif
-     \global\@namedef{the#1}{\@nameuse{the#2}}%
-     \expandafter\protected@xdef\csname num@addtheoremline#1\endcsname{%
-              \noexpand\@num@addtheoremline{#1}{#3}}%
-     \expandafter\protected@xdef\csname nonum@addtheoremline#1\endcsname{%
-              \noexpand\@nonum@addtheoremline{#1}{#3}}%
-    \theoremkeyword{#3}%
-    \expandafter\protected@xdef\csname #1Keyword\endcsname
-             {\the\theoremkeyword}%
-     \expandafter\gdef\csname mkheader@#1\endcsname
-       {\csname setparms@#1\endcsname
-                \@thm{#1}{#2}{#3}}%
-     \global\@namedef{end#1}{\@endtheorem}\fi}}
-\gdef\@xnthm#1#2[#3]{%
-  \ifthm@tempif
-     \expandafter\@ifundefined{c@#1}%
-        {\@definecounter{#1}}{}%
-     \@newctr{#1}[#3]%
-     \expandafter\xdef\csname the#1\endcsname{%
-       \expandafter\noexpand\csname the#3\endcsname \@thmcountersep
-          {\noexpand\csname\the\theoremnumbering\endcsname{#1}}}%
-     \expandafter\gdef\csname mkheader@#1\endcsname
-       {\csname setparms@#1\endcsname
-        \@thm{#1}{#1}{#2}}%
-     \global\@namedef{end#1}{\@endtheorem}\fi}
-\gdef\@ynthm#1#2{%
-  \ifthm@tempif
-     \expandafter\@ifundefined{c@#1}%
-        {\@definecounter{#1}}{}%
-     \expandafter\xdef\csname the#1\endcsname
-        {\noexpand\csname\the\theoremnumbering\endcsname{#1}}%
-     \expandafter\gdef\csname mkheader@#1\endcsname
-       {\csname setparms@#1\endcsname
-        \@thm{#1}{#1}{#2}}%
-     \global\@namedef{end#1}{\@endtheorem}\fi}
-\gdef\@thm#1#2#3{%
-   \if@thmmarks
-     \stepcounter{end\InTheoType ctr}%
-   \fi
-   \renewcommand{\InTheoType}{#1}%
-   \if@thmmarks
-     \stepcounter{curr#1ctr}%
-     \setcounter{end#1ctr}{0}%
-   \fi
-   \refstepcounter{#2}%
-   \theorem@prework
-   \thm@topsepadd \theorempostskipamount   % cf. latex.ltx: \@trivlist
-   \ifvmode \advance\thm@topsepadd\partopsep\fi
-   \trivlist
-   \@topsep \theorempreskipamount
-   \@topsepadd \thm@topsepadd        % used by \@endparenv
-   \advance\linewidth -\theorem@indent
-   \advance\@totalleftmargin \theorem@indent
-   \parshape \@ne \@totalleftmargin \linewidth
-   \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}}
-\def\@xthm#1#2#3{%
-  \@begintheorem{#3}{\csname the#2\endcsname}%
-  \ifx\thm@starredenv\@undefined
-    \thm@thmcaption{#1}{{#3}{\csname the#2\endcsname}{}}\fi
-  \ignorespaces}
-\def\@ythm#1#2#3[#4]{%
-  \expandafter\global\expandafter\def\csname#1name\endcsname{#4}%
-  \@opargbegintheorem{#3}{\csname the#2\endcsname}{#4}%
-  \ifx\thm@starredenv\@undefined
-    \thm@thmcaption{#1}{{#3}{\csname the#2\endcsname}{#4}}\fi%
-  \ignorespaces}
-\gdef\@endtheorem{%
-  \endtrivlist
-  \csname\InTheoType @postwork\endcsname
-  }
-\DeclareOption{framed}{%*********************************
-\newtoks\shadecolor
-\shadecolor{gray}
-\let\theoremframecommand\relax
-\def\newshadedtheorem#1{%
-  \expandafter\global\expandafter\xdef\csname#1@shadecolor\endcsname{%
-    \the\shadecolor}%
-  \ifx\theoremframecommand\relax
-    \expandafter\global\expandafter\xdef\csname#1@framecommand\endcsname{%
-      \noexpand\psframebox[fillstyle=solid,
-                    fillcolor=\csname#1@shadecolor\endcsname,
-                    linecolor=\csname#1@shadecolor\endcsname]}%
-  \else
-   \expandafter\global\expandafter\let\csname#1@framecommand\endcsname%
-     \theoremframecommand%
-  \fi
-  \theoremprework{%
-    \def\FrameCommand{\csname#1@framecommand\endcsname}\framed}%
-  \theorempostwork{\endframed}%
-  \newtheorem{#1}%
-  }
-\def\newframedtheorem#1{%
-  \theoremprework{\framed}%
-  \theorempostwork{\endframed}%
-  \newtheorem{#1}%
-  }
-}% end of option amsthm **********************************************
-\def\thm@thmcaption#1#2{\thm@@thmcaption{#1}#2}
-\def\thm@@thmcaption#1#2#3#4{%
-    \thm@parseforwriting{#2}%
-    \let\thm@tmpii\thm@tmp%
-    \thm@parseforwriting{#4}%
-    \edef\thm@t{{\thm@tmpii}{#3}{\thm@tmp}}%
-    \addcontentsline{thm}{#1}{\thm@t}}
-\def\thm@@thmline@noname#1#2#3#4{%
-            \@dottedtocline{-2}{0em}{2.3em}%
-                   {\protect\numberline{#2}#3}%
-                   {#4}}
-\def\thm@@thmline@name#1#2#3#4{%
-        \@dottedtocline{-2}{0em}{2.3em}%
-                   {#1 \protect\numberline{#2}#3}%
-                   {#4}}
-\def\thm@thmline#1#2{\thm@@thmline#1{#2}}
-\long\def\thm@lgobble#1#2{\ignorespaces}
-\def\theoremlistall{%
-    \let\thm@@thmlstart=\relax
-    \let\thm@@thmlend=\relax
-    \let\thm@@thmline=\thm@@thmline@noname}
-\def\theoremlistallname{%
-    \let\thm@@thmlstart=\relax
-    \let\thm@@thmlend=\relax
-    \let\thm@@thmline=\thm@@thmline@name}
-\def\theoremlistoptional{%
-    \let\thm@@thmlstart=\relax
-    \let\thm@@thmlend=\relax
-    \def\thm@@thmline##1##2##3##4{%
-         \ifx\empty ##3%
-         \else
-            \thm@@thmline@noname{##1}{##2}{##3}{##4}%
-         \fi}}
-\def\theoremlistoptname{%
-    \let\thm@@thmlstart=\relax
-    \let\thm@@thmlend=\relax
-    \def\thm@@thmline##1##2##3##4{%
-         \ifx\empty ##3%
-         \else%
-            \thm@@thmline@name{##1}{##2}{##3}{##4}%
-         \fi}}
-\DeclareOption{hyperref}{% **********************************************
-    \def\thm@@thmline@noname#1#2#3#4#5{%
-        \ifx\\#5\\%
-            \@dottedtocline{-2}{0em}{2.3em}%
-                {\protect\numberline{#2}#3}%
-                {#4}%
-        \else
-            \ifHy@linktocpage\relax\relax
-                \@dottedtocline{-2}{0em}{2.3em}%
-                    {\protect\numberline{#2}#3}%
-                    {\hyper@linkstart{link}{#5}{#4}\hyper@linkend}
-            \else
-                \@dottedtocline{-2}{0em}{2.3em}%
-                    {\hyper@linkstart{link}{#5}{\protect\numberline{#2}#3}%
-                      \hyper@linkend}%
-                    {#4}%
-            \fi
-        \fi}%
-    \def\thm@@thmline@name#1#2#3#4#5{%
-        \ifx\\#5\\%
-            \@dottedtocline{-2}{0em}{2.3em}%
-                {#1 \protect\numberline{#2}#3}%
-                {#4}
-        \else
-            \ifHy@linktocpage\relax\relax
-                \@dottedtocline{-2}{0em}{2.3em}%
-                    {#1 \protect\numberline{#2}#3}%
-                    {\hyper@linkstart{link}{#5}{#4}\hyper@linkend}%
-            \else
-                \@dottedtocline{-2}{0em}{2.3em}%
-                    {\hyper@linkstart{link}{#5}%
-                      {#1 \protect\numberline{#2}#3}\hyper@linkend}%
-                    {#4}%
-            \fi
-        \fi}
-    \def\thm@thmline#1#2#3{\thm@@thmline#1{#2}{#3}}
-    \long\def\thm@lgobble#1#2#3{\ignorespaces}
-    \def\theoremlistoptional{%
-        \let\thm@@thmlstart=\relax
-        \let\thm@@thmlend=\relax
-        \def\thm@@thmline##1##2##3##4##5{%
-             \ifx\empty ##3%
-             \else%
-                \thm@@thmline@noname{##1}{##2}{##3}{##4}{##5}%
-             \fi}}
-    \def\theoremlistoptname{%
-        \let\thm@@thmlstart=\relax
-        \let\thm@@thmlend=\relax
-        \def\thm@@thmline##1##2##3##4##5{%
-             \ifx\empty ##3%
-             \else%
-                \thm@@thmline@name{##1}{##2}{##3}{##4}{##5}%
-             \fi}}
-}% end of option hyperref *********************************************
-\def\theoremlisttype#1{%
-    \@ifundefined{thm@thml@#1}%
-       {\PackageError{\basename}{Listtype #1 not defined}\@eha}%
-       {\csname thm@thml@#1\endcsname}}
-\def\thm@thml@all{\theoremlistall}
-\def\thm@thml@opt{\theoremlistoptional}
-\def\thm@thml@optname{\theoremlistoptname}
-\def\thm@thml@allname{\theoremlistallname}
-\def\newtheoremlisttype#1#2#3#4{%
-  \@ifundefined{thm@thml@#1}%
-  {\expandafter\gdef\csname thm@thml@#1\endcsname{%
-    \def\thm@@thmlstart{#2}%
-    \def\thm@@thmline####1####2####3####4{#3}%
-    \def\thm@@thmlend{#4}}%
-  }{\PackageError{\basename}{list type #1 already defined}\@eha}}
-\def\renewtheoremlisttype#1#2#3#4{%
-  \@ifundefined{thm@thml@#1}%
-    {\PackageError{\basename}{List type #1 not defined}\@ehc}{}%
-  \expandafter\let\csname thm@thml@#1\endcsname\relax
-  \newtheoremlisttype{#1}{#2}{#3}{#4}}
-\def\thm@definelthm#1{%
- \expandafter\gdef\csname l@#1\endcsname{\thm@lgobble}%
- \expandafter\gdef\csname thm@listdo#1\endcsname{\thm@lgobble}}
-\long\def\thm@inlistdo#1#2{#2}%
-\def\listtheorems#1{\begingroup
-  \c@tocdepth=-2%
-  \def\thm@list{#1}\thm@processlist
-  \endgroup}
-\def\thm@processlist{%
- \begingroup
- \typeout{** Generating table of \thm@list}%
- \def\contentsline##1{%
-      \expandafter\@ifundefined{l@##1}{\thm@lgobble}{\csname l@##1\endcsname}}%
- \thm@@thmlstart
- \@for\thm@currentlist:=\thm@list\do{%
-  \ifx\thm@currentlist\@empty\else
-   \expandafter\gdef\csname l@\thm@currentlist\endcsname{\thm@thmline}%
-   \expandafter\gdef\csname thm@listdo\thm@currentlist\endcsname{\thm@inlistdo}%
-  \fi
- }%
- \@input{\jobname .thm}%
- \thm@@thmlend
- \@for\thm@currentlist:=\thm@list\do{%
-  \ifx\thm@currentlist\@empty\else
-   \expandafter\gdef\csname l@\thm@currentlist\endcsname{\thm@lgobble}%
-   \expandafter\gdef\csname thm@listdo\thm@currentlist\endcsname{\thm@lgobble}%
-  \fi
- }%
- \endgroup}
-\def\thm@enablelistoftheorems{%
-  \begingroup
-    \makeatletter
-    \if@filesw
-      \expandafter\newwrite\csname tf@thm\endcsname%
-      \immediate\openout \csname tf@thm\endcsname \jobname.thm\relax%
-    \fi
-    \@nobreakfalse
-  \endgroup}
-\def\addtheoremline{\@ifstar{\nonum@addtheoremline}{\num@addtheoremline}}
-\def\nonum@addtheoremline#1{\csname nonum@addtheoremline#1\endcsname}%
-\def\num@addtheoremline#1{\csname num@addtheoremline#1\endcsname}%
-\def\@nonum@addtheoremline#1#2#3{%
-    \thm@parseforwriting{#3}%
-    \edef\thm@t{{#2}{}{\thm@tmp}}%
-    \addcontentsline{thm}{#1}{\thm@t}}
-\def\@num@addtheoremline#1#2#3{%
-   \thm@parseforwriting{#3}%
-    \edef\thm@t{{#2}{\csname the#1\endcsname}{\thm@tmp}}%
-    \addcontentsline{thm}{#1}{\thm@t}}%
-\long\def\addtotheoremfile{%
-  \@ifnextchar[{\@@addtotheoremfile}{\@addtotheoremfile}}
-\long\def\@addtotheoremfile#1{%
-   \thm@parseforwriting{#1}%
-   \protected@write\@auxout%
-      {}{\string\@writefile{thm}{\thm@tmp}}}
-\long\def\@@addtotheoremfile[#1]#2{%
-   \thm@parseforwriting{#2}%
-   \protected@write\@auxout%
-      {}{\string\@writefile{thm}{\string\theoremlistdo{#1}{\thm@tmp}}}}
-\long\def\theoremlistdo#1#2{\expandafter\@ifundefined{thm@listdo#1}%
-     \relax{\csname thm@listdo#1\endcsname{#1}{#2}}}
-\AtEndDocument{\thm@enablelistoftheorems}
-\def\thm@meaning#1->#2\relax{#2}% remove "macro: ->"
-\long\def\thm@parseforwriting#1{%
-    \def\thm@tmp{#1}%
-    \edef\thm@tmp{\expandafter\thm@meaning\meaning\thm@tmp\relax}}
-\def\theorem@checkbold{\if b\expandafter\@car\f@series\@nil\boldmath\fi}
-\def\@greek#1{\theorem@checkbold%
- \ifcase#1\or$\alpha$\or$\beta$\or$\gamma$\or$\delta$\or$\varepsilon$%
-  \or$\zeta$\or$\eta$\or$\vartheta$\or$\iota$\or$\kappa$\or$\lambda$\or$%
-  \mu$\or$\nu$\or$\xi$\or$ o$\or$\varpi$\or$\varrho$\or$\varsigma$\or$\tau$%
-  \or$\upsilon$\or$\varphi$\or$\chi$\or$\psi$\or$\omega$\else\@ctrerr\fi}
-\def\@Greek#1{\theorem@checkbold%
- \ifcase#1\or A\or B\or$\Gamma$\or$\Delta$\or E%
-  \or Z\or H\or$\Theta$\or I\or K\or$\Lambda$\or M%
-  \or N\or$\Xi$\or O\or$\Pi$\or P\or$\Sigma$\or T%
-  \or$\Upsilon$\or$\Phi$\or X\or$\Psi$\or$\Omega$\else\@ctrerr\fi}
-\def\greek#1{\@greek{\csname c@#1\endcsname}}
-\def\Greek#1{\@Greek{\csname c@#1\endcsname}}
-\ProcessOptions\relax
-\theoremlistall
-\ifx\thm@noconfig\@undefined
-\InputIfFileExists{ntheorem.cfg}%
-  {\PackageInfo{\basename}{Local config file ntheorem.cfg used}}%
-  {\ifx\thm@usestd\@undefined%
-   \else%
-     \InputIfFileExists{ntheorem.std}%
-      {\PackageInfo{\basename}{Standard config file ntheorem.std used}}{}
-   \fi}
-\fi
-\endinput
-%%
-%% End of file `ntheorem.sty'.
diff --git a/src/jsr311-api/src/javax/ws/rs/ApplicationPath.java b/src/javax/ws/rs/ApplicationPath.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ApplicationPath.java
rename to src/javax/ws/rs/ApplicationPath.java
diff --git a/src/jsr311-api/src/javax/ws/rs/Consumes.java b/src/javax/ws/rs/Consumes.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/Consumes.java
rename to src/javax/ws/rs/Consumes.java
diff --git a/src/jsr311-api/src/javax/ws/rs/CookieParam.java b/src/javax/ws/rs/CookieParam.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/CookieParam.java
rename to src/javax/ws/rs/CookieParam.java
diff --git a/src/jsr311-api/src/javax/ws/rs/DELETE.java b/src/javax/ws/rs/DELETE.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/DELETE.java
rename to src/javax/ws/rs/DELETE.java
diff --git a/src/jsr311-api/src/javax/ws/rs/DefaultValue.java b/src/javax/ws/rs/DefaultValue.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/DefaultValue.java
rename to src/javax/ws/rs/DefaultValue.java
diff --git a/src/jsr311-api/src/javax/ws/rs/Encoded.java b/src/javax/ws/rs/Encoded.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/Encoded.java
rename to src/javax/ws/rs/Encoded.java
diff --git a/src/jsr311-api/src/javax/ws/rs/FormParam.java b/src/javax/ws/rs/FormParam.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/FormParam.java
rename to src/javax/ws/rs/FormParam.java
diff --git a/src/jsr311-api/src/javax/ws/rs/GET.java b/src/javax/ws/rs/GET.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/GET.java
rename to src/javax/ws/rs/GET.java
diff --git a/src/jsr311-api/src/javax/ws/rs/HEAD.java b/src/javax/ws/rs/HEAD.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/HEAD.java
rename to src/javax/ws/rs/HEAD.java
diff --git a/src/jsr311-api/src/javax/ws/rs/HeaderParam.java b/src/javax/ws/rs/HeaderParam.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/HeaderParam.java
rename to src/javax/ws/rs/HeaderParam.java
diff --git a/src/jsr311-api/src/javax/ws/rs/HttpMethod.java b/src/javax/ws/rs/HttpMethod.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/HttpMethod.java
rename to src/javax/ws/rs/HttpMethod.java
diff --git a/src/jsr311-api/src/javax/ws/rs/MatrixParam.java b/src/javax/ws/rs/MatrixParam.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/MatrixParam.java
rename to src/javax/ws/rs/MatrixParam.java
diff --git a/src/jsr311-api/src/javax/ws/rs/OPTIONS.java b/src/javax/ws/rs/OPTIONS.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/OPTIONS.java
rename to src/javax/ws/rs/OPTIONS.java
diff --git a/src/jsr311-api/src/javax/ws/rs/POST.java b/src/javax/ws/rs/POST.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/POST.java
rename to src/javax/ws/rs/POST.java
diff --git a/src/jsr311-api/src/javax/ws/rs/PUT.java b/src/javax/ws/rs/PUT.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/PUT.java
rename to src/javax/ws/rs/PUT.java
diff --git a/src/jsr311-api/src/javax/ws/rs/Path.java b/src/javax/ws/rs/Path.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/Path.java
rename to src/javax/ws/rs/Path.java
diff --git a/src/jsr311-api/src/javax/ws/rs/PathParam.java b/src/javax/ws/rs/PathParam.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/PathParam.java
rename to src/javax/ws/rs/PathParam.java
diff --git a/src/jsr311-api/src/javax/ws/rs/Produces.java b/src/javax/ws/rs/Produces.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/Produces.java
rename to src/javax/ws/rs/Produces.java
diff --git a/src/jsr311-api/src/javax/ws/rs/QueryParam.java b/src/javax/ws/rs/QueryParam.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/QueryParam.java
rename to src/javax/ws/rs/QueryParam.java
diff --git a/src/jsr311-api/src/javax/ws/rs/WebApplicationException.java b/src/javax/ws/rs/WebApplicationException.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/WebApplicationException.java
rename to src/javax/ws/rs/WebApplicationException.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Application.java b/src/javax/ws/rs/core/Application.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/Application.java
rename to src/javax/ws/rs/core/Application.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/CacheControl.java b/src/javax/ws/rs/core/CacheControl.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/CacheControl.java
rename to src/javax/ws/rs/core/CacheControl.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Context.java b/src/javax/ws/rs/core/Context.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/Context.java
rename to src/javax/ws/rs/core/Context.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Cookie.java b/src/javax/ws/rs/core/Cookie.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/Cookie.java
rename to src/javax/ws/rs/core/Cookie.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/EntityTag.java b/src/javax/ws/rs/core/EntityTag.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/EntityTag.java
rename to src/javax/ws/rs/core/EntityTag.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/GenericEntity.java b/src/javax/ws/rs/core/GenericEntity.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/GenericEntity.java
rename to src/javax/ws/rs/core/GenericEntity.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/HttpHeaders.java b/src/javax/ws/rs/core/HttpHeaders.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/HttpHeaders.java
rename to src/javax/ws/rs/core/HttpHeaders.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/MediaType.java b/src/javax/ws/rs/core/MediaType.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/MediaType.java
rename to src/javax/ws/rs/core/MediaType.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/MultivaluedMap.java b/src/javax/ws/rs/core/MultivaluedMap.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/MultivaluedMap.java
rename to src/javax/ws/rs/core/MultivaluedMap.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/NewCookie.java b/src/javax/ws/rs/core/NewCookie.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/NewCookie.java
rename to src/javax/ws/rs/core/NewCookie.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/PathSegment.java b/src/javax/ws/rs/core/PathSegment.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/PathSegment.java
rename to src/javax/ws/rs/core/PathSegment.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Request.java b/src/javax/ws/rs/core/Request.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/Request.java
rename to src/javax/ws/rs/core/Request.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Response.java b/src/javax/ws/rs/core/Response.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/Response.java
rename to src/javax/ws/rs/core/Response.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/SecurityContext.java b/src/javax/ws/rs/core/SecurityContext.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/SecurityContext.java
rename to src/javax/ws/rs/core/SecurityContext.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/StreamingOutput.java b/src/javax/ws/rs/core/StreamingOutput.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/StreamingOutput.java
rename to src/javax/ws/rs/core/StreamingOutput.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/UriBuilder.java b/src/javax/ws/rs/core/UriBuilder.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/UriBuilder.java
rename to src/javax/ws/rs/core/UriBuilder.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/UriBuilderException.java b/src/javax/ws/rs/core/UriBuilderException.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/UriBuilderException.java
rename to src/javax/ws/rs/core/UriBuilderException.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/UriInfo.java b/src/javax/ws/rs/core/UriInfo.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/UriInfo.java
rename to src/javax/ws/rs/core/UriInfo.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Variant.java b/src/javax/ws/rs/core/Variant.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/Variant.java
rename to src/javax/ws/rs/core/Variant.java
diff --git a/src/jsr311-api/src/javax/ws/rs/core/package-info.java b/src/javax/ws/rs/core/package-info.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/core/package-info.java
rename to src/javax/ws/rs/core/package-info.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/ContextResolver.java b/src/javax/ws/rs/ext/ContextResolver.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/ContextResolver.java
rename to src/javax/ws/rs/ext/ContextResolver.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/ExceptionMapper.java b/src/javax/ws/rs/ext/ExceptionMapper.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/ExceptionMapper.java
rename to src/javax/ws/rs/ext/ExceptionMapper.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/FactoryFinder.java b/src/javax/ws/rs/ext/FactoryFinder.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/FactoryFinder.java
rename to src/javax/ws/rs/ext/FactoryFinder.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/MessageBodyReader.java b/src/javax/ws/rs/ext/MessageBodyReader.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/MessageBodyReader.java
rename to src/javax/ws/rs/ext/MessageBodyReader.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/MessageBodyWriter.java b/src/javax/ws/rs/ext/MessageBodyWriter.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/MessageBodyWriter.java
rename to src/javax/ws/rs/ext/MessageBodyWriter.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/Provider.java b/src/javax/ws/rs/ext/Provider.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/Provider.java
rename to src/javax/ws/rs/ext/Provider.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/Providers.java b/src/javax/ws/rs/ext/Providers.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/Providers.java
rename to src/javax/ws/rs/ext/Providers.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/RuntimeDelegate.java b/src/javax/ws/rs/ext/RuntimeDelegate.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/RuntimeDelegate.java
rename to src/javax/ws/rs/ext/RuntimeDelegate.java
diff --git a/src/jsr311-api/src/javax/ws/rs/ext/package-info.java b/src/javax/ws/rs/ext/package-info.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/ext/package-info.java
rename to src/javax/ws/rs/ext/package-info.java
diff --git a/src/jsr311-api/src/javax/ws/rs/package-info.java b/src/javax/ws/rs/package-info.java
similarity index 100%
rename from src/jsr311-api/src/javax/ws/rs/package-info.java
rename to src/javax/ws/rs/package-info.java
diff --git a/src/jsr311-api/test/javax/ws/rs/core/CookieTest.java b/test/javax/ws/rs/core/CookieTest.java
similarity index 100%
rename from src/jsr311-api/test/javax/ws/rs/core/CookieTest.java
rename to test/javax/ws/rs/core/CookieTest.java
diff --git a/src/jsr311-api/test/javax/ws/rs/core/GenericEntityTest.java b/test/javax/ws/rs/core/GenericEntityTest.java
similarity index 100%
rename from src/jsr311-api/test/javax/ws/rs/core/GenericEntityTest.java
rename to test/javax/ws/rs/core/GenericEntityTest.java
diff --git a/src/jsr311-api/test/javax/ws/rs/core/NewCookieTest.java b/test/javax/ws/rs/core/NewCookieTest.java
similarity index 100%
rename from src/jsr311-api/test/javax/ws/rs/core/NewCookieTest.java
rename to test/javax/ws/rs/core/NewCookieTest.java
diff --git a/src/jsr311-api/test/javax/ws/rs/core/RuntimeDelegateStub.java b/test/javax/ws/rs/core/RuntimeDelegateStub.java
similarity index 100%
rename from src/jsr311-api/test/javax/ws/rs/core/RuntimeDelegateStub.java
rename to test/javax/ws/rs/core/RuntimeDelegateStub.java