diff --git a/FourthDimension.sh b/FourthDimension.sh index 1333e165c11ac5682e65b48654126688543c3da5..6989cb6b13751cc816b638620db5d7f3c949c2c6 100644 --- a/FourthDimension.sh +++ b/FourthDimension.sh @@ -3,6 +3,7 @@ install() { echo "运行安装程序" + pip install . if [ -d bge-large-zh-v1.5 ]; then while true; do read -p "嵌入模型目录已存在,是否重新下载(Y/N)" user_input diff --git a/README.md b/README.md index 40b94f5fb69b9806ea28990be3a009ca12371cfc..ec97deab2c0360cbacca456413649d29e17d080e 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,6 @@ FourthDimension(第四维度)由华中科技大学人工智能与嵌入式 * 向量存储与检索 * 检索增强生成 -### 测试对比 - -> 下表是FourthDimension与LangChain、LlamaIndex的召回率的对比测试结果,采用归一化折损累计增益(Normalized Discounted Cumulative Gain,NDCG)评价指标。 - - -| 工具 | MMarco. | Covid. | Ecom. | Video. | Medical. | Cmedqa. | Du. |T2. | -|:-------------------:|:---------:|:--------:|:-------:|:--------:|:----------:|:---------:|:-------:|:-------:| -| LlamaIndex | 72.71 | 64.75 | 66.24 | 64.82 | 70.79 | 62.97 | 68.61 |65.34 | -| LangChain | 66.5 | 73.68 | 69.94 | 66.06 | 63.15 | 62.76 | 66.15 |66.33 | -| FourthDimension | **83.94** | **93.15** | **86.9** | **89.35** | **76.43** | **68.05** | **79.55** | **81.6** | - - # 工具使用 ### 前置依赖项 @@ -55,47 +43,45 @@ sh FourthDimension.sh install ``` - 4. FourthDimension示例代码 > 运行示例程序,实现文档导入私域知识库,基于私域知识库的问答(检索增强生成) ```text python example/demo.py ``` -5. FourthDimension使用说明 +6. FourthDimension使用说明 >config.json为FourthDimension的配置文件,在使用FourthDimension时请将config.json置于脚本文件同级目录下 -       5.1 导入文档到私域知识库 +       6.1 导入文档到私域知识库 ```text import FourthDimension # 传入文档路径或文件夹路径,目前支持的文档类型包括doc、docx等 -result = FourthDimension.upload('./example/demo') +result = FourthDimension.upload('./data/example/') print(result) ``` -       5.2 基于私域知识库的问答(检索增强生成) +       6.2 基于私域知识库的问答(检索增强生成) ```text import FourthDimension -# 传入问题“蚁群算法是什么?” -answer = FourthDimension.query('蚁群算法是什么?') -# 输出答案“蚁群算法是一种启发式搜索算法,通过模拟蚂蚁寻找食物的行为来解决优化问题。蚁群算法基于蚂蚁群体在真实环境中的觅食行为...” +# 传入问题“什么是活期存款” +answer = FourthDimension.query('什么是活期存款') print(answer) ``` -       5.3 清空私域知识库 +       6.3 清空私域知识库 ```text import FourthDimension result = FourthDimension.clean() print(result) ``` -       5.4 config.json配置文件示例 +       6.4 config.json配置文件示例 ```text { "word_storage": "default", - "embedding_storage": "default", + "embedding_storage": "faiss", "search_select": "default", "embedding_model": "bge-large-zh-v1.5", "answer_generation_model": "gpt-3.5-turbo-16k", @@ -103,12 +89,10 @@ print(result) "api_key": "", "url": "https://api.openai.com/v1" }, - "para_config": { - "chunk_size": 500, - "overlap": 20 - }, "recall_config": { - "top_k": 10 + "keyword_top_k": 30, + "vector_top_k": 50, + "answer_top_k": 3 } } ``` @@ -121,22 +105,11 @@ embedding_model:Embedding模型 answer_generation_model:答案生成模型 openai.api_key:配置您的api key openai.url: 默认使用openai官方接口,可根据需求进行修改 -para_config.chunk_size:文档切分段落长度 -para_config.overlap:文档切分重叠度 -recall_config.top_k:指定使用多少召回结果进行答案生成 -``` -       5.5 FourthDimension测试 -> 下载测试数据集 -```text -sh FourthDimension.sh install_data +recall_config.keyword_top_k:关键字召回的段落数量 +recall_config.vector_top_k:向量召回的段落数量 +recall_config.answer_top_k:进行答案生成的段落数量 ``` -> 启动测试 -> 如需测试其他工具效果,可以选择test_langchain.py或者test_llamaIndex.py -```text -cd test -python test_FourthDimension.py -``` -# 论坛交流 + # 相关知识 @@ -145,6 +118,9 @@ python test_FourthDimension.py - 如何通过大模型实现外挂知识库优化 -更多相关知识分享——网站链接 +- RAG增强技术研究综述 +- +- 向量检索:从Delaunay graph到HNSW Graph +更多相关知识分享——网站链接 diff --git a/example/config.json b/config.json similarity index 30% rename from example/config.json rename to config.json index 27ec0be90d5d1a19d3964bfba96a4072956c039e..a1cd4e700cbbf12acd062e5b0594cecd1b9dd20f 100644 --- a/example/config.json +++ b/config.json @@ -1,18 +1,18 @@ { "word_storage": "default", - "embedding_storage": "faiss", + "embedding_storage": "default", "search_select": "default", - "embedding_model": "../bge-large-zh-v1.5", + "embedding_model": "/home/root1/sunhb/workspace/yantu_rag/models/bge-large-zh-v1.5", "answer_generation_model": "gpt-3.5-turbo-16k", "openai": { - "api_key": "", - "url": "https://api.openai.com/v1" - }, - "para_config": { - "chunk_size": 500, - "overlap": 20 + "api_key": "ak-qBCozWxVnpiPNGOVfiPqemVEF7SHsJxLWnkUCSGxHBOqjYiZ", + "url": "https://api.nextapi.fun/v1" }, "recall_config": { - "top_k": 10 + "keyword_top_k": 30, + "vector_top_k": 50, + "queryTopK": 50, + "totalHitsThreshold": 10000, + "answer_top_k": 3 } } \ No newline at end of file diff --git a/dependencies.txt b/dependencies.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e6c8f5cdf969fa9ee700c81b8a43f1b4cfd3bc3 --- /dev/null +++ b/dependencies.txt @@ -0,0 +1,8 @@ +openai==0.28.0 +torch==2.1.1 +jpype1==1.4.1 +transformers==4.35.2 +fastapi==0.105.0 +jieba==0.42.1 +tiktoken==0.5.2 +docx2txt==0.8 \ No newline at end of file diff --git a/dependency.txt b/dependency.txt deleted file mode 100644 index 1d88d8a534e73b850c41bd31b7a532259d2176e7..0000000000000000000000000000000000000000 --- a/dependency.txt +++ /dev/null @@ -1,77 +0,0 @@ -aiohttp==3.8.6 -aiosignal==1.3.1 -annotated-types==0.6.0 -anyio==3.7.1 -async-timeout==4.0.3 -attrs==23.1.0 -certifi==2023.7.22 -charset-normalizer==3.3.2 -colorama==0.4.6 -dataclasses-json==0.6.1 -docutils==0.20.1 -docx==0.2.4 -elasticsearch==7.17.7 -exceptiongroup==1.1.3 -faiss-cpu==1.7.4 -fastapi==0.104.1 -filelock==3.13.1 -frozenlist==1.4.0 -fsspec==2023.10.0 -fuzzywuzzy==0.18.0 -greenlet==3.0.1 -huggingface-hub==0.17.3 -idna==3.4 -importlib-metadata==6.8.0 -jaraco.classes==3.3.0 -jieba==0.42.1 -jsonpatch==1.33 -jsonpointer==2.4 -keyring==24.2.0 -langchain==0.0.330 -langsmith==0.0.57 -lxml==4.9.3 -markdown-it-py==3.0.0 -marshmallow==3.20.1 -mdurl==0.1.2 -more-itertools==10.1.0 -multidict==6.0.4 -mypy-extensions==1.0.0 -nh3==0.2.14 -numpy==1.24.4 -openai==0.28.1 -packaging==23.2 -Pillow==10.1.0 -pkginfo==1.9.6 -pydantic==2.4.2 -pydantic_core==2.10.1 -Pygments==2.16.1 -pywin32-ctypes==0.2.2 -PyYAML==6.0.1 -readme-renderer==42.0 -regex==2023.10.3 -requests==2.31.0 -requests-toolbelt==1.0.0 -rfc3986==2.0.0 -rich==13.6.0 -safetensors==0.4.0 -sniffio==1.3.0 -SQLAlchemy==2.0.23 -starlette==0.27.0 -tenacity==8.2.3 -tokenizers==0.14.1 -tqdm==4.66.1 -transformers==4.35.0 -twine==4.0.2 -typing-inspect==0.9.0 -typing_extensions==4.8.0 -urllib3==1.26.18 -yarl==1.9.2 -zipp==3.17.0 -tiktoken==0.5.1 -docx==0.2.4 -docx2txt==0.8 -torch==2.0.1 -torchvision==0.15.2 -torchaudio==2.0.2 -python-Levenshtein==0.23.0 -FourthDimension diff --git a/example/demo.py b/example/demo.py index 1b0998e25ce78a08da75b690015c1d7a77e35134..d0d18397009cff8511a239941c046cf48c42c013 100644 --- a/example/demo.py +++ b/example/demo.py @@ -8,13 +8,13 @@ import FourthDimension 文件说明: """ - +index_name = "default_docx" def upload_test(doc_path): """ 导入文档到私域知识库测试 :return: """ - FourthDimension.upload(doc_path) + FourthDimension.upload(doc_path,index_name=index_name) def query_test(question): @@ -22,7 +22,7 @@ def query_test(question): 基于私域知识库的问答(检索增强生成)测试 :return: """ - answer = FourthDimension.query(question) + answer = FourthDimension.query(question,index_name=index_name) return answer @@ -31,7 +31,7 @@ def clean_test(): 清空私域知识库测试 :return: """ - FourthDimension.clean() + FourthDimension.clean(index_name=index_name) if __name__ == '__main__': diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..aee844a4cbb363df423988f3d4c2e29109808ef5 --- /dev/null +++ b/setup.py @@ -0,0 +1,39 @@ +from setuptools import setup, find_packages + +VERSION = '1.4.1' +DESCRIPTION = 'FourthDimension(第四维度)由华中科技大学人工智能与嵌入式实验室联合言图科技研发,是一款基于大语言模型的智能检索增强生成(RAG)系统,提供私域知识库、文档问答等多种服务。此外,FourthDimension提供便捷的本地部署方法,方便用户在本地环境中搭建属于自己的应用平台。' + +setup( + name="FourthDimension", + version=VERSION, + author="yantu-tech", + author_email="wu466687121@qq.com", + description=DESCRIPTION, + long_description_content_type="text/markdown", + long_description=open('README.md', encoding="UTF8").read(), + package_dir={"": "src"}, + packages=find_packages("src"), + include_package_data=True, + package_data={'FourthDimension': ['resources/**']}, + install_requires=[ + 'openai==0.28.0', + 'torch==2.1.1', + 'jpype1==1.4.1', + 'transformers==4.35.2', + 'fastapi==0.105.0', + 'jieba==0.42.1', + 'tiktoken==0.5.2', + 'docx2txt==0.8', + 'attrs==23.1.0', + 'certifi==2023.11.17', + 'idna==3.6', + 'numpy==1.24.4', + 'pyyaml==6.0.1', + 'tqdm==4.66.1', + 'urllib3==2.1.0', + 'sacrebleu==2.4.0' + ], + keywords=["python", "yantu"], + license="MIT", + url="https://gitee.com/hustai/FourthDimension" +) diff --git a/src/FourthDimension/__init__.py b/src/FourthDimension/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d2d6e326496e99770bbc6a6fc715894ea7813a6e --- /dev/null +++ b/src/FourthDimension/__init__.py @@ -0,0 +1 @@ +from FourthDimension.main import upload, clean, select, query diff --git a/src/FourthDimension/chain/__init__.py b/src/FourthDimension/chain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dab737202d0c4b3c2cce70fcd53e032da2818cf0 --- /dev/null +++ b/src/FourthDimension/chain/__init__.py @@ -0,0 +1,3 @@ +""" +文件说明:包含从langchain中集成的代码,不需要任何改动 +""" \ No newline at end of file diff --git a/src/FourthDimension/chain/blob.py b/src/FourthDimension/chain/blob.py new file mode 100644 index 0000000000000000000000000000000000000000..4d95e046ed482ebd21b2e1805ba6578b7fd3512c --- /dev/null +++ b/src/FourthDimension/chain/blob.py @@ -0,0 +1,146 @@ +"""Schema for Blobs and Blob Loaders. + +The goal is to facilitate decoupling of content loading from content parsing code. + +In addition, content loading code should provide a lazy loading interface by default. +""" +from __future__ import annotations + +import contextlib +import mimetypes +from io import BufferedReader, BytesIO +from pathlib import PurePath +from typing import Any, Generator, Iterable, Mapping, Optional, Union + +from FourthDimension.chain.pydantic import BaseModel, root_validator + +PathLike = Union[str, PurePath] + + +class Blob(BaseModel): + """Blob represents raw data by either reference or value. + + Provides an interface to materialize the blob in different representations, and + help to decouple the development of data loaders from the downstream parsing of + the raw data. + + Inspired by: https://developer.mozilla.org/en-US/docs/Web/API/Blob + """ + + data: Union[bytes, str, None] # Raw data + mimetype: Optional[str] = None # Not to be confused with a file extension + encoding: str = "utf-8" # Use utf-8 as default encoding, if decoding to string + # Location where the original content was found + # Represent location on the local file system + # Useful for situations where downstream code assumes it must work with file paths + # rather than in-memory content. + path: Optional[PathLike] = None + + class Config: + arbitrary_types_allowed = True + frozen = True + + @property + def source(self) -> Optional[str]: + """The source location of the blob as string if known otherwise none.""" + return str(self.path) if self.path else None + + @root_validator(pre=True) + def check_blob_is_valid(cls, values: Mapping[str, Any]) -> Mapping[str, Any]: + """Verify that either data or path is provided.""" + if "data" not in values and "path" not in values: + raise ValueError("Either data or path must be provided") + return values + + def as_string(self) -> str: + """Read data as a string.""" + if self.data is None and self.path: + with open(str(self.path), "r", encoding=self.encoding) as f: + return f.read() + elif isinstance(self.data, bytes): + return self.data.decode(self.encoding) + elif isinstance(self.data, str): + return self.data + else: + raise ValueError(f"Unable to get string for blob {self}") + + def as_bytes(self) -> bytes: + """Read data as bytes.""" + if isinstance(self.data, bytes): + return self.data + elif isinstance(self.data, str): + return self.data.encode(self.encoding) + elif self.data is None and self.path: + with open(str(self.path), "rb") as f: + return f.read() + else: + raise ValueError(f"Unable to get bytes for blob {self}") + + @contextlib.contextmanager + def as_bytes_io(self) -> Generator[Union[BytesIO, BufferedReader], None, None]: + """Read data as a byte stream.""" + if isinstance(self.data, bytes): + yield BytesIO(self.data) + elif self.data is None and self.path: + with open(str(self.path), "rb") as f: + yield f + else: + raise NotImplementedError(f"Unable to convert blob {self}") + + @classmethod + def from_path( + cls, + path: PathLike, + *, + encoding: str = "utf-8", + mime_type: Optional[str] = None, + guess_type: bool = True, + ) -> Blob: + """Load the blob from a path like object. + + Args: + path: path like object to file to be read + encoding: Encoding to use if decoding the bytes into a string + mime_type: if provided, will be set as the mime-type of the data + guess_type: If True, the mimetype will be guessed from the file extension, + if a mime-type was not provided + + Returns: + Blob instance + """ + if mime_type is None and guess_type: + _mimetype = mimetypes.guess_type(path)[0] if guess_type else None + else: + _mimetype = mime_type + # We do not load the data immediately, instead we treat the blob as a + # reference to the underlying data. + return cls(data=None, mimetype=_mimetype, encoding=encoding, path=path) + + @classmethod + def from_data( + cls, + data: Union[str, bytes], + *, + encoding: str = "utf-8", + mime_type: Optional[str] = None, + path: Optional[str] = None, + ) -> Blob: + """Initialize the blob from in-memory data. + + Args: + data: the in-memory data associated with the blob + encoding: Encoding to use if decoding the bytes into a string + mime_type: if provided, will be set as the mime-type of the data + path: if provided, will be set as the source from which the data came + + Returns: + Blob instance + """ + return cls(data=data, mimetype=mime_type, encoding=encoding, path=path) + + def __repr__(self) -> str: + """Define the blob representation.""" + str_repr = f"Blob {id(self)}" + if self.source: + str_repr += f" {self.source}" + return str_repr diff --git a/src/doc/document.py b/src/FourthDimension/chain/document.py similarity index 94% rename from src/doc/document.py rename to src/FourthDimension/chain/document.py index e8eb2104dae5320ca81d7fc73a5b81d7c0275df7..da0956e9423bc5e813c56c3a26151fe8b5af0710 100644 --- a/src/doc/document.py +++ b/src/FourthDimension/chain/document.py @@ -4,9 +4,7 @@ from typing import Any, Dict, List, Literal, Optional, TypedDict, Union, cast, S import asyncio from functools import partial -from FourthDimension.doc.pydantic import BaseModel, PrivateAttr, Field - - +from FourthDimension.chain.pydantic import BaseModel, PrivateAttr, Field class BaseSerialized(TypedDict): @@ -42,8 +40,9 @@ def try_neq_default(value: Any, key: str, model: BaseModel) -> bool: except Exception: return True + def _replace_secrets( - root: Dict[Any, Any], secrets_map: Dict[str, str] + root: Dict[Any, Any], secrets_map: Dict[str, str] ) -> Dict[Any, Any]: result = root.copy() for path, secret_id in secrets_map.items(): @@ -93,6 +92,7 @@ def to_json_not_implemented(obj: object) -> SerializedNotImplemented: pass return result + class Serializable(BaseModel, ABC): """Serializable base class.""" @@ -103,11 +103,6 @@ class Serializable(BaseModel, ABC): @classmethod def get_lc_namespace(cls) -> List[str]: - """Get the namespace of the langchain object. - - For example, if the class is `langchain.llms.openai.OpenAI`, then the - namespace is ["langchain", "llms", "openai"] - """ return cls.__module__.split(".") @property @@ -265,7 +260,7 @@ class BaseDocumentTransformer(ABC): @abstractmethod def transform_documents( - self, documents: Sequence[Document], **kwargs: Any + self, documents: Sequence[Document], **kwargs: Any ) -> Sequence[Document]: """Transform a list of documents. @@ -277,7 +272,7 @@ class BaseDocumentTransformer(ABC): """ async def atransform_documents( - self, documents: Sequence[Document], **kwargs: Any + self, documents: Sequence[Document], **kwargs: Any ) -> Sequence[Document]: """Asynchronously transform a list of documents. @@ -289,4 +284,4 @@ class BaseDocumentTransformer(ABC): """ return await asyncio.get_running_loop().run_in_executor( None, partial(self.transform_documents, **kwargs), documents - ) \ No newline at end of file + ) diff --git a/src/FourthDimension/chain/loader.py b/src/FourthDimension/chain/loader.py new file mode 100644 index 0000000000000000000000000000000000000000..d64a893012adbfd1cf502c7b401f483d2891b52d --- /dev/null +++ b/src/FourthDimension/chain/loader.py @@ -0,0 +1,451 @@ +import os +import tempfile +import warnings +from abc import ABC, abstractmethod +from typing import Iterator, List, Optional, Dict, Union, Sequence, Iterable, Any, Mapping + +import numpy as np +import pypdf +import requests +from urllib.parse import urlparse +# import pypdf._page + +from FourthDimension.chain.document import Document +from FourthDimension.chain.text_splitter import TextSplitter, RecursiveCharacterTextSplitter +from FourthDimension.chain.blob import Blob + + +_PDF_FILTER_WITH_LOSS = ["DCTDecode", "DCT", "JPXDecode"] +_PDF_FILTER_WITHOUT_LOSS = [ + "LZWDecode", + "LZW", + "FlateDecode", + "Fl", + "ASCII85Decode", + "A85", + "ASCIIHexDecode", + "AHx", + "RunLengthDecode", + "RL", + "CCITTFaxDecode", + "CCF", + "JBIG2Decode", +] + + +class BaseLoader(ABC): + """Interface for Document Loader. + + Implementations should implement the lazy-loading method using generators + to avoid loading all Documents into memory at once. + + The `load` method will remain as is for backwards compatibility, but its + implementation should be just `list(self.lazy_load())`. + """ + + # Sub-classes should implement this method + # as return list(self.lazy_load()). + # This method returns a List which is materialized in memory. + @abstractmethod + def load(self) -> List[Document]: + """Load data into Document objects.""" + + def load_and_split( + self, text_splitter: Optional[TextSplitter] = None + ) -> List[Document]: + """Load Documents and split into chunks. Chunks are returned as Documents. + + Args: + text_splitter: TextSplitter instance to use for splitting documents. + Defaults to RecursiveCharacterTextSplitter. + + Returns: + List of Documents. + """ + if text_splitter is None: + _text_splitter: TextSplitter = RecursiveCharacterTextSplitter() + else: + _text_splitter = text_splitter + docs = self.load() + return _text_splitter.split_documents(docs) + + # Attention: This method will be upgraded into an abstractmethod once it's + # implemented in all the existing subclasses. + def lazy_load( + self, + ) -> Iterator[Document]: + """A lazy loader for Documents.""" + raise NotImplementedError( + f"{self.__class__.__name__} does not implement lazy_load()" + ) + +class BaseBlobParser(ABC): + """Abstract interface for blob parsers. + + A blob parser provides a way to parse raw data stored in a blob into one + or more documents. + + The parser can be composed with blob loaders, making it easy to reuse + a parser independent of how the blob was originally loaded. + """ + + @abstractmethod + def lazy_parse(self, blob: Blob) -> Iterator[Document]: + """Lazy parsing interface. + + Subclasses are required to implement this method. + + Args: + blob: Blob instance + + Returns: + Generator of documents + """ + + def parse(self, blob: Blob) -> List[Document]: + """Eagerly parse the blob into a document or documents. + + This is a convenience method for interactive development environment. + + Production applications should favor the lazy_parse method instead. + + Subclasses should generally not over-ride this parse method. + + Args: + blob: Blob instance + + Returns: + List of documents + """ + return list(self.lazy_parse(blob)) + +class Docx2txtLoader(BaseLoader, ABC): + """Load `DOCX` file using `docx2txt` and chunks at character level. + + Defaults to check for local file, but if the file is a web path, it will download it + to a temporary file, and use that, then clean up the temporary file after completion + """ + + def __init__(self, file_path: str): + """Initialize with file path.""" + self.file_path = file_path + if "~" in self.file_path: + self.file_path = os.path.expanduser(self.file_path) + + # If the file is a web path, download it to a temporary file, and use that + if not os.path.isfile(self.file_path) and self._is_valid_url(self.file_path): + r = requests.get(self.file_path) + + if r.status_code != 200: + raise ValueError( + "Check the url of your file; returned status code %s" + % r.status_code + ) + + self.web_path = self.file_path + self.temp_file = tempfile.NamedTemporaryFile() + self.temp_file.write(r.content) + self.file_path = self.temp_file.name + elif not os.path.isfile(self.file_path): + raise ValueError("File path %s is not a valid file or url" % self.file_path) + + def __del__(self) -> None: + if hasattr(self, "temp_file"): + self.temp_file.close() + + def load(self) -> List[Document]: + """Load given path as single page.""" + import docx2txt + + return [ + Document( + page_content=docx2txt.process(self.file_path), + metadata={"source": self.file_path}, + ) + ] + + @staticmethod + def _is_valid_url(url: str) -> bool: + """Check if the url is valid.""" + parsed = urlparse(url) + return bool(parsed.netloc) and bool(parsed.scheme) + +def extract_from_images_with_rapidocr( + images: Sequence[Union[Iterable[np.ndarray], bytes]] +) -> str: + """Extract text from images with RapidOCR. + + Args: + images: Images to extract text from. + + Returns: + Text extracted from images. + + Raises: + ImportError: If `rapidocr-onnxruntime` package is not installed. + """ + try: + from rapidocr_onnxruntime import RapidOCR + except ImportError: + raise ImportError( + "`rapidocr-onnxruntime` package not found, please install it with " + "`pip install rapidocr-onnxruntime`" + ) + ocr = RapidOCR() + text = "" + for img in images: + result, _ = ocr(img) + if result: + result = [text[1] for text in result] + text += "\n".join(result) + return text + +class PyPDFParser(BaseBlobParser): + """Load `PDF` using `pypdf`""" + + def __init__( + self, password: Optional[Union[str, bytes]] = None, extract_images: bool = False + ): + self.password = password + self.extract_images = extract_images + + def lazy_parse(self, blob: Blob) -> Iterator[Document]: + """Lazily parse the blob.""" + import pypdf + + with blob.as_bytes_io() as pdf_file_obj: + pdf_reader = pypdf.PdfReader(pdf_file_obj, password=self.password) + yield from [ + Document( + page_content=page.extract_text() + + self._extract_images_from_page(page), + metadata={"source": blob.source, "page": page_number}, + ) + for page_number, page in enumerate(pdf_reader.pages) + ] + + def _extract_images_from_page(self, page: pypdf._page.PageObject) -> str: + """Extract images from page and get the text with RapidOCR.""" + if not self.extract_images or "/XObject" not in page["/Resources"].keys(): + return "" + + xObject = page["/Resources"]["/XObject"].get_object() # type: ignore + images = [] + for obj in xObject: + if xObject[obj]["/Subtype"] == "/Image": + if xObject[obj]["/Filter"][1:] in _PDF_FILTER_WITHOUT_LOSS: + height, width = xObject[obj]["/Height"], xObject[obj]["/Width"] + + images.append( + np.frombuffer(xObject[obj].get_data(), dtype=np.uint8).reshape( + height, width, -1 + ) + ) + elif xObject[obj]["/Filter"][1:] in _PDF_FILTER_WITH_LOSS: + images.append(xObject[obj].get_data()) + else: + warnings.warn("Unknown PDF Filter!") + return extract_from_images_with_rapidocr(images) + +class PyMuPDFParser(BaseBlobParser): + """Parse `PDF` using `PyMuPDF`.""" + + def __init__( + self, + text_kwargs: Optional[Mapping[str, Any]] = None, + extract_images: bool = False, + ) -> None: + """Initialize the parser. + + Args: + text_kwargs: Keyword arguments to pass to ``fitz.Page.get_text()``. + """ + self.text_kwargs = text_kwargs or {} + self.extract_images = extract_images + + def lazy_parse(self, blob: Blob) -> Iterator[Document]: + """Lazily parse the blob.""" + import fitz + + with blob.as_bytes_io() as file_path: + doc = fitz.open(file_path) # open document + + yield from [ + Document( + page_content=page.get_text(**self.text_kwargs) + + self._extract_images_from_page(doc, page), + metadata=dict( + { + "source": blob.source, + "file_path": blob.source, + "page": page.number, + "total_pages": len(doc), + }, + **{ + k: doc.metadata[k] + for k in doc.metadata + if type(doc.metadata[k]) in [str, int] + }, + ), + ) + for page in doc + ] + + def _extract_images_from_page( + self, doc, page + ) -> str: + """Extract images from page and get the text with RapidOCR.""" + if not self.extract_images: + return "" + import fitz + + img_list = page.get_images() + imgs = [] + for img in img_list: + xref = img[0] + pix = fitz.Pixmap(doc, xref) + imgs.append( + np.frombuffer(pix.samples, dtype=np.uint8).reshape( + pix.height, pix.width, -1 + ) + ) + return extract_from_images_with_rapidocr(imgs) + +class BasePDFLoader(BaseLoader, ABC): + """Base Loader class for `PDF` files. + + If the file is a web path, it will download it to a temporary file, use it, then + clean up the temporary file after completion. + """ + + def __init__(self, file_path: str, *, headers: Optional[Dict] = None): + """Initialize with a file path. + + Args: + file_path: Either a local, S3 or web path to a PDF file. + headers: Headers to use for GET request to download a file from a web path. + """ + self.file_path = file_path + self.web_path = None + self.headers = headers + if "~" in self.file_path: + self.file_path = os.path.expanduser(self.file_path) + + # If the file is a web path or S3, download it to a temporary file, and use that + if not os.path.isfile(self.file_path) and self._is_valid_url(self.file_path): + self.temp_dir = tempfile.TemporaryDirectory() + _, suffix = os.path.splitext(self.file_path) + temp_pdf = os.path.join(self.temp_dir.name, f"tmp{suffix}") + self.web_path = self.file_path + if not self._is_s3_url(self.file_path): + r = requests.get(self.file_path, headers=self.headers) + if r.status_code != 200: + raise ValueError( + "Check the url of your file; returned status code %s" + % r.status_code + ) + + with open(temp_pdf, mode="wb") as f: + f.write(r.content) + self.file_path = str(temp_pdf) + elif not os.path.isfile(self.file_path): + raise ValueError("File path %s is not a valid file or url" % self.file_path) + + def __del__(self) -> None: + if hasattr(self, "temp_dir"): + self.temp_dir.cleanup() + + @staticmethod + def _is_valid_url(url: str) -> bool: + """Check if the url is valid.""" + parsed = urlparse(url) + return bool(parsed.netloc) and bool(parsed.scheme) + + @staticmethod + def _is_s3_url(url: str) -> bool: + """check if the url is S3""" + try: + result = urlparse(url) + if result.scheme == "s3" and result.netloc: + return True + return False + except ValueError: + return False + + @property + def source(self) -> str: + return self.web_path if self.web_path is not None else self.file_path + +class PyPDFLoader(BasePDFLoader): + """Load PDF using pypdf into list of documents. + + Loader chunks by page and stores page numbers in metadata. + """ + + def __init__( + self, + file_path: str, + password: Optional[Union[str, bytes]] = None, + headers: Optional[Dict] = None, + extract_images: bool = False, + ) -> None: + """Initialize with a file path.""" + try: + import pypdf # noqa:F401 + except ImportError: + raise ImportError( + "pypdf package not found, please install it with " "`pip install pypdf`" + ) + super().__init__(file_path, headers=headers) + self.parser = PyPDFParser(password=password, extract_images=extract_images) + + def load(self) -> List[Document]: + """Load given path as pages.""" + return list(self.lazy_load()) + + def lazy_load( + self, + ) -> Iterator[Document]: + """Lazy load given path as pages.""" + if self.web_path: + blob = Blob.from_data(open(self.file_path, "rb").read(), path=self.web_path) + else: + blob = Blob.from_path(self.file_path) + yield from self.parser.parse(blob) + +class PyMuPDFLoader(BasePDFLoader): + """Load `PDF` files using `PyMuPDF`.""" + def __init__( + self, + file_path: str, + *, + headers: Optional[Dict] = None, + extract_images: bool = False, + **kwargs: Any, + ) -> None: + """Initialize with a file path.""" + try: + import fitz # noqa:F401 + except ImportError: + raise ImportError( + "`PyMuPDF` package not found, please install it with " + "`pip install pymupdf`" + ) + super().__init__(file_path, headers=headers) + self.extract_images = extract_images + self.text_kwargs = kwargs + + def load(self, **kwargs: Any) -> List[Document]: + """Load file.""" + if kwargs: + print( + f"Received runtime arguments {kwargs}. Passing runtime args to `load`" + f" is deprecated. Please pass arguments during initialization instead." + ) + + text_kwargs = {**self.text_kwargs, **kwargs} + parser = PyMuPDFParser( + text_kwargs=text_kwargs, extract_images=self.extract_images + ) + blob = Blob.from_path(self.file_path) + return parser.parse(blob) diff --git a/src/doc/pydantic.py b/src/FourthDimension/chain/pydantic.py similarity index 100% rename from src/doc/pydantic.py rename to src/FourthDimension/chain/pydantic.py diff --git a/src/doc/spliter.py b/src/FourthDimension/chain/text_splitter.py similarity index 96% rename from src/doc/spliter.py rename to src/FourthDimension/chain/text_splitter.py index 0f75482d25d0b90f0ba3873f8fb3b11751b17ccc..f427636a623c8b7b95b4952c25577f92bf837fdc 100644 --- a/src/doc/spliter.py +++ b/src/FourthDimension/chain/text_splitter.py @@ -1,22 +1,20 @@ -"""**Text Splitters** are classes for splitting text. +""" +**文本分割器**是用于分割文本的类。 +**类层次结构:** -**Class hierarchy:** +.. 代码块:: -.. code-block:: + BaseDocumentTransformer --> TextSplitter --> TextSplitter # 示例:CharacterTextSplitter + RecursiveCharacterTextSplitter --> <名称>TextSplitter - BaseDocumentTransformer --> TextSplitter --> TextSplitter # Example: CharacterTextSplitter - RecursiveCharacterTextSplitter --> TextSplitter +注意: **MarkdownHeaderTextSplitter** 和 **HTMLHeaderTextSplitter 不是从 TextSplitter 派生的。 -Note: **MarkdownHeaderTextSplitter** and **HTMLHeaderTextSplitter do not derive from TextSplitter. +**主要帮手:** +.. 代码块:: -**Main helpers:** - -.. code-block:: - - Document, Tokenizer, Language, LineType, HeaderType - + 文档、分词器、语言、行类型、标题类型 """ # noqa: E501 from __future__ import annotations @@ -51,28 +49,29 @@ from typing import ( ) import requests -from FourthDimension.doc.document import Document, BaseDocumentTransformer + +from FourthDimension.chain.document import Document, BaseDocumentTransformer logger = logging.getLogger(__name__) TS = TypeVar("TS", bound="TextSplitter") -def _make_spacy_pipeline_for_splitting(pipeline: str) -> Any: # avoid importing spacy - try: - import spacy - except ImportError: - raise ImportError( - "Spacy is not installed, please install it with `pip install spacy`." - ) - if pipeline == "sentencizer": - from spacy.lang.en import English - - sentencizer = English() - sentencizer.add_pipe("sentencizer") - else: - sentencizer = spacy.load(pipeline, exclude=["ner", "tagger"]) - return sentencizer +# def _make_spacy_pipeline_for_splitting(pipeline: str) -> Any: # avoid importing spacy +# try: +# import spacy +# except ImportError: +# raise ImportError( +# "Spacy is not installed, please install it with `pip install spacy`." +# ) +# if pipeline == "sentencizer": +# from spacy.lang.en import English +# +# sentencizer = English() +# sentencizer.add_pipe("sentencizer") +# else: +# sentencizer = spacy.load(pipeline, exclude=["ner", "tagger"]) +# return sentencizer def _split_text_with_regex( @@ -146,6 +145,7 @@ class TextSplitter(BaseDocumentTransformer, ABC): if self._add_start_index: index = text.find(chunk, index + 1) metadata["start_index"] = index + metadata["end_index"] = index +len(chunk)-1 new_doc = Document(page_content=chunk, metadata=metadata) documents.append(new_doc) return documents @@ -155,6 +155,7 @@ class TextSplitter(BaseDocumentTransformer, ABC): texts, metadatas = [], [] for doc in documents: texts.append(doc.page_content) + doc.metadata['type'] = 'chunk' metadatas.append(doc.metadata) return self.create_documents(texts, metadatas=metadatas) @@ -233,7 +234,8 @@ class TextSplitter(BaseDocumentTransformer, ABC): @classmethod def from_tiktoken_encoder( cls: Type[TS], - encoding_name: str = "gpt2", + encoding_name: str = "cl100k_base", + # encoding_name: str = "gpt2", model_name: Optional[str] = None, allowed_special: Union[Literal["all"], AbstractSet[str]] = set(), disallowed_special: Union[Literal["all"], Collection[str]] = "all", @@ -288,6 +290,9 @@ class TextSplitter(BaseDocumentTransformer, ABC): None, partial(self.transform_documents, **kwargs), documents ) + def get_length(self, text: str) -> int: + return self._length_function(text) + class CharacterTextSplitter(TextSplitter): """Splitting text that looks at characters.""" @@ -1378,18 +1383,18 @@ class SpacyTextSplitter(TextSplitter): potentially less accurate splitting, you can use `pipeline='sentencizer'`. """ - def __init__( - self, separator: str = "\n\n", pipeline: str = "en_core_web_sm", **kwargs: Any - ) -> None: - """Initialize the spacy text splitter.""" - super().__init__(**kwargs) - self._tokenizer = _make_spacy_pipeline_for_splitting(pipeline) - self._separator = separator - - def split_text(self, text: str) -> List[str]: - """Split incoming text and return chunks.""" - splits = (s.text for s in self._tokenizer(text).sents) - return self._merge_splits(splits, self._separator) + # def __init__( + # self, separator: str = "\n\n", pipeline: str = "en_core_web_sm", **kwargs: Any + # ) -> None: + # """Initialize the spacy text splitter.""" + # super().__init__(**kwargs) + # self._tokenizer = _make_spacy_pipeline_for_splitting(pipeline) + # self._separator = separator + # + # def split_text(self, text: str) -> List[str]: + # """Split incoming text and return chunks.""" + # splits = (s.text for s in self._tokenizer(text).sents) + # return self._merge_splits(splits, self._separator) # For backwards compatibility diff --git a/src/config/config.py b/src/FourthDimension/config/__init__.py similarity index 35% rename from src/config/config.py rename to src/FourthDimension/config/__init__.py index aa3ecd417facc2991a6a85c645fe18a4332399c6..a30da59fbec4b3572960404e68e034f2e8881757 100644 --- a/src/config/config.py +++ b/src/FourthDimension/config/__init__.py @@ -1,58 +1,64 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh +""" +文件说明:该部分存储的是常量 +""" + import json -import logging import os import re -from FourthDimension.model.model_init import init_embeddings_model - -""" -文件说明:项目初始化 -""" -patterns = [] -question_template = [] -config_setting = {} -patternsLen = 0 -embedding_model = None +import openai # 获取当前脚本文件的路径 current_path = os.path.abspath(__file__) - # 获取当前脚本文件所在的目录 current_dir = os.path.dirname(current_path) - # 获取项目根目录的路径 root_dir = os.path.dirname(current_dir) +# resource目录 +resource_dir = f'{root_dir}/resources' + +# 项目总目录 +project_dir = os.path.dirname(os.path.dirname(root_dir)) # 读取配置文件 -with open('config.json') as f: +with open(f"{project_dir}/config.json", 'r', encoding='utf-8') as f: config_setting = dict(json.load(f)) -config_setting.setdefault('elasticsearch_setting', {}) -elasticsearch_setting = config_setting['elasticsearch_setting'] -elasticsearch_setting.update({ - 'host': 'host', - 'port': 9200, - 'username': '', - 'password': '', - 'index_name': 'default_index', - 'analyzer': 'standard' -}) - # 读取问句模板 -with open(current_dir + '/question_regex.txt', 'r', encoding='utf-8') as file: +patterns = [] +question_template = [] +patternsLen = 0 +with open(f'{resource_dir}/question_regex.txt', 'r', encoding='utf-8') as file: for line in file: line = line.strip() question_template.append(line) - for i, line in enumerate(question_template): patterns.append(re.compile(line)) - patternsLen = len(patterns) -logging.warning('模型初始化...') -embedding_model = init_embeddings_model(model_name=config_setting['embedding_model'], - model_kwargs={'device': 'cuda'}, - encode_kwargs={'normalize_embeddings': True}) + +# 文件切分配置 +chunk_overlap = 20 +# min_para_token_len = 80 +# max_para_token_len = 2000 +min_para_character_len = 80 +max_para_character_len = 500 +max_chunk_len = 500 +separators = ['\n\n', '\n', '。', ',', ''] +post_merge_threshold = 20 +post_merge_character = '\n' + +# 检索方法 +search_select = config_setting["search_select"] + +# chatGPT的配置参数 +answer_generation_model = config_setting['answer_generation_model'] +openai.api_key = config_setting['openai']['api_key'] +openai.api_base = config_setting['openai']['url'] + +# 召回使用的上下文段落数 +keyword_top_k = config_setting["recall_config"]['keyword_top_k'] +vector_top_k = config_setting["recall_config"]['vector_top_k'] +answer_top_k = config_setting["recall_config"]['answer_top_k'] + +queryTopK = 50 +totalHitsThreshold = 10000 diff --git a/src/FourthDimension/config/config.py b/src/FourthDimension/config/config.py new file mode 100644 index 0000000000000000000000000000000000000000..b947b8fbc2eb2a4f776c5dd16287c9733182e8b8 --- /dev/null +++ b/src/FourthDimension/config/config.py @@ -0,0 +1,32 @@ +""" +文件说明:该部分初始化模型、搜索客户端等 +""" +import torch + +from FourthDimension.config import config_setting +from FourthDimension.fds.client import FdsClient + + +# from FourthDimension.util.fd_util import load_bge_model + +def load_bge_model(): + from transformers import AutoTokenizer, AutoModel + # Load model from HuggingFace Hub + device = torch.device("cuda" if torch.cuda.is_available() else "cpu") + tokenizer = AutoTokenizer.from_pretrained(config_setting['embedding_model']) + model = AutoModel.from_pretrained(config_setting['embedding_model']).to(device) + model.eval() + return model, tokenizer + + + + +# embed模型 +print('模型初始化...') +embed_model, embed_tokenizer = load_bge_model() +embed_model_device = next(embed_model.parameters()).device +print('模型初始化完成...') + +# lucene配置 +fds_client = FdsClient() + diff --git a/src/FourthDimension/docstore/__init__.py b/src/FourthDimension/docstore/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54e587b6989c009986fa61cc0dce8ecc2a4e4ceb --- /dev/null +++ b/src/FourthDimension/docstore/__init__.py @@ -0,0 +1,3 @@ +""" +文件说明:document是存储类型 +""" diff --git a/src/FourthDimension/docstore/document.py b/src/FourthDimension/docstore/document.py new file mode 100644 index 0000000000000000000000000000000000000000..6521f8c379c77b8d917c32a357bb96668848b541 --- /dev/null +++ b/src/FourthDimension/docstore/document.py @@ -0,0 +1,73 @@ +from typing import List, Optional, Union + + +class FDDocument: + # lucene存储基本单元 fd_document + def __init__(self, + file_name: str = None, + para_num: Union[int, List[int]] = None, + para_context: str = None, + para_vector: List[float] = None, + para_tag: int = 0, + score: float = None + ): + self.file_name = file_name + self.para_num = para_num + self.para_context = para_context + self.para_vector = para_vector + self.para_tag = para_tag + self.sentences_vectors: List[List[float]] = [] + self.sentences: List[str] = [] + self.score: float = score + + # 生成get方法 + def get_file_name(self) -> Optional[str]: + return self.file_name + + def get_para_num(self) -> Optional[Union[int, List[int]]]: + return self.para_num + + def get_para_context(self) -> Optional[str]: + return self.para_context + + def get_para_vector(self) -> Optional[List[float]]: + return self.para_vector + + def get_para_tag(self) -> int: + return self.para_tag + + def get_sentences_vectors(self) -> List[List[float]]: + return self.sentences_vectors + + def get_sentences(self) -> List[str]: + return self.sentences + + # 生成set方法 + def set_file_name(self, file_name: str): + self.file_name = file_name + + def set_para_num(self, para_num: Union[int, List[int]]): + self.para_num = para_num + + def set_para_context(self, para_context: str): + self.para_context = para_context + + def set_para_vector(self, para_vector: List[float]): + self.para_vector = para_vector + + def set_para_tag(self, para_tag: int): + self.para_tag = para_tag + + def set_sentences(self, sentences: List[str]): + self.sentences = sentences + + def set_sentences_vectors(self, sentences_vectors: List[List[float]]): + self.sentences_vectors = sentences_vectors + + def set_score(self, score): + self.score = score + def get_score(self): + return self.score + + def __str__(self): + return f'document(\npara_context({self.para_context})\nfile_name({self.file_name})\npara_num({self.para_num})\npara_tag({self.para_tag}))' diff --git a/src/FourthDimension/document_parser/__init__.py b/src/FourthDimension/document_parser/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64f79402f7c61855f6f2e6f115fdda74f28ac7b8 --- /dev/null +++ b/src/FourthDimension/document_parser/__init__.py @@ -0,0 +1,15 @@ +""" +文件说明:将各种类型的文件转成file类,然后转成document类 +""" + +__all__ = [ + "DocxParser", + "JsonParser", + "JsonlParser", + "PdfParser" +] + +from FourthDimension.document_parser.docx_parser import DocxParser +from FourthDimension.document_parser.json_parser import JsonParser +from FourthDimension.document_parser.jsonl_parser import JsonlParser +from FourthDimension.document_parser.pdf_parser import PdfParser diff --git a/src/FourthDimension/document_parser/base_parser.py b/src/FourthDimension/document_parser/base_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..6dca539276896245853940e77d4655207ff57f91 --- /dev/null +++ b/src/FourthDimension/document_parser/base_parser.py @@ -0,0 +1,262 @@ +import os +from typing import List, Optional, Tuple + +from FourthDimension.chain.text_splitter import RecursiveCharacterTextSplitter + +from FourthDimension.config import ( + # max_para_token_len, + # min_para_token_len, + max_chunk_len, + chunk_overlap, + separators, + post_merge_character, + post_merge_threshold, + max_para_character_len, min_para_character_len +) + +from FourthDimension.docstore.document import FDDocument + +from FourthDimension.chain.document import Document + +from FourthDimension.chain.loader import Docx2txtLoader +# from FourthDimension.docstore.common import process_file +from FourthDimension.util.fd_util import replace_multiple_newlines, get_embedding, get_tokens_from_string, \ + chinese_segment + + +class BaseParser(): + def __init__(self): + self.original_document: Optional[List[Document]] = None + self.chunk_fd_documents: Optional[List[FDDocument]] = None + self.para_fd_documents:Optional[List[FDDocument]] = None + self.fd_documents: List[FDDocument] = [] + self.chunk_spliter = RecursiveCharacterTextSplitter.from_tiktoken_encoder( + chunk_size=max_chunk_len, chunk_overlap=chunk_overlap, separators=separators, add_start_index=True) + + def process_docx(self, document: List[Document]): + """ + 处理chunk,并与para对齐, + """ + # documents = [] + # file.compute_documents(loader_class=Docx2txtLoader) + # file = process_file( + # file=file, + # loader_class=Docx2txtLoader + # ) + self.original_document = document + # self.chunk_fd_documents = self.split_chunk() + self.para_fd_documents = self.split_para() + # self.map_chunk2para() + file_name = os.path.basename(self.original_document[0].metadata["source"]) + self.fd_documents.extend(self.para_fd_documents) + for i, fd_document in enumerate(self.fd_documents): + para_vector = get_embedding(fd_document.get_para_context()) + sentences = chinese_segment(fd_document.get_para_context()) + sentences_vectors = [get_embedding(s) for s in sentences] + fd_document.set_para_vector(para_vector) + fd_document.set_file_name(file_name) + fd_document.set_sentences(sentences) + fd_document.set_sentences_vectors(sentences_vectors) + return self.fd_documents + + def parse(self, dir_path, file_name): + pass + + # def split_chunk(self) -> List[FDDocument]: + # chunk_documents = self.chunk_spliter.split_documents(self.original_document) + # chunk_fd_documents = [] + # for chunk_document in chunk_documents: + # chunk_fd_documents.append(FDDocument( + # file_name=chunk_document.metadata['source'], + # chunk_context=chunk_document.page_content, + # chunk_vector=None, + # para_num=None, + # para_contexts=None, + # start_pos=chunk_document.metadata['start_index'], + # end_pos=chunk_document.metadata['end_index'] + # )) + # chunk_fd_documents = self.__post_merge(chunk_fd_documents, post_merge_character) + # return chunk_fd_documents + # + # def __post_merge( + # self, + # chunk_documents: List[FDDocument], + # post_merge_character: str + # ) -> List[FDDocument]: + # final_chunk_documents = [] + # for i in range(0, len(chunk_documents)-1): + # doc = chunk_documents[i] + # next_doc = chunk_documents[i+1] + # if doc.get_end_pos() - doc.get_start_pos() < post_merge_threshold: + # chunk_documents[i+1] = FDDocument( + # file_name=doc.get_file_name(), + # chunk_context=self.original_document[0].page_content[doc.get_start_pos(): next_doc.get_end_pos()], + # chunk_vector=None, + # para_num=None, + # para_contexts=None, + # start_pos=doc.get_start_pos(), + # end_pos=next_doc.get_end_pos() + # ) + # else: + # final_chunk_documents.append(doc) + # last_doc = chunk_documents[-1] + # if last_doc.get_end_pos() - last_doc.get_start_pos() < post_merge_threshold: + # penultimate_doc = final_chunk_documents[-1] + # final_chunk_documents[-1] = FDDocument( + # file_name=penultimate_doc.get_file_name(), + # chunk_context=self.original_document[0].page_content[penultimate_doc.get_start_pos(): last_doc.get_end_pos()], + # chunk_vector=None, + # para_num=None, + # para_contexts=None, + # start_pos=penultimate_doc.get_start_pos(), + # end_pos=last_doc.get_end_pos() + # ) + # else: + # final_chunk_documents.append(last_doc) + # return final_chunk_documents + + + def split_para(self) -> List[FDDocument]: + """ + 文档内容进行自然段划分,并确定每个文档的偏移位置,偏移计算单位为char + Returns: FDDocument列表 + """ + file_document = self.original_document[0] + content = file_document.page_content + + split_contents = [] + split_contents_ = content.split('\n') + # 过长的段落,按照max_para_character_len进行二次切分 + for i, split_content in enumerate(split_contents_): + if len(split_content) > max_para_character_len: + # 二次切分使用标志位1表示 + split_contents.extend( + (split_content[i:i + max_para_character_len], 1) if i < len(split_content) - max_para_character_len else ( + split_content[i:i + max_para_character_len], 0) + for i in range(0, len(split_content), max_para_character_len) + ) + elif i == len(split_contents_) - 1: + # 最后一段使用标志位2表示 + split_contents.append((split_content, 2)) + else: + # 未切分使用标志位0 + split_contents.append((split_content, 0)) + # 验证 + # total_len = 0 + # for split_content in split_contents: + # total_len += len(split_content[0] + "\n") if split_content[1] == 0 else len(split_content[0]) + # assert len(content) == total_len, "切分后各段拼接总长度与原文长度不同" + + all_para_id_l = [] + para_id_l = [] + for i, split_content in enumerate(split_contents): + para_id_l.append(i) + current_merge_para_len = sum( + len(split_contents[para_id][0] + "\n") if split_contents[para_id][1] == 0 else len( + split_contents[para_id][0]) for para_id in para_id_l + ) + + # 自然段长度超过最低限度min_para_character_len + if current_merge_para_len > min_para_character_len: + if current_merge_para_len <= max_para_character_len + 1: + # 添加新的para_context + all_para_id_l.append(para_id_l) + para_id_l = [] + else: + # 超过max_para_len,按照max_para_len个token进行切分 + assert current_merge_para_len <= max_para_character_len + 1, "文档中过长自然段没有做二次切分!" + # 自然段长度未到最低限度min_single_para_len,进行拼接 + else: + next_para_len = 0 if i == len(split_contents) -1 else len(split_contents[i + 1][0] + "\n") if split_contents[i + 1][1] == 0 else len( + split_contents[i + 1][0]) + merge_para_token_len = current_merge_para_len + next_para_len + # 拼接后一个段落后,长度大于max_para_character_len,直接合并添加 + if merge_para_token_len > max_para_character_len: + all_para_id_l.append(para_id_l) + para_id_l = [] + # 最后一个段落,直接合并添加 + elif i == len(split_contents) - 1: + all_para_id_l.append(para_id_l) + para_id_l = [] + # 小于max_para_len进入下一次循环 + else: + continue + para_fd_documents = self.paras2fd_document(split_contents, all_para_id_l) + if para_fd_documents[-1].get_para_tag() != 2: + para_fd_documents[-1].set_para_tag(2) + # print([doc.get_para_tag() for doc in para_fd_documents]) + return para_fd_documents + + def paras2fd_document(self, + split_contents: List[Tuple[str, int]], + all_para_id_list: List[List[int]]) -> List[FDDocument]: + """ + 构造para的FDDocument + Args: + split_contents: 切分后的段落内容 + all_para_id_list: 自然段序号列表 + + Returns: para FDDocuments + + """ + + # para个数于列表para_id个数对应 + assert len(split_contents) == sum(len(para_id_list) for para_id_list in all_para_id_list) + file_name = os.path.basename(self.original_document[0].metadata["source"]) + para_fd_documents = [] + _pre_para_content = "" + for i, para_id_list in enumerate(all_para_id_list): + # 计算para起止偏移位置 + pre_para_num = para_id_list[0] + pre_para_content = "".join(split_content[0] + "\n" if split_content[1] == 0 else split_content[0] for split_content in split_contents[:pre_para_num]) + pre_para_character_len = len(pre_para_content) + start_pos = pre_para_character_len + # 当前自然段内容 + current_para_context = "".join( + split_contents[para_id][0] + "\n" if split_contents[para_id][1] == 0 else split_contents[para_id][0] + for para_id in para_id_list) + # 从开始拼接至本自然段 + merge_current_para_context = "".join( + split_content[0] + "\n" if split_content[1] == 0 else split_content[0] for split_content in + split_contents[:para_id_list[-1] + 1]) + end_pos = len(merge_current_para_context) -1 + # 添加para_fd_document + if len(para_id_list) > 1: + for para_id in para_id_list: + if split_contents[para_id][1] == 1: + raise Exception("Unexpected situation: para len > 1 but has tag 1!") + para_fd_documents.append(FDDocument( + file_name=file_name, + # start_pos=start_pos, + # end_pos=end_pos, + para_context=current_para_context, + para_num=i, + para_tag=split_contents[para_id_list[-1]][1] + )) + if i == len(all_para_id_list) - 1: + assert end_pos == len("".join(split_content[0] + "\n" if split_content[1] == 0 else split_content[0] for split_content in split_contents[:])) -1,"token数没有对齐!" + return para_fd_documents + + def map_chunk2para(self): + para_id2span = [[para_fd_document.get_start_pos(),para_fd_document.get_end_pos()] for i,para_fd_document in enumerate(self.para_fd_documents)] + para_len = len(self.para_fd_documents) + for chunk_fd_document in self.chunk_fd_documents: + para_index = 0 + chunk_start_pos = chunk_fd_document.get_start_pos(); + chunk_end_pos = chunk_fd_document.get_end_pos(); + tmp_para_nums = [] + # 计算chunk与para的匹配 + while(para_index < para_len): + if chunk_start_pos >= para_id2span[para_index][0] and chunk_start_pos <= para_id2span[para_index][1]: + tmp_para_nums.append(para_index) + elif chunk_end_pos >= para_id2span[para_index][0] and chunk_end_pos <= para_id2span[para_index][1]: + tmp_para_nums.append(para_index) + elif chunk_start_pos <= para_id2span[para_index][0] and chunk_end_pos >= para_id2span[para_index][1]: + tmp_para_nums.append(para_index) + para_index = para_index + 1 + chunk_fd_document.set_para_num(para_num=tmp_para_nums) + para_contexts = [self.para_fd_documents[para_num].get_chunk_context() for para_num in tmp_para_nums] + chunk_fd_document.set_para_contexts(para_contexts) + + + diff --git a/src/FourthDimension/document_parser/docx_parser.py b/src/FourthDimension/document_parser/docx_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..6e1d8b4f91124b31576ce899a3e9e7dc14e51ab5 --- /dev/null +++ b/src/FourthDimension/document_parser/docx_parser.py @@ -0,0 +1,22 @@ +import io +import os +from typing import List + +from FourthDimension.docstore.document import FDDocument +from FourthDimension.chain.loader import Docx2txtLoader +from FourthDimension.document_parser.base_parser import BaseParser + + +class DocxParser(BaseParser): + + def parse(self, dir_path, file_name) -> List[FDDocument]: + """ + 解析docx文件 + """ + + docx_loader = Docx2txtLoader(file_path=(os.path.join(dir_path,file_name))) + docx_document = docx_loader.load() + + # 处理docx文件(切分para) + documents = self.process_docx(docx_document) + return documents diff --git a/src/FourthDimension/document_parser/json_parser.py b/src/FourthDimension/document_parser/json_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..d2795cbfb3944f17502784003560197f675b6c39 --- /dev/null +++ b/src/FourthDimension/document_parser/json_parser.py @@ -0,0 +1,16 @@ +import io +import os + +from fastapi import UploadFile + +# from FourthDimension.docstore.file import File +from FourthDimension.document_parser.base_parser import BaseParser + + +class JsonParser(BaseParser): + + def parse(self, dir_path, file_name): + """ + 解析docx文件 FIXME + """ + return None \ No newline at end of file diff --git a/src/FourthDimension/document_parser/jsonl_parser.py b/src/FourthDimension/document_parser/jsonl_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..7913d23484223040b64b58c7921f4eda75ac1ed2 --- /dev/null +++ b/src/FourthDimension/document_parser/jsonl_parser.py @@ -0,0 +1,28 @@ +import io +import os + +from fastapi import UploadFile + +# from FourthDimension.docstore.file import File +from FourthDimension.document_parser.base_parser import BaseParser + +class JsonlParser(BaseParser): + + def parse(self, dir_path, file_name): + """ + 解析docx文件 + """ + # with open(os.path.join(dir_path, file_name), "rb") as f: + # file_content = f.read() + # + # # Create a file-like object in memory using BytesIO + # file_object = io.BytesIO(file_content) + # upload_file = UploadFile( + # file=file_object, filename=file_name + # ) + # file_instance = File(file=upload_file) + # file_instance.content = file_content + # + # # 处理docx文件(划分chunk和para并对齐) + # documents = self.process_docx(file_instance) + return None diff --git a/src/FourthDimension/document_parser/pdf_parser.py b/src/FourthDimension/document_parser/pdf_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..0a14ad818034e27709525f59723ed946778f9001 --- /dev/null +++ b/src/FourthDimension/document_parser/pdf_parser.py @@ -0,0 +1,27 @@ +import io +import os + +from FourthDimension.chain.document import Document +from FourthDimension.document_parser.base_parser import BaseParser +from FourthDimension.chain.loader import Docx2txtLoader + + +class PdfParser(BaseParser): + + def parse(self, dir_path, file_name): + """ + 解析pdf文件 + """ + pdf_loader = PyMuPDFLoader(file_path=(os.path.join(dir_path, file_name))) + pdf_document = pdf_loader.load() + # # Create a file-like object in memory using BytesIO + # file_object = io.BytesIO(file_content) + # upload_file = UploadFile( + # file=file_object, filename=file_name + # ) + # file_instance = File(file=upload_file) + # file_instance.content = file_content + + # 处理docx文件(划分chunk和para并对齐) + documents = self.process_docx(pdf_document) + return documents \ No newline at end of file diff --git a/src/FourthDimension/fds/__init__.py b/src/FourthDimension/fds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..99a0ab411492e76a0e86f84bc8b0b15e825019f1 --- /dev/null +++ b/src/FourthDimension/fds/__init__.py @@ -0,0 +1,3 @@ +""" +文件说明:和java编写的lucene连接的客户端 +""" diff --git a/src/FourthDimension/fds/client.py b/src/FourthDimension/fds/client.py new file mode 100644 index 0000000000000000000000000000000000000000..a3e8b0c3076d708d9e1f5efb1a4629b713788280 --- /dev/null +++ b/src/FourthDimension/fds/client.py @@ -0,0 +1,159 @@ +import os +from typing import List, Dict + +import jpype + + +from FourthDimension.config import resource_dir, vector_top_k, keyword_top_k, queryTopK, totalHitsThreshold +from FourthDimension.docstore.document import FDDocument +import json + +class FdsClient: + """ + FdSearch 客户端,提供Python调用Java对应的函数。 + + .. 代码块:: python + fds_client = FdsClient() + + # 插入文档API + fds_client.insert_data(all_documents, index_name) + + # QA文档检索API + + # QA向量检索API + """ + def __init__(self) -> None: + # getDefaultJVMPath 获取默认的 JVM 路径 + # jvm_path = jpype.getDefaultJVMPath() + jvm_path = os.path.join(resource_dir, 'jdk', 'lib', 'server', 'libjvm.so') + jpype.startJVM(jvm_path, '-ea', convertStrings=False) + fds_path = os.path.join(resource_dir, "FourthDimension-search.jar") + jpype.addClassPath(fds_path) + + self.JavaFDDocument = jpype.JClass('cn.yantu.fourthdimension.index.mapper.Document') + self.JavaArrayList = jpype.JClass('java.util.ArrayList') + self.JavaMain = jpype.JClass('cn.yantu.fourthdimension.FDStore') + self.JavaFloatArray = jpype.JArray(jpype.JFloat) + self.main = self.JavaMain() + self.JavaDoubleArray = jpype.JArray(jpype.JDouble) + + def create_index(self): + raise Exception("Unimplemented") + + def insert_data(self, all_documents: List[FDDocument], index_name: str) -> dict: + javaDocumentList = self.JavaArrayList() + for doc in all_documents: + sentenceList = self.JavaArrayList() + for sentence in doc.get_sentences(): + sentenceList.add(sentence) + sentenceVectorList = self.JavaArrayList() + for sentence_vector in doc.get_sentences_vectors(): + sentenceVectorList.add(self.JavaFloatArray(sentence_vector)) + javaFDDocument = self.JavaFDDocument() + javaFDDocument.setPara_context(doc.para_context) + javaFDDocument.setFile_name(doc.file_name) + javaFDDocument.setPara_num(doc.para_num) + javaFDDocument.setPara_vector(doc.para_vector) + javaFDDocument.setPara_tag(doc.para_tag) + javaFDDocument.setSentences(sentenceList) + javaFDDocument.setSentences_vectors(sentenceVectorList) + javaDocumentList.add(javaFDDocument) + response = self.main.insertDocuments(javaDocumentList, index_name) + response_json = json.loads(str(response)) + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'] + } + + def search_filename(self): + raise Exception("Unimplemented") + + def clean_data(self, index_name: str): + response = self.main.cleanDocuments(index_name) + response_json = json.loads(str(response)) + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'] + } + + def fds_select(self, file_name: str, para_num: int, index_name: str): + response = self.main.searchDocumentByFilenameAndParanum(file_name, para_num, index_name) + response_json = json.loads(str(response)) + if response_json['code'] == 200 or response_json['code'] == 201: + context = FDDocument( + file_name=response_json['data']['file_name'], + para_num=response_json['data']['para_num'], + para_context=response_json['data']['para_context'], + para_tag=response_json['data']['para_tag'] + ) + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'], + 'context': context + } + else: + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'] + } + + def fds_get_sentences(self, file_name: str, para_num: int, index_name: str): + response = self.main.getSentences(file_name, para_num, index_name) + response_json = json.loads(str(response)) + response_documents = response_json['data'] if 'data' in response_json else [] + if response_documents != []: + sentences_vectors = response_documents['sentences_vectors'] + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'], + 'vectors': sentences_vectors + } + else: + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'], + } + + def fds_search(self, question: str, anal_question: str, index_name: str, topk: int = 10) -> Dict: + response = self.main.searchDocuments(question, anal_question, index_name, keyword_top_k) + response_json = json.loads(str(response)) + response_documents = response_json['data'] if 'data' in response_json else [] + contexts = [] + for doc in response_documents: + contexts.append(FDDocument( + file_name=doc['file_name'], + para_context=doc['para_context'], + para_num=doc['para_num'], + para_tag=doc['para_tag'] + )) + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'], + 'contexts': contexts + } + + def fds_search_vectors(self, query_vector: List[float], index_name: str) -> Dict: + response = self.main.searchVector(query_vector, index_name, vector_top_k) + + + # response = self.main.searchVector_v3(query_vector, index_name, vector_top_k, totalHitsThreshold) + + response_json = json.loads(str(response)) + response_documents = response_json['data'] + contexts = [] + for doc in response_documents: + contexts.append(FDDocument( + file_name=doc['file_name'], + para_context=doc['para_context'], + para_num=doc['para_num'], + para_tag=doc['para_tag'] + )) + return { + 'state_code': response_json['code'], + 'log_detail': response_json['message'], + 'contexts': contexts + } + + def shutdown(self): + # shutdownJVM()关闭JAVA虚拟机 + jpype.shutdownJVM() diff --git a/src/FourthDimension/interface/__init__.py b/src/FourthDimension/interface/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6067d44f7616fd5069161d2a74cf4ae653cb9757 --- /dev/null +++ b/src/FourthDimension/interface/__init__.py @@ -0,0 +1,3 @@ +""" +文件说明:接口 +""" diff --git a/src/FourthDimension/interface/clean.py b/src/FourthDimension/interface/clean.py new file mode 100644 index 0000000000000000000000000000000000000000..29dd388d3a8fd7aa8829b351a52dfc048be64f0c --- /dev/null +++ b/src/FourthDimension/interface/clean.py @@ -0,0 +1,26 @@ +from FourthDimension.config.config import fds_client + +class Cleaner(): + + def __init__(self): + pass + + def clean(self, index_name): + response_data: dict = fds_client.clean_data(index_name) + if response_data.get("state_code") == 200: + print("文档清空成功!") + else: + state_code = response_data.get("state_code") + log_detail = response_data.get("log_detail") + raise Exception(f"文档清空失败!错误码:{state_code}\n日志信息:{log_detail}") + +def clean_entrance(index_name): + print('正在清空文档...') + response_data: dict = fds_client.clean_data(index_name) + if response_data.get("state_code") == 200: + print("文档清空成功!") + else: + state_code =response_data.get("state_code") + log_detail = response_data.get("log_detail") + raise Exception(f"文档清空失败!错误码:{state_code}\n日志信息:{log_detail}") + print('---------------------------------') diff --git a/src/FourthDimension/interface/parse.py b/src/FourthDimension/interface/parse.py new file mode 100644 index 0000000000000000000000000000000000000000..187692438e1703150c67b5cbb94ddce719ba9d18 --- /dev/null +++ b/src/FourthDimension/interface/parse.py @@ -0,0 +1,88 @@ +import os + +from tqdm import tqdm + +from FourthDimension.document_parser import DocxParser, JsonlParser, PdfParser + +class Parser(): + def __init__(self): + pass + + def get_files(self, path): + filenames = [] + if os.path.isfile(path): # 如果是文件 + dirpath, filename = os.path.split(path) + filenames.append(filename) + elif os.path.isdir(path): # 如果是目录 + dirpath = path + filenames = self.get_dir_files(path) + else: + print(f"{path} 不是有效的文件或目录") + exit(0) + return dirpath, filenames + + def get_dir_files(self, path): + filenames = [] + for file_name in tqdm(os.listdir(path)): + file_path = os.path.join(path, file_name) + if os.path.isfile(file_path): # 如果是文件 + filenames.append(file_name) + return filenames + + def get_docs(self, dir_path, file_name): + return get_fd_docs_from_file(dir_path, file_name) + + +def parse_data(doc_or_dir_path): + """ + 数据解析 + :param doc_or_dir_path: 文件路径或文件夹路径 + :return: list[FDDocument] + """ + print('开始文档解析...') + if os.path.isfile(doc_or_dir_path): # 如果是文件 + filepath, filename = os.path.split(doc_or_dir_path) + fd_docs = get_fd_docs_from_file(filepath, filename) + elif os.path.isdir(doc_or_dir_path): # 如果是目录 + fd_docs = get_fd_docs_from_dir(doc_or_dir_path) + else: + print(f"{doc_or_dir_path} 不是有效的文件或目录") + exit(0) + print('文档解析结束...') + return fd_docs + + +def get_fd_docs_from_file(dir_path, file_name): + fd_docs = None + file_type = os.path.splitext(file_name)[1] + # '/home/example.2.1.txt' -> '.txt' + # 根据不同的file_type选择不同解析方式 + if 'docx' in file_type: + parser = DocxParser() + fd_docs = parser.parse(dir_path, file_name) + elif 'jsonl' in file_type: + parser = JsonlParser() + fd_docs = parser.parse(dir_path, file_name) + # elif 'pdf' in file_type: + # parser = PdfParser() + # fd_docs = parser.parse(dir_path, file_name) + else: + print(f"暂时不支持解析该类文件:{file_type}") + return fd_docs + + +def get_fd_docs_from_dir(dir_path): + # 遍历目录中的文件 + fd_docs = [] + for file_name in tqdm(os.listdir(dir_path)): + file_path = os.path.join(dir_path, file_name) + if os.path.isfile(file_path): # 如果是文件 + fd_docs.extend(get_fd_docs_from_file(dir_path, file_name)) + return fd_docs + +if __name__ == '__main__': + parser = Parser() + dirpath, files = parser.get_files("/home/root1/file/project/202401/FD/FourthDimensionCore/data/C1/1227_docx") + + docs = parser.get_docs(dirpath, files[0]) + print(docs) \ No newline at end of file diff --git a/src/FourthDimension/interface/query.py b/src/FourthDimension/interface/query.py new file mode 100644 index 0000000000000000000000000000000000000000..f0e9d464b6a1ffef391e3c18934ac369d6cb0b40 --- /dev/null +++ b/src/FourthDimension/interface/query.py @@ -0,0 +1,352 @@ +from typing import List + +import numpy as np + +from FourthDimension.config.config import fds_client +from FourthDimension.docstore.document import FDDocument +from FourthDimension.util.fd_util import question_analysis, get_embedding, \ + index_search + + +class Queryer(): + + def __init__(self): + self.text_topk = [] + self.vec_topk = [] + self.merged_docs = [] + self.reranked_docs = [] + + def default_query(self, question, index_name): + self.text_query(question, index_name) + + vector = get_embedding(question) + self.vec_query(vector, index_name) + + self.merge_docs() + + self.rerank(question, index_name) + + + def text_query(self, question, index_name): + # 文本查询 + question_anal = question_analysis(question=question) + response = fds_client.fds_search(question=question, + anal_question=question_anal, + index_name=index_name) + if response.get('state_code') != 200: + lucene_log_detail = response.get('log_detail', "not known") + lucene_status_code = response.get('status_code', "not known") + raise Exception(f"Lucene文本查询失败!错误码:{lucene_status_code}\n日志信息:{lucene_log_detail}") + else: + self.text_topk = response.get("contexts") + + def vec_query(self, vectors, index_name): + # 向量查询 + response = fds_client.fds_search_vectors(query_vector=vectors, + index_name=index_name) + if response.get("state_code") != 200: + lucene_log_detail = response.get('log_detail', "not known") + lucene_status_code = response.get('status_code', 'not known') + raise Exception(f"Lucene向量查询失败!错误码:{lucene_status_code}\n日志信息:{lucene_log_detail}") + else: + self.vec_topk = response.get("contexts") + + def merge_docs(self): + + data = self.text_topk.copy() + data.extend(self.vec_topk.copy()) + merged_fd_documents = quchong(data) + self.merged_docs = merged_fd_documents + + def rerank(self, question, indexname): + """ + 根据 para,对 fd_documnets 进行重排 + 1. rerank模型对每个段落打分。 + 2. 每个段落进行以下处理: 切分句子级别,使用BM25进行打分,低分过滤。然后对整个段落综合打分。 + 3. 综合步骤1和步骤2的结果,进行排序。 + Args: + question: 问题 + fd_documents: 文档列表 + + Returns: 重排后的fd_documents列表 + """ + # 计算所有自然段和问题的相似度得分,通过rerank打分 + chunk_scores = [] + # time0 = time.time() + query_embed = get_embedding(question) + # print(time.time() - time0) + paras = self.merged_docs + paras_score = [] + D_list_ans = [] + + for index, i in enumerate(paras): + filename = i.get_file_name() + para_num = i.get_para_num() + D_list = [] + # time1 = time.time() + for para_num_ in para_num: + response = fds_client.fds_get_sentences(filename, para_num_, index_name=indexname) + sentences_vectors = response['vectors'] + for vector in sentences_vectors: + D = index_search(query_embed, vector) + D_list.append(D) + D_list_ans.append(D_list) + flat_D_list_ans = [item for sublist in D_list_ans for item in sublist] + sorted_flat_D_list_ans = sorted(flat_D_list_ans) + D_max = sorted_flat_D_list_ans[int(len(sorted_flat_D_list_ans) * 0.2)] + + for index, D_list in enumerate(D_list_ans): + sorted_sents_score_top3 = get_sents_score_top3(D_list, D_max=D_max) + paras_score.append(sorted_sents_score_top3) + + weight, entr_scores = get_score(paras_score) + + scores = [[i, (e_sc * 0.7 + (paras_score[i][0]) * 0.3)] for i, e_sc in enumerate(entr_scores)] + + + # print(time.time() - time3) + # break + sorted_fd_documents = sorted(scores, key=lambda x: x[1], reverse=True) + rerank_fd_documents = [] + for i, d in enumerate(range(len(sorted_fd_documents))): + index = sorted_fd_documents[i][0] + rerank_fd_documents.append(paras[index]) + # print(1) + self.reranked_docs = rerank_fd_documents + + +class CompleteQueryer(Queryer): + + def __init__(self): + super().__init__() + + def default_query(self, question, index_name): + self.text_query(question, index_name) + + vector = get_embedding(question) + self.vec_query(vector, index_name) + + self.merge_docs() + self.rerank(question, index_name) + + def text_query(self, question, index_name): + self.text_topk = [] + # 文本查询 + question_anal = question_analysis(question=question) + response = fds_client.fds_search(question=question, + anal_question=question_anal, + index_name=index_name) + if response.get('state_code') != 200: + lucene_log_detail = response.get('log_detail', "not known") + lucene_status_code = response.get('status_code', "not known") + raise Exception(f"Lucene文本查询失败!错误码:{lucene_status_code}\n日志信息:{lucene_log_detail}") + else: + top_k: List[FDDocument] = response.get("contexts") + for doc in top_k: + # print("tag是", doc.get_para_tag()) + # 向前合并 + para_num = doc.get_para_num() + doc.set_para_num([doc.get_para_num()]) + now_para_num = para_num + now_tag = 1 + while now_para_num > 0 and now_tag == 1: + response = fds_client.fds_select(doc.get_file_name(), now_para_num - 1, index_name) + assert int(response.get("state_code") / 100) == 2 + previous_doc: FDDocument = response.get("context") + now_tag = previous_doc.get_para_tag() + now_para_num = previous_doc.get_para_num() + if now_tag == 1: + doc.set_para_context(previous_doc.get_para_context() + doc.get_para_context()) + doc.set_para_num([previous_doc.get_para_num()] + doc.get_para_num()) + # print("向前合并了") + # 向后合并 + now_tag = doc.get_para_tag() + now_para_num = para_num + while now_tag == 1: + # print("向后合并了") + response = fds_client.fds_select(doc.get_file_name(), now_para_num + 1, index_name) + assert int(response.get("state_code") / 100) == 2 + next_doc: FDDocument = response.get("context") + doc.set_para_context(doc.get_para_context() + next_doc.get_para_context()) + doc.set_para_num(doc.get_para_num() + [next_doc.get_para_num()]) + now_tag = next_doc.get_para_tag() + now_para_num = next_doc.get_para_num() + self.text_topk.append(doc) + + def vec_query(self, vectors, index_name): + self.vec_topk = [] + # 向量查询 + response = fds_client.fds_search_vectors(query_vector=vectors, + index_name=index_name) + if response.get("state_code") != 200: + lucene_log_detail = response.get('log_detail', "not known") + lucene_status_code = response.get('status_code', 'not known') + raise Exception(f"Lucene向量查询失败!错误码:{lucene_status_code}\n日志信息:{lucene_log_detail}") + else: + top_k: List[FDDocument] = response.get("contexts") + for doc in top_k: + # print("tag是", doc.get_para_tag()) + # 向前合并 + para_num = doc.get_para_num() + doc.set_para_num([doc.get_para_num()]) + now_para_num = para_num + now_tag = 1 + # score = doc.get_score() + while now_para_num > 0 and now_tag == 1: + response = fds_client.fds_select(doc.get_file_name(), now_para_num - 1, index_name) + assert int(response.get("state_code") / 100) == 2 + previous_doc: FDDocument = response.get("context") + now_tag = previous_doc.get_para_tag() + now_para_num = previous_doc.get_para_num() + if now_tag == 1: + doc.set_para_context(previous_doc.get_para_context() + doc.get_para_context()) + doc.set_para_num([previous_doc.get_para_num()] + doc.get_para_num()) + # doc.set_score(doc.get_score()) + # print("向前合并了") + # 向后合并 + now_tag = doc.get_para_tag() + now_para_num = para_num + while now_tag == 1: + # print("向后合并了") + response = fds_client.fds_select(doc.get_file_name(), now_para_num + 1, index_name) + assert int(response.get("state_code") / 100) == 2 + next_doc: FDDocument = response.get("context") + doc.set_para_context(doc.get_para_context() + next_doc.get_para_context()) + doc.set_para_num(doc.get_para_num() + [next_doc.get_para_num()]) + now_tag = next_doc.get_para_tag() + now_para_num = next_doc.get_para_num() + self.vec_topk.append(doc) + + def merge_docs(self): + data = self.text_topk.copy() + data.extend(self.vec_topk.copy()) + merged_fd_documents = quchong(data) + self.merged_docs = merged_fd_documents + + +def lucene_query(question: str, + index_name, + split_retrival: bool = False) -> List[FDDocument]: + """ + lucene 查询文本和查询向量 + :param question: 问题 + """ + # 文本查询 + question_anal = question_analysis(question=question) + # TODO: question_anal只包含标点符号,进行清除 + text_search_fd_documents_response = fds_client.fds_search(question=question, + anal_question=question_anal, + index_name=index_name) + text_search_fd_documents = "" + if text_search_fd_documents_response.get('state_code') != 200: + lucene_log_detail = text_search_fd_documents_response.get('log_detail', "not known") + lucene_status_code = text_search_fd_documents_response.get('status_code', "not known") + raise Exception(f"Lucene文本查询失败!错误码:{lucene_status_code}\n日志信息:{lucene_log_detail}") + else: + text_search_fd_documents = text_search_fd_documents_response.get("contexts") + + # 向量查询 + embedded_query = get_embedding(question) + vector_search_fd_documents_response = fds_client.fds_search_vectors(query_vector=embedded_query, + index_name=index_name) + if vector_search_fd_documents_response.get("state_code") != 200: + lucene_log_detail = vector_search_fd_documents_response.get('log_detail', "not known") + lucene_status_code = vector_search_fd_documents_response.get('status_code', 'not known') + raise Exception(f"Lucene向量查询失败!错误码:{lucene_status_code}\n日志信息:{lucene_log_detail}") + else: + vector_search_fd_documents = vector_search_fd_documents_response.get("contexts") + # fds_client + # 分别返回文本和向量topk检索结果 + if split_retrival: + return [text_search_fd_documents, vector_search_fd_documents] + # 合并查询结果 + # Merge text_search_fd_documents + vector_search_fd_documents + merged_fd_documents = text_search_fd_documents + merged_fd_documents_contexts = [d.get_para_context() for d in text_search_fd_documents] + for d in vector_search_fd_documents: + if d.get_para_context() not in merged_fd_documents_contexts: + merged_fd_documents.append(d) + merged_fd_documents_contexts.append(d.get_para_context()) + return merged_fd_documents + + +def get_sents_score_top3(D_list, D_max=2): + sents_score = [] + + for D in D_list: + if D > D_max: + continue + sents_score.append(1 / (D ** 2 + 1)) # 和knn_score算法一致 + + sorted_sents_score = sorted(sents_score, reverse=True) + if len(sorted_sents_score) >= 3: + sorted_sents_score_top3 = sorted_sents_score[:3] + else: + if len(sorted_sents_score) == 2: + # 第一种取法 + sorted_sents_score_top3 = [sorted_sents_score[0], + sum(sorted_sents_score[:2]) / 2, + sorted_sents_score[1]] + elif len(sorted_sents_score) == 1: + # 第一种取法 + sorted_sents_score_top3 = [sorted_sents_score[0], + sorted_sents_score[0], + sorted_sents_score[0]] + else: + sorted_sents_score_top3 = [1e-6, 1e-6, 1e-6] # 该段的所有分句全都被阈值排除了,给一个低分 + + return sorted_sents_score_top3 + + +def get_score(paras_score): + def stand(x): + min_ = np.min(x, axis=0) + max_ = np.max(x, axis=0) + + # 获取max == min 的列 + col_max_eq_min = np.where(max_ == min_)[0] + + # 初始化 + x_ = np.zeros_like(x) + for j in range(x.shape[1]): + if j in col_max_eq_min: + x_[:, j] = 1 # 该列全为1 + else: + x_[:, j] = (x[:, j] - min_[j]) / (max_[j] - min_[j]) + return x_ + + ## 主程序 + data = np.array(paras_score, dtype=float) + + # 标准化 + data_st = stand(data) + # 归一化 + data_ = data_st / np.sum(data_st, axis=0) + # 计算熵 + entropy = -np.sum(data_ * np.log(data_ + 1e-10), axis=0) / np.log(len(data_)) + # 计算权重 + weight = (1 - entropy) / np.sum(1 - entropy) + # 计算总分 + score = np.sum(data_ * weight, axis=1) + + return weight.tolist(), score.tolist() + + +def quchong(data): + quchong_paras = [] + hit = {} + for d in data: + para_num = d.get_para_num() + docx_name = d.get_file_name() + id_name = docx_name + for p in para_num: + id_name = id_name + "_" + str(p) + + if id_name in hit: + continue + else: + quchong_paras.append(d) + hit[id_name] = True + + return quchong_paras + diff --git a/src/FourthDimension/interface/select.py b/src/FourthDimension/interface/select.py new file mode 100644 index 0000000000000000000000000000000000000000..6e2112b9888daf19036e3d966e5e65ec363c266c --- /dev/null +++ b/src/FourthDimension/interface/select.py @@ -0,0 +1,18 @@ +from FourthDimension.config.config import fds_client +from typing import Optional + +from FourthDimension.docstore.document import FDDocument + + +class Selector: + def __init__(self, index_name: str): + self.index_name = index_name + + def select(self, file_name: str, para_num: int) -> Optional[FDDocument]: + response = fds_client.fds_select(file_name, para_num, self.index_name) + state_code = response['state_code'] + if int(state_code/100) == 2: + context = response['context'] + return context + else: + raise Exception(response['log_detail']) diff --git a/src/FourthDimension/interface/upload.py b/src/FourthDimension/interface/upload.py new file mode 100644 index 0000000000000000000000000000000000000000..5dd15f74aeca8febe608abf220c989456768e73d --- /dev/null +++ b/src/FourthDimension/interface/upload.py @@ -0,0 +1,36 @@ +from typing import List + +from FourthDimension.config.config import fds_client +from FourthDimension.docstore.document import FDDocument + + +class Uploader(): + + def __init__(self): + pass + + def upload(self, docs: List[FDDocument], index_name): + response_data: dict = fds_client.insert_data(docs, index_name) + if response_data.get("state_code") == 200: + print("文档成功上传!") + else: + state_code = response_data.get("state_code") + log_detail = response_data.get("log_detail") + raise Exception(f"文档上传失败!错误码:{state_code}\n日志信息:{log_detail}") + + +def upload_entrance(all_documents, index_name): + """ + 存储入口 + :param all_documents: 段落列表 + :return: + """ + print('解析完成,文档上传中...') + response_data:dict = fds_client.insert_data(all_documents, index_name) + if response_data.get("state_code") == 200: + print("文档成功上传!") + else: + state_code =response_data.get("state_code") + log_detail = response_data.get("log_detail") + raise Exception(f"文档上传失败!错误码:{state_code}\n日志信息:{log_detail}") + print('---------------------------------') diff --git a/src/FourthDimension/main.py b/src/FourthDimension/main.py new file mode 100644 index 0000000000000000000000000000000000000000..f2e26c8fb441f336dd1bedb808dc8fe6625e5657 --- /dev/null +++ b/src/FourthDimension/main.py @@ -0,0 +1,61 @@ +from typing import Optional + +from tqdm import tqdm + +from FourthDimension.config import search_select +from FourthDimension.docstore.document import FDDocument +from FourthDimension.interface.clean import Cleaner +from FourthDimension.interface.parse import Parser +from FourthDimension.interface.query import CompleteQueryer +from FourthDimension.interface.select import Selector +from FourthDimension.interface.upload import Uploader +from FourthDimension.model import chatGPT + + +def upload(path, index_name): + """ + 文档上传接口 + :param path: file or dir path + :param index_name: store database name + """ + # 1. 获取所有需要上传的文档 + parser = Parser() + dirpath, file_names = parser.get_files(path) + uploader = Uploader() + # 2. 将文档转成上传格式 + print("开始分文件导入") + for file_name in tqdm(file_names): + docs = parser.get_docs(dirpath, file_name) + # 3. 调用上传接口 + + uploader.upload(docs, index_name) + + + + +def query(question: str, index_name): + queryer = CompleteQueryer() + print('开始检索问题:{}'.format(question)) + if search_select == "default": + # 向量查询和文本查询,合并之后重排 + queryer.default_query(question, index_name) + else: + raise Exception(f"参数search_select无法匹配,请检查参数:f{search_select}") + answer = chatGPT.answer_generate(question, queryer.reranked_docs) + + return answer + + +def clean(index_name): + """ + 清除所有数据 + """ + print('正在清空文档...') + cleaner = Cleaner() + cleaner.clean(index_name) + print('---------------------------------') + + +def select(file_name: str, para_num: int, index_name: str) -> Optional[FDDocument]: + selector = Selector(index_name=index_name) + return selector.select(file_name, para_num) diff --git a/src/FourthDimension/model/__init__.py b/src/FourthDimension/model/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..01090161346420a9de386d00be67eded465fb8b0 --- /dev/null +++ b/src/FourthDimension/model/__init__.py @@ -0,0 +1,4 @@ +""" +模型调用接口 +chatGPT.py 调用chatGPT模型 +""" diff --git a/src/model/chatGPT.py b/src/FourthDimension/model/chatGPT.py similarity index 68% rename from src/model/chatGPT.py rename to src/FourthDimension/model/chatGPT.py index 1b61b9b79bf586120f2fb2d46d24290f6a5c74bb..95cf243bd7c3f7991a41d52f0a3e769c6b25ef57 100644 --- a/src/model/chatGPT.py +++ b/src/FourthDimension/model/chatGPT.py @@ -1,19 +1,23 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -import openai +# author: sunhb +# datetime: 2023/12/11 下午4:55 +# ide: PyCharm +# filename: chatGPT.py +from pprint import pprint +from typing import List -from FourthDimension.config.config import config_setting +import openai -answer_generation_model = config_setting['answer_generation_model'] -openai.api_key = config_setting['openai']['api_key'] -openai.api_base = config_setting['openai']['url'] +from FourthDimension.config import answer_generation_model, answer_top_k +from FourthDimension.docstore.document import FDDocument -def answer_generate(question, top_k_contexts): +def answer_generate(question, top_k_fd_documents:List[FDDocument]): + top_k_contexts = [fd_document.para_context for fd_document in + top_k_fd_documents] top_k_contexts_str = "" - for i, d in enumerate(top_k_contexts): + for i, d in enumerate(top_k_contexts[:answer_top_k]): top_k_contexts_str += f"{i + 1}:{d}\n" prompt = "你的背景知识:{};对话要求:1. 背景知识是最新的实时的信息,使用背景知识回答问题。" \ "2. 优先使用背景知识的内容回答我的问题,答案应与背景知识严格一致。" \ diff --git a/src/FourthDimension/resources/FourthDimension-search.jar b/src/FourthDimension/resources/FourthDimension-search.jar new file mode 100644 index 0000000000000000000000000000000000000000..5a354d0ed53027239368a2978061c9232470d72e Binary files /dev/null and b/src/FourthDimension/resources/FourthDimension-search.jar differ diff --git a/src/FourthDimension/resources/jdk/NOTICE b/src/FourthDimension/resources/jdk/NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..45484c2619d376ae5a76b134a2b9cdb4720c33ff --- /dev/null +++ b/src/FourthDimension/resources/jdk/NOTICE @@ -0,0 +1,63 @@ +# Notices for Eclipse Temurin + +This content is produced and maintained by the Eclipse Temurin project. + + * Project home: https://projects.eclipse.org/projects/adoptium.temurin + +## Trademarks + +Eclipse Temurin is a trademark of the Eclipse Foundation. Eclipse, and the +Eclipse Logo are registered trademarks of the Eclipse Foundation. + +Java and all Java-based trademarks are trademarks of Oracle Corporation in +the United States, other countries, or both. + +## Copyright + +All content is the property of the respective authors or their employers. +For more information regarding authorship of content, please consult the +listed source code repository logs. + +## Declared Project Licenses + +This program and the accompanying materials are made available under the terms +of the GNU General Public License, version 2, with the Classpath Exception. + +Additional information relating to the program and accompanying materials +license and usage is available as follows. + * For Eclipse Temurin version 8 see the LICENSE and ASSEMBLY_EXCEPTION files +in the top level directory of the installation. + * For Eclipse Temurin version 9 or later see the files under the legal/ +directory in the top level directory of the installation. + +SPDX-License-Identifier: GPL-2.0 WITH Classpath-exception-2.0 + +## Source Code + +The project maintains the following source code repositories which may be +relevant to this content: + + * https://github.com/adoptium/temurin-build + * https://github.com/adoptium/jdk + * https://github.com/adoptium/jdk8u + * https://github.com/adoptium/jdk11u + * https://github.com/adoptium/jdk17u + * https://github.com/adoptium/jdk20 + * and so on + +## Third-party Content + +This program and accompanying materials contains third-party content. + * For Eclipse Temurin version 8 see the THIRD_PARTY_LICENSE file in the +top level directory of the installation. + * For Eclipse Temurin version 9 or later see the files under the legal/ +directory in the top level directory of the installation. + +## Cryptography + +Content may contain encryption software. The country in which you are currently +may have restrictions on the import, possession, and use, and/or re-export to +another country, of encryption software. BEFORE using any encryption software, +please check the country's laws, regulations and policies concerning the import, +possession, or use, and re-export of encryption software, to see if this is +permitted. diff --git a/src/FourthDimension/resources/jdk/bin/java b/src/FourthDimension/resources/jdk/bin/java new file mode 100755 index 0000000000000000000000000000000000000000..30e4e961987cf75fcea053947077112529c4990a Binary files /dev/null and b/src/FourthDimension/resources/jdk/bin/java differ diff --git a/src/FourthDimension/resources/jdk/bin/jfr b/src/FourthDimension/resources/jdk/bin/jfr new file mode 100755 index 0000000000000000000000000000000000000000..539cf67c72e82d4f6ec822416b48daed440b2fe6 Binary files /dev/null and b/src/FourthDimension/resources/jdk/bin/jfr differ diff --git a/src/FourthDimension/resources/jdk/bin/jrunscript b/src/FourthDimension/resources/jdk/bin/jrunscript new file mode 100755 index 0000000000000000000000000000000000000000..5c8c1f30eaf8e864538198f4585d32ac9ac6da71 Binary files /dev/null and b/src/FourthDimension/resources/jdk/bin/jrunscript differ diff --git a/src/FourthDimension/resources/jdk/bin/keytool b/src/FourthDimension/resources/jdk/bin/keytool new file mode 100755 index 0000000000000000000000000000000000000000..3602cf0b6bc2ae53b4181cd8ccfe3d067d54d4a3 Binary files /dev/null and b/src/FourthDimension/resources/jdk/bin/keytool differ diff --git a/src/FourthDimension/resources/jdk/bin/rmiregistry b/src/FourthDimension/resources/jdk/bin/rmiregistry new file mode 100755 index 0000000000000000000000000000000000000000..17d4f751de036bb11db648676393b6d9f5649937 Binary files /dev/null and b/src/FourthDimension/resources/jdk/bin/rmiregistry differ diff --git a/src/FourthDimension/resources/jdk/conf/logging.properties b/src/FourthDimension/resources/jdk/conf/logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..99a385072902340b95ffc99ebbaa6b00dfa8fc52 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/logging.properties @@ -0,0 +1,63 @@ +############################################################ +# Default Logging Configuration File +# +# You can use a different file by specifying a filename +# with the java.util.logging.config.file system property. +# For example, java -Djava.util.logging.config.file=myfile +############################################################ + +############################################################ +# Global properties +############################################################ + +# "handlers" specifies a comma-separated list of log Handler +# classes. These handlers will be installed during VM startup. +# Note that these classes must be on the system classpath. +# By default we only configure a ConsoleHandler, which will only +# show messages at the INFO and above levels. +handlers= java.util.logging.ConsoleHandler + +# To also add the FileHandler, use the following line instead. +#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler + +# Default global logging level. +# This specifies which kinds of events are logged across +# all loggers. For any given facility this global level +# can be overridden by a facility-specific level +# Note that the ConsoleHandler also has a separate level +# setting to limit messages printed to the console. +.level= INFO + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +# default file output is in user's home directory. +java.util.logging.FileHandler.pattern = %h/java%u.log +java.util.logging.FileHandler.limit = 50000 +java.util.logging.FileHandler.count = 1 +# Default number of locks FileHandler can obtain synchronously. +# This specifies maximum number of attempts to obtain lock file by FileHandler +# implemented by incrementing the unique field %u as per FileHandler API documentation. +java.util.logging.FileHandler.maxLocks = 100 +java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter + +# Limit the messages that are printed on the console to INFO and above. +java.util.logging.ConsoleHandler.level = INFO +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + +# Example to customize the SimpleFormatter output format +# to print one-line log message like this: +# : [] +# +# java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n + +############################################################ +# Facility-specific properties. +# Provides extra control for each logger. +############################################################ + +# For example, set the com.xyz.foo logger to only log SEVERE +# messages: +# com.xyz.foo.level = SEVERE diff --git a/src/FourthDimension/resources/jdk/conf/management/jmxremote.access b/src/FourthDimension/resources/jdk/conf/management/jmxremote.access new file mode 100644 index 0000000000000000000000000000000000000000..a09e008fe34c565323833e38e21408628e219e20 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/management/jmxremote.access @@ -0,0 +1,79 @@ +###################################################################### +# Default Access Control File for Remote JMX(TM) Monitoring +###################################################################### +# +# Access control file for Remote JMX API access to monitoring. +# This file defines the allowed access for different roles. The +# password file (jmxremote.password by default) defines the roles and their +# passwords. To be functional, a role must have an entry in +# both the password and the access files. +# +# The default location of this file is $JRE/conf/management/jmxremote.access +# You can specify an alternate location by specifying a property in +# the management config file $JRE/conf/management/management.properties +# (See that file for details) +# +# The file format for password and access files is syntactically the same +# as the Properties file format. The syntax is described in the Javadoc +# for java.util.Properties.load. +# A typical access file has multiple lines, where each line is blank, +# a comment (like this one), or an access control entry. +# +# An access control entry consists of a role name, and an +# associated access level. The role name is any string that does not +# itself contain spaces or tabs. It corresponds to an entry in the +# password file (jmxremote.password). The access level is one of the +# following: +# "readonly" grants access to read attributes of MBeans. +# For monitoring, this means that a remote client in this +# role can read measurements but cannot perform any action +# that changes the environment of the running program. +# "readwrite" grants access to read and write attributes of MBeans, +# to invoke operations on them, and optionally +# to create or remove them. This access should be granted +# only to trusted clients, since they can potentially +# interfere with the smooth operation of a running program. +# +# The "readwrite" access level can optionally be followed by the "create" and/or +# "unregister" keywords. The "unregister" keyword grants access to unregister +# (delete) MBeans. The "create" keyword grants access to create MBeans of a +# particular class or of any class matching a particular pattern. Access +# should only be granted to create MBeans of known and trusted classes. +# +# For example, the following entry would grant readwrite access +# to "controlRole", as well as access to create MBeans of the class +# javax.management.monitor.CounterMonitor and to unregister any MBean: +# controlRole readwrite \ +# create javax.management.monitor.CounterMonitorMBean \ +# unregister +# or equivalently: +# controlRole readwrite unregister create javax.management.monitor.CounterMBean +# +# The following entry would grant readwrite access as well as access to create +# MBeans of any class in the packages javax.management.monitor and +# javax.management.timer: +# controlRole readwrite \ +# create javax.management.monitor.*,javax.management.timer.* \ +# unregister +# +# The \ character is defined in the Properties file syntax to allow continuation +# lines as shown here. A * in a class pattern matches a sequence of characters +# other than dot (.), so javax.management.monitor.* matches +# javax.management.monitor.CounterMonitor but not +# javax.management.monitor.foo.Bar. +# +# A given role should have at most one entry in this file. If a role +# has no entry, it has no access. +# If multiple entries are found for the same role name, then the last +# access entry is used. +# +# +# Default access control entries: +# o The "monitorRole" role has readonly access. +# o The "controlRole" role has readwrite access and can create the standard +# Timer and Monitor MBeans defined by the JMX API. + +monitorRole readonly +controlRole readwrite \ + create javax.management.monitor.*,javax.management.timer.* \ + unregister diff --git a/src/FourthDimension/resources/jdk/conf/management/jmxremote.password.template b/src/FourthDimension/resources/jdk/conf/management/jmxremote.password.template new file mode 100644 index 0000000000000000000000000000000000000000..c98a0ad253a422f0542cbdf52443a94d96ce1ada --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/management/jmxremote.password.template @@ -0,0 +1,115 @@ +# ---------------------------------------------------------------------- +# Template for jmxremote.password +# +# o Copy this template to jmxremote.password +# o Set the user/password entries in jmxremote.password +# o Change the permission of jmxremote.password to be accessible +# only by the owner. +# o The jmxremote.passwords file will be re-written by the server +# to replace all plain text passwords with hashed passwords when +# the file is read by the server. +# + +############################################################## +# Password File for Remote JMX Monitoring +############################################################## +# +# Password file for Remote JMX API access to monitoring. This +# file defines the different roles and their passwords. The access +# control file (jmxremote.access by default) defines the allowed +# access for each role. To be functional, a role must have an entry +# in both the password and the access files. +# +# Default location of this file is $JRE/conf/management/jmxremote.password +# You can specify an alternate location by specifying a property in +# the management config file $JRE/conf/management/management.properties +# or by specifying a system property (See that file for details). + +############################################################## +# File format of the jmxremote.password file +############################################################## +# +# The file contains multiple lines where each line is blank, +# a comment (like this one), or a password entry. +# +# password entry follows the below syntax +# role_name W [clearPassword|hashedPassword] +# +# role_name is any string that does not itself contain spaces or tabs. +# W = spaces or tabs +# +# Passwords can be specified via clear text or via a hash. Clear text password +# is any string that does not contain spaces or tabs. Hashed passwords must +# follow the below format. +# hashedPassword = base64_encoded_64_byte_salt W base64_encoded_hash W hash_algorithm +# where, +# base64_encoded_64_byte_salt = 64 byte random salt +# base64_encoded_hash = Hash_algorithm(password + salt) +# W = spaces or tabs +# hash_algorithm = Algorithm string specified using the format below +# https://docs.oracle.com/javase/9/docs/specs/security/standard-names.html#messagedigest-algorithms +# This is an optional field. If not specified, SHA3-512 will be assumed. +# +# If passwords are in clear, they will be overwritten by their hash if all of +# the below criteria are met. +# * com.sun.management.jmxremote.password.toHashes property is set to true in +# management.properties file +# * the password file is writable +# * the system security policy allows writing into the password file, if a +# security manager is configured +# +# In order to change the password for a role, replace the hashed password entry +# with a new clear text password or a new hashed password. If the new password +# is in clear, it will be replaced with its hash when a new login attempt is made. +# +# A given role should have at most one entry in this file. If a role +# has no entry, it has no access. +# If multiple entries are found for the same role name, then the last one +# is used. +# +# A user generated hashed password file can also be used instead of clear-text +# password file. If generated by the user, hashed passwords must follow the +# format specified above. +# +# Caution: It is recommended not to edit the password file while the +# agent is running, as edits could be lost if a client connection triggers the +# hashing of the password file at the same time that the file is externally modified. +# The integrity of the file is guaranteed, but any external edits made to the +# file during the short period between the time that the agent reads the file +# and the time that it writes it back might get lost + +############################################################## +# File permissions of the jmxremote.password file +############################################################## +# This file must be made accessible by ONLY the owner, +# otherwise the program will exit with an error. +# +# In a typical installation, this file can be accessed by anybody on the +# local machine, and possibly by people on other machines. +# For security, you should either restrict the access to this file except for owner, +# or specify another, less accessible file in the management config file +# as described above. +# +# In order to prevent inadverent edits to the password file in the +# production environment, it is recommended to deploy a read-only +# hashed password file. The hashed entries for clear passwords can be generated +# in advance by running the JMX agent. +# + +############################################################## +# Sample of the jmxremote.password file +############################################################## +# Following are two commented-out entries. The "monitorRole" role has +# password "QED". The "controlRole" role has password "R&D". This is an example +# of specifying passwords in the clear +# +# monitorRole QED +# controlRole R&D +# +# Once a login attempt is made, passwords will be hashed and the file will have +# below entries with clear passwords overwritten by their respective +# SHA3-512 hash +# +# monitorRole trilby APzBTt34rV2l+OMbuvbnOQ4si8UZmfRCVbIY1+fAofV5CkQzXS/FDMGteQQk/R3q1wtt104qImzJEA7gCwl6dw== 4EeTdSJ7X6Imu0Mb+dWqIns7a7QPIBoM3NB/XlpMQSPSicE7PnlALVWn2pBY3Q3pGDHyAb32Hd8GUToQbUhAjA== SHA3-512 +# controlRole roHEJSbRqSSTII4Z4+NOCV2OJaZVQ/dw153Fy2u4ILDP9XiZ426GwzCzc3RtpoqNMwqYIcfdd74xWXSMrWtGaA== w9qDsekgKn0WOVJycDyU0kLBa081zbStcCjUAVEqlfon5Sgx7XHtaodbmzpLegA1jT7Ag36T0zHaEWRHJe2fdA== SHA3-512 +# \ No newline at end of file diff --git a/src/FourthDimension/resources/jdk/conf/management/management.properties b/src/FourthDimension/resources/jdk/conf/management/management.properties new file mode 100644 index 0000000000000000000000000000000000000000..ecb088235a3c105f76e422d6c26e203be1b93831 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/management/management.properties @@ -0,0 +1,304 @@ +##################################################################### +# Default Configuration File for Java Platform Management +##################################################################### +# +# The Management Configuration file (in java.util.Properties format) +# will be read if one of the following system properties is set: +# -Dcom.sun.management.jmxremote.port= +# or -Dcom.sun.management.config.file= +# +# The default Management Configuration file is: +# +# $JRE/conf/management/management.properties +# +# Another location for the Management Configuration File can be specified +# by the following property on the Java command line: +# +# -Dcom.sun.management.config.file= +# +# If -Dcom.sun.management.config.file= is set, the port +# number for the management agent can be specified in the config file +# using the following lines: +# +# ################ Management Agent Port ######################### +# +# For setting the JMX RMI agent port use the following line +# com.sun.management.jmxremote.port= +# +# For setting the JMX local server port use the following line +# com.sun.management.jmxremote.local.port= + +##################################################################### +# Optional Instrumentation +##################################################################### +# +# By default only the basic instrumentation with low overhead is on. +# The following properties allow to selectively turn on optional +# instrumentation which are off by default and may have some +# additional overhead. +# +# com.sun.management.enableThreadContentionMonitoring +# +# This option enables thread contention monitoring if the +# Java virtual machine supports such instrumentation. +# Refer to the specification for the java.lang.management.ThreadMXBean +# interface - see isThreadContentionMonitoringSupported() method. +# + +# To enable thread contention monitoring, uncomment the following line +# com.sun.management.enableThreadContentionMonitoring + +##################################################################### +# RMI Management Properties +##################################################################### +# +# If system property -Dcom.sun.management.jmxremote.port= +# is set then +# - A MBean server is started +# - JRE Platform MBeans are registered in the MBean server +# - RMI connector is published in a private readonly registry at +# specified port using a well known name, "jmxrmi" +# - the following properties are read for JMX remote management. +# +# The configuration can be specified only at startup time. +# Later changes to above system property (e.g. via setProperty method), +# this config file, the password file, or the access file have no effect to the +# running MBean server, the connector, or the registry. +# + +# +# ########## RMI connector settings for local management ########## +# +# com.sun.management.jmxremote.local.only=true|false +# Default for this property is true. (Case for true/false ignored) +# If this property is specified as true then the local JMX RMI connector +# server will only accept connection requests from clients running on +# the host where the out-of-the-box JMX management agent is running. +# In order to ensure backwards compatibility this property could be +# set to false. However, deploying the local management agent in this +# way is discouraged because the local JMX RMI connector server will +# accept connection requests from any client either local or remote. +# For remote management the remote JMX RMI connector server should +# be used instead with authentication and SSL/TLS encryption enabled. +# + +# For allowing the local management agent accept local +# and remote connection requests use the following line +# com.sun.management.jmxremote.local.only=false + +# +# ###################### RMI SSL ############################# +# +# com.sun.management.jmxremote.ssl=true|false +# Default for this property is true. (Case for true/false ignored) +# If this property is specified as false then SSL is not used. +# + +# For RMI monitoring without SSL use the following line +# com.sun.management.jmxremote.ssl=false + +# com.sun.management.jmxremote.ssl.config.file=filepath +# Specifies the location of the SSL configuration file. A properties +# file can be used to supply the keystore and truststore location and +# password settings thus avoiding to pass them as cleartext in the +# command-line. +# +# The current implementation of the out-of-the-box management agent will +# look up and use the properties specified below to configure the SSL +# keystore and truststore, if present: +# javax.net.ssl.keyStore= +# javax.net.ssl.keyStorePassword= +# javax.net.ssl.trustStore= +# javax.net.ssl.trustStorePassword= +# Any other properties in the file will be ignored. This will allow us +# to extend the property set in the future if required by the default +# SSL implementation. +# +# If the property "com.sun.management.jmxremote.ssl" is set to false, +# then this property is ignored. +# + +# For supplying the keystore settings in a file use the following line +# com.sun.management.jmxremote.ssl.config.file=filepath + +# com.sun.management.jmxremote.ssl.enabled.cipher.suites= +# The value of this property is a string that is a comma-separated list +# of SSL/TLS cipher suites to enable. This property can be specified in +# conjunction with the previous property "com.sun.management.jmxremote.ssl" +# in order to control which particular SSL/TLS cipher suites are enabled +# for use by accepted connections. If this property is not specified then +# the SSL/TLS RMI Server Socket Factory uses the SSL/TLS cipher suites that +# are enabled by default. +# + +# com.sun.management.jmxremote.ssl.enabled.protocols= +# The value of this property is a string that is a comma-separated list +# of SSL/TLS protocol versions to enable. This property can be specified in +# conjunction with the previous property "com.sun.management.jmxremote.ssl" +# in order to control which particular SSL/TLS protocol versions are +# enabled for use by accepted connections. If this property is not +# specified then the SSL/TLS RMI Server Socket Factory uses the SSL/TLS +# protocol versions that are enabled by default. +# + +# com.sun.management.jmxremote.ssl.need.client.auth=true|false +# Default for this property is false. (Case for true/false ignored) +# If this property is specified as true in conjunction with the previous +# property "com.sun.management.jmxremote.ssl" then the SSL/TLS RMI Server +# Socket Factory will require client authentication. +# + +# For RMI monitoring with SSL client authentication use the following line +# com.sun.management.jmxremote.ssl.need.client.auth=true + +# com.sun.management.jmxremote.registry.ssl=true|false +# Default for this property is false. (Case for true/false ignored) +# If this property is specified as true then the RMI registry used +# to bind the RMIServer remote object is protected with SSL/TLS +# RMI Socket Factories that can be configured with the properties: +# com.sun.management.jmxremote.ssl.config.file +# com.sun.management.jmxremote.ssl.enabled.cipher.suites +# com.sun.management.jmxremote.ssl.enabled.protocols +# com.sun.management.jmxremote.ssl.need.client.auth +# If the two properties below are true at the same time, i.e. +# com.sun.management.jmxremote.ssl=true +# com.sun.management.jmxremote.registry.ssl=true +# then the RMIServer remote object and the RMI registry are +# both exported with the same SSL/TLS RMI Socket Factories. +# + +# For using an SSL/TLS protected RMI registry use the following line +# com.sun.management.jmxremote.registry.ssl=true + +# +# ################ RMI User authentication ################ +# +# com.sun.management.jmxremote.authenticate=true|false +# Default for this property is true. (Case for true/false ignored) +# If this property is specified as false then no authentication is +# performed and all users are allowed all access. +# + +# For RMI monitoring without any checking use the following line +# com.sun.management.jmxremote.authenticate=false + +# +# ################ RMI Login configuration ################### +# +# com.sun.management.jmxremote.login.config= +# Specifies the name of a JAAS login configuration entry to use when +# authenticating users of RMI monitoring. +# +# Setting this property is optional - the default login configuration +# specifies a file-based authentication that uses the password file. +# +# When using this property to override the default login configuration +# then the named configuration entry must be in a file that gets loaded +# by JAAS. In addition, the login module(s) specified in the configuration +# should use the name and/or password callbacks to acquire the user's +# credentials. See the NameCallback and PasswordCallback classes in the +# javax.security.auth.callback package for more details. +# +# If the property "com.sun.management.jmxremote.authenticate" is set to +# false, then this property and the password & access files are ignored. +# + +# For a non-default login configuration use the following line +# com.sun.management.jmxremote.login.config= + +# +# ################ RMI Password file location ################## +# +# com.sun.management.jmxremote.password.file=filepath +# Specifies location for password file +# This is optional - default location is +# $JRE/conf/management/jmxremote.password +# +# If the property "com.sun.management.jmxremote.authenticate" is set to +# false, then this property and the password & access files are ignored. +# Otherwise the password file must exist and be in the valid format. +# If the password file is empty or non-existent then no access is allowed. +# + +# For a non-default password file location use the following line +# com.sun.management.jmxremote.password.file=filepath + +# +# ################# Hash passwords in password file ############## +# com.sun.management.jmxremote.password.toHashes = true|false +# Default for this property is true. +# Specifies if passwords in the password file should be hashed or not. +# If this property is true, and if the password file is writable, and if the +# system security policy allows writing into the password file, +# all the clear passwords in the password file will be replaced by +# their SHA3-512 hash when the file is read by the server +# + +# +# ################ RMI Access file location ##################### +# +# com.sun.management.jmxremote.access.file=filepath +# Specifies location for access file +# This is optional - default location is +# $JRE/conf/management/jmxremote.access +# +# If the property "com.sun.management.jmxremote.authenticate" is set to +# false, then this property and the password & access files are ignored. +# Otherwise, the access file must exist and be in the valid format. +# If the access file is empty or non-existent then no access is allowed. +# + +# For a non-default password file location use the following line +# com.sun.management.jmxremote.access.file=filepath +# + +# ################ Management agent listen interface ######################### +# +# com.sun.management.jmxremote.host= +# Specifies the local interface on which the JMX RMI agent will bind. +# This is useful when running on machines which have several +# interfaces defined. It makes it possible to listen to a specific +# subnet accessible through that interface. +# +# The format of the value for that property is any string accepted +# by java.net.InetAddress.getByName(String). +# + +# ################ Filter for ObjectInputStream ############################# +# com.sun.management.jmxremote.serial.filter.pattern= +# A filter, if configured, is used by java.io.ObjectInputStream during +# deserialization of parameters sent to the JMX default agent to validate the +# contents of the stream. +# A filter is configured as a sequence of patterns, each pattern is either +# matched against the name of a class in the stream or defines a limit. +# Patterns are separated by ";" (semicolon). +# Whitespace is significant and is considered part of the pattern. +# +# If a pattern includes a "=", it sets a limit. +# If a limit appears more than once the last value is used. +# Limits are checked before classes regardless of the order in the sequence of patterns. +# If any of the limits are exceeded, the filter status is REJECTED. +# +# maxdepth=value - the maximum depth of a graph +# maxrefs=value - the maximum number of internal references +# maxbytes=value - the maximum number of bytes in the input stream +# maxarray=value - the maximum array length allowed +# +# Other patterns, from left to right, match the class or package name as +# returned from Class.getName. +# If the class is an array type, the class or package to be matched is the element type. +# Arrays of any number of dimensions are treated the same as the element type. +# For example, a pattern of "!example.Foo", rejects creation of any instance or +# array of example.Foo. +# +# If the pattern starts with "!", the status is REJECTED if the remaining pattern +# is matched; otherwise the status is ALLOWED if the pattern matches. +# If the pattern contains "/", the non-empty prefix up to the "/" is the module name; +# if the module name matches the module name of the class then +# the remaining pattern is matched with the class name. +# If there is no "/", the module name is not compared. +# If the pattern ends with ".**" it matches any class in the package and all subpackages. +# If the pattern ends with ".*" it matches any class in the package. +# If the pattern ends with "*", it matches any class with the pattern as a prefix. +# If the pattern is equal to the class name, it matches. +# Otherwise, the status is UNDECIDED. diff --git a/src/FourthDimension/resources/jdk/conf/net.properties b/src/FourthDimension/resources/jdk/conf/net.properties new file mode 100644 index 0000000000000000000000000000000000000000..9cefdff43e68b35e4b046f260e41286cbdf75196 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/net.properties @@ -0,0 +1,147 @@ +############################################################ +# Default Networking Configuration File +# +# This file may contain default values for the networking system properties. +# These values are only used when the system properties are not specified +# on the command line or set programmatically. +# For now, only the various proxy settings can be configured here. +############################################################ + +# Whether or not the DefaultProxySelector will default to System Proxy +# settings when they do exist. +# Set it to 'true' to enable this feature and check for platform +# specific proxy settings +# Note that the system properties that do explicitly set proxies +# (like http.proxyHost) do take precedence over the system settings +# even if java.net.useSystemProxies is set to true. + +java.net.useSystemProxies=false + +#------------------------------------------------------------------------ +# Proxy configuration for the various protocol handlers. +# DO NOT uncomment these lines if you have set java.net.useSystemProxies +# to true as the protocol specific properties will take precedence over +# system settings. +#------------------------------------------------------------------------ + +# HTTP Proxy settings. proxyHost is the name of the proxy server +# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default +# value is 80) and nonProxyHosts is a '|' separated list of hostnames which +# should be accessed directly, ignoring the proxy server (default value is +# localhost & 127.0.0.1). +# +# http.proxyHost= +# http.proxyPort=80 +http.nonProxyHosts=localhost|127.*|[::1] +# +# HTTPS Proxy Settings. proxyHost is the name of the proxy server +# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default +# value is 443). The HTTPS protocol handlers uses the http nonProxyHosts list. +# +# https.proxyHost= +# https.proxyPort=443 +# +# FTP Proxy settings. proxyHost is the name of the proxy server +# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default +# value is 80) and nonProxyHosts is a '|' separated list of hostnames which +# should be accessed directly, ignoring the proxy server (default value is +# localhost & 127.0.0.1). +# +# ftp.proxyHost= +# ftp.proxyPort=80 +ftp.nonProxyHosts=localhost|127.*|[::1] +# +# Socks proxy settings. socksProxyHost is the name of the proxy server +# (e.g. socks.domain.com), socksProxyPort is the port number to use +# (default value is 1080) +# +# socksProxyHost= +# socksProxyPort=1080 +# +# HTTP Keep Alive settings. remainingData is the maximum amount of data +# in kilobytes that will be cleaned off the underlying socket so that it +# can be reused (default value is 512K), queuedConnections is the maximum +# number of Keep Alive connections to be on the queue for clean up (default +# value is 10). +# http.KeepAlive.remainingData=512 +# http.KeepAlive.queuedConnections=10 + +# Authentication Scheme restrictions for HTTP and HTTPS. +# +# In some environments certain authentication schemes may be undesirable +# when proxying HTTP or HTTPS. For example, "Basic" results in effectively the +# cleartext transmission of the user's password over the physical network. +# This section describes the mechanism for disabling authentication schemes +# based on the scheme name. Disabled schemes will be treated as if they are not +# supported by the implementation. +# +# The 'jdk.http.auth.tunneling.disabledSchemes' property lists the authentication +# schemes that will be disabled when tunneling HTTPS over a proxy, HTTP CONNECT. +# The 'jdk.http.auth.proxying.disabledSchemes' property lists the authentication +# schemes that will be disabled when proxying HTTP. +# +# In both cases the property is a comma-separated list of, case-insensitive, +# authentication scheme names, as defined by their relevant RFCs. An +# implementation may, but is not required to, support common schemes whose names +# include: 'Basic', 'Digest', 'NTLM', 'Kerberos', 'Negotiate'. A scheme that +# is not known, or not supported, by the implementation is ignored. +# +# Note: This property is currently used by the JDK Reference implementation. It +# is not guaranteed to be examined and used by other implementations. +# +#jdk.http.auth.proxying.disabledSchemes= +jdk.http.auth.tunneling.disabledSchemes=Basic + +# +# Allow restricted HTTP request headers +# +# By default, the following request headers are not allowed to be set by user code +# in HttpRequests: "connection", "content-length", "expect", "host" and "upgrade". +# The 'jdk.httpclient.allowRestrictedHeaders' property allows one or more of these +# headers to be specified as a comma separated list to override the default restriction. +# The names are case-insensitive and white-space is ignored (removed before processing +# the list). Note, this capability is mostly intended for testing and isn't expected +# to be used in real deployments. Protocol errors or other undefined behavior is likely +# to occur when using them. The property is not set by default. +# Note also, that there may be other headers that are restricted from being set +# depending on the context. This includes the "Authorization" header when the +# relevant HttpClient has an authenticator set. These restrictions cannot be +# overridden by this property. +# +# jdk.httpclient.allowRestrictedHeaders=host +# +# +# Transparent NTLM HTTP authentication mode on Windows. Transparent authentication +# can be used for the NTLM scheme, where the security credentials based on the +# currently logged in user's name and password can be obtained directly from the +# operating system, without prompting the user. This property has three possible +# values which regulate the behavior as shown below. Other unrecognized values +# are handled the same as 'disabled'. Note, that NTLM is not considered to be a +# strongly secure authentication scheme and care should be taken before enabling +# this mechanism. +# +# Transparent authentication never used. +#jdk.http.ntlm.transparentAuth=disabled +# +# Enabled for all hosts. +#jdk.http.ntlm.transparentAuth=allHosts +# +# Enabled for hosts that are trusted in Windows Internet settings +#jdk.http.ntlm.transparentAuth=trustedHosts +# +jdk.http.ntlm.transparentAuth=disabled +# +# Default directory where automatically bound Unix domain server +# sockets are stored. Sockets are automatically bound when bound +# with a null address. +# +# On Unix the search order to determine this directory is: +# +# 1. System property jdk.net.unixdomain.tmpdir +# +# 2. Networking property jdk.net.unixdomain.tmpdir specified +# in this file (effective default) +# +# 3. System property java.io.tmpdir +# +jdk.net.unixdomain.tmpdir=/tmp diff --git a/src/FourthDimension/resources/jdk/conf/sdp/sdp.conf.template b/src/FourthDimension/resources/jdk/conf/sdp/sdp.conf.template new file mode 100644 index 0000000000000000000000000000000000000000..71cb5c2ce84d0447d2714121efac0b71b7544831 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/sdp/sdp.conf.template @@ -0,0 +1,30 @@ +# +# Configuration file to enable InfiniBand Sockets Direct Protocol. +# +# Each line that does not start with a comment (#) is a rule to indicate when +# the SDP transport protocol should be used. The format of a rule is as follows: +# ("bind"|"connect") 1*LWSP-char (hostname|ipaddress["/"prefix]) 1*LWSP-char ("*"|port)["-"("*"|port)] +# +# A "bind" rule indicates that the SDP protocol transport should be used when +# a TCP socket binds to an address/port that matches the rule. A "connect" rule +# indicates that the SDP protocol transport should be used when an unbound +# TCP socket attempts to connect to an address/port that matches the rule. +# Addresses may be specified as hostnames or literal Internet Protocol (IP) +# addresses. When a literal IP address is used then a prefix length may be used +# to indicate the number of bits for matching (useful when a block of addresses +# or subnet is allocated to the InfiniBand fabric). + +# Use SDP for all sockets that bind to specific local addresses +#bind 192.168.1.1 * +#bind fe80::21b:24ff:fe3d:7896 * + +# Use SDP for all sockets that bind to the wildcard address in a port range +#bind 0.0.0.0 5000-5999 +#bind ::0 5000-5999 + +# Use SDP when connecting to all application services on 192.168.1.* +#connect 192.168.1.0/24 1024-* + +# Use SDP when connecting to the http server or MySQL database on hpccluster. +#connect hpccluster.foo.com 80 +#connect hpccluster.foo.com 3306 diff --git a/src/FourthDimension/resources/jdk/conf/security/java.policy b/src/FourthDimension/resources/jdk/conf/security/java.policy new file mode 100644 index 0000000000000000000000000000000000000000..1554541d126f9b2b9f642e092bda435ef7164574 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/java.policy @@ -0,0 +1,44 @@ +// +// This system policy file grants a set of default permissions to all domains +// and can be configured to grant additional permissions to modules and other +// code sources. The code source URL scheme for modules linked into a +// run-time image is "jrt". +// +// For example, to grant permission to read the "foo" property to the module +// "com.greetings", the grant entry is: +// +// grant codeBase "jrt:/com.greetings" { +// permission java.util.PropertyPermission "foo", "read"; +// }; +// + +// default permissions granted to all domains +grant { + // allows anyone to listen on dynamic ports + permission java.net.SocketPermission "localhost:0", "listen"; + + // "standard" properies that can be read by anyone + permission java.util.PropertyPermission "java.version", "read"; + permission java.util.PropertyPermission "java.vendor", "read"; + permission java.util.PropertyPermission "java.vendor.url", "read"; + permission java.util.PropertyPermission "java.class.version", "read"; + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.version", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "file.separator", "read"; + permission java.util.PropertyPermission "path.separator", "read"; + permission java.util.PropertyPermission "line.separator", "read"; + permission java.util.PropertyPermission + "java.specification.version", "read"; + permission java.util.PropertyPermission "java.specification.vendor", "read"; + permission java.util.PropertyPermission "java.specification.name", "read"; + permission java.util.PropertyPermission + "java.vm.specification.version", "read"; + permission java.util.PropertyPermission + "java.vm.specification.vendor", "read"; + permission java.util.PropertyPermission + "java.vm.specification.name", "read"; + permission java.util.PropertyPermission "java.vm.version", "read"; + permission java.util.PropertyPermission "java.vm.vendor", "read"; + permission java.util.PropertyPermission "java.vm.name", "read"; +}; diff --git a/src/FourthDimension/resources/jdk/conf/security/java.security b/src/FourthDimension/resources/jdk/conf/security/java.security new file mode 100644 index 0000000000000000000000000000000000000000..b984a59fbbf8a3a41f3a575ab324dfa7f97ab78b --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/java.security @@ -0,0 +1,1360 @@ +# +# This is the "master security properties file". +# +# An alternate java.security properties file may be specified +# from the command line via the system property +# +# -Djava.security.properties= +# +# This properties file appends to the master security properties file. +# If both properties files specify values for the same key, the value +# from the command-line properties file is selected, as it is the last +# one loaded. +# +# Also, if you specify +# +# -Djava.security.properties== (2 equals), +# +# then that properties file completely overrides the master security +# properties file. +# +# To disable the ability to specify an additional properties file from +# the command line, set the key security.overridePropertiesFile +# to false in the master security properties file. It is set to true +# by default. +# +# If this properties file fails to load, the JDK implementation will throw +# an unspecified error when initializing the java.security.Security class. + +# In this file, various security properties are set for use by +# java.security classes. This is where users can statically register +# Cryptography Package Providers ("providers" for short). The term +# "provider" refers to a package or set of packages that supply a +# concrete implementation of a subset of the cryptography aspects of +# the Java Security API. A provider may, for example, implement one or +# more digital signature algorithms or message digest algorithms. +# +# Each provider must implement a subclass of the Provider class. +# To register a provider in this master security properties file, +# specify the provider and priority in the format +# +# security.provider.= +# +# This declares a provider, and specifies its preference +# order n. The preference order is the order in which providers are +# searched for requested algorithms (when no specific provider is +# requested). The order is 1-based; 1 is the most preferred, followed +# by 2, and so on. +# +# must specify the name of the Provider as passed to its super +# class java.security.Provider constructor. This is for providers loaded +# through the ServiceLoader mechanism. +# +# must specify the subclass of the Provider class whose +# constructor sets the values of various properties that are required +# for the Java Security API to look up the algorithms or other +# facilities implemented by the provider. This is for providers loaded +# through classpath. +# +# Note: Providers can be dynamically registered instead by calls to +# either the addProvider or insertProviderAt method in the Security +# class. + +# +# List of providers and their preference orders (see above): +# +security.provider.1=SUN +security.provider.2=SunRsaSign +security.provider.3=SunEC +security.provider.4=SunJSSE +security.provider.5=SunJCE +security.provider.6=SunJGSS +security.provider.7=SunSASL +security.provider.8=XMLDSig +security.provider.9=SunPCSC +security.provider.10=JdkLDAP +security.provider.11=JdkSASL +security.provider.12=SunPKCS11 + +# +# A list of preferred providers for specific algorithms. These providers will +# be searched for matching algorithms before the list of registered providers. +# Entries containing errors (parsing, etc) will be ignored. Use the +# -Djava.security.debug=jca property to debug these errors. +# +# The property is a comma-separated list of serviceType.algorithm:provider +# entries. The serviceType (example: "MessageDigest") is optional, and if +# not specified, the algorithm applies to all service types that support it. +# The algorithm is the standard algorithm name or transformation. +# Transformations can be specified in their full standard name +# (ex: AES/CBC/PKCS5Padding), or as partial matches (ex: AES, AES/CBC). +# The provider is the name of the provider. Any provider that does not +# also appear in the registered list will be ignored. +# +# There is a special serviceType for this property only to group a set of +# algorithms together. The type is "Group" and is followed by an algorithm +# keyword. Groups are to simplify and lessen the entries on the property +# line. Current groups are: +# Group.SHA2 = SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256 +# Group.HmacSHA2 = HmacSHA224, HmacSHA256, HmacSHA384, HmacSHA512 +# Group.SHA2RSA = SHA224withRSA, SHA256withRSA, SHA384withRSA, SHA512withRSA +# Group.SHA2DSA = SHA224withDSA, SHA256withDSA, SHA384withDSA, SHA512withDSA +# Group.SHA2ECDSA = SHA224withECDSA, SHA256withECDSA, SHA384withECDSA, \ +# SHA512withECDSA +# Group.SHA3 = SHA3-224, SHA3-256, SHA3-384, SHA3-512 +# Group.HmacSHA3 = HmacSHA3-224, HmacSHA3-256, HmacSHA3-384, HmacSHA3-512 +# +# Example: +# jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \ +# MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE +# +#jdk.security.provider.preferred= + + +# +# Sun Provider SecureRandom seed source. +# +# Select the primary source of seed data for the "NativePRNG", "SHA1PRNG" +# and "DRBG" SecureRandom implementations in the "Sun" provider. +# (Other SecureRandom implementations might also use this property.) +# +# On Unix-like systems (for example, Linux/MacOS), the +# "NativePRNG", "SHA1PRNG" and "DRBG" implementations obtains seed data from +# special device files such as file:/dev/random. +# +# On Windows systems, specifying the URLs "file:/dev/random" or +# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding +# mechanism for SHA1PRNG and DRBG. +# +# By default, an attempt is made to use the entropy gathering device +# specified by the "securerandom.source" Security property. If an +# exception occurs while accessing the specified URL: +# +# NativePRNG: +# a default value of /dev/random will be used. If neither +# are available, the implementation will be disabled. +# "file" is the only currently supported protocol type. +# +# SHA1PRNG and DRBG: +# the traditional system/thread activity algorithm will be used. +# +# The entropy gathering device can also be specified with the System +# property "java.security.egd". For example: +# +# % java -Djava.security.egd=file:/dev/random MainClass +# +# Specifying this System property will override the +# "securerandom.source" Security property. +# +# In addition, if "file:/dev/random" or "file:/dev/urandom" is +# specified, the "NativePRNG" implementation will be more preferred than +# DRBG and SHA1PRNG in the Sun provider. +# +securerandom.source=file:/dev/random + +# +# A list of known strong SecureRandom implementations. +# +# To help guide applications in selecting a suitable strong +# java.security.SecureRandom implementation, Java distributions should +# indicate a list of known strong implementations using the property. +# +# This is a comma-separated list of algorithm and/or algorithm:provider +# entries. +# +securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN + +# +# Sun provider DRBG configuration and default instantiation request. +# +# NIST SP 800-90Ar1 lists several DRBG mechanisms. Each can be configured +# with a DRBG algorithm name, and can be instantiated with a security strength, +# prediction resistance support, etc. This property defines the configuration +# and the default instantiation request of "DRBG" SecureRandom implementations +# in the SUN provider. (Other DRBG implementations can also use this property.) +# Applications can request different instantiation parameters like security +# strength, capability, personalization string using one of the +# getInstance(...,SecureRandomParameters,...) methods with a +# DrbgParameters.Instantiation argument, but other settings such as the +# mechanism and DRBG algorithm names are not currently configurable by any API. +# +# Please note that the SUN implementation of DRBG always supports reseeding. +# +# The value of this property is a comma-separated list of all configurable +# aspects. The aspects can appear in any order but the same aspect can only +# appear at most once. Its BNF-style definition is: +# +# Value: +# aspect { "," aspect } +# +# aspect: +# mech_name | algorithm_name | strength | capability | df +# +# // The DRBG mechanism to use. Default "Hash_DRBG" +# mech_name: +# "Hash_DRBG" | "HMAC_DRBG" | "CTR_DRBG" +# +# // The DRBG algorithm name. The "SHA-***" names are for Hash_DRBG and +# // HMAC_DRBG, default "SHA-256". The "AES-***" names are for CTR_DRBG, +# // default "AES-128" when using the limited cryptographic or "AES-256" +# // when using the unlimited. +# algorithm_name: +# "SHA-224" | "SHA-512/224" | "SHA-256" | +# "SHA-512/256" | "SHA-384" | "SHA-512" | +# "AES-128" | "AES-192" | "AES-256" +# +# // Security strength requested. Default "128" +# strength: +# "112" | "128" | "192" | "256" +# +# // Prediction resistance and reseeding request. Default "none" +# // "pr_and_reseed" - Both prediction resistance and reseeding +# // support requested +# // "reseed_only" - Only reseeding support requested +# // "none" - Neither prediction resistance not reseeding +# // support requested +# pr: +# "pr_and_reseed" | "reseed_only" | "none" +# +# // Whether a derivation function should be used. only applicable +# // to CTR_DRBG. Default "use_df" +# df: +# "use_df" | "no_df" +# +# Examples, +# securerandom.drbg.config=Hash_DRBG,SHA-224,112,none +# securerandom.drbg.config=CTR_DRBG,AES-256,192,pr_and_reseed,use_df +# +# The default value is an empty string, which is equivalent to +# securerandom.drbg.config=Hash_DRBG,SHA-256,128,none +# +securerandom.drbg.config= + +# +# Class to instantiate as the javax.security.auth.login.Configuration +# provider. +# +login.configuration.provider=sun.security.provider.ConfigFile + +# +# Default login configuration file +# +#login.config.url.1=file:${user.home}/.java.login.config + +# +# Class to instantiate as the system Policy. This is the name of the class +# that will be used as the Policy object. The system class loader is used to +# locate this class. +# +policy.provider=sun.security.provider.PolicyFile + +# The default is to have a single system-wide policy file, +# and a policy file in the user's home directory. +# +policy.url.1=file:${java.home}/conf/security/java.policy +policy.url.2=file:${user.home}/.java.policy + +# Controls whether or not properties are expanded in policy and login +# configuration files. If set to false, properties (${...}) will not +# be expanded in policy and login configuration files. If commented out or +# set to an empty string, the default value is "false" for policy files and +# "true" for login configuration files. +# +policy.expandProperties=true + +# Controls whether or not an extra policy or login configuration file is +# allowed to be passed on the command line with -Djava.security.policy=somefile +# or -Djava.security.auth.login.config=somefile. If commented out or set to +# an empty string, the default value is "false". +# +policy.allowSystemProperty=true + +# whether or not we look into the IdentityScope for trusted Identities +# when encountering a 1.1 signed JAR file. If the identity is found +# and is trusted, we grant it AllPermission. Note: the default policy +# provider (sun.security.provider.PolicyFile) does not support this property. +# +policy.ignoreIdentityScope=false + +# +# Default keystore type. +# +keystore.type=pkcs12 + +# +# Controls compatibility mode for JKS and PKCS12 keystore types. +# +# When set to 'true', both JKS and PKCS12 keystore types support loading +# keystore files in either JKS or PKCS12 format. When set to 'false' the +# JKS keystore type supports loading only JKS keystore files and the PKCS12 +# keystore type supports loading only PKCS12 keystore files. +# +keystore.type.compat=true + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when passed to the +# SecurityManager::checkPackageAccess method unless the corresponding +# RuntimePermission("accessClassInPackage."+package) has been granted. +# +package.access=sun.misc.,\ + sun.reflect. + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when passed to the +# SecurityManager::checkPackageDefinition method unless the corresponding +# RuntimePermission("defineClassInPackage."+package) has been granted. +# +# By default, none of the class loaders supplied with the JDK call +# checkPackageDefinition. +# +package.definition=sun.misc.,\ + sun.reflect. + +# +# Determines whether this properties file can be appended to +# or overridden on the command line via -Djava.security.properties +# +security.overridePropertiesFile=true + +# +# Determines the default key and trust manager factory algorithms for +# the javax.net.ssl package. +# +ssl.KeyManagerFactory.algorithm=SunX509 +ssl.TrustManagerFactory.algorithm=PKIX + +# +# The Java-level namelookup cache policy for successful lookups: +# +# any negative value: caching forever +# any positive value: the number of seconds to cache an address for +# zero: do not cache +# +# default value is forever (FOREVER). For security reasons, this +# caching is made forever when a security manager is set. When a security +# manager is not set, the default behavior in this implementation +# is to cache for 30 seconds. +# +# NOTE: setting this to anything other than the default value can have +# serious security implications. Do not set it unless +# you are sure you are not exposed to DNS spoofing attack. +# +#networkaddress.cache.ttl=-1 + +# The Java-level namelookup cache policy for failed lookups: +# +# any negative value: cache forever +# any positive value: the number of seconds to cache negative lookup results +# zero: do not cache +# +# In some Microsoft Windows networking environments that employ +# the WINS name service in addition to DNS, name service lookups +# that fail may take a noticeably long time to return (approx. 5 seconds). +# For this reason the default caching policy is to maintain these +# results for 10 seconds. +# +networkaddress.cache.negative.ttl=10 + +# +# Properties to configure OCSP for certificate revocation checking +# + +# Enable OCSP +# +# By default, OCSP is not used for certificate revocation checking. +# This property enables the use of OCSP when set to the value "true". +# +# NOTE: SocketPermission is required to connect to an OCSP responder. +# +# Example, +# ocsp.enable=true + +# +# Location of the OCSP responder +# +# By default, the location of the OCSP responder is determined implicitly +# from the certificate being validated. This property explicitly specifies +# the location of the OCSP responder. The property is used when the +# Authority Information Access extension (defined in RFC 5280) is absent +# from the certificate or when it requires overriding. +# +# Example, +# ocsp.responderURL=http://ocsp.example.net:80 + +# +# Subject name of the OCSP responder's certificate +# +# By default, the certificate of the OCSP responder is that of the issuer +# of the certificate being validated. This property identifies the certificate +# of the OCSP responder when the default does not apply. Its value is a string +# distinguished name (defined in RFC 2253) which identifies a certificate in +# the set of certificates supplied during cert path validation. In cases where +# the subject name alone is not sufficient to uniquely identify the certificate +# then both the "ocsp.responderCertIssuerName" and +# "ocsp.responderCertSerialNumber" properties must be used instead. When this +# property is set then those two properties are ignored. +# +# Example, +# ocsp.responderCertSubjectName=CN=OCSP Responder, O=XYZ Corp + +# +# Issuer name of the OCSP responder's certificate +# +# By default, the certificate of the OCSP responder is that of the issuer +# of the certificate being validated. This property identifies the certificate +# of the OCSP responder when the default does not apply. Its value is a string +# distinguished name (defined in RFC 2253) which identifies a certificate in +# the set of certificates supplied during cert path validation. When this +# property is set then the "ocsp.responderCertSerialNumber" property must also +# be set. When the "ocsp.responderCertSubjectName" property is set then this +# property is ignored. +# +# Example, +# ocsp.responderCertIssuerName=CN=Enterprise CA, O=XYZ Corp + +# +# Serial number of the OCSP responder's certificate +# +# By default, the certificate of the OCSP responder is that of the issuer +# of the certificate being validated. This property identifies the certificate +# of the OCSP responder when the default does not apply. Its value is a string +# of hexadecimal digits (colon or space separators may be present) which +# identifies a certificate in the set of certificates supplied during cert path +# validation. When this property is set then the "ocsp.responderCertIssuerName" +# property must also be set. When the "ocsp.responderCertSubjectName" property +# is set then this property is ignored. +# +# Example, +# ocsp.responderCertSerialNumber=2A:FF:00 + +# +# Policy for failed Kerberos KDC lookups: +# +# When a KDC is unavailable (network error, service failure, etc), it is +# put inside a secondary list and accessed less often for future requests. The +# value (case-insensitive) for this policy can be: +# +# tryLast +# KDCs in the secondary list are always tried after those not on the list. +# +# tryLess[:max_retries,timeout] +# KDCs in the secondary list are still tried by their order in the +# configuration, but with smaller max_retries and timeout values. +# max_retries and timeout are optional numerical parameters (default 1 and +# 5000, which means once and 5 seconds). Please note that if any of the +# values defined here are more than what is defined in krb5.conf, it will be +# ignored. +# +# Whenever a KDC is detected as available, it is removed from the secondary +# list. The secondary list is reset when krb5.conf is reloaded. You can add +# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is +# reloaded whenever a JAAS authentication is attempted. +# +# Example, +# krb5.kdc.bad.policy = tryLast +# krb5.kdc.bad.policy = tryLess:2,2000 +# +krb5.kdc.bad.policy = tryLast + +# +# Kerberos cross-realm referrals (RFC 6806) +# +# OpenJDK's Kerberos client supports cross-realm referrals as defined in +# RFC 6806. This allows to setup more dynamic environments in which clients +# do not need to know in advance how to reach the realm of a target principal +# (either a user or service). +# +# When a client issues an AS or a TGS request, the "canonicalize" option +# is set to announce support of this feature. A KDC server may fulfill the +# request or reply referring the client to a different one. If referred, +# the client will issue a new request and the cycle repeats. +# +# In addition to referrals, the "canonicalize" option allows the KDC server +# to change the client name in response to an AS request. For security reasons, +# RFC 6806 (section 11) FAST scheme is enforced. +# +# Disable Kerberos cross-realm referrals. Value may be overwritten with a +# System property (-Dsun.security.krb5.disableReferrals). +sun.security.krb5.disableReferrals=false + +# Maximum number of AS or TGS referrals to avoid infinite loops. Value may +# be overwritten with a System property (-Dsun.security.krb5.maxReferrals). +sun.security.krb5.maxReferrals=5 + +# +# This property contains a list of disabled EC Named Curves that can be included +# in the jdk.[tls|certpath|jar].disabledAlgorithms properties. To include this +# list in any of the disabledAlgorithms properties, add the property name as +# an entry. +#jdk.disabled.namedCurves= + +# +# Algorithm restrictions for certification path (CertPath) processing +# +# In some environments, certain algorithms or key lengths may be undesirable +# for certification path building and validation. For example, "MD2" is +# generally no longer considered to be a secure hash algorithm. This section +# describes the mechanism for disabling algorithms based on algorithm name +# and/or key length. This includes algorithms used in certificates, as well +# as revocation information such as CRLs and signed OCSP Responses. +# The syntax of the disabled algorithm string is described as follows: +# DisabledAlgorithms: +# " DisabledAlgorithm { , DisabledAlgorithm } " +# +# DisabledAlgorithm: +# AlgorithmName [Constraint] { '&' Constraint } | IncludeProperty +# +# AlgorithmName: +# (see below) +# +# Constraint: +# KeySizeConstraint | CAConstraint | DenyAfterConstraint | +# UsageConstraint +# +# KeySizeConstraint: +# keySize Operator KeyLength +# +# Operator: +# <= | < | == | != | >= | > +# +# KeyLength: +# Integer value of the algorithm's key length in bits +# +# CAConstraint: +# jdkCA +# +# DenyAfterConstraint: +# denyAfter YYYY-MM-DD +# +# UsageConstraint: +# usage [TLSServer] [TLSClient] [SignedJAR] +# +# IncludeProperty: +# include +# +# The "AlgorithmName" is the standard algorithm name of the disabled +# algorithm. See the Java Security Standard Algorithm Names Specification +# for information about Standard Algorithm Names. Matching is +# performed using a case-insensitive sub-element matching rule. (For +# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and +# "ECDSA" for signatures.) If the assertion "AlgorithmName" is a +# sub-element of the certificate algorithm name, the algorithm will be +# rejected during certification path building and validation. For example, +# the assertion algorithm name "DSA" will disable all certificate algorithms +# that rely on DSA, such as NONEwithDSA, SHA1withDSA. However, the assertion +# will not disable algorithms related to "ECDSA". +# +# The "IncludeProperty" allows a implementation-defined security property that +# can be included in the disabledAlgorithms properties. These properties are +# to help manage common actions easier across multiple disabledAlgorithm +# properties. +# There is one defined security property: jdk.disabled.namedCurves +# See the property for more specific details. +# +# +# A "Constraint" defines restrictions on the keys and/or certificates for +# a specified AlgorithmName: +# +# KeySizeConstraint: +# keySize Operator KeyLength +# The constraint requires a key of a valid size range if the +# "AlgorithmName" is of a key algorithm. The "KeyLength" indicates +# the key size specified in number of bits. For example, +# "RSA keySize <= 1024" indicates that any RSA key with key size less +# than or equal to 1024 bits should be disabled, and +# "RSA keySize < 1024, RSA keySize > 2048" indicates that any RSA key +# with key size less than 1024 or greater than 2048 should be disabled. +# This constraint is only used on algorithms that have a key size. +# +# CAConstraint: +# jdkCA +# This constraint prohibits the specified algorithm only if the +# algorithm is used in a certificate chain that terminates at a marked +# trust anchor in the lib/security/cacerts keystore. If the jdkCA +# constraint is not set, then all chains using the specified algorithm +# are restricted. jdkCA may only be used once in a DisabledAlgorithm +# expression. +# Example: To apply this constraint to SHA-1 certificates, include +# the following: "SHA1 jdkCA" +# +# DenyAfterConstraint: +# denyAfter YYYY-MM-DD +# This constraint prohibits a certificate with the specified algorithm +# from being used after the date regardless of the certificate's +# validity. JAR files that are signed and timestamped before the +# constraint date with certificates containing the disabled algorithm +# will not be restricted. The date is processed in the UTC timezone. +# This constraint can only be used once in a DisabledAlgorithm +# expression. +# Example: To deny usage of RSA 2048 bit certificates after Feb 3 2020, +# use the following: "RSA keySize == 2048 & denyAfter 2020-02-03" +# +# UsageConstraint: +# usage [TLSServer] [TLSClient] [SignedJAR] +# This constraint prohibits the specified algorithm for +# a specified usage. This should be used when disabling an algorithm +# for all usages is not practical. 'TLSServer' restricts the algorithm +# in TLS server certificate chains when server authentication is +# performed. 'TLSClient' restricts the algorithm in TLS client +# certificate chains when client authentication is performed. +# 'SignedJAR' constrains use of certificates in signed jar files. +# The usage type follows the keyword and more than one usage type can +# be specified with a whitespace delimiter. +# Example: "SHA1 usage TLSServer TLSClient" +# +# When an algorithm must satisfy more than one constraint, it must be +# delimited by an ampersand '&'. For example, to restrict certificates in a +# chain that terminate at a distribution provided trust anchor and contain +# RSA keys that are less than or equal to 1024 bits, add the following +# constraint: "RSA keySize <= 1024 & jdkCA". +# +# All DisabledAlgorithms expressions are processed in the order defined in the +# property. This requires lower keysize constraints to be specified +# before larger keysize constraints of the same algorithm. For example: +# "RSA keySize < 1024 & jdkCA, RSA keySize < 2048". +# +# Note: The algorithm restrictions do not apply to trust anchors or +# self-signed certificates. +# +# Note: This property is currently used by Oracle's PKIX implementation. It +# is not guaranteed to be examined and used by other implementations. +# +# Example: +# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 +# +# +jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \ + RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \ + SHA1 usage SignedJAR & denyAfter 2019-01-01 + +# +# Legacy algorithms for certification path (CertPath) processing and +# signed JAR files. +# +# In some environments, a certain algorithm or key length may be undesirable +# but is not yet disabled. +# +# Tools such as keytool and jarsigner may emit warnings when these legacy +# algorithms are used. See the man pages for those tools for more information. +# +# The syntax is the same as the "jdk.certpath.disabledAlgorithms" and +# "jdk.jar.disabledAlgorithms" security properties. +# +# Note: This property is currently used by the JDK Reference +# implementation. It is not guaranteed to be examined and used by other +# implementations. + +jdk.security.legacyAlgorithms=SHA1, \ + RSA keySize < 2048, DSA keySize < 2048 + +# +# Algorithm restrictions for signed JAR files +# +# In some environments, certain algorithms or key lengths may be undesirable +# for signed JAR validation. For example, "MD2" is generally no longer +# considered to be a secure hash algorithm. This section describes the +# mechanism for disabling algorithms based on algorithm name and/or key length. +# JARs signed with any of the disabled algorithms or key sizes will be treated +# as unsigned. +# +# The syntax of the disabled algorithm string is described as follows: +# DisabledAlgorithms: +# " DisabledAlgorithm { , DisabledAlgorithm } " +# +# DisabledAlgorithm: +# AlgorithmName [Constraint] { '&' Constraint } +# +# AlgorithmName: +# (see below) +# +# Constraint: +# KeySizeConstraint | DenyAfterConstraint +# +# KeySizeConstraint: +# keySize Operator KeyLength +# +# DenyAfterConstraint: +# denyAfter YYYY-MM-DD +# +# Operator: +# <= | < | == | != | >= | > +# +# KeyLength: +# Integer value of the algorithm's key length in bits +# +# Note: This property is currently used by the JDK Reference +# implementation. It is not guaranteed to be examined and used by other +# implementations. +# +# See "jdk.certpath.disabledAlgorithms" for syntax descriptions. +# +jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ + DSA keySize < 1024, SHA1 denyAfter 2019-01-01 + +# +# Algorithm restrictions for Secure Socket Layer/Transport Layer Security +# (SSL/TLS/DTLS) processing +# +# In some environments, certain algorithms or key lengths may be undesirable +# when using SSL/TLS/DTLS. This section describes the mechanism for disabling +# algorithms during SSL/TLS/DTLS security parameters negotiation, including +# protocol version negotiation, cipher suites selection, named groups +# selection, signature schemes selection, peer authentication and key +# exchange mechanisms. +# +# Disabled algorithms will not be negotiated for SSL/TLS connections, even +# if they are enabled explicitly in an application. +# +# For PKI-based peer authentication and key exchange mechanisms, this list +# of disabled algorithms will also be checked during certification path +# building and validation, including algorithms used in certificates, as +# well as revocation information such as CRLs and signed OCSP Responses. +# This is in addition to the jdk.certpath.disabledAlgorithms property above. +# +# See the specification of "jdk.certpath.disabledAlgorithms" for the +# syntax of the disabled algorithm string. +# +# Note: The algorithm restrictions do not apply to trust anchors or +# self-signed certificates. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# Example: +# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048, \ +# rsa_pkcs1_sha1, secp224r1 +jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \ + DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL + +# +# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS) +# processing in JSSE implementation. +# +# In some environments, a certain algorithm may be undesirable but it +# cannot be disabled because of its use in legacy applications. Legacy +# algorithms may still be supported, but applications should not use them +# as the security strength of legacy algorithms are usually not strong enough +# in practice. +# +# During SSL/TLS security parameters negotiation, legacy algorithms will +# not be negotiated unless there are no other candidates. +# +# The syntax of the legacy algorithms string is described as this Java +# BNF-style: +# LegacyAlgorithms: +# " LegacyAlgorithm { , LegacyAlgorithm } " +# +# LegacyAlgorithm: +# AlgorithmName (standard JSSE algorithm name) +# +# See the specification of security property "jdk.certpath.disabledAlgorithms" +# for the syntax and description of the "AlgorithmName" notation. +# +# Per SSL/TLS specifications, cipher suites have the form: +# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg +# or +# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg +# +# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the +# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC +# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest +# algorithm for HMAC. +# +# The LegacyAlgorithm can be one of the following standard algorithm names: +# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA +# 2. JSSE key exchange algorithm name, e.g., RSA +# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC +# 4. JSSE message digest algorithm name, e.g., SHA +# +# See SSL/TLS specifications and the Java Security Standard Algorithm Names +# Specification for information about the algorithm names. +# +# Note: If a legacy algorithm is also restricted through the +# jdk.tls.disabledAlgorithms property or the +# java.security.AlgorithmConstraints API (See +# javax.net.ssl.SSLParameters.setAlgorithmConstraints()), +# then the algorithm is completely disabled and will not be negotiated. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# There is no guarantee the property will continue to exist or be of the +# same syntax in future releases. +# +# Example: +# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5 +# +jdk.tls.legacyAlgorithms=NULL, anon, RC4, DES, 3DES_EDE_CBC + +# +# The pre-defined default finite field Diffie-Hellman ephemeral (DHE) +# parameters for Transport Layer Security (SSL/TLS/DTLS) processing. +# +# In traditional SSL/TLS/DTLS connections where finite field DHE parameters +# negotiation mechanism is not used, the server offers the client group +# parameters, base generator g and prime modulus p, for DHE key exchange. +# It is recommended to use dynamic group parameters. This property defines +# a mechanism that allows you to specify custom group parameters. +# +# The syntax of this property string is described as this Java BNF-style: +# DefaultDHEParameters: +# DefinedDHEParameters { , DefinedDHEParameters } +# +# DefinedDHEParameters: +# "{" DHEPrimeModulus , DHEBaseGenerator "}" +# +# DHEPrimeModulus: +# HexadecimalDigits +# +# DHEBaseGenerator: +# HexadecimalDigits +# +# HexadecimalDigits: +# HexadecimalDigit { HexadecimalDigit } +# +# HexadecimalDigit: one of +# 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f +# +# Whitespace characters are ignored. +# +# The "DefinedDHEParameters" defines the custom group parameters, prime +# modulus p and base generator g, for a particular size of prime modulus p. +# The "DHEPrimeModulus" defines the hexadecimal prime modulus p, and the +# "DHEBaseGenerator" defines the hexadecimal base generator g of a group +# parameter. It is recommended to use safe primes for the custom group +# parameters. +# +# If this property is not defined or the value is empty, the underlying JSSE +# provider's default group parameter is used for each connection. +# +# If the property value does not follow the grammar, or a particular group +# parameter is not valid, the connection will fall back and use the +# underlying JSSE provider's default group parameter. +# +# Note: This property is currently used by OpenJDK's JSSE implementation. It +# is not guaranteed to be examined and used by other implementations. +# +# Example: +# jdk.tls.server.defaultDHEParameters= +# { \ +# FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 \ +# 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD \ +# EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 \ +# E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED \ +# EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 \ +# FFFFFFFF FFFFFFFF, 2} + +# +# TLS key limits on symmetric cryptographic algorithms +# +# This security property sets limits on algorithms key usage in TLS 1.3. +# When the amount of data encrypted exceeds the algorithm value listed below, +# a KeyUpdate message will trigger a key change. This is for symmetric ciphers +# with TLS 1.3 only. +# +# The syntax for the property is described below: +# KeyLimits: +# " KeyLimit { , KeyLimit } " +# +# WeakKeyLimit: +# AlgorithmName Action Length +# +# AlgorithmName: +# A full algorithm transformation. +# +# Action: +# KeyUpdate +# +# Length: +# The amount of encrypted data in a session before the Action occurs +# This value may be an integer value in bytes, or as a power of two, 2^29. +# +# KeyUpdate: +# The TLS 1.3 KeyUpdate handshake process begins when the Length amount +# is fulfilled. +# +# Note: This property is currently used by OpenJDK's JSSE implementation. It +# is not guaranteed to be examined and used by other implementations. +# +jdk.tls.keyLimits=AES/GCM/NoPadding KeyUpdate 2^37, \ + ChaCha20-Poly1305 KeyUpdate 2^37 + +# +# Cryptographic Jurisdiction Policy defaults +# +# Import and export control rules on cryptographic software vary from +# country to country. By default, Java provides two different sets of +# cryptographic policy files[1]: +# +# unlimited: These policy files contain no restrictions on cryptographic +# strengths or algorithms +# +# limited: These policy files contain more restricted cryptographic +# strengths +# +# The default setting is determined by the value of the "crypto.policy" +# Security property below. If your country or usage requires the +# traditional restrictive policy, the "limited" Java cryptographic +# policy is still available and may be appropriate for your environment. +# +# If you have restrictions that do not fit either use case mentioned +# above, Java provides the capability to customize these policy files. +# The "crypto.policy" security property points to a subdirectory +# within /conf/security/policy/ which can be customized. +# Please see the /conf/security/policy/README.txt file or consult +# the Java Security Guide/JCA documentation for more information. +# +# YOU ARE ADVISED TO CONSULT YOUR EXPORT/IMPORT CONTROL COUNSEL OR ATTORNEY +# TO DETERMINE THE EXACT REQUIREMENTS. +# +# [1] Please note that the JCE for Java SE, including the JCE framework, +# cryptographic policy files, and standard JCE providers provided with +# the Java SE, have been reviewed and approved for export as mass market +# encryption item by the US Bureau of Industry and Security. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +crypto.policy=unlimited + +# +# The policy for the XML Signature secure validation mode. Validation of +# XML Signatures that violate any of these constraints will fail. The +# mode is enforced by default. The mode can be disabled by setting the +# property "org.jcp.xml.dsig.secureValidation" to Boolean.FALSE with the +# javax.xml.crypto.XMLCryptoContext.setProperty() method. +# +# Policy: +# Constraint {"," Constraint } +# Constraint: +# AlgConstraint | MaxTransformsConstraint | MaxReferencesConstraint | +# ReferenceUriSchemeConstraint | KeySizeConstraint | OtherConstraint +# AlgConstraint +# "disallowAlg" Uri +# MaxTransformsConstraint: +# "maxTransforms" Integer +# MaxReferencesConstraint: +# "maxReferences" Integer +# ReferenceUriSchemeConstraint: +# "disallowReferenceUriSchemes" String { String } +# KeySizeConstraint: +# "minKeySize" KeyAlg Integer +# OtherConstraint: +# "noDuplicateIds" | "noRetrievalMethodLoops" +# +# For AlgConstraint, Uri is the algorithm URI String that is not allowed. +# See the XML Signature Recommendation for more information on algorithm +# URI Identifiers. For KeySizeConstraint, KeyAlg is the standard algorithm +# name of the key type (ex: "RSA"). If the MaxTransformsConstraint, +# MaxReferencesConstraint or KeySizeConstraint (for the same key type) is +# specified more than once, only the last entry is enforced. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +jdk.xml.dsig.secureValidationPolicy=\ + disallowAlg http://www.w3.org/TR/1999/REC-xslt-19991116,\ + disallowAlg http://www.w3.org/2001/04/xmldsig-more#rsa-md5,\ + disallowAlg http://www.w3.org/2001/04/xmldsig-more#hmac-md5,\ + disallowAlg http://www.w3.org/2001/04/xmldsig-more#md5,\ + disallowAlg http://www.w3.org/2000/09/xmldsig#sha1,\ + disallowAlg http://www.w3.org/2000/09/xmldsig#dsa-sha1,\ + disallowAlg http://www.w3.org/2000/09/xmldsig#rsa-sha1,\ + disallowAlg http://www.w3.org/2007/05/xmldsig-more#sha1-rsa-MGF1,\ + disallowAlg http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1,\ + maxTransforms 5,\ + maxReferences 30,\ + disallowReferenceUriSchemes file http https,\ + minKeySize RSA 1024,\ + minKeySize DSA 1024,\ + minKeySize EC 224,\ + noDuplicateIds,\ + noRetrievalMethodLoops + + +# +# Deserialization JVM-wide filter factory +# +# A filter factory class name is used to configure the JVM-wide filter factory. +# The class must be public, must have a public zero-argument constructor, implement the +# java.util.function.BinaryOperator interface, provide its +# implementation and be accessible via the application class loader. +# A builtin filter factory is used if no filter factory is defined. +# See java.io.ObjectInputFilter.Config for more information. +# +# If the system property jdk.serialFilterFactory is also specified, it supersedes +# the security property value defined here. +# +#jdk.serialFilterFactory= + +# +# Deserialization JVM-wide filter +# +# A filter, if configured, is used by the filter factory to provide the filter used by +# java.io.ObjectInputStream during deserialization to check the contents of the stream. +# A filter is configured as a sequence of patterns, each pattern is either +# matched against the name of a class in the stream or defines a limit. +# Patterns are separated by ";" (semicolon). +# Whitespace is significant and is considered part of the pattern. +# +# If the system property jdk.serialFilter is also specified, it supersedes +# the security property value defined here. +# +# If a pattern includes a "=", it sets a limit. +# If a limit appears more than once the last value is used. +# Limits are checked before classes regardless of the order in the +# sequence of patterns. +# If any of the limits are exceeded, the filter status is REJECTED. +# +# maxdepth=value - the maximum depth of a graph +# maxrefs=value - the maximum number of internal references +# maxbytes=value - the maximum number of bytes in the input stream +# maxarray=value - the maximum array length allowed +# +# Other patterns, from left to right, match the class or package name as +# returned from Class.getName. +# If the class is an array type, the class or package to be matched is the +# element type. +# Arrays of any number of dimensions are treated the same as the element type. +# For example, a pattern of "!example.Foo", rejects creation of any instance or +# array of example.Foo. +# +# If the pattern starts with "!", the status is REJECTED if the remaining +# pattern is matched; otherwise the status is ALLOWED if the pattern matches. +# If the pattern contains "/", the non-empty prefix up to the "/" is the +# module name; +# if the module name matches the module name of the class then +# the remaining pattern is matched with the class name. +# If there is no "/", the module name is not compared. +# If the pattern ends with ".**" it matches any class in the package and all +# subpackages. +# If the pattern ends with ".*" it matches any class in the package. +# If the pattern ends with "*", it matches any class with the pattern as a +# prefix. +# If the pattern is equal to the class name, it matches. +# Otherwise, the status is UNDECIDED. +# +#jdk.serialFilter=pattern;pattern + +# +# RMI Registry Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI Registry or to decrease limits but not +# to increase limits. +# If the limits (maxdepth, maxrefs, or maxbytes) are exceeded, the object is rejected. +# +# Each non-array type is allowed or rejected if it matches one of the patterns, +# evaluated from left to right, and is otherwise allowed. Arrays of any +# component type, including subarrays and arrays of primitives, are allowed. +# +# Array construction of any component type, including subarrays and arrays of +# primitives, are allowed unless the length is greater than the maxarray limit. +# The filter is applied to each array element. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# The built-in filter allows subclasses of allowed classes and +# can approximately be represented as the pattern: +# +#sun.rmi.registry.registryFilter=\ +# maxarray=1000000;\ +# maxdepth=20;\ +# java.lang.String;\ +# java.lang.Number;\ +# java.lang.reflect.Proxy;\ +# java.rmi.Remote;\ +# sun.rmi.server.UnicastRef;\ +# sun.rmi.server.RMIClientSocketFactory;\ +# sun.rmi.server.RMIServerSocketFactory;\ +# java.rmi.server.UID +# +# RMI Distributed Garbage Collector (DGC) Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI DGC. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# The builtin DGC filter can approximately be represented as the filter pattern: +# +#sun.rmi.transport.dgcFilter=\ +# java.rmi.server.ObjID;\ +# java.rmi.server.UID;\ +# java.rmi.dgc.VMID;\ +# java.rmi.dgc.Lease;\ +# maxdepth=5;maxarray=10000 + +# +# JCEKS Encrypted Key Serial Filter +# +# This filter, if configured, is used by the JCEKS KeyStore during the +# deserialization of the encrypted Key object stored inside a key entry. +# If not configured or the filter result is UNDECIDED (i.e. none of the patterns +# matches), the filter configured by jdk.serialFilter will be consulted. +# +# If the system property jceks.key.serialFilter is also specified, it supersedes +# the security property value defined here. +# +# The filter pattern uses the same format as jdk.serialFilter. The default +# pattern allows java.lang.Enum, java.security.KeyRep, java.security.KeyRep$Type, +# and javax.crypto.spec.SecretKeySpec and rejects all the others. +jceks.key.serialFilter = java.base/java.lang.Enum;java.base/java.security.KeyRep;\ + java.base/java.security.KeyRep$Type;java.base/javax.crypto.spec.SecretKeySpec;!* + +# The iteration count used for password-based encryption (PBE) in JCEKS +# keystores. Values in the range 10000 to 5000000 are considered valid. +# If the value is out of this range, or is not a number, or is unspecified; +# a default of 200000 is used. +# +# If the system property jdk.jceks.iterationCount is also specified, it +# supersedes the security property value defined here. +# +#jdk.jceks.iterationCount = 200000 + +# +# PKCS12 KeyStore properties +# +# The following properties, if configured, are used by the PKCS12 KeyStore +# implementation during the creation of a new keystore. Several of the +# properties may also be used when modifying an existing keystore. The +# properties can be overridden by a KeyStore API that specifies its own +# algorithms and parameters. +# +# If an existing PKCS12 keystore is loaded and then stored, the algorithm and +# parameter used to generate the existing Mac will be reused. If the existing +# keystore does not have a Mac, no Mac will be created while storing. If there +# is at least one certificate in the existing keystore, the algorithm and +# parameters used to encrypt the last certificate in the existing keystore will +# be reused to encrypt all certificates while storing. If the last certificate +# in the existing keystore is not encrypted, all certificates will be stored +# unencrypted. If there is no certificate in the existing keystore, any newly +# added certificate will be encrypted (or stored unencrypted if algorithm +# value is "NONE") using the "keystore.pkcs12.certProtectionAlgorithm" and +# "keystore.pkcs12.certPbeIterationCount" values defined here. Existing private +# and secret key(s) are not changed. Newly set private and secret key(s) will +# be encrypted using the "keystore.pkcs12.keyProtectionAlgorithm" and +# "keystore.pkcs12.keyPbeIterationCount" values defined here. +# +# In order to apply new algorithms and parameters to all entries in an +# existing keystore, one can create a new keystore and add entries in the +# existing keystore into the new keystore. This can be achieved by calling the +# "keytool -importkeystore" command. +# +# If a system property of the same name is also specified, it supersedes the +# security property value defined here. +# +# If the property is set to an illegal value, +# an iteration count that is not a positive integer, or an unknown algorithm +# name, an exception will be thrown when the property is used. +# If the property is not set or empty, a default value will be used. +# +# Note: These properties are currently used by the JDK Reference implementation. +# They are not guaranteed to be examined and used by other implementations. + +# The algorithm used to encrypt a certificate. This can be any non-Hmac PBE +# algorithm defined in the Cipher section of the Java Security Standard +# Algorithm Names Specification. When set to "NONE", the certificate +# is not encrypted. The default value is "PBEWithHmacSHA256AndAES_256". +#keystore.pkcs12.certProtectionAlgorithm = PBEWithHmacSHA256AndAES_256 + +# The iteration count used by the PBE algorithm when encrypting a certificate. +# This value must be a positive integer. The default value is 10000. +#keystore.pkcs12.certPbeIterationCount = 10000 + +# The algorithm used to encrypt a private key or secret key. This can be +# any non-Hmac PBE algorithm defined in the Cipher section of the Java +# Security Standard Algorithm Names Specification. The value must not be "NONE". +# The default value is "PBEWithHmacSHA256AndAES_256". +#keystore.pkcs12.keyProtectionAlgorithm = PBEWithHmacSHA256AndAES_256 + +# The iteration count used by the PBE algorithm when encrypting a private key +# or a secret key. This value must be a positive integer. The default value +# is 10000. +#keystore.pkcs12.keyPbeIterationCount = 10000 + +# The algorithm used to calculate the optional MacData at the end of a PKCS12 +# file. This can be any HmacPBE algorithm defined in the Mac section of the +# Java Security Standard Algorithm Names Specification. When set to "NONE", +# no Mac is generated. The default value is "HmacPBESHA256". +#keystore.pkcs12.macAlgorithm = HmacPBESHA256 + +# The iteration count used by the MacData algorithm. This value must be a +# positive integer. The default value is 10000. +#keystore.pkcs12.macIterationCount = 10000 + +# +# Enhanced exception message information +# +# By default, exception messages should not include potentially sensitive +# information such as file names, host names, or port numbers. This property +# accepts one or more comma separated values, each of which represents a +# category of enhanced exception message information to enable. Values are +# case-insensitive. Leading and trailing whitespaces, surrounding each value, +# are ignored. Unknown values are ignored. +# +# NOTE: Use caution before setting this property. Setting this property +# exposes sensitive information in Exceptions, which could, for example, +# propagate to untrusted code or be emitted in stack traces that are +# inadvertently disclosed and made accessible over a public network. +# +# The categories are: +# +# hostInfo - IOExceptions thrown by java.net.Socket and the socket types in the +# java.nio.channels package will contain enhanced exception +# message information +# +# jar - enables more detailed information in the IOExceptions thrown +# by classes in the java.util.jar package +# +# The property setting in this file can be overridden by a system property of +# the same name, with the same syntax and possible values. +# +#jdk.includeInExceptions=hostInfo,jar + +# +# Disabled mechanisms for the Simple Authentication and Security Layer (SASL) +# +# Disabled mechanisms will not be negotiated by both SASL clients and servers. +# These mechanisms will be ignored if they are specified in the "mechanisms" +# argument of "Sasl.createSaslClient" or the "mechanism" argument of +# "Sasl.createSaslServer". +# +# The value of this property is a comma-separated list of SASL mechanisms. +# The mechanisms are case-sensitive. Whitespaces around the commas are ignored. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# Example: +# jdk.sasl.disabledMechanisms=PLAIN, CRAM-MD5, DIGEST-MD5 +jdk.sasl.disabledMechanisms= + +# +# Policies for distrusting Certificate Authorities (CAs). +# +# This is a comma separated value of one or more case-sensitive strings, each +# of which represents a policy for determining if a CA should be distrusted. +# The supported values are: +# +# SYMANTEC_TLS : Distrust TLS Server certificates anchored by a Symantec +# root CA and issued after April 16, 2019 unless issued by one of the +# following subordinate CAs which have a later distrust date: +# 1. Apple IST CA 2 - G1, SHA-256 fingerprint: +# AC2B922ECFD5E01711772FEA8ED372DE9D1E2245FCE3F57A9CDBEC77296A424B +# Distrust after December 31, 2019. +# 2. Apple IST CA 8 - G1, SHA-256 fingerprint: +# A4FE7C7F15155F3F0AEF7AAA83CF6E06DEB97CA3F909DF920AC1490882D488ED +# Distrust after December 31, 2019. +# +# Leading and trailing whitespace surrounding each value are ignored. +# Unknown values are ignored. If the property is commented out or set to the +# empty String, no policies are enforced. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be supported by other SE implementations. Also, this +# property does not override other security properties which can restrict +# certificates such as jdk.tls.disabledAlgorithms or +# jdk.certpath.disabledAlgorithms; those restrictions are still enforced even +# if this property is not enabled. +# +jdk.security.caDistrustPolicies=SYMANTEC_TLS + +# +# FilePermission path canonicalization +# +# This security property dictates how the path argument is processed and stored +# while constructing a FilePermission object. If the value is set to true, the +# path argument is canonicalized and FilePermission methods (such as implies, +# equals, and hashCode) are implemented based on this canonicalized result. +# Otherwise, the path argument is not canonicalized and FilePermission methods are +# implemented based on the original input. See the implementation note of the +# FilePermission class for more details. +# +# If a system property of the same name is also specified, it supersedes the +# security property value defined here. +# +# The default value for this property is false. +# +jdk.io.permissionsUseCanonicalPath=false + + +# +# Policies for the proxy_impersonator Kerberos ccache configuration entry +# +# The proxy_impersonator ccache configuration entry indicates that the ccache +# is a synthetic delegated credential for use with S4U2Proxy by an intermediate +# server. The ccache file should also contain the TGT of this server and +# an evidence ticket from the default principal of the ccache to this server. +# +# This security property determines how Java uses this configuration entry. +# There are 3 possible values: +# +# no-impersonate - Ignore this configuration entry, and always act as +# the owner of the TGT (if it exists). +# +# try-impersonate - Try impersonation when this configuration entry exists. +# If no matching TGT or evidence ticket is found, +# fallback to no-impersonate. +# +# always-impersonate - Always impersonate when this configuration entry exists. +# If no matching TGT or evidence ticket is found, +# no initial credential is read from the ccache. +# +# The default value is "always-impersonate". +# +# If a system property of the same name is also specified, it supersedes the +# security property value defined here. +# +#jdk.security.krb5.default.initiate.credential=always-impersonate + +# +# Trust Anchor Certificates - CA Basic Constraint check +# +# X.509 v3 certificates used as Trust Anchors (to validate signed code or TLS +# connections) must have the cA Basic Constraint field set to 'true'. Also, if +# they include a Key Usage extension, the keyCertSign bit must be set. These +# checks, enabled by default, can be disabled for backward-compatibility +# purposes with the jdk.security.allowNonCaAnchor System and Security +# properties. In the case that both properties are simultaneously set, the +# System value prevails. The default value of the property is "false". +# +#jdk.security.allowNonCaAnchor=true + +# +# The default Character set name (java.nio.charset.Charset.forName()) +# for converting TLS ALPN values between byte arrays and Strings. +# Prior versions of the JDK may use UTF-8 as the default charset. If +# you experience interoperability issues, setting this property to UTF-8 +# may help. +# +# jdk.tls.alpnCharset=UTF-8 +jdk.tls.alpnCharset=ISO_8859_1 + +# +# JNDI Object Factories Filter +# +# This filter is used by the JNDI runtime to control the set of object factory classes +# which will be allowed to instantiate objects from object references returned by +# naming/directory systems. The factory class named by the reference instance will be +# matched against this filter. The filter property supports pattern-based filter syntax +# with the same format as jdk.serialFilter. +# +# Each pattern is matched against the factory class name to allow or disallow it's +# instantiation. The access to a factory class is allowed unless the filter returns +# REJECTED. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# If the system property jdk.jndi.object.factoriesFilter is also specified, it supersedes +# the security property value defined here. The default value of the property is "*". +# +# The default pattern value allows any object factory class specified by the reference +# instance to recreate the referenced object. +#jdk.jndi.object.factoriesFilter=* diff --git a/src/FourthDimension/resources/jdk/conf/security/policy/README.txt b/src/FourthDimension/resources/jdk/conf/security/policy/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..fdf77d3e3a401f0d6f0be18c53f6bec7cf4b0f25 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/policy/README.txt @@ -0,0 +1,54 @@ + + Java(TM) Cryptography Extension Policy Files + for the Java(TM) Platform, Standard Edition Runtime Environment + + README +------------------------------------------------------------------------ + +Import and export control rules on cryptographic software vary from +country to country. The Java Cryptography Extension (JCE) architecture +allows flexible cryptographic key strength to be configured via the +jurisdiction policy files which are referenced by the "crypto.policy" +security property in the /conf/security/java.security file. + +By default, Java provides two different sets of cryptographic policy +files: + + unlimited: These policy files contain no restrictions on cryptographic + strengths or algorithms + + limited: These policy files contain more restricted cryptographic + strengths + +These files reside in /conf/security/policy in the "unlimited" +or "limited" subdirectories respectively. + +Each subdirectory contains a complete policy configuration, +and subdirectories can be added/edited/removed to reflect your +import or export control product requirements. + +Within a subdirectory, the effective policy is the combined minimum +permissions of the grant statements in the file(s) matching the filename +pattern "default_*.policy". At least one grant is required. For example: + + limited = Export (all) + Import (limited) = Limited + unlimited = Export (all) + Import (all) = Unlimited + +The effective exemption policy is the combined minimum permissions +of the grant statements in the file(s) matching the filename pattern +"exempt_*.policy". Exemption grants are optional. For example: + + limited = grants exemption permissions, by which the + effective policy can be circumvented. + e.g. KeyRecovery/KeyEscrow/KeyWeakening. + +Please see the Java Cryptography Architecture (JCA) documentation for +additional information on these files and formats. + +YOU ARE ADVISED TO CONSULT YOUR EXPORT/IMPORT CONTROL COUNSEL OR ATTORNEY +TO DETERMINE THE EXACT REQUIREMENTS. + +Please note that the JCE for Java SE, including the JCE framework, +cryptographic policy files, and standard JCE providers provided with +the Java SE, have been reviewed and approved for export as mass market +encryption item by the US Bureau of Industry and Security. diff --git a/src/FourthDimension/resources/jdk/conf/security/policy/limited/default_US_export.policy b/src/FourthDimension/resources/jdk/conf/security/policy/limited/default_US_export.policy new file mode 100644 index 0000000000000000000000000000000000000000..1f389340585d2a0a2f671fa3b3c273281986071c --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/policy/limited/default_US_export.policy @@ -0,0 +1,6 @@ +// Default US Export policy file. + +grant { + // There is no restriction to any algorithms. + permission javax.crypto.CryptoAllPermission; +}; diff --git a/src/FourthDimension/resources/jdk/conf/security/policy/limited/default_local.policy b/src/FourthDimension/resources/jdk/conf/security/policy/limited/default_local.policy new file mode 100644 index 0000000000000000000000000000000000000000..2a6d5134047c001361528e9300daab3ebc28ebb0 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/policy/limited/default_local.policy @@ -0,0 +1,14 @@ +// Some countries have import limits on crypto strength. This policy file +// is worldwide importable. + +grant { + permission javax.crypto.CryptoPermission "DES", 64; + permission javax.crypto.CryptoPermission "DESede", *; + permission javax.crypto.CryptoPermission "RC2", 128, + "javax.crypto.spec.RC2ParameterSpec", 128; + permission javax.crypto.CryptoPermission "RC4", 128; + permission javax.crypto.CryptoPermission "RC5", 128, + "javax.crypto.spec.RC5ParameterSpec", *, 12, *; + permission javax.crypto.CryptoPermission "RSA", *; + permission javax.crypto.CryptoPermission *, 128; +}; diff --git a/src/FourthDimension/resources/jdk/conf/security/policy/limited/exempt_local.policy b/src/FourthDimension/resources/jdk/conf/security/policy/limited/exempt_local.policy new file mode 100644 index 0000000000000000000000000000000000000000..9dd5b91b06d768bea47022ab61d02dcbcccff410 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/policy/limited/exempt_local.policy @@ -0,0 +1,13 @@ +// Some countries have import limits on crypto strength, but may allow for +// these exemptions if the exemption mechanism is used. + +grant { + // There is no restriction to any algorithms if KeyRecovery is enforced. + permission javax.crypto.CryptoPermission *, "KeyRecovery"; + + // There is no restriction to any algorithms if KeyEscrow is enforced. + permission javax.crypto.CryptoPermission *, "KeyEscrow"; + + // There is no restriction to any algorithms if KeyWeakening is enforced. + permission javax.crypto.CryptoPermission *, "KeyWeakening"; +}; diff --git a/src/FourthDimension/resources/jdk/conf/security/policy/unlimited/default_US_export.policy b/src/FourthDimension/resources/jdk/conf/security/policy/unlimited/default_US_export.policy new file mode 100644 index 0000000000000000000000000000000000000000..1f389340585d2a0a2f671fa3b3c273281986071c --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/policy/unlimited/default_US_export.policy @@ -0,0 +1,6 @@ +// Default US Export policy file. + +grant { + // There is no restriction to any algorithms. + permission javax.crypto.CryptoAllPermission; +}; diff --git a/src/FourthDimension/resources/jdk/conf/security/policy/unlimited/default_local.policy b/src/FourthDimension/resources/jdk/conf/security/policy/unlimited/default_local.policy new file mode 100644 index 0000000000000000000000000000000000000000..2b907e25895d6fa4cd7bc2692cdc50db4f38adf7 --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/security/policy/unlimited/default_local.policy @@ -0,0 +1,6 @@ +// Country-specific policy file for countries with no limits on crypto strength. + +grant { + // There is no restriction to any algorithms. + permission javax.crypto.CryptoAllPermission; +}; diff --git a/src/FourthDimension/resources/jdk/conf/sound.properties b/src/FourthDimension/resources/jdk/conf/sound.properties new file mode 100644 index 0000000000000000000000000000000000000000..68309d111a6050739ccd938dd4d4b9fae3f4e36d --- /dev/null +++ b/src/FourthDimension/resources/jdk/conf/sound.properties @@ -0,0 +1,39 @@ +############################################################ +# Sound Configuration File +############################################################ +# +# This properties file is used to specify default service +# providers for javax.sound.midi.MidiSystem and +# javax.sound.sampled.AudioSystem. +# +# The following keys are recognized by MidiSystem methods: +# +# javax.sound.midi.Receiver +# javax.sound.midi.Sequencer +# javax.sound.midi.Synthesizer +# javax.sound.midi.Transmitter +# +# The following keys are recognized by AudioSystem methods: +# +# javax.sound.sampled.Clip +# javax.sound.sampled.Port +# javax.sound.sampled.SourceDataLine +# javax.sound.sampled.TargetDataLine +# +# The values specify the full class name of the service +# provider, or the device name. +# +# See the class descriptions for details. +# +# Example 1: +# Use MyDeviceProvider as default for SourceDataLines: +# javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider +# +# Example 2: +# Specify the default Synthesizer by its name "InternalSynth". +# javax.sound.midi.Synthesizer=#InternalSynth +# +# Example 3: +# Specify the default Receiver by provider and name: +# javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 +# diff --git a/src/FourthDimension/resources/jdk/legal/java.base/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.base/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.base/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.base/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.base/LICENSE b/src/FourthDimension/resources/jdk/legal/java.base/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.base/aes.md b/src/FourthDimension/resources/jdk/legal/java.base/aes.md new file mode 100644 index 0000000000000000000000000000000000000000..6d0ee2e2bb4a501ec2f8174f6b13b8883f54175c --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/aes.md @@ -0,0 +1,36 @@ +## Cryptix AES v3.2.0 + +### Cryptix General License +
+
+Cryptix General License
+
+Copyright (c) 1995-2005 The Cryptix Foundation Limited.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  1. Redistributions of source code must retain the copyright notice,
+     this list of conditions and the following disclaimer.
+
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
+CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.base/asm.md b/src/FourthDimension/resources/jdk/legal/java.base/asm.md new file mode 100644 index 0000000000000000000000000000000000000000..707ecda7c0e19e9eeb526b8cc2598bd0a5ed3384 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/asm.md @@ -0,0 +1,36 @@ +## ASM Bytecode Manipulation Framework v8.0.1 + +### ASM License +
+
+Copyright (c) 2000-2011 France Télécom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.base/c-libutl.md b/src/FourthDimension/resources/jdk/legal/java.base/c-libutl.md new file mode 100644 index 0000000000000000000000000000000000000000..8bc98806825f58b159b6d8b369fff17ebb420f0a --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/c-libutl.md @@ -0,0 +1,35 @@ +## c-libutl 20160225 + +### c-libutl License +``` + +This software is distributed under the terms of the BSD license. + +== BSD LICENSE =============================================================== + + (C) 2009 by Remo Dentato (rdentato@gmail.com) + + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +http://opensource.org/licenses/bsd-license.php + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.base/cldr.md b/src/FourthDimension/resources/jdk/legal/java.base/cldr.md new file mode 100644 index 0000000000000000000000000000000000000000..2f21c45c2fe6638ec16e36cb7766467ed35c22b9 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/cldr.md @@ -0,0 +1,105 @@ +## Unicode Common Local Data Repository (CLDR) v39 + +### CLDR License + +``` + +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +See Terms of Use for definitions of Unicode Inc.'s +Data Files and Software. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2021 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + + +------------------------------------------------------------ Terms of Use --------------------------------------------------------------- + +Unicode® Copyright and Terms of Use +For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + +Unicode Copyright +Copyright © 1991-2021 Unicode, Inc. All rights reserved. +Definitions +Unicode Data Files ("DATA FILES") include all data files under the directories: +https://www.unicode.org/Public/ +https://www.unicode.org/reports/ +https://www.unicode.org/ivd/data/ + +Unicode Data Files do not include PDF online code charts under the directory: +https://www.unicode.org/Public/ + +Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard +or any source code or compiled code under the directories: +https://www.unicode.org/Public/PROGRAMS/ +https://www.unicode.org/Public/cldr/ +http://site.icu-project.org/download/ +Terms of Use +Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. +Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. +Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. +Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. +The Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. +All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. +No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. +Modification is not permitted with respect to this document. All copies of this document must be verbatim. +Restricted Rights Legend +Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. +Warranties and Disclaimers +This publication and/or website may include technical or typographical errors or other inaccuracies. Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. +If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. +EXCEPT AS PROVIDED IN SECTION E.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE, INC. AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. +Waiver of Damages +In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. +Trademarks & Logos +The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. +The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. +All third party trademarks referenced herein are the property of their respective owners. +Miscellaneous +Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this website shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. +Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. +Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. +Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. +Entire Agreement. This Agreement constitutes the entire agreement between the parties. + + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.base/icu.md b/src/FourthDimension/resources/jdk/legal/java.base/icu.md new file mode 100644 index 0000000000000000000000000000000000000000..ab850bf143edf5f4febfbc82c7b65f47b0e2bd8e --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/icu.md @@ -0,0 +1,140 @@ +## International Components for Unicode (ICU4J) v67.1 + +### ICU4J License +``` + +COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) + +Copyright © 1991-2020 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + +--------------------- + +Third-Party Software Licenses + +This section contains third-party software notices and/or additional +terms for licensed third-party software components included within ICU +libraries. + +1. ICU License - ICU 1.8.1 to ICU 57.1 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1995-2016 International Business Machines Corporation and others +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +All trademarks and registered trademarks mentioned herein are the +property of their respective owners. + + +—————————————————————————————————————————————————————————————————————— + + +From: https://www.unicode.org/copyright.html: + + Unicode® Copyright and Terms of Use + + For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + + Unicode Copyright + Copyright © 1991-2020 Unicode, Inc. All rights reserved. + Definitions + + Unicode Data Files ("DATA FILES") include all data files under the directories: + https://www.unicode.org/Public/ + https://www.unicode.org/reports/ + https://www.unicode.org/ivd/data/ + + Unicode Data Files do not include PDF online code charts under the directory: + https://www.unicode.org/Public/ + + Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard + or any source code or compiled code under the directories: + https://www.unicode.org/Public/PROGRAMS/ + https://www.unicode.org/Public/cldr/ + http://site.icu-project.org/download/ + + Terms of Use + Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. + Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. + Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. + Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. + The Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. + All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. + No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. + Modification is not permitted with respect to this document. All copies of this document must be verbatim. + Restricted Rights Legend + Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. + Warranties and Disclaimers + This publication and/or website may include technical or typographical errors or other inaccuracies. Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. + If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. + EXCEPT AS PROVIDED IN SECTION E.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE, INC. AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. + Waiver of Damages + In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. + Trademarks & Logos + The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. + The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. + All third party trademarks referenced herein are the property of their respective owners. + Miscellaneous + Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this website shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. + Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. + Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. + Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. + Entire Agreement. This Agreement constitutes the entire agreement between the parties. + +``` + diff --git a/src/FourthDimension/resources/jdk/legal/java.base/public_suffix.md b/src/FourthDimension/resources/jdk/legal/java.base/public_suffix.md new file mode 100644 index 0000000000000000000000000000000000000000..d228ac298b90c641bf6bffab766677bcea3affbd --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/public_suffix.md @@ -0,0 +1,399 @@ +## Mozilla Public Suffix List + +### Public Suffix Notice +``` +You are receiving a copy of the Mozilla Public Suffix List in the following +file: /lib/security/public_suffix_list.dat. The terms of the +Oracle license do NOT apply to this file; it is licensed under the +Mozilla Public License 2.0, separately from the Oracle programs you receive. +If you do not wish to use the Public Suffix List, you may remove the +/lib/security/public_suffix_list.dat file. + +The Source Code of this file is available under the +Mozilla Public License, v. 2.0 and is located at +https://raw.githubusercontent.com/publicsuffix/list/88467c960d6cdad2ca1623e892e5e17506bc269f/public_suffix_list.dat. +If a copy of the MPL was not distributed with this file, you can obtain one +at https://mozilla.org/MPL/2.0/. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +for the specific language governing rights and limitations under the License. +``` + +### MPL v2.0 +``` +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.base/unicode.md b/src/FourthDimension/resources/jdk/legal/java.base/unicode.md new file mode 100644 index 0000000000000000000000000000000000000000..cff0c82a873dd86974430c7b506303b313dfed04 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/unicode.md @@ -0,0 +1,54 @@ +## The Unicode Standard, Unicode Character Database, Version 13.0.0 + +### Unicode Character Database +``` + +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +See Terms of Use for definitions of Unicode Inc.'s +Data Files and Software. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2020 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + +``` + diff --git a/src/FourthDimension/resources/jdk/legal/java.base/zlib.md b/src/FourthDimension/resources/jdk/legal/java.base/zlib.md new file mode 100644 index 0000000000000000000000000000000000000000..d856af6ccd404c8a34ccf9e6d542dccc86c91b15 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.base/zlib.md @@ -0,0 +1,27 @@ +## zlib v1.2.13 + +### zlib License +
+
+Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+Jean-loup Gailly        Mark Adler
+jloup@gzip.org          madler@alumni.caltech.edu
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.compiler/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.compiler/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.compiler/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.compiler/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.compiler/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.compiler/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.compiler/LICENSE b/src/FourthDimension/resources/jdk/legal/java.compiler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.compiler/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.datatransfer/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.datatransfer/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.datatransfer/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.datatransfer/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.datatransfer/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.datatransfer/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.datatransfer/LICENSE b/src/FourthDimension/resources/jdk/legal/java.datatransfer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.datatransfer/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.desktop/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.desktop/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/LICENSE b/src/FourthDimension/resources/jdk/legal/java.desktop/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/colorimaging.md b/src/FourthDimension/resources/jdk/legal/java.desktop/colorimaging.md new file mode 100644 index 0000000000000000000000000000000000000000..eeb9932e1377f7c063279e0f1d341177f689660e --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/colorimaging.md @@ -0,0 +1,7 @@ +## Eastman Kodak Company: Portions of color management and imaging software + +### Eastman Kodak Notice +
+Portions Copyright Eastman Kodak Company 1991-2003
+
+ diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/giflib.md b/src/FourthDimension/resources/jdk/legal/java.desktop/giflib.md new file mode 100644 index 0000000000000000000000000000000000000000..0be4fb8226e2d4f9c2cfb8f9d4e3ba61262dda66 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/giflib.md @@ -0,0 +1,30 @@ +## GIFLIB v5.2.1 + +### GIFLIB License +``` + +The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +https://sourceforge.net/p/giflib/code/ci/master/tree/openbsd-reallocarray.c + +Copyright (c) 2008 Otto Moerbeek +SPDX-License-Identifier: MIT diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/harfbuzz.md b/src/FourthDimension/resources/jdk/legal/java.desktop/harfbuzz.md new file mode 100644 index 0000000000000000000000000000000000000000..e2ed76aa7c6aa950fee850a9a34ed2769e834035 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/harfbuzz.md @@ -0,0 +1,95 @@ +## Harfbuzz v7.2.0 + +### Harfbuzz License + +https://github.com/harfbuzz/harfbuzz/blob/7.2.0/COPYING + +
+
+HarfBuzz is licensed under the so-called "Old MIT" license.  Details follow.
+For parts of HarfBuzz that are licensed under different licenses see individual
+files names COPYING in subdirectories where applicable.
+
+Copyright © 2010-2023  Google, Inc.
+Copyright © 2018-2020  Ebrahim Byagowi
+Copyright © 2004-2013  Red Hat, Inc.
+Copyright © 2019  Facebook, Inc.
+Copyright © 2007  Chris Wilson
+Copyright © 2018-2019 Adobe Inc.
+Copyright © 2006-2023 Behdad Esfahbod
+Copyright © 1998-2004  David Turner and Werner Lemberg
+Copyright © 2009  Keith Stribley
+Copyright © 2018  Khaled Hosny
+Copyright © 2016  Elie Roux 
+Copyright © 2016  Igalia S.L.
+Copyright © 2015  Mozilla Foundation.
+Copyright © 1999  David Turner
+Copyright © 2005  Werner Lemberg
+Copyright © 2013-2015  Alexei Podtelezhnikov
+Copyright © 2022 Matthias Clasen
+Copyright © 2011  Codethink Limited
+
+For full copyright notices consult the individual files in the package.
+
+
+Permission is hereby granted, without written agreement and without
+license or royalty fees, to use, copy, modify, and distribute this
+software and its documentation for any purpose, provided that the
+above copyright notice and the following two paragraphs appear in
+all copies of this software.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+All source code, except for one section, is licensed as above. The one
+exception is licensed with a slightly different MIT variant:
+The contents of this directory are licensed under the following terms:
+
+---------------------------------
+The below license applies to the following files:
+libharfbuzz/hb-ucd.cc
+
+Copyright (C) 2012 Grigori Goronzy 
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+ +### AUTHORS File Information +``` + +Behdad Esfahbod +David Corbett +David Turner +Ebrahim Byagowi +Garret Rieger +Jonathan Kew +Khaled Hosny +Lars Knoll +Martin Hosken +Owen Taylor +Roderick Sheeter +Roozbeh Pournader +Simon Hausmann +Werner Lemberg + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/jpeg.md b/src/FourthDimension/resources/jdk/legal/java.desktop/jpeg.md new file mode 100644 index 0000000000000000000000000000000000000000..1a0d41c17a2a103c583e65f380ec6809adee4829 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/jpeg.md @@ -0,0 +1,77 @@ +## Independent JPEG Group: JPEG release 6b + +### JPEG License + +``` +**************************************************************************** + +Copyright (C) 1991-1998, Thomas G. Lane. + +This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, +Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, +Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG +Group. + +IJG is not affiliated with the official ISO JPEG standards committee. + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", +and you, its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute +this software (or portions thereof) for any purpose, without fee, +subject to these conditions: + +(1) If any part of the source code for this software is distributed, +then this README file must be included, with this copyright and no-warranty +notice unaltered; and any additions, deletions, or changes to the original +files must be clearly indicated in accompanying documentation. + +(2) If only executable code is distributed, then the accompanying documentation +must state that "this software is based in part on the work of the +Independent JPEG Group". + +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived +from it. This software may be referred to only as "the Independent JPEG +Group's software". + +We specifically permit and encourage the use of this software as the basis +of commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + +It appears that the arithmetic coding option of the JPEG spec is covered +by patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding +cannot legally be used without obtaining one or more licenses. For this +reason, support for arithmetic coding has been removed from the free +JPEG software. (Since arithmetic coding provides only a marginal gain +over the unpatented Huffman mode, it is unlikely that very many +implementations will support it.) So far as we are aware, there are +no patent restrictions on the remaining code. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support +has been removed altogether, and the GIF writer has been simplified to +produce "uncompressed GIFs". This technique does not use the LZW algorithm; +the resulting GIF files are larger than usual, but are readable by all +standard GIF decoders. + +We are required to state that "The Graphics Interchange Format(c) is +the Copyright property of CompuServe Incorporated. GIF(sm) is a +Service Mark property of CompuServe Incorporated." + +**************************************************************************** +``` + diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/lcms.md b/src/FourthDimension/resources/jdk/legal/java.desktop/lcms.md new file mode 100644 index 0000000000000000000000000000000000000000..da86a9c47ca31ca36bbd3b79487c7237f22c4de2 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/lcms.md @@ -0,0 +1,108 @@ +## Little Color Management System (LCMS) v2.15 + +### LCMS License +
+README.1ST file information
+
+LittleCMS core is released under MIT License
+
+---------------------------------
+
+Little CMS
+Copyright (c) 1998-2023 Marti Maria Saguer
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+---------------------------------
+The below license applies to the following files:
+liblcms/cmssm.c
+
+Copyright 2001, softSurfer (www.softsurfer.com)
+
+This code may be freely used and modified for any purpose
+providing that this copyright notice is included with it.
+SoftSurfer makes no warranty for this code, and cannot be held
+liable for any real or imagined damage resulting from its use.
+Users of this code must verify correctness for their application.
+
+
+ +### AUTHORS File Information +``` + + +Main Author +------------ +Marti Maria + + +Contributors +------------ +Bob Friesenhahn +Kai-Uwe Behrmann +Stuart Nixon +Jordi Vilar +Richard Hughes +Auke Nauta +Chris Evans (Google) +Lorenzo Ridolfi +Robin Watts (Artifex) +Shawn Pedersen +Andrew Brygin +Samuli Suominen +Florian Hˆch +Aurelien Jarno +Claudiu Cebuc +Michael Vhrel (Artifex) +Michal Cihar +Daniel Kaneider +Mateusz Jurczyk (Google) +Paul Miller +SÈbastien LÈon +Christian Schmitz +XhmikosR +Stanislav Brabec (SuSe) +Leonhard Gruenschloss (Google) +Patrick Noffke +Christopher James Halse Rogers +John Hein +Thomas Weber (Debian) +Mark Allen +Noel Carboni +Sergei Trofimovic +Philipp Knechtges +Amyspark +Lovell Fuller +Eli Schwartz + +Special Thanks +-------------- +Artifex software +AlienSkin software +libVIPS +Jan Morovic +Jos Vernon (WebSupergoo) +Harald Schneider (Maxon) +Christian Albrecht +Dimitrios Anastassakis +Lemke Software +Tim Zaman + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/libpng.md b/src/FourthDimension/resources/jdk/legal/java.desktop/libpng.md new file mode 100644 index 0000000000000000000000000000000000000000..f11cfe580ce97eae58ef5ea72df04a4750c80922 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/libpng.md @@ -0,0 +1,204 @@ +## libpng v1.6.39 + +### libpng License +
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
+
+PNG Reference Library License version 2
+---------------------------------------
+
+Copyright (c) 1995-2022 The PNG Reference Library Authors.
+Copyright (c) 2018-2022 Cosmin Truta
+Copyright (c) 1998-2018 Glenn Randers-Pehrson
+Copyright (c) 1996-1997 Andreas Dilger
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement.  In no event shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+    must not claim that you wrote the original software.  If you
+    use this software in a product, an acknowledgment in the product
+    documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+    not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+    source or altered source distribution.
+
+
+PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+-----------------------------------------------------------------------
+
+libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
+Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
+
+    Simon-Pierre Cadieux
+    Eric S. Raymond
+    Mans Rullgard
+    Cosmin Truta
+    Gilles Vollant
+    James Yu
+    Mandar Sahastrabuddhe
+    Google Inc.
+    Vadim Barkov
+
+and with the following additions to the disclaimer:
+
+    There is no warranty against interference with your enjoyment of
+    the library or against infringement.  There is no warranty that our
+    efforts or the library will fulfill any of your particular purposes
+    or needs.  This library is provided with all faults, and the entire
+    risk of satisfactory quality, performance, accuracy, and effort is
+    with the user.
+
+Some files in the "contrib" directory and some configure-generated
+files that are distributed with libpng have other copyright owners, and
+are released under other open source licenses.
+
+libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the
+list of Contributing Authors:
+
+    Tom Lane
+    Glenn Randers-Pehrson
+    Willem van Schaik
+
+libpng versions 0.89, June 1996, through 0.96, May 1997, are
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
+
+    John Bowler
+    Kevin Bracey
+    Sam Bushell
+    Magnus Holmgren
+    Greg Roelofs
+    Tom Tanner
+
+Some files in the "scripts" directory have other copyright owners,
+but are released under this license.
+
+libpng versions 0.5, May 1995, through 0.88, January 1996, are
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+For the purposes of this copyright and license, "Contributing Authors"
+is defined as the following set of individuals:
+
+    Andreas Dilger
+    Dave Martindale
+    Guy Eric Schalnat
+    Paul Schmidt
+    Tim Wegner
+
+The PNG Reference Library is supplied "AS IS".  The Contributing
+Authors and Group 42, Inc. disclaim all warranties, expressed or
+implied, including, without limitation, the warranties of
+merchantability and of fitness for any purpose.  The Contributing
+Authors and Group 42, Inc. assume no liability for direct, indirect,
+incidental, special, exemplary, or consequential damages, which may
+result from the use of the PNG Reference Library, even if advised of
+the possibility of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+source code, or portions hereof, for any purpose, without fee, subject
+to the following restrictions:
+
+ 1. The origin of this source code must not be misrepresented.
+
+ 2. Altered versions must be plainly marked as such and must not
+    be misrepresented as being the original source.
+
+ 3. This Copyright notice may not be removed or altered from any
+    source or altered source distribution.
+
+The Contributing Authors and Group 42, Inc. specifically permit,
+without fee, and encourage the use of this source code as a component
+to supporting the PNG file format in commercial products.  If you use
+this source code in a product, acknowledgment is not required but would
+be appreciated.
+
+TRADEMARK
+=========
+
+The name "libpng" has not been registered by the Copyright owners
+as a trademark in any jurisdiction.  However, because libpng has
+been distributed and maintained world-wide, continually since 1995,
+the Copyright owners claim "common-law trademark protection" in any
+jurisdiction where common-law trademark is recognized.
+
+
+ +### AUTHORS File Information +``` +PNG REFERENCE LIBRARY AUTHORS +============================= + +This is the list of PNG Reference Library ("libpng") Contributing +Authors, for copyright and licensing purposes. + + * Andreas Dilger + * Cosmin Truta + * Dave Martindale + * Eric S. Raymond + * Gilles Vollant + * Glenn Randers-Pehrson + * Greg Roelofs + * Guy Eric Schalnat + * James Yu + * John Bowler + * Kevin Bracey + * Magnus Holmgren + * Mandar Sahastrabuddhe + * Mans Rullgard + * Matt Sarett + * Mike Klein + * Pascal Massimino + * Paul Schmidt + * Qiang Zhou + * Sam Bushell + * Samuel Williams + * Simon-Pierre Cadieux + * Tim Wegner + * Tom Lane + * Tom Tanner + * Vadim Barkov + * Willem van Schaik + * Zhijie Liang + * Arm Holdings + - Richard Townsend + * Google Inc. + - Dan Field + - Leon Scroggins III + - Matt Sarett + - Mike Klein + - Sami Boukortt + +The build projects, the build scripts, the test scripts, and other +files in the "ci", "projects", "scripts" and "tests" directories, have +other copyright owners, but are released under the libpng license. + +Some files in the "contrib" directory, and some tools-generated files +that are distributed with libpng, have other copyright owners, and are +released under other open source licenses. +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/mesa3d.md b/src/FourthDimension/resources/jdk/legal/java.desktop/mesa3d.md new file mode 100644 index 0000000000000000000000000000000000000000..cdaa1acb2930bff36dce3622b207ed8d9dc40290 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/mesa3d.md @@ -0,0 +1,134 @@ +## Mesa 3-D Graphics Library v21.0.3 + +### Mesa License + +``` +Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Attention, Contributors + +When contributing to the Mesa project you must agree to the licensing terms +of the component to which you're contributing. +The following section lists the primary components of the Mesa distribution +and their respective licenses. +Mesa Component Licenses + + + +Component Location License +------------------------------------------------------------------ +Main Mesa code src/mesa/ MIT +Device drivers src/mesa/drivers/* MIT, generally + +Gallium code src/gallium/ MIT + +Ext headers GL/glext.h Khronos + GL/glxext.h Khronos + GL/wglext.h Khronos + KHR/khrplatform.h Khronos + +***************************************************************************** + +---- +include/GL/gl.h : + + + Mesa 3-D graphics library + + Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + Copyright (C) 2009 VMware, Inc. All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + ***************************************************************************** + +---- +include/GL/glext.h +include/GL/glxext.h +include/GL/wglxext.h : + + + Copyright (c) 2013 - 2018 The Khronos Group Inc. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and/or associated documentation files (the + "Materials"), to deal in the Materials without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Materials, and to + permit persons to whom the Materials are furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Materials. + + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + + ***************************************************************************** + +---- +include/KHR/khrplatform.h : + + Copyright (c) 2008 - 2018 The Khronos Group Inc. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and/or associated documentation files (the + "Materials"), to deal in the Materials without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Materials, and to + permit persons to whom the Materials are furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Materials. + + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + + ***************************************************************************** + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.desktop/xwd.md b/src/FourthDimension/resources/jdk/legal/java.desktop/xwd.md new file mode 100644 index 0000000000000000000000000000000000000000..f3c53278db6d44698c24e1b453a9026c8ec85d9b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.desktop/xwd.md @@ -0,0 +1,34 @@ +## xwd v1.0.7 + +### xwd utility +
+
+This is the copyright for the files in src/java.desktop/unix/native/libawt_xawt:
+list.h, multiVis.h, wsutils.h, list.c, multiVis.c
+
+Copyright 1994 Hewlett-Packard Co.
+Copyright 1996, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.instrument/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.instrument/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.instrument/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.instrument/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.instrument/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.instrument/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.instrument/LICENSE b/src/FourthDimension/resources/jdk/legal/java.instrument/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.instrument/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.logging/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.logging/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.logging/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.logging/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.logging/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.logging/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.logging/LICENSE b/src/FourthDimension/resources/jdk/legal/java.logging/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.logging/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.management.rmi/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.management.rmi/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.management.rmi/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.management.rmi/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.management.rmi/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.management.rmi/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.management.rmi/LICENSE b/src/FourthDimension/resources/jdk/legal/java.management.rmi/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.management.rmi/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.management/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.management/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.management/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.management/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.management/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.management/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.management/LICENSE b/src/FourthDimension/resources/jdk/legal/java.management/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.management/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.naming/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.naming/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.naming/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.naming/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.naming/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.naming/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.naming/LICENSE b/src/FourthDimension/resources/jdk/legal/java.naming/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.naming/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.net.http/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.net.http/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.net.http/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.net.http/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.net.http/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.net.http/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.net.http/LICENSE b/src/FourthDimension/resources/jdk/legal/java.net.http/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.net.http/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.prefs/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.prefs/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.prefs/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.prefs/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.prefs/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.prefs/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.prefs/LICENSE b/src/FourthDimension/resources/jdk/legal/java.prefs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.prefs/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.rmi/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.rmi/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.rmi/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.rmi/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.rmi/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.rmi/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.rmi/LICENSE b/src/FourthDimension/resources/jdk/legal/java.rmi/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.rmi/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.scripting/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.scripting/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.scripting/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.scripting/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.scripting/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.scripting/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.scripting/LICENSE b/src/FourthDimension/resources/jdk/legal/java.scripting/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.scripting/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.se/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.se/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.se/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.se/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.se/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.se/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.se/LICENSE b/src/FourthDimension/resources/jdk/legal/java.se/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.se/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.security.jgss/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.security.jgss/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.security.jgss/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.security.jgss/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.security.jgss/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.security.jgss/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.security.jgss/LICENSE b/src/FourthDimension/resources/jdk/legal/java.security.jgss/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.security.jgss/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.security.sasl/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.security.sasl/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.security.sasl/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.security.sasl/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.security.sasl/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.security.sasl/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.security.sasl/LICENSE b/src/FourthDimension/resources/jdk/legal/java.security.sasl/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.security.sasl/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.smartcardio/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.smartcardio/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.smartcardio/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.smartcardio/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.smartcardio/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.smartcardio/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.smartcardio/LICENSE b/src/FourthDimension/resources/jdk/legal/java.smartcardio/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.smartcardio/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.smartcardio/pcsclite.md b/src/FourthDimension/resources/jdk/legal/java.smartcardio/pcsclite.md new file mode 100644 index 0000000000000000000000000000000000000000..99a9936a4771de43f6b7c363c2915a7e3f71f78a --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.smartcardio/pcsclite.md @@ -0,0 +1,57 @@ +## PC/SC Lite v1.9.9 + +### PC/SC Lite Notice +``` +MUSCLE SmartCard Development ( https://pcsclite.apdu.fr/ ) + +Only 3 header files are included in this distribution: winscard.h, wintypes.h, pcsclite.h + +Copyright for winscard.h: + * Copyright (C) 1999-2003 + * David Corcoran + * Copyright (C) 2002-2009 + * Ludovic Rousseau + +Copyright for wintypes.h: + * Copyright (C) 1999 + * David Corcoran + * Copyright (C) 2002-2011 + * Ludovic Rousseau + +Copyright for pcsclite.h: + * Copyright (C) 1999-2004 + * David Corcoran + * Copyright (C) 2002-2011 + * Ludovic Rousseau + * Copyright (C) 2005 + * Martin Paljak + +``` + +### PC/SC Lite License +``` + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` diff --git a/src/FourthDimension/resources/jdk/legal/java.sql.rowset/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.sql.rowset/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.sql.rowset/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.sql.rowset/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.sql.rowset/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.sql.rowset/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.sql.rowset/LICENSE b/src/FourthDimension/resources/jdk/legal/java.sql.rowset/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.sql.rowset/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.sql/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.sql/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.sql/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.sql/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.sql/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.sql/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.sql/LICENSE b/src/FourthDimension/resources/jdk/legal/java.sql/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.sql/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.transaction.xa/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.transaction.xa/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.transaction.xa/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.transaction.xa/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.transaction.xa/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.transaction.xa/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.transaction.xa/LICENSE b/src/FourthDimension/resources/jdk/legal/java.transaction.xa/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.transaction.xa/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml.crypto/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml.crypto/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml.crypto/LICENSE b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml.crypto/santuario.md b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/santuario.md new file mode 100644 index 0000000000000000000000000000000000000000..fa87128126d19e089465db75c016bbde4e236e22 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml.crypto/santuario.md @@ -0,0 +1,225 @@ +## Apache Santuario v2.3.0 + +### Apache Santuario Notice +
+
+  Apache Santuario - XML Security for Java
+  Copyright 1999-2021 The Apache Software Foundation
+
+  This product includes software developed at
+  The Apache Software Foundation (http://www.apache.org/).
+
+  It was originally based on software copyright (c) 2001, Institute for
+  Data Communications Systems, .
+
+  The development of this software was partly funded by the European
+  Commission in the  project in the ISIS Programme.
+
+
+ +### Apache 2.0 License +
+
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/java.xml/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/java.xml/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/LICENSE b/src/FourthDimension/resources/jdk/legal/java.xml/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/bcel.md b/src/FourthDimension/resources/jdk/legal/java.xml/bcel.md new file mode 100644 index 0000000000000000000000000000000000000000..2c673d6b1af3ef3fa6896f14e6d1e646b01aec0e --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/bcel.md @@ -0,0 +1,219 @@ +## Apache Commons Byte Code Engineering Library (BCEL) Version 6.7.0 + +### Apache Commons BCEL Notice +
+
+    Apache Commons BCEL
+    Copyright 2004-2022 The Apache Software Foundation
+
+    This product includes software developed at
+    The Apache Software Foundation (https://www.apache.org/).
+
+
+ +### Apache 2.0 License +
+
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/dom.md b/src/FourthDimension/resources/jdk/legal/java.xml/dom.md new file mode 100644 index 0000000000000000000000000000000000000000..4fe80935ed184e2fbced1752ac14cc8d2057a3cf --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/dom.md @@ -0,0 +1,77 @@ +## DOM Level 3 Core Specification v1.0 + +### W3C Software Notice +
+Copyright © 2004 World Wide Web Consortium, (Massachusetts Institute of Technology,
+European Research Consortium for Informatics and Mathematics, Keio University).
+All Rights Reserved.
+
+The DOM bindings are published under the W3C Software Copyright Notice and License.
+The software license requires "Notice of any changes or modifications to the W3C
+files, including the date changes were made." Consequently, modified versions of
+the DOM bindings must document that they do not conform to the W3C standard; in the
+case of the IDL definitions, the pragma prefix can no longer be 'w3c.org'; in the
+case of the Java language binding, the package names can no longer be in the
+'org.w3c' package.
+
+ +### W3C License +
+
+W3C SOFTWARE NOTICE AND LICENSE
+
+http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+This work (and included software, documentation such as READMEs, or other
+related items) is being provided by the copyright holders under the following
+license. By obtaining, using and/or copying this work, you (the licensee)
+agree that you have read, understood, and will comply with the following terms
+and conditions.
+
+Permission to copy, modify, and distribute this software and its
+documentation, with or without modification, for any purpose and without fee
+or royalty is hereby granted, provided that you include the following on ALL
+copies of the software and documentation or portions thereof, including
+modifications:
+
+   1.The full text of this NOTICE in a location viewable to users of the
+   redistributed or derivative work.
+
+   2.Any pre-existing intellectual property disclaimers, notices, or terms and
+   conditions. If none exist, the W3C Software Short Notice should be included
+   (hypertext is preferred, text is permitted) within the body of any
+   redistributed or derivative code.
+
+   3.Notice of any changes or modifications to the files, including the date
+   changes were made. (We recommend you provide URIs to the location from
+   which the code is derived.)
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
+MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
+PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY
+THIRD PARTY PATENTS,COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+DOCUMENTATION.  The name and trademarks of copyright holders may NOT be used
+in advertising or publicity pertaining to the software without specific,
+written prior permission. Title to copyright in this software and any
+associated documentation will at all times remain with copyright holders.
+
+____________________________________
+
+This formulation of W3C's notice and license became active on December 31
+2002. This version removes the copyright ownership notice such that this
+license can be used with materials other than those owned by the W3C, reflects
+that ERCIM is now a host of the W3C, includes references to this specific
+dated version of the license, and removes the ambiguous grant of "use".
+Otherwise, this version is the same as the previous version and is written so
+as to preserve the Free Software Foundation's assessment of GPL compatibility
+and OSI's certification under the Open Source Definition. Please see our
+Copyright FAQ for common questions about using materials from our site,
+including specific terms and conditions for packages like libwww, Amaya, and
+Jigsaw. Other questions about this notice can be directed to
+site-policy@w3.org.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/jcup.md b/src/FourthDimension/resources/jdk/legal/java.xml/jcup.md new file mode 100644 index 0000000000000000000000000000000000000000..bc566b7d2dbd9746f1085f1d19c70e57cb9654ca --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/jcup.md @@ -0,0 +1,31 @@ +## CUP Parser Generator for Java v 0.11b + +### CUP Parser Generator License + +``` +Copyright 1996-2015 by Scott Hudson, Frank Flannery, C. Scott Ananian, Michael Petter + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both +the copyright notice and this permission notice and warranty disclaimer +appear in supporting documentation, and that the names of the authors or +their employers not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. + +The authors and their employers disclaim all warranties with regard to +this software, including all implied warranties of merchantability and +fitness. In no event shall the authors or their employers be liable for +any special, indirect or consequential damages or any damages whatsoever +resulting from loss of use, data or profits, whether in an action of +contract, negligence or other tortious action, arising out of or in +connection with the use or performance of this software. +``` +--- +``` +This is an open source license. It is also GPL-Compatible (see entry for +"Standard ML of New Jersey"). The portions of CUP output which are hard-coded +into the CUP source code are (naturally) covered by this same license, as is +the CUP runtime code linked with the generated parser. +``` + diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/xalan.md b/src/FourthDimension/resources/jdk/legal/java.xml/xalan.md new file mode 100644 index 0000000000000000000000000000000000000000..924bce872c81f22b5366713386c80dac630e914d --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/xalan.md @@ -0,0 +1,255 @@ +## Apache Xalan v2.7.2 + +### Apache Xalan Notice +
+
+    ======================================================================================
+    ==  NOTICE file corresponding to the section 4d of the Apache License, Version 2.0, ==
+    ==  in this case for the Apache Xalan distribution.                                 ==
+    ======================================================================================
+
+   This product includes software developed by
+   The Apache Software Foundation (http://www.apache.org/).
+
+   Specifically, we only include the XSLTC portion of the source from the Xalan distribution. 
+   The Xalan project has two processors: an interpretive one (Xalan Interpretive) and a 
+   compiled one (The XSLT Compiler (XSLTC)). We *only* use the XSLTC part of Xalan; We use
+   the source from the packages that are part of the XSLTC sources.
+
+   Portions of this software was originally based on the following:
+
+     - software copyright (c) 1999-2002, Lotus Development Corporation., http://www.lotus.com.
+     - software copyright (c) 2001-2002, Sun Microsystems., http://www.sun.com.
+     - software copyright (c) 2003, IBM Corporation., http://www.ibm.com.
+     - voluntary contributions made by Ovidiu Predescu (ovidiu@cup.hp.com) on behalf of the
+       Apache Software Foundation and was originally developed at Hewlett Packard Company.
+
+
+ +### Apache 2.0 License +
+
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+JLEX COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.
+Copyright 1996-2003 by Elliot Joel Berk and C. Scott Ananian
+Permission to use, copy, modify, and distribute this software and 
+its documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that 
+both the copyright notice and this permission notice and warranty 
+disclaimer appear in supporting documentation, and that the name of 
+the authors or their employers not be used in advertising or publicity 
+pertaining to distribution of the software without specific, written 
+prior permission.
+The authors and their employers disclaim all warranties with regard to 
+this software, including all implied warranties of merchantability and 
+fitness. In no event shall the authors or their employers be liable for 
+any special, indirect or consequential damages or any damages whatsoever 
+resulting from loss of use, data or profits, whether in an action of 
+contract, negligence or other tortious action, arising out of or in 
+connection with the use or performance of this software.The portions of 
+JLex output which are hard-coded into the JLex source code are (naturally) 
+covered by this same license.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/java.xml/xerces.md b/src/FourthDimension/resources/jdk/legal/java.xml/xerces.md new file mode 100644 index 0000000000000000000000000000000000000000..3790b7a47aa32b9a71a2c1346e6b018c43c3cc8b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/java.xml/xerces.md @@ -0,0 +1,229 @@ +## Apache Xerces v2.12.2 + +### Apache Xerces Notice +
+    =========================================================================
+    == NOTICE file corresponding to section 4(d) of the Apache License,    ==
+    == Version 2.0, in this case for the Apache Xerces Java distribution.  ==
+    =========================================================================
+    
+    Apache Xerces Java
+    Copyright 1999-2022 The Apache Software Foundation
+
+    This product includes software developed at
+    The Apache Software Foundation (http://www.apache.org/).
+
+    Portions of this software were originally based on the following:
+    - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
+    - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
+    - voluntary contributions made by Paul Eng on behalf of the
+    Apache Software Foundation that were originally developed at iClick, Inc.,
+    software copyright (c) 1999.
+
+ +### Apache 2.0 License +
+
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/jdk.accessibility/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.accessibility/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.accessibility/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.accessibility/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.accessibility/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.accessibility/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.accessibility/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.accessibility/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.accessibility/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.charsets/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.charsets/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.charsets/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.charsets/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.charsets/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.charsets/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.charsets/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.charsets/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.charsets/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md new file mode 100644 index 0000000000000000000000000000000000000000..08d1e3c713d923f3675bc671514994c7d9e55b6f --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md @@ -0,0 +1,72 @@ +## OASIS PKCS #11 Cryptographic Token Interface v3.0 + +### OASIS PKCS #11 Cryptographic Token Interface License +
+
+Copyright © OASIS Open 2020. All Rights Reserved.
+
+    All capitalized terms in the following text have the meanings
+assigned to them in the OASIS Intellectual Property Rights Policy (the
+"OASIS IPR Policy"). The full Policy may be found at the OASIS website:
+[http://www.oasis-open.org/policies-guidelines/ipr]
+
+    This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it or
+assist in its implementation may be prepared, copied, published, and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this section are included
+on all such copies and derivative works. However, this document itself
+may not be modified in any way, including by removing the copyright
+notice or references to OASIS, except as needed for the purpose of
+developing any document or deliverable produced by an OASIS Technical
+Committee (in which case the rules applicable to copyrights, as set
+forth in the OASIS IPR Policy, must be followed) or as required to
+translate it into languages other than English.
+
+    The limited permissions granted above are perpetual and will not be
+revoked by OASIS or its successors or assigns.
+
+    This document and the information contained herein is provided on an
+"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
+INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED
+WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. OASIS
+AND ITS MEMBERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THIS DOCUMENT OR ANY
+PART THEREOF.
+
+    [OASIS requests that any OASIS Party or any other party that
+believes it has patent claims that would necessarily be infringed by
+implementations of this OASIS Standards Final Deliverable, to notify
+OASIS TC Administrator and provide an indication of its willingness to
+grant patent licenses to such patent claims in a manner consistent with
+the IPR Mode of the OASIS Technical Committee that produced this
+deliverable.]
+
+    [OASIS invites any party to contact the OASIS TC Administrator if it
+is aware of a claim of ownership of any patent claims that would
+necessarily be infringed by implementations of this OASIS Standards
+Final Deliverable by a patent holder that is not willing to provide a
+license to such patent claims in a manner consistent with the IPR Mode
+of the OASIS Technical Committee that produced this OASIS Standards
+Final Deliverable. OASIS may include such claims on its website, but
+disclaims any obligation to do so.]
+
+    [OASIS takes no position regarding the validity or scope of any
+intellectual property or other rights that might be claimed to pertain
+to the implementation or use of the technology described in this OASIS
+Standards Final Deliverable or the extent to which any license under
+such rights might or might not be available; neither does it represent
+that it has made any effort to identify any such rights. Information on
+OASIS' procedures with respect to rights in any document or deliverable
+produced by an OASIS Technical Committee can be found on the OASIS
+website. Copies of claims of rights made available for publication and
+any assurances of licenses to be made available, or the result of an
+attempt made to obtain a general license or permission for the use of
+such proprietary rights by implementers or users of this OASIS Standards
+Final Deliverable, can be obtained from the OASIS TC Administrator.
+OASIS makes no representation that any information or list of
+intellectual property rights will at any time be complete, or that any
+claims in such list are, in fact, Essential Claims.]
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/pkcs11wrapper.md b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/pkcs11wrapper.md new file mode 100644 index 0000000000000000000000000000000000000000..9eb453bca8dcbe38a0da162f215c29c0ca21dff1 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.cryptoki/pkcs11wrapper.md @@ -0,0 +1,46 @@ +## IAIK (Institute for Applied Information Processing and Communication) PKCS#11 wrapper files v1 + +### IAIK License +
+
+Copyright (c) 2002 Graz University of Technology. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+
+3. The end-user documentation included with the redistribution, if any, must
+   include the following acknowledgment:
+
+   "This product includes software developed by IAIK of Graz University of
+    Technology."
+
+   Alternately, this acknowledgment may appear in the software itself, if and
+   wherever such third-party acknowledgments normally appear.
+
+4. The names "Graz University of Technology" and "IAIK of Graz University of
+   Technology" must not be used to endorse or promote products derived from this
+   software without prior written permission.
+
+5. Products derived from this software may not be called "IAIK PKCS Wrapper",
+   nor may "IAIK" appear in their name, without prior written permission of
+   Graz University of Technology.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.crypto.ec/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.dynalink/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.dynalink/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.dynalink/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.dynalink/dynalink.md b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/dynalink.md new file mode 100644 index 0000000000000000000000000000000000000000..309efc7cbd864a29ce63e846c6411c090f5a63a7 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.dynalink/dynalink.md @@ -0,0 +1,32 @@ +## Dynalink v.5 + +### Dynalink License +
+
+Copyright (c) 2009-2013, Attila Szegedi
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+* Neither the name of the copyright holder nor the names of
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/jdk.httpserver/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.httpserver/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.httpserver/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.httpserver/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.httpserver/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.httpserver/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.httpserver/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.httpserver/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.httpserver/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.incubator.foreign/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.incubator.vector/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.ci/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler.management/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.internal.vm.compiler/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jdwp.agent/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jfr/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.jfr/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jfr/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jfr/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.jfr/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jfr/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jfr/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.jfr/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jfr/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jsobject/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.jsobject/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jsobject/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jsobject/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.jsobject/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jsobject/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.jsobject/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.jsobject/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.jsobject/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.localedata/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.localedata/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.localedata/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.localedata/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.localedata/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.localedata/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.localedata/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.localedata/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.localedata/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.localedata/cldr.md b/src/FourthDimension/resources/jdk/legal/jdk.localedata/cldr.md new file mode 100644 index 0000000000000000000000000000000000000000..2f21c45c2fe6638ec16e36cb7766467ed35c22b9 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.localedata/cldr.md @@ -0,0 +1,105 @@ +## Unicode Common Local Data Repository (CLDR) v39 + +### CLDR License + +``` + +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +See Terms of Use for definitions of Unicode Inc.'s +Data Files and Software. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2021 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + + +------------------------------------------------------------ Terms of Use --------------------------------------------------------------- + +Unicode® Copyright and Terms of Use +For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + +Unicode Copyright +Copyright © 1991-2021 Unicode, Inc. All rights reserved. +Definitions +Unicode Data Files ("DATA FILES") include all data files under the directories: +https://www.unicode.org/Public/ +https://www.unicode.org/reports/ +https://www.unicode.org/ivd/data/ + +Unicode Data Files do not include PDF online code charts under the directory: +https://www.unicode.org/Public/ + +Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard +or any source code or compiled code under the directories: +https://www.unicode.org/Public/PROGRAMS/ +https://www.unicode.org/Public/cldr/ +http://site.icu-project.org/download/ +Terms of Use +Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. +Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. +Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. +Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. +The Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. +All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. +No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. +Modification is not permitted with respect to this document. All copies of this document must be verbatim. +Restricted Rights Legend +Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. +Warranties and Disclaimers +This publication and/or website may include technical or typographical errors or other inaccuracies. Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. +If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. +EXCEPT AS PROVIDED IN SECTION E.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE, INC. AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. +Waiver of Damages +In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. +Trademarks & Logos +The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. +The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. +All third party trademarks referenced herein are the property of their respective owners. +Miscellaneous +Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this website shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. +Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. +Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. +Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. +Entire Agreement. This Agreement constitutes the entire agreement between the parties. + + +``` diff --git a/src/FourthDimension/resources/jdk/legal/jdk.localedata/thaidict.md b/src/FourthDimension/resources/jdk/legal/jdk.localedata/thaidict.md new file mode 100644 index 0000000000000000000000000000000000000000..f8b1133ca51d22ad995e6dd34c674f84f804461a --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.localedata/thaidict.md @@ -0,0 +1,31 @@ +## Thai Dictionary + +### Thai Dictionary License +
+
+Copyright (C) 1982 The Royal Institute, Thai Royal Government.
+
+Copyright (C) 1998 National Electronics and Computer Technology Center,
+National Science and Technology Development Agency,
+Ministry of Science Technology and Environment,
+Thai Royal Government.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management.agent/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.management.agent/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management.agent/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management.agent/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.management.agent/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management.agent/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management.agent/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.management.agent/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management.agent/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management.jfr/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.management/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.management/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.management/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.management/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.management/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.naming.dns/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.naming.rmi/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.net/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.net/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.net/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.net/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.net/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.net/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.net/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.net/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.net/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.nio.mapmode/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.sctp/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.sctp/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.sctp/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.sctp/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.sctp/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.sctp/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.sctp/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.sctp/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.sctp/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.security.auth/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.security.auth/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.security.auth/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.security.auth/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.security.auth/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.security.auth/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.security.auth/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.security.auth/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.security.auth/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.security.jgss/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.unsupported/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.unsupported/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.unsupported/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.unsupported/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.unsupported/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.unsupported/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.unsupported/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.unsupported/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.unsupported/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.xml.dom/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.zipfs/ADDITIONAL_LICENSE_INFO b/src/FourthDimension/resources/jdk/legal/jdk.zipfs/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000000000000000000000000000000000000..ff700cd09f6ea0cc497f68169fd5c210bdaa7c2b --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.zipfs/ADDITIONAL_LICENSE_INFO @@ -0,0 +1,37 @@ + ADDITIONAL INFORMATION ABOUT LICENSING + +Certain files distributed by Oracle America, Inc. and/or its affiliates are +subject to the following clarification and special exception to the GPLv2, +based on the GNU Project exception for its Classpath libraries, known as the +GNU Classpath Exception. + +Note that Oracle includes multiple, independent programs in this software +package. Some of those programs are provided under licenses deemed +incompatible with the GPLv2 by the Free Software Foundation and others. +For example, the package includes programs licensed under the Apache +License, Version 2.0 and may include FreeType. Such programs are licensed +to you under their original licenses. + +Oracle facilitates your further distribution of this package by adding the +Classpath Exception to the necessary parts of its GPLv2 code, which permits +you to use that code in combination with other independent modules not +licensed under the GPLv2. However, note that this would not permit you to +commingle code under an incompatible license with Oracle's GPLv2 licensed +code by, for example, cutting and pasting such code into a file also +containing Oracle's GPLv2 licensed code and then distributing the result. + +Additionally, if you were to remove the Classpath Exception from any of the +files to which it applies and distribute the result, you would likely be +required to license some or all of the other code in that distribution under +the GPLv2 as well, and since the GPLv2 is incompatible with the license terms +of some items included in the distribution by Oracle, removing the Classpath +Exception could therefore effectively compromise your ability to further +distribute the package. + +Failing to distribute notices associated with some files may also create +unexpected legal consequences. + +Proceed with caution and we recommend that you obtain the advice of a lawyer +skilled in open source matters before removing the Classpath Exception or +making modifications to this package which may subsequently be redistributed +and/or involve the use of third party software. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.zipfs/ASSEMBLY_EXCEPTION b/src/FourthDimension/resources/jdk/legal/jdk.zipfs/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..065b8d90239f30b7de3eba350f6446a932d4d131 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.zipfs/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/src/FourthDimension/resources/jdk/legal/jdk.zipfs/LICENSE b/src/FourthDimension/resources/jdk/legal/jdk.zipfs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8b400c7ab81b7b18baff3f81d597f5e511883134 --- /dev/null +++ b/src/FourthDimension/resources/jdk/legal/jdk.zipfs/LICENSE @@ -0,0 +1,347 @@ +The GNU General Public License (GPL) + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or + in part contains or is derived from the Program or any part thereof, to be + licensed as a whole at no charge to all third parties under the terms of + this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes + with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free + software, and you are welcome to redistribute it under certain conditions; + type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than 'show w' and 'show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here +is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + 'Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL + +Certain source files distributed by Oracle America and/or its affiliates are +subject to the following clarification and special exception to the GPL, but +only where Oracle has expressly included in the particular source file's header +the words "Oracle designates this particular file as subject to the "Classpath" +exception as provided by Oracle in the LICENSE file that accompanied this code." + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. diff --git a/src/FourthDimension/resources/jdk/lib/classlist b/src/FourthDimension/resources/jdk/lib/classlist new file mode 100644 index 0000000000000000000000000000000000000000..6aa883bd010fe1aa0806c3732a39f4cc8966d656 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/classlist @@ -0,0 +1,1403 @@ +# NOTE: Do not modify this file. +# +# This file is generated via the -XX:DumpLoadedClassList= option +# and is used at CDS archive dump time (see -Xshare:dump). +# +java/io/BufferedInputStream +java/io/BufferedOutputStream +java/io/BufferedWriter +java/io/ByteArrayInputStream +java/io/ByteArrayOutputStream +java/io/Closeable +java/io/DataInput +java/io/DataInputStream +java/io/DataOutput +java/io/DefaultFileSystem +java/io/File +java/io/File$PathStatus +java/io/FileCleanable +java/io/FileDescriptor +java/io/FileDescriptor$1 +java/io/FileInputStream +java/io/FileInputStream$1 +java/io/FileOutputStream +java/io/FilePermission +java/io/FileSystem +java/io/FilterInputStream +java/io/FilterOutputStream +java/io/Flushable +java/io/InputStream +java/io/ObjectStreamField +java/io/OutputStream +java/io/OutputStreamWriter +java/io/PrintStream +java/io/RandomAccessFile +java/io/RandomAccessFile$1 +java/io/RandomAccessFile$2 +java/io/Serializable +java/io/UnixFileSystem +java/io/Writer +java/lang/AbstractStringBuilder +java/lang/Appendable +java/lang/ApplicationShutdownHooks +java/lang/ApplicationShutdownHooks$1 +java/lang/ArithmeticException +java/lang/ArrayStoreException +java/lang/AssertionStatusDirectives +java/lang/AutoCloseable +java/lang/Boolean +java/lang/BootstrapMethodError +java/lang/Byte +java/lang/Byte$ByteCache +java/lang/CharSequence +java/lang/Character +java/lang/Character$CharacterCache +java/lang/CharacterData +java/lang/CharacterData00 +java/lang/CharacterDataLatin1 +java/lang/Class +java/lang/Class$1 +java/lang/Class$3 +java/lang/Class$Atomic +java/lang/Class$ReflectionData +java/lang/ClassCastException +java/lang/ClassLoader +java/lang/ClassLoader$ParallelLoaders +java/lang/ClassNotFoundException +java/lang/ClassValue +java/lang/ClassValue$Entry +java/lang/ClassValue$Identity +java/lang/ClassValue$Version +java/lang/Cloneable +java/lang/Comparable +java/lang/CompoundEnumeration +java/lang/Double +java/lang/Enum +java/lang/Error +java/lang/Exception +java/lang/Float +java/lang/IllegalArgumentException +java/lang/IllegalMonitorStateException +java/lang/IncompatibleClassChangeError +java/lang/Integer +java/lang/Integer$IntegerCache +java/lang/InternalError +java/lang/Iterable +java/lang/LinkageError +java/lang/LiveStackFrame +java/lang/LiveStackFrameInfo +java/lang/Long +java/lang/Long$LongCache +java/lang/Math +java/lang/Module +java/lang/Module$ArchivedData +java/lang/Module$ReflectionData +java/lang/ModuleLayer +java/lang/ModuleLayer$Controller +java/lang/NamedPackage +java/lang/NoClassDefFoundError +java/lang/NoSuchFieldException +java/lang/NoSuchMethodError +java/lang/NoSuchMethodException +java/lang/NullPointerException +java/lang/Number +java/lang/Object +java/lang/OutOfMemoryError +java/lang/Package +java/lang/Package$VersionInfo +java/lang/PublicMethods$Key +java/lang/PublicMethods$MethodList +java/lang/Readable +java/lang/Record +java/lang/ReflectiveOperationException +java/lang/Runnable +java/lang/Runtime +java/lang/Runtime$Version +java/lang/RuntimeException +java/lang/RuntimePermission +java/lang/SecurityManager +java/lang/Short +java/lang/Short$ShortCache +java/lang/Shutdown +java/lang/Shutdown$Lock +java/lang/StackFrameInfo +java/lang/StackOverflowError +java/lang/StackStreamFactory$AbstractStackWalker +java/lang/StackTraceElement +java/lang/StackWalker +java/lang/StackWalker$StackFrame +java/lang/String +java/lang/String$CaseInsensitiveComparator +java/lang/StringBuffer +java/lang/StringBuilder +java/lang/StringCoding +java/lang/StringConcatHelper +java/lang/StringLatin1 +java/lang/StringLatin1$CharsSpliterator +java/lang/StringUTF16 +java/lang/StringUTF16$CharsSpliterator +java/lang/System +java/lang/System$2 +java/lang/System$Logger +java/lang/System$LoggerFinder +java/lang/Terminator +java/lang/Terminator$1 +java/lang/Thread +java/lang/Thread$UncaughtExceptionHandler +java/lang/ThreadDeath +java/lang/ThreadGroup +java/lang/ThreadLocal +java/lang/ThreadLocal$ThreadLocalMap +java/lang/ThreadLocal$ThreadLocalMap$Entry +java/lang/Throwable +java/lang/VersionProps +java/lang/VirtualMachineError +java/lang/Void +java/lang/WeakPairMap +java/lang/WeakPairMap$Pair +java/lang/WeakPairMap$Pair$Lookup +java/lang/annotation/Annotation +java/lang/constant/Constable +java/lang/constant/ConstantDesc +java/lang/invoke/AbstractValidatingLambdaMetafactory +java/lang/invoke/BootstrapMethodInvoker +java/lang/invoke/BoundMethodHandle +java/lang/invoke/BoundMethodHandle$Specializer +java/lang/invoke/BoundMethodHandle$Specializer$Factory +java/lang/invoke/BoundMethodHandle$SpeciesData +java/lang/invoke/BoundMethodHandle$Species_D +java/lang/invoke/BoundMethodHandle$Species_DL +java/lang/invoke/BoundMethodHandle$Species_I +java/lang/invoke/BoundMethodHandle$Species_IL +java/lang/invoke/BoundMethodHandle$Species_L +java/lang/invoke/BoundMethodHandle$Species_LJ +java/lang/invoke/BoundMethodHandle$Species_LL +java/lang/invoke/BoundMethodHandle$Species_LLL +java/lang/invoke/BoundMethodHandle$Species_LLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLLLLLLL +java/lang/invoke/BoundMethodHandle$Species_LLLLLLLLLLLLL +java/lang/invoke/CallSite +java/lang/invoke/ClassSpecializer +java/lang/invoke/ClassSpecializer$1 +java/lang/invoke/ClassSpecializer$Factory +java/lang/invoke/ClassSpecializer$SpeciesData +java/lang/invoke/ConstantCallSite +java/lang/invoke/DelegatingMethodHandle +java/lang/invoke/DelegatingMethodHandle$Holder +java/lang/invoke/DirectMethodHandle +java/lang/invoke/DirectMethodHandle$2 +java/lang/invoke/DirectMethodHandle$Accessor +java/lang/invoke/DirectMethodHandle$Constructor +java/lang/invoke/DirectMethodHandle$Holder +java/lang/invoke/DirectMethodHandle$Interface +java/lang/invoke/InfoFromMemberName +java/lang/invoke/InnerClassLambdaMetafactory +java/lang/invoke/InnerClassLambdaMetafactory$1 +java/lang/invoke/InnerClassLambdaMetafactory$ForwardingMethodGenerator +java/lang/invoke/InvokerBytecodeGenerator +java/lang/invoke/InvokerBytecodeGenerator$2 +java/lang/invoke/InvokerBytecodeGenerator$ClassData +java/lang/invoke/Invokers +java/lang/invoke/Invokers$Holder +java/lang/invoke/LambdaForm +java/lang/invoke/LambdaForm$BasicType +java/lang/invoke/LambdaForm$Holder +java/lang/invoke/LambdaForm$Kind +java/lang/invoke/LambdaForm$Name +java/lang/invoke/LambdaForm$NamedFunction +java/lang/invoke/LambdaFormBuffer +java/lang/invoke/LambdaFormEditor +java/lang/invoke/LambdaFormEditor$1 +java/lang/invoke/LambdaFormEditor$Transform +java/lang/invoke/LambdaFormEditor$TransformKey +java/lang/invoke/LambdaMetafactory +java/lang/invoke/LambdaProxyClassArchive +java/lang/invoke/MemberName +java/lang/invoke/MemberName$Factory +java/lang/invoke/MethodHandle +java/lang/invoke/MethodHandleImpl +java/lang/invoke/MethodHandleImpl$1 +java/lang/invoke/MethodHandleImpl$AsVarargsCollector +java/lang/invoke/MethodHandleImpl$Intrinsic +java/lang/invoke/MethodHandleImpl$IntrinsicMethodHandle +java/lang/invoke/MethodHandleInfo +java/lang/invoke/MethodHandleNatives +java/lang/invoke/MethodHandleNatives$CallSiteContext +java/lang/invoke/MethodHandleStatics +java/lang/invoke/MethodHandles +java/lang/invoke/MethodHandles$1 +java/lang/invoke/MethodHandles$Lookup +java/lang/invoke/MethodHandles$Lookup$ClassDefiner +java/lang/invoke/MethodHandles$Lookup$ClassFile +java/lang/invoke/MethodHandles$Lookup$ClassOption +java/lang/invoke/MethodType +java/lang/invoke/MethodType$ConcurrentWeakInternSet +java/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry +java/lang/invoke/MethodTypeForm +java/lang/invoke/MutableCallSite +java/lang/invoke/ResolvedMethodName +java/lang/invoke/SimpleMethodHandle +java/lang/invoke/StringConcatFactory +java/lang/invoke/StringConcatFactory$1 +java/lang/invoke/StringConcatFactory$2 +java/lang/invoke/StringConcatFactory$3 +java/lang/invoke/TypeConvertingMethodAdapter +java/lang/invoke/TypeDescriptor +java/lang/invoke/TypeDescriptor$OfField +java/lang/invoke/TypeDescriptor$OfMethod +java/lang/invoke/VarForm +java/lang/invoke/VarHandle +java/lang/invoke/VarHandle$1 +java/lang/invoke/VarHandle$AccessDescriptor +java/lang/invoke/VarHandle$AccessMode +java/lang/invoke/VarHandle$AccessType +java/lang/invoke/VarHandleGuards +java/lang/invoke/VarHandleInts$FieldInstanceReadOnly +java/lang/invoke/VarHandleInts$FieldInstanceReadWrite +java/lang/invoke/VarHandleInts$FieldStaticReadOnly +java/lang/invoke/VarHandleInts$FieldStaticReadWrite +java/lang/invoke/VarHandleLongs$FieldInstanceReadOnly +java/lang/invoke/VarHandleLongs$FieldInstanceReadWrite +java/lang/invoke/VarHandleReferences$Array +java/lang/invoke/VarHandleReferences$FieldInstanceReadOnly +java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite +java/lang/invoke/VarHandles +java/lang/invoke/VarHandles$1 +java/lang/invoke/VolatileCallSite +java/lang/module/Configuration +java/lang/module/ModuleDescriptor +java/lang/module/ModuleDescriptor$1 +java/lang/module/ModuleDescriptor$Builder +java/lang/module/ModuleDescriptor$Exports +java/lang/module/ModuleDescriptor$Modifier +java/lang/module/ModuleDescriptor$Opens +java/lang/module/ModuleDescriptor$Provides +java/lang/module/ModuleDescriptor$Requires +java/lang/module/ModuleDescriptor$Requires$Modifier +java/lang/module/ModuleDescriptor$Version +java/lang/module/ModuleFinder +java/lang/module/ModuleFinder$1 +java/lang/module/ModuleFinder$2 +java/lang/module/ModuleReader +java/lang/module/ModuleReference +java/lang/module/ResolvedModule +java/lang/module/Resolver +java/lang/ref/Cleaner +java/lang/ref/Cleaner$1 +java/lang/ref/Cleaner$Cleanable +java/lang/ref/FinalReference +java/lang/ref/Finalizer +java/lang/ref/Finalizer$FinalizerThread +java/lang/ref/PhantomReference +java/lang/ref/Reference +java/lang/ref/Reference$1 +java/lang/ref/Reference$ReferenceHandler +java/lang/ref/ReferenceQueue +java/lang/ref/ReferenceQueue$Lock +java/lang/ref/ReferenceQueue$Null +java/lang/ref/SoftReference +java/lang/ref/WeakReference +java/lang/reflect/AccessibleObject +java/lang/reflect/AnnotatedElement +java/lang/reflect/Array +java/lang/reflect/Constructor +java/lang/reflect/Executable +java/lang/reflect/Field +java/lang/reflect/GenericDeclaration +java/lang/reflect/Member +java/lang/reflect/Method +java/lang/reflect/Modifier +java/lang/reflect/Parameter +java/lang/reflect/RecordComponent +java/lang/reflect/ReflectAccess +java/lang/reflect/ReflectPermission +java/lang/reflect/Type +java/math/BigDecimal +java/math/BigInteger +java/math/RoundingMode +java/net/DefaultInterface +java/net/Inet4Address +java/net/Inet6Address +java/net/Inet6Address$Inet6AddressHolder +java/net/Inet6AddressImpl +java/net/InetAddress +java/net/InetAddress$1 +java/net/InetAddress$InetAddressHolder +java/net/InetAddress$NameService +java/net/InetAddress$PlatformNameService +java/net/InetAddressImpl +java/net/InetAddressImplFactory +java/net/InterfaceAddress +java/net/NetworkInterface +java/net/URI +java/net/URI$1 +java/net/URI$Parser +java/net/URL +java/net/URL$3 +java/net/URL$DefaultFactory +java/net/URLStreamHandler +java/net/URLStreamHandlerFactory +java/nio/Bits +java/nio/Bits$1 +java/nio/Buffer +java/nio/Buffer$1 +java/nio/ByteBuffer +java/nio/ByteOrder +java/nio/CharBuffer +java/nio/DirectByteBuffer +java/nio/DirectByteBufferR +java/nio/DirectIntBufferRU +java/nio/DirectIntBufferU +java/nio/DirectLongBufferU +java/nio/HeapByteBuffer +java/nio/HeapCharBuffer +java/nio/IntBuffer +java/nio/LongBuffer +java/nio/MappedByteBuffer +java/nio/charset/Charset +java/nio/charset/CharsetEncoder +java/nio/charset/CoderResult +java/nio/charset/CodingErrorAction +java/nio/charset/StandardCharsets +java/nio/charset/spi/CharsetProvider +java/nio/file/CopyOption +java/nio/file/FileSystem +java/nio/file/FileSystems +java/nio/file/FileSystems$DefaultFileSystemHolder +java/nio/file/FileSystems$DefaultFileSystemHolder$1 +java/nio/file/Files +java/nio/file/LinkOption +java/nio/file/OpenOption +java/nio/file/Path +java/nio/file/Paths +java/nio/file/StandardOpenOption +java/nio/file/Watchable +java/nio/file/attribute/AttributeView +java/nio/file/attribute/BasicFileAttributeView +java/nio/file/attribute/BasicFileAttributes +java/nio/file/attribute/DosFileAttributeView +java/nio/file/attribute/DosFileAttributes +java/nio/file/attribute/FileAttributeView +java/nio/file/attribute/FileTime +java/nio/file/attribute/PosixFileAttributes +java/nio/file/attribute/UserDefinedFileAttributeView +java/nio/file/spi/FileSystemProvider +java/security/AccessControlContext +java/security/AccessController +java/security/AllPermission +java/security/BasicPermission +java/security/BasicPermissionCollection +java/security/CodeSigner +java/security/CodeSource +java/security/Guard +java/security/Permission +java/security/PermissionCollection +java/security/Permissions +java/security/Principal +java/security/PrivilegedAction +java/security/PrivilegedExceptionAction +java/security/ProtectionDomain +java/security/ProtectionDomain$JavaSecurityAccessImpl +java/security/ProtectionDomain$Key +java/security/SecureClassLoader +java/security/SecureClassLoader$1 +java/security/SecureClassLoader$CodeSourceKey +java/security/SecureClassLoader$DebugHolder +java/security/Security +java/security/Security$1 +java/security/Security$2 +java/security/UnresolvedPermission +java/security/cert/Certificate +java/text/AttributedCharacterIterator$Attribute +java/text/DateFormat +java/text/DateFormat$Field +java/text/DateFormatSymbols +java/text/DecimalFormat +java/text/DecimalFormatSymbols +java/text/DigitList +java/text/DontCareFieldPosition +java/text/DontCareFieldPosition$1 +java/text/FieldPosition +java/text/Format +java/text/Format$Field +java/text/Format$FieldDelegate +java/text/NumberFormat +java/text/NumberFormat$Field +java/text/SimpleDateFormat +java/text/spi/BreakIteratorProvider +java/text/spi/CollatorProvider +java/text/spi/DateFormatProvider +java/text/spi/DateFormatSymbolsProvider +java/text/spi/DecimalFormatSymbolsProvider +java/text/spi/NumberFormatProvider +java/time/Clock +java/time/Clock$SystemClock +java/time/Duration +java/time/Instant +java/time/InstantSource +java/time/LocalDate +java/time/LocalDate$1 +java/time/LocalDateTime +java/time/LocalTime +java/time/LocalTime$1 +java/time/Period +java/time/ZoneId +java/time/ZoneOffset +java/time/ZoneRegion +java/time/chrono/AbstractChronology +java/time/chrono/ChronoLocalDate +java/time/chrono/ChronoLocalDateTime +java/time/chrono/ChronoPeriod +java/time/chrono/Chronology +java/time/chrono/IsoChronology +java/time/format/DateTimeFormatter +java/time/format/DateTimeFormatterBuilder +java/time/format/DateTimeFormatterBuilder$1 +java/time/format/DateTimeFormatterBuilder$2 +java/time/format/DateTimeFormatterBuilder$CharLiteralPrinterParser +java/time/format/DateTimeFormatterBuilder$CompositePrinterParser +java/time/format/DateTimeFormatterBuilder$DateTimePrinterParser +java/time/format/DateTimeFormatterBuilder$FractionPrinterParser +java/time/format/DateTimeFormatterBuilder$InstantPrinterParser +java/time/format/DateTimeFormatterBuilder$NumberPrinterParser +java/time/format/DateTimeFormatterBuilder$OffsetIdPrinterParser +java/time/format/DateTimeFormatterBuilder$SettingsParser +java/time/format/DateTimeFormatterBuilder$StringLiteralPrinterParser +java/time/format/DateTimeFormatterBuilder$TextPrinterParser +java/time/format/DateTimeFormatterBuilder$ZoneIdPrinterParser +java/time/format/DateTimePrintContext +java/time/format/DateTimeTextProvider +java/time/format/DateTimeTextProvider$1 +java/time/format/DateTimeTextProvider$LocaleStore +java/time/format/DecimalStyle +java/time/format/ResolverStyle +java/time/format/SignStyle +java/time/format/TextStyle +java/time/temporal/ChronoField +java/time/temporal/ChronoUnit +java/time/temporal/IsoFields +java/time/temporal/IsoFields$Field +java/time/temporal/IsoFields$Field$1 +java/time/temporal/IsoFields$Field$2 +java/time/temporal/IsoFields$Field$3 +java/time/temporal/IsoFields$Field$4 +java/time/temporal/IsoFields$Unit +java/time/temporal/JulianFields +java/time/temporal/JulianFields$Field +java/time/temporal/Temporal +java/time/temporal/TemporalAccessor +java/time/temporal/TemporalAdjuster +java/time/temporal/TemporalAmount +java/time/temporal/TemporalField +java/time/temporal/TemporalQueries +java/time/temporal/TemporalQueries$1 +java/time/temporal/TemporalQueries$2 +java/time/temporal/TemporalQueries$3 +java/time/temporal/TemporalQueries$4 +java/time/temporal/TemporalQueries$5 +java/time/temporal/TemporalQueries$6 +java/time/temporal/TemporalQueries$7 +java/time/temporal/TemporalQuery +java/time/temporal/TemporalUnit +java/time/temporal/ValueRange +java/time/zone/ZoneOffsetTransitionRule +java/time/zone/ZoneRules +java/util/AbstractCollection +java/util/AbstractList +java/util/AbstractList$RandomAccessSpliterator +java/util/AbstractMap +java/util/AbstractMap$SimpleImmutableEntry +java/util/AbstractSequentialList +java/util/AbstractSet +java/util/ArrayDeque +java/util/ArrayDeque$DeqIterator +java/util/ArrayList +java/util/ArrayList$ArrayListSpliterator +java/util/ArrayList$Itr +java/util/ArrayList$SubList +java/util/Arrays +java/util/Arrays$ArrayItr +java/util/Arrays$ArrayList +java/util/Arrays$LegacyMergeSort +java/util/Calendar +java/util/Calendar$Builder +java/util/Collection +java/util/Collections +java/util/Collections$1 +java/util/Collections$3 +java/util/Collections$EmptyEnumeration +java/util/Collections$EmptyIterator +java/util/Collections$EmptyList +java/util/Collections$EmptyMap +java/util/Collections$EmptySet +java/util/Collections$SetFromMap +java/util/Collections$SingletonMap +java/util/Collections$SingletonSet +java/util/Collections$SynchronizedCollection +java/util/Collections$SynchronizedMap +java/util/Collections$SynchronizedSet +java/util/Collections$UnmodifiableCollection +java/util/Collections$UnmodifiableCollection$1 +java/util/Collections$UnmodifiableList +java/util/Collections$UnmodifiableRandomAccessList +java/util/Collections$UnmodifiableSet +java/util/Comparator +java/util/Date +java/util/Deque +java/util/Dictionary +java/util/EnumMap +java/util/EnumMap$1 +java/util/EnumSet +java/util/Enumeration +java/util/Formattable +java/util/Formatter +java/util/Formatter$Conversion +java/util/Formatter$Flags +java/util/Formatter$FormatSpecifier +java/util/Formatter$FormatString +java/util/GregorianCalendar +java/util/HashMap +java/util/HashMap$EntryIterator +java/util/HashMap$EntrySet +java/util/HashMap$HashIterator +java/util/HashMap$HashMapSpliterator +java/util/HashMap$KeyIterator +java/util/HashMap$KeySet +java/util/HashMap$KeySpliterator +java/util/HashMap$Node +java/util/HashMap$TreeNode +java/util/HashMap$ValueIterator +java/util/HashMap$ValueSpliterator +java/util/HashMap$Values +java/util/HashSet +java/util/Hashtable +java/util/Hashtable$Entry +java/util/Hashtable$Enumerator +java/util/HexFormat +java/util/IdentityHashMap +java/util/IdentityHashMap$IdentityHashMapIterator +java/util/IdentityHashMap$KeyIterator +java/util/IdentityHashMap$KeySet +java/util/IdentityHashMap$Values +java/util/ImmutableCollections +java/util/ImmutableCollections$AbstractImmutableCollection +java/util/ImmutableCollections$AbstractImmutableList +java/util/ImmutableCollections$AbstractImmutableMap +java/util/ImmutableCollections$AbstractImmutableSet +java/util/ImmutableCollections$List12 +java/util/ImmutableCollections$ListItr +java/util/ImmutableCollections$ListN +java/util/ImmutableCollections$Map1 +java/util/ImmutableCollections$MapN +java/util/ImmutableCollections$MapN$1 +java/util/ImmutableCollections$MapN$MapNIterator +java/util/ImmutableCollections$Set12 +java/util/ImmutableCollections$Set12$1 +java/util/ImmutableCollections$SetN +java/util/ImmutableCollections$SetN$SetNIterator +java/util/Iterator +java/util/KeyValueHolder +java/util/LinkedHashMap +java/util/LinkedHashMap$Entry +java/util/LinkedHashMap$LinkedEntryIterator +java/util/LinkedHashMap$LinkedEntrySet +java/util/LinkedHashMap$LinkedHashIterator +java/util/LinkedHashSet +java/util/LinkedList +java/util/LinkedList$Node +java/util/List +java/util/ListIterator +java/util/ListResourceBundle +java/util/Locale +java/util/Locale$Builder +java/util/Locale$Cache +java/util/Locale$Category +java/util/Map +java/util/Map$Entry +java/util/NavigableMap +java/util/NavigableSet +java/util/Objects +java/util/Optional +java/util/OptionalInt +java/util/Properties +java/util/Properties$EntrySet +java/util/Properties$LineReader +java/util/Queue +java/util/Random +java/util/RandomAccess +java/util/RegularEnumSet +java/util/ResourceBundle +java/util/ResourceBundle$1 +java/util/ResourceBundle$2 +java/util/ResourceBundle$Control +java/util/ResourceBundle$Control$CandidateListCache +java/util/ResourceBundle$NoFallbackControl +java/util/ResourceBundle$ResourceBundleProviderHelper +java/util/ResourceBundle$SingleFormatControl +java/util/ServiceLoader +java/util/ServiceLoader$1 +java/util/ServiceLoader$2 +java/util/ServiceLoader$3 +java/util/ServiceLoader$LazyClassPathLookupIterator +java/util/ServiceLoader$ModuleServicesLookupIterator +java/util/ServiceLoader$Provider +java/util/ServiceLoader$ProviderImpl +java/util/Set +java/util/SortedMap +java/util/SortedSet +java/util/Spliterator +java/util/Spliterator$OfDouble +java/util/Spliterator$OfInt +java/util/Spliterator$OfLong +java/util/Spliterator$OfPrimitive +java/util/Spliterators +java/util/Spliterators$1Adapter +java/util/Spliterators$AbstractSpliterator +java/util/Spliterators$ArraySpliterator +java/util/Spliterators$EmptySpliterator +java/util/Spliterators$EmptySpliterator$OfDouble +java/util/Spliterators$EmptySpliterator$OfInt +java/util/Spliterators$EmptySpliterator$OfLong +java/util/Spliterators$EmptySpliterator$OfRef +java/util/Spliterators$IteratorSpliterator +java/util/StringJoiner +java/util/StringTokenizer +java/util/TimSort +java/util/TimeZone +java/util/TreeMap +java/util/TreeMap$Entry +java/util/TreeMap$EntryIterator +java/util/TreeMap$EntrySet +java/util/TreeMap$PrivateEntryIterator +java/util/WeakHashMap +java/util/WeakHashMap$Entry +java/util/WeakHashMap$KeySet +java/util/concurrent/AbstractExecutorService +java/util/concurrent/ConcurrentHashMap +java/util/concurrent/ConcurrentHashMap$BaseIterator +java/util/concurrent/ConcurrentHashMap$CollectionView +java/util/concurrent/ConcurrentHashMap$CounterCell +java/util/concurrent/ConcurrentHashMap$EntryIterator +java/util/concurrent/ConcurrentHashMap$EntrySetView +java/util/concurrent/ConcurrentHashMap$ForwardingNode +java/util/concurrent/ConcurrentHashMap$KeyIterator +java/util/concurrent/ConcurrentHashMap$KeySetView +java/util/concurrent/ConcurrentHashMap$MapEntry +java/util/concurrent/ConcurrentHashMap$Node +java/util/concurrent/ConcurrentHashMap$ReservationNode +java/util/concurrent/ConcurrentHashMap$Segment +java/util/concurrent/ConcurrentHashMap$Traverser +java/util/concurrent/ConcurrentHashMap$ValueIterator +java/util/concurrent/ConcurrentHashMap$ValuesView +java/util/concurrent/ConcurrentMap +java/util/concurrent/ConcurrentNavigableMap +java/util/concurrent/ConcurrentSkipListMap +java/util/concurrent/ConcurrentSkipListMap$Index +java/util/concurrent/ConcurrentSkipListMap$Node +java/util/concurrent/ConcurrentSkipListSet +java/util/concurrent/CopyOnWriteArrayList +java/util/concurrent/CopyOnWriteArrayList$COWIterator +java/util/concurrent/CountedCompleter +java/util/concurrent/Executor +java/util/concurrent/ExecutorService +java/util/concurrent/ForkJoinPool +java/util/concurrent/ForkJoinPool$1 +java/util/concurrent/ForkJoinPool$DefaultCommonPoolForkJoinWorkerThreadFactory +java/util/concurrent/ForkJoinPool$DefaultCommonPoolForkJoinWorkerThreadFactory$1 +java/util/concurrent/ForkJoinPool$DefaultForkJoinWorkerThreadFactory +java/util/concurrent/ForkJoinPool$ForkJoinWorkerThreadFactory +java/util/concurrent/ForkJoinPool$WorkQueue +java/util/concurrent/ForkJoinTask +java/util/concurrent/ForkJoinTask$Aux +java/util/concurrent/ForkJoinWorkerThread +java/util/concurrent/Future +java/util/concurrent/ThreadFactory +java/util/concurrent/ThreadLocalRandom +java/util/concurrent/TimeUnit +java/util/concurrent/atomic/AtomicInteger +java/util/concurrent/atomic/AtomicLong +java/util/concurrent/atomic/LongAdder +java/util/concurrent/atomic/Striped64 +java/util/concurrent/locks/AbstractOwnableSynchronizer +java/util/concurrent/locks/AbstractQueuedSynchronizer +java/util/concurrent/locks/Lock +java/util/concurrent/locks/LockSupport +java/util/concurrent/locks/ReentrantLock +java/util/concurrent/locks/ReentrantLock$NonfairSync +java/util/concurrent/locks/ReentrantLock$Sync +java/util/function/BiConsumer +java/util/function/BiFunction +java/util/function/BinaryOperator +java/util/function/Consumer +java/util/function/Function +java/util/function/IntConsumer +java/util/function/IntFunction +java/util/function/IntPredicate +java/util/function/Predicate +java/util/function/Supplier +java/util/jar/Attributes +java/util/jar/Attributes$Name +java/util/jar/JarEntry +java/util/jar/JarFile +java/util/jar/JarFile$JarFileEntry +java/util/jar/JarVerifier +java/util/jar/JavaUtilJarAccessImpl +java/util/jar/Manifest +java/util/jar/Manifest$FastInputStream +java/util/logging/Handler +java/util/logging/Level +java/util/logging/Level$KnownLevel +java/util/logging/LogManager +java/util/logging/LogManager$1 +java/util/logging/LogManager$2 +java/util/logging/LogManager$4 +java/util/logging/LogManager$Cleaner +java/util/logging/LogManager$LogNode +java/util/logging/LogManager$LoggerContext +java/util/logging/LogManager$LoggerContext$1 +java/util/logging/LogManager$LoggerWeakRef +java/util/logging/LogManager$LoggingProviderAccess +java/util/logging/LogManager$RootLogger +java/util/logging/LogManager$SystemLoggerContext +java/util/logging/LogManager$VisitedLoggers +java/util/logging/Logger +java/util/logging/Logger$ConfigurationData +java/util/logging/Logger$LoggerBundle +java/util/logging/Logger$SystemLoggerHelper +java/util/logging/Logger$SystemLoggerHelper$1 +java/util/logging/LoggingPermission +java/util/random/RandomGenerator +java/util/regex/ASCII +java/util/regex/CharPredicates +java/util/regex/IntHashSet +java/util/regex/MatchResult +java/util/regex/Matcher +java/util/regex/Pattern +java/util/regex/Pattern$BackRef +java/util/regex/Pattern$Begin +java/util/regex/Pattern$BitClass +java/util/regex/Pattern$BmpCharPredicate +java/util/regex/Pattern$BmpCharProperty +java/util/regex/Pattern$BmpCharPropertyGreedy +java/util/regex/Pattern$Branch +java/util/regex/Pattern$BranchConn +java/util/regex/Pattern$CharPredicate +java/util/regex/Pattern$CharProperty +java/util/regex/Pattern$CharPropertyGreedy +java/util/regex/Pattern$Curly +java/util/regex/Pattern$Dollar +java/util/regex/Pattern$First +java/util/regex/Pattern$GroupCurly +java/util/regex/Pattern$GroupHead +java/util/regex/Pattern$GroupTail +java/util/regex/Pattern$LastNode +java/util/regex/Pattern$Node +java/util/regex/Pattern$Qtype +java/util/regex/Pattern$Ques +java/util/regex/Pattern$Slice +java/util/regex/Pattern$SliceNode +java/util/regex/Pattern$Start +java/util/regex/Pattern$StartS +java/util/regex/Pattern$TreeInfo +java/util/spi/CalendarDataProvider +java/util/spi/CurrencyNameProvider +java/util/spi/LocaleNameProvider +java/util/spi/LocaleServiceProvider +java/util/spi/TimeZoneNameProvider +java/util/stream/AbstractPipeline +java/util/stream/AbstractTask +java/util/stream/BaseStream +java/util/stream/Collector +java/util/stream/Collector$Characteristics +java/util/stream/Collectors +java/util/stream/Collectors$CollectorImpl +java/util/stream/Collectors$Partition +java/util/stream/Collectors$Partition$1 +java/util/stream/DistinctOps +java/util/stream/DistinctOps$1 +java/util/stream/DistinctOps$1$2 +java/util/stream/FindOps +java/util/stream/FindOps$FindOp +java/util/stream/FindOps$FindSink +java/util/stream/FindOps$FindSink$OfInt +java/util/stream/FindOps$FindSink$OfRef +java/util/stream/ForEachOps +java/util/stream/ForEachOps$ForEachOp +java/util/stream/ForEachOps$ForEachOp$OfRef +java/util/stream/IntPipeline +java/util/stream/IntPipeline$10 +java/util/stream/IntPipeline$10$1 +java/util/stream/IntPipeline$Head +java/util/stream/IntPipeline$StatelessOp +java/util/stream/IntStream +java/util/stream/PipelineHelper +java/util/stream/ReduceOps +java/util/stream/ReduceOps$3 +java/util/stream/ReduceOps$3ReducingSink +java/util/stream/ReduceOps$AccumulatingSink +java/util/stream/ReduceOps$Box +java/util/stream/ReduceOps$ReduceOp +java/util/stream/ReduceOps$ReduceTask +java/util/stream/ReferencePipeline +java/util/stream/ReferencePipeline$2 +java/util/stream/ReferencePipeline$2$1 +java/util/stream/ReferencePipeline$3 +java/util/stream/ReferencePipeline$3$1 +java/util/stream/ReferencePipeline$7 +java/util/stream/ReferencePipeline$7$1 +java/util/stream/ReferencePipeline$Head +java/util/stream/ReferencePipeline$StatefulOp +java/util/stream/ReferencePipeline$StatelessOp +java/util/stream/Sink +java/util/stream/Sink$ChainedInt +java/util/stream/Sink$ChainedReference +java/util/stream/Sink$OfInt +java/util/stream/Stream +java/util/stream/Stream$Builder +java/util/stream/StreamOpFlag +java/util/stream/StreamOpFlag$MaskBuilder +java/util/stream/StreamOpFlag$Type +java/util/stream/StreamShape +java/util/stream/StreamSupport +java/util/stream/Streams +java/util/stream/Streams$AbstractStreamBuilderImpl +java/util/stream/Streams$StreamBuilderImpl +java/util/stream/TerminalOp +java/util/stream/TerminalSink +java/util/zip/CRC32 +java/util/zip/Checksum +java/util/zip/Checksum$1 +java/util/zip/Inflater +java/util/zip/Inflater$InflaterZStreamRef +java/util/zip/InflaterInputStream +java/util/zip/ZipCoder +java/util/zip/ZipCoder$UTF8ZipCoder +java/util/zip/ZipConstants +java/util/zip/ZipEntry +java/util/zip/ZipFile +java/util/zip/ZipFile$1 +java/util/zip/ZipFile$CleanableResource +java/util/zip/ZipFile$EntrySpliterator +java/util/zip/ZipFile$InflaterCleanupAction +java/util/zip/ZipFile$Source +java/util/zip/ZipFile$Source$End +java/util/zip/ZipFile$Source$Key +java/util/zip/ZipFile$ZipFileInflaterInputStream +java/util/zip/ZipFile$ZipFileInputStream +java/util/zip/ZipUtils +jdk/internal/access/JavaIOFileDescriptorAccess +jdk/internal/access/JavaIORandomAccessFileAccess +jdk/internal/access/JavaLangAccess +jdk/internal/access/JavaLangInvokeAccess +jdk/internal/access/JavaLangModuleAccess +jdk/internal/access/JavaLangRefAccess +jdk/internal/access/JavaLangReflectAccess +jdk/internal/access/JavaNetInetAddressAccess +jdk/internal/access/JavaNetURLAccess +jdk/internal/access/JavaNetUriAccess +jdk/internal/access/JavaNioAccess +jdk/internal/access/JavaSecurityAccess +jdk/internal/access/JavaSecurityPropertiesAccess +jdk/internal/access/JavaUtilJarAccess +jdk/internal/access/JavaUtilResourceBundleAccess +jdk/internal/access/JavaUtilZipFileAccess +jdk/internal/access/SharedSecrets +jdk/internal/invoke/NativeEntryPoint +jdk/internal/jimage/BasicImageReader +jdk/internal/jimage/BasicImageReader$1 +jdk/internal/jimage/ImageHeader +jdk/internal/jimage/ImageLocation +jdk/internal/jimage/ImageReader +jdk/internal/jimage/ImageReader$SharedImageReader +jdk/internal/jimage/ImageReaderFactory +jdk/internal/jimage/ImageReaderFactory$1 +jdk/internal/jimage/ImageStrings +jdk/internal/jimage/ImageStringsReader +jdk/internal/jimage/NativeImageBuffer +jdk/internal/jimage/NativeImageBuffer$1 +jdk/internal/jimage/decompressor/Decompressor +jdk/internal/loader/AbstractClassLoaderValue +jdk/internal/loader/AbstractClassLoaderValue$Memoizer +jdk/internal/loader/ArchivedClassLoaders +jdk/internal/loader/BootLoader +jdk/internal/loader/BuiltinClassLoader +jdk/internal/loader/BuiltinClassLoader$1 +jdk/internal/loader/BuiltinClassLoader$2 +jdk/internal/loader/BuiltinClassLoader$5 +jdk/internal/loader/BuiltinClassLoader$LoadedModule +jdk/internal/loader/ClassLoaderHelper +jdk/internal/loader/ClassLoaderValue +jdk/internal/loader/ClassLoaders +jdk/internal/loader/ClassLoaders$AppClassLoader +jdk/internal/loader/ClassLoaders$BootClassLoader +jdk/internal/loader/ClassLoaders$PlatformClassLoader +jdk/internal/loader/FileURLMapper +jdk/internal/loader/NativeLibraries +jdk/internal/loader/NativeLibraries$1 +jdk/internal/loader/NativeLibraries$LibraryPaths +jdk/internal/loader/NativeLibraries$NativeLibraryImpl +jdk/internal/loader/NativeLibrary +jdk/internal/loader/Resource +jdk/internal/loader/URLClassPath +jdk/internal/loader/URLClassPath$1 +jdk/internal/loader/URLClassPath$3 +jdk/internal/loader/URLClassPath$JarLoader +jdk/internal/loader/URLClassPath$JarLoader$1 +jdk/internal/loader/URLClassPath$JarLoader$2 +jdk/internal/loader/URLClassPath$Loader +jdk/internal/logger/BootstrapLogger +jdk/internal/logger/BootstrapLogger$BootstrapExecutors +jdk/internal/logger/BootstrapLogger$DetectBackend +jdk/internal/logger/BootstrapLogger$DetectBackend$1 +jdk/internal/logger/BootstrapLogger$LoggingBackend +jdk/internal/logger/BootstrapLogger$RedirectedLoggers +jdk/internal/logger/DefaultLoggerFinder +jdk/internal/logger/DefaultLoggerFinder$1 +jdk/internal/math/FDBigInteger +jdk/internal/math/FloatingDecimal +jdk/internal/math/FloatingDecimal$1 +jdk/internal/math/FloatingDecimal$ASCIIToBinaryConverter +jdk/internal/math/FloatingDecimal$BinaryToASCIIBuffer +jdk/internal/math/FloatingDecimal$BinaryToASCIIConverter +jdk/internal/math/FloatingDecimal$ExceptionalBinaryToASCIIBuffer +jdk/internal/math/FloatingDecimal$PreparedASCIIToBinaryBuffer +jdk/internal/misc/CDS +jdk/internal/misc/InnocuousThread +jdk/internal/misc/OSEnvironment +jdk/internal/misc/ScopedMemoryAccess +jdk/internal/misc/Signal +jdk/internal/misc/Signal$Handler +jdk/internal/misc/Signal$NativeHandler +jdk/internal/misc/TerminatingThreadLocal +jdk/internal/misc/TerminatingThreadLocal$1 +jdk/internal/misc/Unsafe +jdk/internal/misc/UnsafeConstants +jdk/internal/misc/VM +jdk/internal/misc/VM$BufferPool +jdk/internal/module/ArchivedBootLayer +jdk/internal/module/ArchivedModuleGraph +jdk/internal/module/Builder +jdk/internal/module/Checks +jdk/internal/module/DefaultRoots +jdk/internal/module/ModuleBootstrap +jdk/internal/module/ModuleBootstrap$Counters +jdk/internal/module/ModuleBootstrap$SafeModuleFinder +jdk/internal/module/ModuleHashes +jdk/internal/module/ModuleHashes$HashSupplier +jdk/internal/module/ModuleInfo$Attributes +jdk/internal/module/ModuleLoaderMap +jdk/internal/module/ModuleLoaderMap$Mapper +jdk/internal/module/ModuleLoaderMap$Modules +jdk/internal/module/ModulePatcher +jdk/internal/module/ModulePath +jdk/internal/module/ModulePath$Patterns +jdk/internal/module/ModuleReferenceImpl +jdk/internal/module/ModuleReferences +jdk/internal/module/ModuleResolution +jdk/internal/module/ModuleTarget +jdk/internal/module/Modules +jdk/internal/module/Resources +jdk/internal/module/ServicesCatalog +jdk/internal/module/ServicesCatalog$ServiceProvider +jdk/internal/module/SystemModuleFinders +jdk/internal/module/SystemModuleFinders$2 +jdk/internal/module/SystemModuleFinders$SystemImage +jdk/internal/module/SystemModuleFinders$SystemModuleFinder +jdk/internal/module/SystemModuleFinders$SystemModuleReader +jdk/internal/module/SystemModules +jdk/internal/module/SystemModules$all +jdk/internal/module/SystemModulesMap +jdk/internal/org/objectweb/asm/AnnotationVisitor +jdk/internal/org/objectweb/asm/AnnotationWriter +jdk/internal/org/objectweb/asm/Attribute +jdk/internal/org/objectweb/asm/ByteVector +jdk/internal/org/objectweb/asm/ClassReader +jdk/internal/org/objectweb/asm/ClassVisitor +jdk/internal/org/objectweb/asm/ClassWriter +jdk/internal/org/objectweb/asm/ConstantDynamic +jdk/internal/org/objectweb/asm/FieldVisitor +jdk/internal/org/objectweb/asm/FieldWriter +jdk/internal/org/objectweb/asm/Frame +jdk/internal/org/objectweb/asm/Handle +jdk/internal/org/objectweb/asm/Handler +jdk/internal/org/objectweb/asm/Label +jdk/internal/org/objectweb/asm/MethodVisitor +jdk/internal/org/objectweb/asm/MethodWriter +jdk/internal/org/objectweb/asm/Symbol +jdk/internal/org/objectweb/asm/SymbolTable +jdk/internal/org/objectweb/asm/SymbolTable$Entry +jdk/internal/org/objectweb/asm/Type +jdk/internal/perf/Perf +jdk/internal/perf/Perf$GetPerfAction +jdk/internal/perf/PerfCounter +jdk/internal/perf/PerfCounter$CoreCounters +jdk/internal/ref/Cleaner +jdk/internal/ref/CleanerFactory +jdk/internal/ref/CleanerFactory$1 +jdk/internal/ref/CleanerImpl +jdk/internal/ref/CleanerImpl$CleanerCleanable +jdk/internal/ref/CleanerImpl$PhantomCleanableRef +jdk/internal/ref/PhantomCleanable +jdk/internal/reflect/CallerSensitive +jdk/internal/reflect/ConstantPool +jdk/internal/reflect/ConstructorAccessor +jdk/internal/reflect/ConstructorAccessorImpl +jdk/internal/reflect/DelegatingClassLoader +jdk/internal/reflect/DelegatingConstructorAccessorImpl +jdk/internal/reflect/DelegatingMethodAccessorImpl +jdk/internal/reflect/FieldAccessor +jdk/internal/reflect/FieldAccessorImpl +jdk/internal/reflect/MagicAccessorImpl +jdk/internal/reflect/MethodAccessor +jdk/internal/reflect/MethodAccessorImpl +jdk/internal/reflect/NativeConstructorAccessorImpl +jdk/internal/reflect/NativeMethodAccessorImpl +jdk/internal/reflect/Reflection +jdk/internal/reflect/ReflectionFactory +jdk/internal/reflect/ReflectionFactory$GetReflectionFactoryAction +jdk/internal/reflect/UnsafeFieldAccessorImpl +jdk/internal/reflect/UnsafeStaticFieldAccessorImpl +jdk/internal/util/ArraysSupport +jdk/internal/util/Preconditions +jdk/internal/util/Preconditions$1 +jdk/internal/util/StaticProperty +jdk/internal/util/SystemProps +jdk/internal/util/SystemProps$Raw +jdk/internal/util/jar/JarIndex +jdk/internal/util/random/RandomSupport +jdk/internal/vm/vector/VectorSupport +jdk/internal/vm/vector/VectorSupport$Vector +jdk/internal/vm/vector/VectorSupport$VectorMask +jdk/internal/vm/vector/VectorSupport$VectorPayload +jdk/internal/vm/vector/VectorSupport$VectorShuffle +sun/invoke/empty/Empty +sun/invoke/util/BytecodeDescriptor +sun/invoke/util/ValueConversions +sun/invoke/util/ValueConversions$WrapperCache +sun/invoke/util/VerifyAccess +sun/invoke/util/VerifyType +sun/invoke/util/Wrapper +sun/invoke/util/Wrapper$1 +sun/invoke/util/Wrapper$Format +sun/launcher/LauncherHelper +sun/net/util/IPAddressUtil +sun/net/util/URLUtil +sun/net/www/ParseUtil +sun/net/www/protocol/file/Handler +sun/net/www/protocol/jar/Handler +sun/nio/ByteBuffered +sun/nio/ch/DirectBuffer +sun/nio/cs/HistoricallyNamedCharset +sun/nio/cs/ISO_8859_1 +sun/nio/cs/StandardCharsets +sun/nio/cs/StandardCharsets$Aliases +sun/nio/cs/StandardCharsets$Cache +sun/nio/cs/StreamEncoder +sun/nio/cs/Surrogate +sun/nio/cs/Surrogate$Parser +sun/nio/cs/US_ASCII +sun/nio/cs/US_ASCII$Encoder +sun/nio/cs/UTF_16 +sun/nio/cs/UTF_16BE +sun/nio/cs/UTF_16LE +sun/nio/cs/UTF_8 +sun/nio/cs/Unicode +sun/nio/fs/AbstractBasicFileAttributeView +sun/nio/fs/AbstractFileSystemProvider +sun/nio/fs/DefaultFileSystemProvider +sun/nio/fs/DynamicFileAttributeView +sun/nio/fs/LinuxFileSystem +sun/nio/fs/LinuxFileSystemProvider +sun/nio/fs/NativeBuffer +sun/nio/fs/NativeBuffer$Deallocator +sun/nio/fs/NativeBuffers +sun/nio/fs/NativeBuffers$1 +sun/nio/fs/UnixFileAttributeViews +sun/nio/fs/UnixFileAttributeViews$Basic +sun/nio/fs/UnixFileAttributes +sun/nio/fs/UnixFileAttributes$UnixAsBasicFileAttributes +sun/nio/fs/UnixFileStoreAttributes +sun/nio/fs/UnixFileSystem +sun/nio/fs/UnixFileSystemProvider +sun/nio/fs/UnixMountEntry +sun/nio/fs/UnixNativeDispatcher +sun/nio/fs/UnixPath +sun/nio/fs/UnixUriUtils +sun/nio/fs/Util +sun/reflect/annotation/AnnotationParser +sun/security/action/GetBooleanAction +sun/security/action/GetIntegerAction +sun/security/action/GetPropertyAction +sun/security/util/Debug +sun/security/util/FilePermCompat +sun/security/util/LazyCodeSourcePermissionCollection +sun/security/util/SecurityProperties +sun/security/util/SignatureFileVerifier +sun/text/resources/cldr/FormatData +sun/util/PreHashedMap +sun/util/calendar/AbstractCalendar +sun/util/calendar/BaseCalendar +sun/util/calendar/BaseCalendar$Date +sun/util/calendar/CalendarDate +sun/util/calendar/CalendarSystem +sun/util/calendar/CalendarSystem$GregorianHolder +sun/util/calendar/CalendarUtils +sun/util/calendar/Gregorian +sun/util/calendar/Gregorian$Date +sun/util/calendar/ZoneInfo +sun/util/calendar/ZoneInfoFile +sun/util/calendar/ZoneInfoFile$1 +sun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule +sun/util/cldr/CLDRBaseLocaleDataMetaInfo +sun/util/cldr/CLDRCalendarDataProviderImpl +sun/util/cldr/CLDRLocaleProviderAdapter +sun/util/locale/BaseLocale +sun/util/locale/BaseLocale$Cache +sun/util/locale/BaseLocale$Key +sun/util/locale/InternalLocaleBuilder +sun/util/locale/InternalLocaleBuilder$CaseInsensitiveChar +sun/util/locale/LanguageTag +sun/util/locale/LocaleObjectCache +sun/util/locale/LocaleObjectCache$CacheEntry +sun/util/locale/LocaleUtils +sun/util/locale/ParseStatus +sun/util/locale/StringTokenIterator +sun/util/locale/provider/AvailableLanguageTags +sun/util/locale/provider/CalendarDataProviderImpl +sun/util/locale/provider/CalendarDataUtility +sun/util/locale/provider/CalendarDataUtility$CalendarWeekParameterGetter +sun/util/locale/provider/CalendarProviderImpl +sun/util/locale/provider/DateFormatProviderImpl +sun/util/locale/provider/DateFormatSymbolsProviderImpl +sun/util/locale/provider/DecimalFormatSymbolsProviderImpl +sun/util/locale/provider/JRELocaleProviderAdapter +sun/util/locale/provider/LocaleDataMetaInfo +sun/util/locale/provider/LocaleProviderAdapter +sun/util/locale/provider/LocaleProviderAdapter$1 +sun/util/locale/provider/LocaleProviderAdapter$Type +sun/util/locale/provider/LocaleResources +sun/util/locale/provider/LocaleResources$ResourceReference +sun/util/locale/provider/LocaleServiceProviderPool +sun/util/locale/provider/LocaleServiceProviderPool$LocalizedObjectGetter +sun/util/locale/provider/NumberFormatProviderImpl +sun/util/locale/provider/ResourceBundleBasedAdapter +sun/util/logging/PlatformLogger$Bridge +sun/util/logging/PlatformLogger$ConfigurableBridge +sun/util/logging/internal/LoggingProviderImpl +sun/util/logging/internal/LoggingProviderImpl$LogManagerAccess +sun/util/resources/Bundles +sun/util/resources/Bundles$1 +sun/util/resources/Bundles$BundleReference +sun/util/resources/Bundles$CacheKey +sun/util/resources/Bundles$CacheKeyReference +sun/util/resources/Bundles$Strategy +sun/util/resources/LocaleData +sun/util/resources/LocaleData$1 +sun/util/resources/LocaleData$LocaleDataStrategy +sun/util/resources/cldr/CalendarData +sun/util/spi/CalendarProvider +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder delegate L6_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L L3_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LJI_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LJJ_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LJL3_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LJLIL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LJLJL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LJL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L LLJ_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DelegatingMethodHandle$Holder reinvoke_L L_V +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder getDouble LL_D +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder getInt LL_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder getLong LL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder getReference LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeInterface L3_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L3I_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L3J_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L3_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L3_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L4_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L4_V +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L5_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L6_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L7_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial L8_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLD_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLII_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLIL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLI_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLI_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJI_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJJ_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJJ_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJL3_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJLIL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJLI_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJLJL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJLJ_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJLL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJ_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LLJ_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LL_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecial LL_V +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecialIFC L3I_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeSpecialIFC LLI_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L10_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L11_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L12_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L13_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L14_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L15_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L16_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L3DL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L3D_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L3IL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L3I_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L3_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L3_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L4J_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L4_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L5_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L5_V +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L6_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L7_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L8_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L9_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LD_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LI3_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LII_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LI_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LI_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJI_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJJ_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJL3_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJLIL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJLJL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJL_J +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LJ_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LLJ_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LL_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStatic L_V +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeStaticInit LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeVirtual L3_V +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder invokeVirtual LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder newInvokeSpecial L3_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder newInvokeSpecial L4_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder newInvokeSpecial LII_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder newInvokeSpecial LI_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder newInvokeSpecial LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.DirectMethodHandle$Holder newInvokeSpecial L_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder invokeExact_MT L7_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder invokeExact_MT L8_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder invoke_MT LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod DL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod IIL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod ILL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod IL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod JJL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod JL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod L3_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod L4_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod L5_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod L6_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod LIL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder linkToTargetMethod L_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.LambdaForm$Holder identity_D LD_D +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.LambdaForm$Holder identity_I LI_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.LambdaForm$Holder identity_L LL_L +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.LambdaForm$Holder zero_D L_D +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.LambdaForm$Holder zero_I L_I +@lambda-form-invoker [LF_RESOLVE] java.lang.invoke.LambdaForm$Holder zero_L L_L +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_D +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_DL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_I +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_IL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_L +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LJ +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.BoundMethodHandle$Species_LLLLLLLLLLLLL +@lambda-form-invoker [SPECIES_RESOLVE] java.lang.invoke.SimpleMethodHandle +@lambda-proxy java/lang/module/ModuleDescriptor$Builder accept ()Ljava/util/function/Consumer; (Ljava/lang/Object;)V REF_invokeStatic jdk/internal/module/Checks requirePackageName (Ljava/lang/String;)Ljava/lang/String; (Ljava/lang/String;)V +@lambda-proxy java/lang/module/ModuleFinder$2 accept (Ljava/lang/module/ModuleFinder$2;Ljava/lang/String;)Ljava/util/function/Consumer; (Ljava/lang/Object;)V REF_invokeVirtual java/lang/module/ModuleFinder$2 lambda$find$1 (Ljava/lang/String;Ljava/lang/module/ModuleReference;)V (Ljava/lang/module/ModuleReference;)V +@lambda-proxy java/lang/module/ModuleFinder$2 accept (Ljava/lang/module/ModuleFinder$2;Ljava/util/Set;)Ljava/util/function/Consumer; (Ljava/lang/Object;)V REF_invokeVirtual java/lang/module/ModuleFinder$2 lambda$findAll$3 (Ljava/util/Set;Ljava/lang/module/ModuleReference;)V (Ljava/lang/module/ModuleReference;)V +@lambda-proxy java/lang/module/ModuleFinder$2 apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/lang/module/ModuleFinder$2 lambda$findAll$2 (Ljava/lang/module/ModuleFinder;)Ljava/util/stream/Stream; (Ljava/lang/module/ModuleFinder;)Ljava/util/stream/Stream; +@lambda-proxy java/lang/module/ModuleFinder$2 apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/Optional stream ()Ljava/util/stream/Stream; (Ljava/util/Optional;)Ljava/util/stream/Stream; +@lambda-proxy java/lang/module/ModuleFinder$2 apply (Ljava/lang/String;)Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/lang/module/ModuleFinder$2 lambda$find$0 (Ljava/lang/String;Ljava/lang/module/ModuleFinder;)Ljava/util/Optional; (Ljava/lang/module/ModuleFinder;)Ljava/util/Optional; +@lambda-proxy java/text/DecimalFormatSymbols test ()Ljava/util/function/IntPredicate; (I)Z REF_invokeStatic java/text/DecimalFormatSymbols lambda$findNonFormatChar$0 (I)Z (I)Z +@lambda-proxy java/time/format/DateTimeFormatter queryFrom ()Ljava/time/temporal/TemporalQuery; (Ljava/time/temporal/TemporalAccessor;)Ljava/lang/Object; REF_invokeStatic java/time/format/DateTimeFormatter lambda$static$0 (Ljava/time/temporal/TemporalAccessor;)Ljava/time/Period; (Ljava/time/temporal/TemporalAccessor;)Ljava/time/Period; +@lambda-proxy java/time/format/DateTimeFormatter queryFrom ()Ljava/time/temporal/TemporalQuery; (Ljava/time/temporal/TemporalAccessor;)Ljava/lang/Object; REF_invokeStatic java/time/format/DateTimeFormatter lambda$static$1 (Ljava/time/temporal/TemporalAccessor;)Ljava/lang/Boolean; (Ljava/time/temporal/TemporalAccessor;)Ljava/lang/Boolean; +@lambda-proxy java/time/format/DateTimeFormatterBuilder queryFrom ()Ljava/time/temporal/TemporalQuery; (Ljava/time/temporal/TemporalAccessor;)Ljava/lang/Object; REF_invokeStatic java/time/format/DateTimeFormatterBuilder lambda$static$0 (Ljava/time/temporal/TemporalAccessor;)Ljava/time/ZoneId; (Ljava/time/temporal/TemporalAccessor;)Ljava/time/ZoneId; +@lambda-proxy java/util/ResourceBundle$ResourceBundleProviderHelper run (Ljava/lang/reflect/Constructor;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeStatic java/util/ResourceBundle$ResourceBundleProviderHelper lambda$newResourceBundle$0 (Ljava/lang/reflect/Constructor;)Ljava/lang/Void; ()Ljava/lang/Void; +@lambda-proxy java/util/logging/Level apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/logging/Level$KnownLevel mirrored ()Ljava/util/Optional; (Ljava/util/logging/Level$KnownLevel;)Ljava/util/Optional; +@lambda-proxy java/util/logging/Level$KnownLevel apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/util/logging/Level$KnownLevel lambda$add$3 (Ljava/lang/String;)Ljava/util/List; (Ljava/lang/String;)Ljava/util/List; +@lambda-proxy java/util/logging/Level$KnownLevel apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/util/logging/Level$KnownLevel lambda$add$4 (Ljava/lang/Integer;)Ljava/util/List; (Ljava/lang/Integer;)Ljava/util/List; +@lambda-proxy java/util/logging/Level$KnownLevel apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/Optional stream ()Ljava/util/stream/Stream; (Ljava/util/Optional;)Ljava/util/stream/Stream; +@lambda-proxy java/util/regex/CharPredicates is ()Ljava/util/regex/Pattern$BmpCharPredicate; (I)Z REF_invokeStatic java/util/regex/CharPredicates lambda$ASCII_DIGIT$18 (I)Z (I)Z +@lambda-proxy java/util/regex/CharPredicates is ()Ljava/util/regex/Pattern$BmpCharPredicate; (I)Z REF_invokeStatic java/util/regex/CharPredicates lambda$ASCII_SPACE$20 (I)Z (I)Z +@lambda-proxy java/util/regex/Pattern is (I)Ljava/util/regex/Pattern$BmpCharPredicate; (I)Z REF_invokeStatic java/util/regex/Pattern lambda$Single$7 (II)Z (I)Z +@lambda-proxy java/util/regex/Pattern is (II)Ljava/util/regex/Pattern$BmpCharPredicate; (I)Z REF_invokeStatic java/util/regex/Pattern lambda$Range$10 (III)Z (I)Z +@lambda-proxy java/util/regex/Pattern$BmpCharPredicate is (Ljava/util/regex/Pattern$BmpCharPredicate;Ljava/util/regex/Pattern$CharPredicate;)Ljava/util/regex/Pattern$BmpCharPredicate; (I)Z REF_invokeInterface java/util/regex/Pattern$BmpCharPredicate lambda$union$2 (Ljava/util/regex/Pattern$CharPredicate;I)Z (I)Z +@lambda-proxy java/util/regex/Pattern$CharPredicate is (Ljava/util/regex/Pattern$CharPredicate;)Ljava/util/regex/Pattern$CharPredicate; (I)Z REF_invokeInterface java/util/regex/Pattern$CharPredicate lambda$negate$3 (I)Z (I)Z +@lambda-proxy java/util/stream/Collectors accept ()Ljava/util/function/BiConsumer; (Ljava/lang/Object;Ljava/lang/Object;)V REF_invokeInterface java/util/Set add (Ljava/lang/Object;)Z (Ljava/util/HashSet;Ljava/lang/Object;)V +@lambda-proxy java/util/stream/Collectors accept ()Ljava/util/function/BiConsumer; (Ljava/lang/Object;Ljava/lang/Object;)V REF_invokeVirtual java/util/StringJoiner add (Ljava/lang/CharSequence;)Ljava/util/StringJoiner; (Ljava/util/StringJoiner;Ljava/lang/CharSequence;)V +@lambda-proxy java/util/stream/Collectors accept (Ljava/util/function/BiConsumer;Ljava/util/function/Predicate;)Ljava/util/function/BiConsumer; (Ljava/lang/Object;Ljava/lang/Object;)V REF_invokeStatic java/util/stream/Collectors lambda$partitioningBy$62 (Ljava/util/function/BiConsumer;Ljava/util/function/Predicate;Ljava/util/stream/Collectors$Partition;Ljava/lang/Object;)V (Ljava/util/stream/Collectors$Partition;Ljava/lang/Object;)V +@lambda-proxy java/util/stream/Collectors apply ()Ljava/util/function/BinaryOperator; (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/util/stream/Collectors lambda$toSet$7 (Ljava/util/HashSet;Ljava/util/HashSet;)Ljava/util/HashSet; (Ljava/util/HashSet;Ljava/util/HashSet;)Ljava/util/HashSet; +@lambda-proxy java/util/stream/Collectors apply ()Ljava/util/function/BinaryOperator; (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/StringJoiner merge (Ljava/util/StringJoiner;)Ljava/util/StringJoiner; (Ljava/util/StringJoiner;Ljava/util/StringJoiner;)Ljava/util/StringJoiner; +@lambda-proxy java/util/stream/Collectors apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/util/stream/Collectors lambda$castingIdentity$2 (Ljava/lang/Object;)Ljava/lang/Object; (Ljava/lang/Object;)Ljava/lang/Object; +@lambda-proxy java/util/stream/Collectors apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/StringJoiner toString ()Ljava/lang/String; (Ljava/util/StringJoiner;)Ljava/lang/String; +@lambda-proxy java/util/stream/Collectors apply (Ljava/util/function/BinaryOperator;)Ljava/util/function/BinaryOperator; (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; REF_invokeStatic java/util/stream/Collectors lambda$partitioningBy$63 (Ljava/util/function/BinaryOperator;Ljava/util/stream/Collectors$Partition;Ljava/util/stream/Collectors$Partition;)Ljava/util/stream/Collectors$Partition; (Ljava/util/stream/Collectors$Partition;Ljava/util/stream/Collectors$Partition;)Ljava/util/stream/Collectors$Partition; +@lambda-proxy java/util/stream/Collectors get ()Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_newInvokeSpecial java/util/HashSet ()V ()Ljava/util/HashSet; +@lambda-proxy java/util/stream/Collectors get (Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_invokeStatic java/util/stream/Collectors lambda$joining$11 (Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/util/StringJoiner; ()Ljava/util/StringJoiner; +@lambda-proxy java/util/stream/Collectors get (Ljava/util/stream/Collector;)Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_invokeStatic java/util/stream/Collectors lambda$partitioningBy$64 (Ljava/util/stream/Collector;)Ljava/util/stream/Collectors$Partition; ()Ljava/util/stream/Collectors$Partition; +@lambda-proxy java/util/stream/FindOps$FindSink$OfInt get ()Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_newInvokeSpecial java/util/stream/FindOps$FindSink$OfInt ()V ()Ljava/util/stream/TerminalSink; +@lambda-proxy java/util/stream/FindOps$FindSink$OfInt get ()Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_newInvokeSpecial java/util/stream/FindOps$FindSink$OfInt ()V ()Ljava/util/stream/TerminalSink; +@lambda-proxy java/util/stream/FindOps$FindSink$OfInt test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeVirtual java/util/OptionalInt isPresent ()Z (Ljava/util/OptionalInt;)Z +@lambda-proxy java/util/stream/FindOps$FindSink$OfInt test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeVirtual java/util/OptionalInt isPresent ()Z (Ljava/util/OptionalInt;)Z +@lambda-proxy java/util/stream/FindOps$FindSink$OfRef get ()Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_newInvokeSpecial java/util/stream/FindOps$FindSink$OfRef ()V ()Ljava/util/stream/TerminalSink; +@lambda-proxy java/util/stream/FindOps$FindSink$OfRef get ()Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_newInvokeSpecial java/util/stream/FindOps$FindSink$OfRef ()V ()Ljava/util/stream/TerminalSink; +@lambda-proxy java/util/stream/FindOps$FindSink$OfRef test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeVirtual java/util/Optional isPresent ()Z (Ljava/util/Optional;)Z +@lambda-proxy java/util/stream/FindOps$FindSink$OfRef test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeVirtual java/util/Optional isPresent ()Z (Ljava/util/Optional;)Z +@lambda-proxy java/util/zip/ZipFile apply (Ljava/util/zip/ZipFile;)Ljava/util/function/IntFunction; (I)Ljava/lang/Object; REF_invokeVirtual java/util/zip/ZipFile lambda$jarStream$1 (I)Ljava/util/jar/JarEntry; (I)Ljava/util/jar/JarEntry; +@lambda-proxy jdk/internal/module/DefaultRoots apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/lang/module/ModuleDescriptor name ()Ljava/lang/String; (Ljava/lang/module/ModuleDescriptor;)Ljava/lang/String; +@lambda-proxy jdk/internal/module/DefaultRoots apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/lang/module/ModuleReference descriptor ()Ljava/lang/module/ModuleDescriptor; (Ljava/lang/module/ModuleReference;)Ljava/lang/module/ModuleDescriptor; +@lambda-proxy jdk/internal/module/DefaultRoots test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeStatic jdk/internal/module/DefaultRoots lambda$compute$0 (Ljava/lang/module/ModuleReference;)Z (Ljava/lang/module/ModuleReference;)Z +@lambda-proxy jdk/internal/module/DefaultRoots test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeStatic jdk/internal/module/DefaultRoots lambda$exportsAPI$2 (Ljava/lang/module/ModuleDescriptor$Exports;)Z (Ljava/lang/module/ModuleDescriptor$Exports;)Z +@lambda-proxy jdk/internal/module/DefaultRoots test (Ljava/lang/module/ModuleFinder;)Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeStatic jdk/internal/module/DefaultRoots lambda$compute$1 (Ljava/lang/module/ModuleFinder;Ljava/lang/module/ModuleDescriptor;)Z (Ljava/lang/module/ModuleDescriptor;)Z +@lambda-proxy jdk/internal/module/ModulePath apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/Optional stream ()Ljava/util/stream/Stream; (Ljava/util/Optional;)Ljava/util/stream/Stream; +@lambda-proxy jdk/internal/module/ModulePath apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/Optional stream ()Ljava/util/stream/Stream; (Ljava/util/Optional;)Ljava/util/stream/Stream; +@lambda-proxy jdk/internal/module/ModulePath apply ()Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual java/util/zip/ZipEntry getName ()Ljava/lang/String; (Ljava/util/jar/JarEntry;)Ljava/lang/String; +@lambda-proxy jdk/internal/module/ModulePath apply (Ljdk/internal/module/ModulePath;)Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual jdk/internal/module/ModulePath toPackageName (Ljava/lang/String;)Ljava/util/Optional; (Ljava/lang/String;)Ljava/util/Optional; +@lambda-proxy jdk/internal/module/ModulePath apply (Ljdk/internal/module/ModulePath;)Ljava/util/function/Function; (Ljava/lang/Object;)Ljava/lang/Object; REF_invokeVirtual jdk/internal/module/ModulePath toServiceName (Ljava/lang/String;)Ljava/util/Optional; (Ljava/lang/String;)Ljava/util/Optional; +@lambda-proxy jdk/internal/module/ModulePath test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeStatic jdk/internal/module/ModulePath lambda$deriveModuleDescriptor$2 (Ljava/util/jar/JarEntry;)Z (Ljava/util/jar/JarEntry;)Z +@lambda-proxy jdk/internal/module/ModulePath test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeStatic jdk/internal/module/ModulePath lambda$deriveModuleDescriptor$3 (Ljava/lang/String;)Z (Ljava/lang/String;)Z +@lambda-proxy jdk/internal/module/ModulePath test ()Ljava/util/function/Predicate; (Ljava/lang/Object;)Z REF_invokeStatic jdk/internal/module/ModulePath lambda$deriveModuleDescriptor$4 (Ljava/lang/String;)Z (Ljava/lang/String;)Z +@lambda-proxy jdk/internal/module/ModuleReferences generate (Ljava/util/function/Supplier;)Ljdk/internal/module/ModuleHashes$HashSupplier; (Ljava/lang/String;)[B REF_invokeStatic jdk/internal/module/ModuleReferences lambda$newJarModule$1 (Ljava/util/function/Supplier;Ljava/lang/String;)[B (Ljava/lang/String;)[B +@lambda-proxy jdk/internal/module/ModuleReferences get (Ljava/nio/file/Path;Ljava/net/URI;)Ljava/util/function/Supplier; ()Ljava/lang/Object; REF_invokeStatic jdk/internal/module/ModuleReferences lambda$newJarModule$0 (Ljava/nio/file/Path;Ljava/net/URI;)Ljava/lang/module/ModuleReader; ()Ljava/lang/module/ModuleReader; +@lambda-proxy sun/util/cldr/CLDRLocaleProviderAdapter run ()Ljava/security/PrivilegedExceptionAction; ()Ljava/lang/Object; REF_invokeStatic sun/util/cldr/CLDRLocaleProviderAdapter lambda$new$0 ()Lsun/util/locale/provider/LocaleDataMetaInfo; ()Lsun/util/locale/provider/LocaleDataMetaInfo; +@lambda-proxy sun/util/cldr/CLDRLocaleProviderAdapter run (Lsun/util/cldr/CLDRLocaleProviderAdapter;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeVirtual sun/util/cldr/CLDRLocaleProviderAdapter lambda$getCalendarDataProvider$1 ()Ljava/util/spi/CalendarDataProvider; ()Ljava/util/spi/CalendarDataProvider; +@lambda-proxy sun/util/locale/provider/JRELocaleProviderAdapter run (Lsun/util/locale/provider/JRELocaleProviderAdapter;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeVirtual sun/util/locale/provider/JRELocaleProviderAdapter lambda$getCalendarProvider$11 ()Lsun/util/spi/CalendarProvider; ()Lsun/util/spi/CalendarProvider; +@lambda-proxy sun/util/locale/provider/JRELocaleProviderAdapter run (Lsun/util/locale/provider/JRELocaleProviderAdapter;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeVirtual sun/util/locale/provider/JRELocaleProviderAdapter lambda$getDateFormatProvider$2 ()Ljava/text/spi/DateFormatProvider; ()Ljava/text/spi/DateFormatProvider; +@lambda-proxy sun/util/locale/provider/JRELocaleProviderAdapter run (Lsun/util/locale/provider/JRELocaleProviderAdapter;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeVirtual sun/util/locale/provider/JRELocaleProviderAdapter lambda$getDateFormatSymbolsProvider$3 ()Ljava/text/spi/DateFormatSymbolsProvider; ()Ljava/text/spi/DateFormatSymbolsProvider; +@lambda-proxy sun/util/locale/provider/JRELocaleProviderAdapter run (Lsun/util/locale/provider/JRELocaleProviderAdapter;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeVirtual sun/util/locale/provider/JRELocaleProviderAdapter lambda$getDecimalFormatSymbolsProvider$4 ()Ljava/text/spi/DecimalFormatSymbolsProvider; ()Ljava/text/spi/DecimalFormatSymbolsProvider; +@lambda-proxy sun/util/locale/provider/JRELocaleProviderAdapter run (Lsun/util/locale/provider/JRELocaleProviderAdapter;)Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeVirtual sun/util/locale/provider/JRELocaleProviderAdapter lambda$getNumberFormatProvider$5 ()Ljava/text/spi/NumberFormatProvider; ()Ljava/text/spi/NumberFormatProvider; diff --git a/src/FourthDimension/resources/jdk/lib/jexec b/src/FourthDimension/resources/jdk/lib/jexec new file mode 100755 index 0000000000000000000000000000000000000000..65a159a9adcc9ff3509870c9d2745d0753c6c722 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/jexec differ diff --git a/src/FourthDimension/resources/jdk/lib/jfr/default.jfc b/src/FourthDimension/resources/jdk/lib/jfr/default.jfc new file mode 100644 index 0000000000000000000000000000000000000000..9c265eba45a34793c143f25e41302629a264d51d --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/jfr/default.jfc @@ -0,0 +1,1069 @@ + + + + + + + true + everyChunk + + + + true + 1000 ms + + + + true + everyChunk + + + + true + 1000 ms + + + + true + 10 s + + + + true + 10 s + + + + true + 10 s + + + + true + 10 s + + + + true + 10 s + + + + true + true + + + + true + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + false + true + 20 ms + + + + true + true + + + + true + true + 0 ms + + + + true + true + 0 ms + + + + true + true + 0 ms + + + + true + true + + + + false + true + 0 ms + + + + false + true + + + + true + true + 0 ms + + + + true + true + 0 ms + + + + true + + + + false + + + + true + beginChunk + + + + true + beginChunk + + + + true + 20 ms + + + + true + 20 ms + + + + true + 10 ms + + + + false + 10 ms + + + + false + 10 ms + + + + false + 10 ms + + + + false + 10 ms + + + + true + 10 ms + + + + true + true + + + + true + everyChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + false + everyChunk + + + + true + everyChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + false + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + true + + + + true + true + + + + true + + + + true + 0 ms + + + + true + 0 ms + true + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + 0 ms + + + + true + + + + true + + + + false + + + + false + + + + true + + + + false + true + + + + true + + + + false + everyChunk + + + + false + + + + false + everyChunk + + + + false + + + + true + false + 0 ns + + + + true + beginChunk + + + + true + 1000 ms + + + + true + 1000 ms + + + + true + 60 s + + + + false + + + + false + + + + true + + + + true + beginChunk + + + + true + everyChunk + + + + true + 100 ms + + + + true + beginChunk + + + + true + everyChunk + + + + true + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + 30 s + + + + true + 30 s + + + + true + 30 s + + + + true + 30 s + + + + true + beginChunk + + + + true + 10 s + + + + true + 1000 ms + + + + true + 10 s + + + + true + beginChunk + + + + true + endChunk + + + + true + true + + + + true + 5 s + + + + true + beginChunk + + + + true + everyChunk + + + + false + true + + + + false + true + + + + true + 150/s + true + + + + true + everyChunk + + + + true + endChunk + + + + true + endChunk + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + true + true + 20 ms + + + + false + true + + + + true + beginChunk + + + + false + true + + + + false + true + + + + false + true + + + + false + true + + + + false + true + + + + false + true + + + + true + true + + + + true + 1000 ms + + + + true + + + + true + + + + false + 0 ns + + + + true + + + + true + + + + true + 0 ms + + + + true + true + 1 ms + + + + true + 0 ms + + + + true + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + false + + + + true + 0 ns + true + + + + true + 5 s + + + + true + 1 s + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 ms + + 20 ms + + 20 ms + + false + + + + diff --git a/src/FourthDimension/resources/jdk/lib/jfr/profile.jfc b/src/FourthDimension/resources/jdk/lib/jfr/profile.jfc new file mode 100644 index 0000000000000000000000000000000000000000..dd2708d52a9cc585132a3709cf4e7024985fe1c9 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/jfr/profile.jfc @@ -0,0 +1,1069 @@ + + + + + + + true + everyChunk + + + + true + 1000 ms + + + + true + everyChunk + + + + true + 1000 ms + + + + true + 10 s + + + + true + 10 s + + + + true + 10 s + + + + true + 10 s + + + + true + 10 s + + + + true + true + + + + true + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + + + + true + true + 0 ms + + + + true + true + 0 ms + + + + true + true + 0 ms + + + + true + true + + + + false + true + 0 ms + + + + false + true + + + + true + true + 0 ms + + + + true + true + 0 ms + + + + true + + + + false + + + + true + beginChunk + + + + true + beginChunk + + + + true + 10 ms + + + + true + 20 ms + + + + true + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + true + 0 ms + + + + true + true + + + + true + 60 s + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + false + everyChunk + + + + true + everyChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + false + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + true + + + + true + true + + + + true + + + + true + 0 ms + + + + true + 0 ms + true + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + 0 ms + + + + true + + + + true + + + + true + + + + true + + + + true + + + + false + true + + + + true + + + + false + everyChunk + + + + false + + + + false + everyChunk + + + + false + + + + true + true + 0 ns + + + + true + beginChunk + + + + true + 1000 ms + + + + true + 100 ms + + + + true + 10 s + + + + true + + + + false + + + + true + + + + true + beginChunk + + + + true + everyChunk + + + + true + 100 ms + + + + true + beginChunk + + + + true + everyChunk + + + + true + + + + true + beginChunk + + + + true + beginChunk + + + + true + beginChunk + + + + true + 30 s + + + + true + 30 s + + + + true + 30 s + + + + true + 30 s + + + + true + beginChunk + + + + true + 10 s + + + + true + 1000 ms + + + + true + 10 s + + + + true + beginChunk + + + + true + endChunk + + + + true + true + + + + true + 5 s + + + + true + beginChunk + + + + true + everyChunk + + + + false + true + + + + false + true + + + + true + 300/s + true + + + + true + everyChunk + + + + true + endChunk + + + + true + endChunk + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + true + true + 10 ms + + + + false + true + + + + true + beginChunk + + + + false + true + + + + false + true + + + + false + true + + + + false + true + + + + false + true + + + + false + true + + + + true + true + + + + true + 1000 ms + + + + true + + + + true + + + + false + 0 ns + + + + true + + + + true + + + + true + 0 ms + + + + true + true + 1 ms + + + + true + 0 ms + + + + true + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + false + 0 ms + + + + true + 0 ms + + + + true + 0 ms + + + + true + true + + + + true + 0 ns + true + + + + true + 5 s + + + + true + 100 ms + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 ms + + 10 ms + + 10 ms + + false + + + + diff --git a/src/FourthDimension/resources/jdk/lib/jrt-fs.jar b/src/FourthDimension/resources/jdk/lib/jrt-fs.jar new file mode 100644 index 0000000000000000000000000000000000000000..4a278672b1b696a5b5d4eed5aef67af49ce54559 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/jrt-fs.jar differ diff --git a/src/FourthDimension/resources/jdk/lib/jspawnhelper b/src/FourthDimension/resources/jdk/lib/jspawnhelper new file mode 100755 index 0000000000000000000000000000000000000000..327de796c32f39c71d541a6a13b34d10dbaa5ad4 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/jspawnhelper differ diff --git a/src/FourthDimension/resources/jdk/lib/jvm.cfg b/src/FourthDimension/resources/jdk/lib/jvm.cfg new file mode 100644 index 0000000000000000000000000000000000000000..97225c8fead9610efc47615e847cc20c2b3b8c19 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/jvm.cfg @@ -0,0 +1,2 @@ +-server KNOWN +-client IGNORE diff --git a/src/FourthDimension/resources/jdk/lib/libawt.so b/src/FourthDimension/resources/jdk/lib/libawt.so new file mode 100644 index 0000000000000000000000000000000000000000..3c373eb1675c6aa91b1b3f4128a8c4ecb71c339f Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libawt.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libawt_headless.so b/src/FourthDimension/resources/jdk/lib/libawt_headless.so new file mode 100644 index 0000000000000000000000000000000000000000..ba78dc7567fcabf6bfce7d3fbd1daa81e72724a6 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libawt_headless.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libawt_xawt.so b/src/FourthDimension/resources/jdk/lib/libawt_xawt.so new file mode 100644 index 0000000000000000000000000000000000000000..2b1d6f939efce2b073afc7980619e34784f11b59 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libawt_xawt.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libdt_socket.so b/src/FourthDimension/resources/jdk/lib/libdt_socket.so new file mode 100644 index 0000000000000000000000000000000000000000..1b5e6de7f0e9cded88107eae89ddb8661b853b7a Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libdt_socket.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libextnet.so b/src/FourthDimension/resources/jdk/lib/libextnet.so new file mode 100644 index 0000000000000000000000000000000000000000..e1c8e5f3a73c1364c861c9017275a6729de9ce79 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libextnet.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libfontmanager.so b/src/FourthDimension/resources/jdk/lib/libfontmanager.so new file mode 100644 index 0000000000000000000000000000000000000000..6d62924d677751e977ffe035226e77734438641e Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libfontmanager.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libinstrument.so b/src/FourthDimension/resources/jdk/lib/libinstrument.so new file mode 100644 index 0000000000000000000000000000000000000000..e14987b030d6250dc6fd404cbf0fea768af09026 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libinstrument.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libj2gss.so b/src/FourthDimension/resources/jdk/lib/libj2gss.so new file mode 100644 index 0000000000000000000000000000000000000000..deb34e776d11666e03b89128f3fd3959c89b9a93 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libj2gss.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libj2pcsc.so b/src/FourthDimension/resources/jdk/lib/libj2pcsc.so new file mode 100644 index 0000000000000000000000000000000000000000..150ed54e1a7782f239dd8db427c2bd4690667d7b Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libj2pcsc.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libj2pkcs11.so b/src/FourthDimension/resources/jdk/lib/libj2pkcs11.so new file mode 100644 index 0000000000000000000000000000000000000000..b4edd32b32ccb6090049fe0fc31c24ddb7bfda38 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libj2pkcs11.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjaas.so b/src/FourthDimension/resources/jdk/lib/libjaas.so new file mode 100644 index 0000000000000000000000000000000000000000..9ea39d43c4022561107947908bda8270e524b162 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjaas.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjava.so b/src/FourthDimension/resources/jdk/lib/libjava.so new file mode 100644 index 0000000000000000000000000000000000000000..b57959b3c73087fe099e1889318d9f9fd6b5ceae Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjava.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjavajpeg.so b/src/FourthDimension/resources/jdk/lib/libjavajpeg.so new file mode 100644 index 0000000000000000000000000000000000000000..598af47f924bb083b021d528eb2891defd71e5ef Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjavajpeg.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjawt.so b/src/FourthDimension/resources/jdk/lib/libjawt.so new file mode 100644 index 0000000000000000000000000000000000000000..6a2806a28e1441bb65512e7f6949b85572bec36e Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjawt.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjdwp.so b/src/FourthDimension/resources/jdk/lib/libjdwp.so new file mode 100644 index 0000000000000000000000000000000000000000..1d9c59e5ff10461ed344e1a34f8554475a74c1b0 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjdwp.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjimage.so b/src/FourthDimension/resources/jdk/lib/libjimage.so new file mode 100644 index 0000000000000000000000000000000000000000..98414ef3f7afc178ee94af37d4df529d9c48a56e Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjimage.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjli.so b/src/FourthDimension/resources/jdk/lib/libjli.so new file mode 100644 index 0000000000000000000000000000000000000000..4a9c0fd721af2f1d918bde8aee497bc6cda4c4e8 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjli.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjsig.so b/src/FourthDimension/resources/jdk/lib/libjsig.so new file mode 100644 index 0000000000000000000000000000000000000000..8e40f8c43ae93a0b2a96d476d40dd047b9cadd49 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjsig.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjsound.so b/src/FourthDimension/resources/jdk/lib/libjsound.so new file mode 100644 index 0000000000000000000000000000000000000000..f3ac9ac5a5732b3f3da854146623a03e9de0a147 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjsound.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libjsvml.so b/src/FourthDimension/resources/jdk/lib/libjsvml.so new file mode 100644 index 0000000000000000000000000000000000000000..d494ea473b369292e4c5b2a8dd8bf75973f55e77 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libjsvml.so differ diff --git a/src/FourthDimension/resources/jdk/lib/liblcms.so b/src/FourthDimension/resources/jdk/lib/liblcms.so new file mode 100644 index 0000000000000000000000000000000000000000..9a5f0c758b4827d2d644231e08933cd0c13b0e0a Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/liblcms.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libmanagement.so b/src/FourthDimension/resources/jdk/lib/libmanagement.so new file mode 100644 index 0000000000000000000000000000000000000000..bad26a0d92e0ba26050cd4d4fbd90f435c1fedbf Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libmanagement.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libmanagement_agent.so b/src/FourthDimension/resources/jdk/lib/libmanagement_agent.so new file mode 100644 index 0000000000000000000000000000000000000000..b85276d8bcb32d305042a2c796dc32c6f1a0c66b Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libmanagement_agent.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libmanagement_ext.so b/src/FourthDimension/resources/jdk/lib/libmanagement_ext.so new file mode 100644 index 0000000000000000000000000000000000000000..c730e98f7f968d74901688a96ca5af4b63c3a88d Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libmanagement_ext.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libmlib_image.so b/src/FourthDimension/resources/jdk/lib/libmlib_image.so new file mode 100644 index 0000000000000000000000000000000000000000..05bd000d40baa42b4d5dbb0eba03f51d640f11eb Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libmlib_image.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libnet.so b/src/FourthDimension/resources/jdk/lib/libnet.so new file mode 100644 index 0000000000000000000000000000000000000000..d267e51b5013415a9f8efc5dfdb671c00a7e8b07 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libnet.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libnio.so b/src/FourthDimension/resources/jdk/lib/libnio.so new file mode 100644 index 0000000000000000000000000000000000000000..a6432b25fe43d59cd797341deae5f86fd9b0deba Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libnio.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libprefs.so b/src/FourthDimension/resources/jdk/lib/libprefs.so new file mode 100644 index 0000000000000000000000000000000000000000..978654f108b505704670ce967a0814f8e9ab3f1e Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libprefs.so differ diff --git a/src/FourthDimension/resources/jdk/lib/librmi.so b/src/FourthDimension/resources/jdk/lib/librmi.so new file mode 100644 index 0000000000000000000000000000000000000000..26a33e73165c57ee2c854db06033a82490f3c33b Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/librmi.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libsctp.so b/src/FourthDimension/resources/jdk/lib/libsctp.so new file mode 100644 index 0000000000000000000000000000000000000000..5b3621af5a5c660cccc691fafbe4250ca75c19b0 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libsctp.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libsplashscreen.so b/src/FourthDimension/resources/jdk/lib/libsplashscreen.so new file mode 100644 index 0000000000000000000000000000000000000000..be04b2f224c13739cf8fb11336cacf6dca9178d9 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libsplashscreen.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libsyslookup.so b/src/FourthDimension/resources/jdk/lib/libsyslookup.so new file mode 100644 index 0000000000000000000000000000000000000000..85510fe24ba0ee1be64645aa046bc3cfd741d45e Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libsyslookup.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libverify.so b/src/FourthDimension/resources/jdk/lib/libverify.so new file mode 100644 index 0000000000000000000000000000000000000000..564ad6ba24139f369c89d6faaf7ead23eb38f29a Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libverify.so differ diff --git a/src/FourthDimension/resources/jdk/lib/libzip.so b/src/FourthDimension/resources/jdk/lib/libzip.so new file mode 100644 index 0000000000000000000000000000000000000000..ec934d6e4b14e546cbb3cc9f700b3e98f9ee2553 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/libzip.so differ diff --git a/src/FourthDimension/resources/jdk/lib/modules b/src/FourthDimension/resources/jdk/lib/modules new file mode 100644 index 0000000000000000000000000000000000000000..e9129261aafc6f14d2e5df634d9755bd2eac98fa Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/modules differ diff --git a/src/FourthDimension/resources/jdk/lib/psfont.properties.ja b/src/FourthDimension/resources/jdk/lib/psfont.properties.ja new file mode 100644 index 0000000000000000000000000000000000000000..d17cf40d19618db82fec55e4c80fc9713d9fd7a1 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/psfont.properties.ja @@ -0,0 +1,119 @@ +# +# +# Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Japanese PostScript printer property file +# +font.num=16 +# +serif=serif +timesroman=serif +sansserif=sansserif +helvetica=sansserif +monospaced=monospaced +courier=monospaced +dialog=sansserif +dialoginput=monospaced +# +serif.latin1.plain=Times-Roman +serif.latin1.italic=Times-Italic +serif.latin1.bolditalic=Times-BoldItalic +serif.latin1.bold=Times-Bold +# +sansserif.latin1.plain=Helvetica +sansserif.latin1.italic=Helvetica-Oblique +sansserif.latin1.bolditalic=Helvetica-BoldOblique +sansserif.latin1.bold=Helvetica-Bold +# +monospaced.latin1.plain=Courier +monospaced.latin1.italic=Courier-Oblique +monospaced.latin1.bolditalic=Courier-BoldOblique +monospaced.latin1.bold=Courier-Bold +# +serif.x11jis0208.plain=Ryumin-Light-H +serif.x11jis0208.italic=Ryumin-Light-H +serif.x11jis0208.bolditalic=Ryumin-Light-H +serif.x11jis0208.bold=Ryumin-Light-H +# +sansserif.x11jis0208.plain=GothicBBB-Medium-H +sansserif.x11jis0208.italic=GothicBBB-Medium-H +sansserif.x11jis0208.bolditalic=GothicBBB-Medium-H +sansserif.x11jis0208.bold=GothicBBB-Medium-H +# +monospaced.x11jis0208.plain=GothicBBB-Medium-H +monospaced.x11jis0208.italic=GothicBBB-Medium-H +monospaced.x11jis0208.bolditalic=GothicBBB-Medium-H +monospaced.x11jis0208.bold=GothicBBB-Medium-H +# +serif.x11jis0201.plain=Ryumin-Light.Hankaku +serif.x11jis0201.italic=Ryumin-Light.Hankaku +serif.x11jis0201.bolditalic=Ryumin-Light.Hankaku +serif.x11jis0201.bold=Ryumin-Light.Hankaku +# +sansserif.x11jis0201.plain=GothicBBB-Medium.Hankaku +sansserif.x11jis0201.italic=GothicBBB-Medium.Hankaku +sansserif.x11jis0201.bolditalic=GothicBBB-Medium.Hankaku +sansserif.x11jis0201.bold=GothicBBB-Medium.Hankaku +# +monospaced.x11jis0201.plain=GothicBBB-Medium.Hankaku +monospaced.x11jis0201.italic=GothicBBB-Medium.Hankaku +monospaced.x11jis0201.bolditalic=GothicBBB-Medium.Hankaku +monospaced.x11jis0201.bold=GothicBBB-Medium.Hankaku +# +Helvetica=0 +Helvetica-Bold=1 +Helvetica-Oblique=2 +Helvetica-BoldOblique=3 +Times-Roman=4 +Times-Bold=5 +Times-Italic=6 +Times-BoldItalic=7 +Courier=8 +Courier-Bold=9 +Courier-Oblique=10 +Courier-BoldOblique=11 +GothicBBB-Medium-H=12 +Ryumin-Light-H=13 +GothicBBB-Medium.Hankaku=14 +Ryumin-Light.Hankaku=15 +# +font.0=Helvetica ISOF +font.1=Helvetica-Bold ISOF +font.2=Helvetica-Oblique ISOF +font.3=Helvetica-BoldOblique ISOF +font.4=Times-Roman ISOF +font.5=Times-Bold ISOF +font.6=Times-Italic ISOF +font.7=Times-BoldItalic ISOF +font.8=Courier ISOF +font.9=Courier-Bold ISOF +font.10=Courier-Oblique ISOF +font.11=Courier-BoldOblique ISOF +font.12=GothicBBB-Medium-H findfont +font.13=Ryumin-Light-H findfont +font.14=GothicBBB-Medium.Hankaku findfont +font.15=Ryumin-Light.Hankaku findfont +# diff --git a/src/FourthDimension/resources/jdk/lib/psfontj2d.properties b/src/FourthDimension/resources/jdk/lib/psfontj2d.properties new file mode 100644 index 0000000000000000000000000000000000000000..5eb2c4b8ba2c55a0dcdc54cc53ce5b3ff7eb17d7 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/psfontj2d.properties @@ -0,0 +1,323 @@ +# +# +# Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. + +# +# PostScript printer property file for Java 2D printing. +# +# WARNING: This is an internal implementation file, not a public file. +# Any customisation or reliance on the existence of this file and its +# contents or syntax is discouraged and unsupported. +# It may be incompatibly changed or removed without any notice. +# +# +font.num=35 +# +# Legacy logical font family names and logical font aliases should all +# map to the primary logical font names. +# +serif=serif +times=serif +timesroman=serif +sansserif=sansserif +helvetica=sansserif +dialog=sansserif +dialoginput=monospaced +monospaced=monospaced +courier=monospaced +# +# Next, physical fonts which can be safely mapped to standard postscript fonts +# These keys generally map to a value which is the same as the key, so +# the key/value is just a way to say the font has a mapping. +# Sometimes however we map more than one screen font to the same PS font. +# +avantgarde=avantgarde_book +avantgarde_book=avantgarde_book +avantgarde_demi=avantgarde_demi +avantgarde_book_oblique=avantgarde_book_oblique +avantgarde_demi_oblique=avantgarde_demi_oblique +# +itcavantgarde=avantgarde_book +itcavantgarde=avantgarde_book +itcavantgarde_demi=avantgarde_demi +itcavantgarde_oblique=avantgarde_book_oblique +itcavantgarde_demi_oblique=avantgarde_demi_oblique +# +bookman=bookman_light +bookman_light=bookman_light +bookman_demi=bookman_demi +bookman_light_italic=bookman_light_italic +bookman_demi_italic=bookman_demi_italic +# +# Exclude "helvetica" on its own as that's a legacy name for a logical font +helvetica_bold=helvetica_bold +helvetica_oblique=helvetica_oblique +helvetica_bold_oblique=helvetica_bold_oblique +# +itcbookman_light=bookman_light +itcbookman_demi=bookman_demi +itcbookman_light_italic=bookman_light_italic +itcbookman_demi_italic=bookman_demi_italic +# +# Exclude "courier" on its own as that's a legacy name for a logical font +courier_bold=courier_bold +courier_oblique=courier_oblique +courier_bold_oblique=courier_bold_oblique +# +courier_new=courier +courier_new_bold=courier_bold +# +monotype_century_schoolbook=newcenturyschoolbook +monotype_century_schoolbook_bold=newcenturyschoolbook_bold +monotype_century_schoolbook_italic=newcenturyschoolbook_italic +monotype_century_schoolbook_bold_italic=newcenturyschoolbook_bold_italic +# +newcenturyschoolbook=newcenturyschoolbook +newcenturyschoolbook_bold=newcenturyschoolbook_bold +newcenturyschoolbook_italic=newcenturyschoolbook_italic +newcenturyschoolbook_bold_italic=newcenturyschoolbook_bold_italic +# +palatino=palatino +palatino_bold=palatino_bold +palatino_italic=palatino_italic +palatino_bold_italic=palatino_bold_italic +# +# Exclude "times" on its own as that's a legacy name for a logical font +times_bold=times_roman_bold +times_italic=times_roman_italic +times_bold_italic=times_roman_bold_italic +# +times_roman=times_roman +times_roman_bold=times_roman_bold +times_roman_italic=times_roman_italic +times_roman_bold_italic=times_roman_bold_italic +# +times_new_roman=times_roman +times_new_roman_bold=times_roman_bold +times_new_roman_italic=times_roman_italic +times_new_roman_bold_italic=times_roman_bold_italic +# +zapfchancery_italic=zapfchancery_italic +itczapfchancery_italic=zapfchancery_italic +# +# Next the mapping of the font name + charset + style to Postscript font name +# for the logical fonts. +# +serif.latin1.plain=Times-Roman +serif.latin1.bold=Times-Bold +serif.latin1.italic=Times-Italic +serif.latin1.bolditalic=Times-BoldItalic +serif.symbol.plain=Symbol +serif.dingbats.plain=ZapfDingbats +serif.symbol.bold=Symbol +serif.dingbats.bold=ZapfDingbats +serif.symbol.italic=Symbol +serif.dingbats.italic=ZapfDingbats +serif.symbol.bolditalic=Symbol +serif.dingbats.bolditalic=ZapfDingbats +# +sansserif.latin1.plain=Helvetica +sansserif.latin1.bold=Helvetica-Bold +sansserif.latin1.italic=Helvetica-Oblique +sansserif.latin1.bolditalic=Helvetica-BoldOblique +sansserif.symbol.plain=Symbol +sansserif.dingbats.plain=ZapfDingbats +sansserif.symbol.bold=Symbol +sansserif.dingbats.bold=ZapfDingbats +sansserif.symbol.italic=Symbol +sansserif.dingbats.italic=ZapfDingbats +sansserif.symbol.bolditalic=Symbol +sansserif.dingbats.bolditalic=ZapfDingbats +# +monospaced.latin1.plain=Courier +monospaced.latin1.bold=Courier-Bold +monospaced.latin1.italic=Courier-Oblique +monospaced.latin1.bolditalic=Courier-BoldOblique +monospaced.symbol.plain=Symbol +monospaced.dingbats.plain=ZapfDingbats +monospaced.symbol.bold=Symbol +monospaced.dingbats.bold=ZapfDingbats +monospaced.symbol.italic=Symbol +monospaced.dingbats.italic=ZapfDingbats +monospaced.symbol.bolditalic=Symbol +monospaced.dingbats.bolditalic=ZapfDingbats +# +# Next the mapping of the font name + charset + style to Postscript font name +# for the physical fonts. Since these always report style as plain, the +# style key is always plain. So we map using the face name to the correct +# style for the postscript font. This is possible since the face names can +# be replied upon to be different for each style. +# However an application may try to create a Font applying a style to an +# physical name. We want to map to the correct Postscript font there too +# if possible but we do not map cases where the application tries to +# augment a style (eg ask for a bold version of a bold font) +# Defer to the 2D package to attempt create an artificially styled version +# +avantgarde_book.latin1.plain=AvantGarde-Book +avantgarde_demi.latin1.plain=AvantGarde-Demi +avantgarde_book_oblique.latin1.plain=AvantGarde-BookOblique +avantgarde_demi_oblique.latin1.plain=AvantGarde-DemiOblique +# +avantgarde_book.latin1.bold=AvantGarde-Demi +avantgarde_book.latin1.italic=AvantGarde-BookOblique +avantgarde_book.latin1.bolditalic=AvantGarde-DemiOblique +avantgarde_demi.latin1.italic=AvantGarde-DemiOblique +avantgarde_book_oblique.latin1.bold=AvantGarde-DemiOblique +# +bookman_light.latin1.plain=Bookman-Light +bookman_demi.latin1.plain=Bookman-Demi +bookman_light_italic.latin1.plain=Bookman-LightItalic +bookman_demi_italic.latin1.plain=Bookman-DemiItalic +# +bookman_light.latin1.bold=Bookman-Demi +bookman_light.latin1.italic=Bookman-LightItalic +bookman_light.latin1.bolditalic=Bookman-DemiItalic +bookman_light_bold.latin1.italic=Bookman-DemiItalic +bookman_light_italic.latin1.bold=Bookman-DemiItalic +# +courier.latin1.plain=Courier +courier_bold.latin1.plain=Courier-Bold +courier_oblique.latin1.plain=Courier-Oblique +courier_bold_oblique.latin1.plain=Courier-BoldOblique +courier.latin1.bold=Courier-Bold +courier.latin1.italic=Courier-Oblique +courier.latin1.bolditalic=Courier-BoldOblique +courier_bold.latin1.italic=Courier-BoldOblique +courier_italic.latin1.bold=Courier-BoldOblique +# +helvetica_bold.latin1.plain=Helvetica-Bold +helvetica_oblique.latin1.plain=Helvetica-Oblique +helvetica_bold_oblique.latin1.plain=Helvetica-BoldOblique +helvetica.latin1.bold=Helvetica-Bold +helvetica.latin1.italic=Helvetica-Oblique +helvetica.latin1.bolditalic=Helvetica-BoldOblique +helvetica_bold.latin1.italic=Helvetica-BoldOblique +helvetica_italic.latin1.bold=Helvetica-BoldOblique +# +newcenturyschoolbook.latin1.plain=NewCenturySchlbk-Roman +newcenturyschoolbook_bold.latin1.plain=NewCenturySchlbk-Bold +newcenturyschoolbook_italic.latin1.plain=NewCenturySchlbk-Italic +newcenturyschoolbook_bold_italic.latin1.plain=NewCenturySchlbk-BoldItalic +newcenturyschoolbook.latin1.bold=NewCenturySchlbk-Bold +newcenturyschoolbook.latin1.italic=NewCenturySchlbk-Italic +newcenturyschoolbook.latin1.bolditalic=NewCenturySchlbk-BoldItalic +newcenturyschoolbook_bold.latin1.italic=NewCenturySchlbk-BoldItalic +newcenturyschoolbook_italic.latin1.bold=NewCenturySchlbk-BoldItalic +# +palatino.latin1.plain=Palatino-Roman +palatino_bold.latin1.plain=Palatino-Bold +palatino_italic.latin1.plain=Palatino-Italic +palatino_bold_italic.latin1.plain=Palatino-BoldItalic +palatino.latin1.bold=Palatino-Bold +palatino.latin1.italic=Palatino-Italic +palatino.latin1.bolditalic=Palatino-BoldItalic +palatino_bold.latin1.italic=Palatino-BoldItalic +palatino_italic.latin1.bold=Palatino-BoldItalic +# +times_roman.latin1.plain=Times-Roman +times_roman_bold.latin1.plain=Times-Bold +times_roman_italic.latin1.plain=Times-Italic +times_roman_bold_italic.latin1.plain=Times-BoldItalic +times_roman.latin1.bold=Times-Bold +times_roman.latin1.italic=Times-Italic +times_roman.latin1.bolditalic=Times-BoldItalic +times_roman_bold.latin1.italic=Times-BoldItalic +times_roman_italic.latin1.bold=Times-BoldItalic +# +zapfchancery_italic.latin1.plain=ZapfChancery-MediumItalic +# +# Finally the mappings of PS font names to indexes. +# +AvantGarde-Book=0 +AvantGarde-BookOblique=1 +AvantGarde-Demi=2 +AvantGarde-DemiOblique=3 +Bookman-Demi=4 +Bookman-DemiItalic=5 +Bookman-Light=6 +Bookman-LightItalic=7 +Courier=8 +Courier-Bold=9 +Courier-BoldOblique=10 +Courier-Oblique=11 +Helvetica=12 +Helvetica-Bold=13 +Helvetica-BoldOblique=14 +Helvetica-Narrow=15 +Helvetica-Narrow-Bold=16 +Helvetica-Narrow-BoldOblique=17 +Helvetica-Narrow-Oblique=18 +Helvetica-Oblique=19 +NewCenturySchlbk-Bold=20 +NewCenturySchlbk-BoldItalic=21 +NewCenturySchlbk-Italic=22 +NewCenturySchlbk-Roman=23 +Palatino-Bold=24 +Palatino-BoldItalic=25 +Palatino-Italic=26 +Palatino-Roman=27 +Symbol=28 +Times-Bold=29 +Times-BoldItalic=30 +Times-Italic=31 +Times-Roman=32 +ZapfDingbats=33 +ZapfChancery-MediumItalic=34 +# +font.0=AvantGarde-Book ISOF +font.1=AvantGarde-BookOblique ISOF +font.2=AvantGarde-Demi ISOF +font.3=AvantGarde-DemiOblique ISOF +font.4=Bookman-Demi ISOF +font.5=Bookman-DemiItalic ISOF +font.6=Bookman-Light ISOF +font.7=Bookman-LightItalic ISOF +font.8=Courier ISOF +font.9=Courier-Bold ISOF +font.10=Courier-BoldOblique ISOF +font.11=Courier-Oblique ISOF +font.12=Helvetica ISOF +font.13=Helvetica-Bold ISOF +font.14=Helvetica-BoldOblique ISOF +font.15=Helvetica-Narrow ISOF +font.16=Helvetica-Narrow-Bold ISOF +font.17=Helvetica-Narrow-BoldOblique ISOF +font.18=Helvetica-Narrow-Oblique ISOF +font.19=Helvetica-Oblique ISOF +font.20=NewCenturySchlbk-Bold ISOF +font.21=NewCenturySchlbk-BoldItalic ISOF +font.22=NewCenturySchlbk-Italic ISOF +font.23=NewCenturySchlbk-Roman ISOF +font.24=Palatino-Bold ISOF +font.25=Palatino-BoldItalic ISOF +font.26=Palatino-Italic ISOF +font.27=Palatino-Roman ISOF +font.28=Symbol findfont +font.29=Times-Bold ISOF +font.30=Times-BoldItalic ISOF +font.31=Times-Italic ISOF +font.32=Times-Roman ISOF +font.33=ZapfDingbats findfont +font.34=ZapfChancery-MediumItalic ISOF +# diff --git a/src/FourthDimension/resources/jdk/lib/security/blocked.certs b/src/FourthDimension/resources/jdk/lib/security/blocked.certs new file mode 100644 index 0000000000000000000000000000000000000000..beded9ed548281d1d969681e07a87908348c9e08 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/security/blocked.certs @@ -0,0 +1,39 @@ +Algorithm=SHA-256 +03DB9E5E79FE6117177F81C11595AF598CB176AF766290DBCEB2C318B32E39A2 +08C396C006A21055D00826A5781A5CCFCE2C8D053AB3C197637A4A7A5BB9A650 +14E6D2764A4B06701C6CBC376A253775F79C782FBCB6C0EE6F99DE4BA1024ADD +1C5E6985ACC09221DBD1A4B7BBC6D3A8C3F8540D19F20763A9537FDD42B4FFE7 +1F6BF8A3F2399AF7FD04516C2719C566CBAD51F412738F66D0457E1E6BDE6F2D +2A464E4113141352C7962FBD1706ED4B88533EF24D7BBA6CCC5D797FD202F1C4 +31C8FD37DB9B56E708B03D1F01848B068C6DA66F36FB5D82C008C6040FA3E133 +3946901F46B0071E90D78279E82FABABCA177231A704BE72C5B0E8918566EA66 +3E11CF90719F6FB44D94EAC9A156B89BEBE7B8598F28EC58913F2BFCAF91D0C0 +423279423B9FC8CB06F1BB7C3B247522B948D5F18939F378ECC901126DE40BFB +450F1B421BB05C8609854884559C323319619E8B06B001EA2DCBB74A23AA3BE2 +4CBBF8256BC9888A8007B2F386940A2E394378B0D903CBB3863C5A6394B889CE +4FEE0163686ECBD65DB968E7494F55D84B25486D438E9DE558D629D28CD4D176 +535D04DFCE027C70BD5F8A9E0AD4F218E9AFDCF5BBCF9B6DE0D81E148E2E3172 +568FAF38D9F155F624838E2181B1CEB4D8459305EE652B0F810C97C3611BFE19 +585CFE6B7436CBD4E732763A2137D7F49599BA9B1790E688FCEC799C58EB84A6 +5E83124D68D24E8E177E306DF643D5EA99C5A94D6FC34B072F7544A1CABB7C7B +71CB00749B9130FB2707A2664BFF958D0FCC8E161D9674C7450BA0FC2BEAF9D3 +76A45A496031E4DD2D7ED23E8F6FF97DBDEA980BAAC8B0BA94D7EDB551348645 +8A1BD21661C60015065212CC98B1ABB50DFD14C872A208E66BAE890F25C448AF +9ED8F9B0E8E42A1656B8E1DD18F42BA42DC06FE52686173BA2FC70E756F207DC +9FADCE80D62A959F9930D748488C1E22E821F4E1E4A43584B848C2FC11E04D77 +A686FEE577C88AB664D0787ECDFFF035F4806F3DE418DC9E4D516324FFF02083 +A90132CEA1D4F7185E4F688EFFD16F6AC14DFD78356A807599A5DABBEEF3333E +B8686723E415534BC0DBD16326F9486F85B0B0799BF6639334E61DAAE67F36CD +C0D1F42B9F4BF7ACC045B7BB5D4805E10737F67B6310CE505248D543D0D5FE07 +D0156949F1381943442C6974E9B5B49EF441BB799EF20477B90A89C3F33620CE +D151962D954970501C60079258EBCFA38502E0A9F03CD640322B08C0A3117FE5 +D24566BF315F4E597D6E381C87119FB4198F5E9E2607F5F4AB362EF7E2E7672F +D3A936E1A7775A45217C8296A1F22AC5631DCDEC45594099E78EEEBBEDCBA967 +D6CEAE5D9E047FAF7D797858D229AC991AD44316D1E2A37A21926D763153593A +DF21016B00FC54F9FE3BC8B039911BB216E9162FAD2FD14D990AB96E951B49BE +E0E740E4B0F8B3548181FF75B5372FAF4C70B99EC995D694ED0FB91B03FF8D21 +EC30C9C3065A06BB07DC5B1C6B497F370C1CA65C0F30C08E042BA6BCECC78F2C +F5B6F88F75D391A4B1EB336F9E201239FB6B1377DB8CFA7B84736216E5AFFFD7 +FBB12938ABD86C125796EDF4162D291028890A7D6C0C1CCA75FD4B95EBFA7A1A +FC02FD48DB92D4DCE6F11679D38354CF750CFC7F584A520EB90BDE80E241F2BD +FDEDB5BDFCB67411513A61AEE5CB5B5D7C52AF06028EFC996CC1B05B1D6CEA2B diff --git a/src/FourthDimension/resources/jdk/lib/security/cacerts b/src/FourthDimension/resources/jdk/lib/security/cacerts new file mode 100644 index 0000000000000000000000000000000000000000..9e614151504744c28c42f142e9643e4ca8e7334b Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/security/cacerts differ diff --git a/src/FourthDimension/resources/jdk/lib/security/default.policy b/src/FourthDimension/resources/jdk/lib/security/default.policy new file mode 100644 index 0000000000000000000000000000000000000000..b22f26947af7660bdd8d370c9182c8a2c432c1d1 --- /dev/null +++ b/src/FourthDimension/resources/jdk/lib/security/default.policy @@ -0,0 +1,225 @@ +// +// Permissions required by modules stored in a run-time image and loaded +// by the platform class loader. +// +// NOTE that this file is not intended to be modified. If additional +// permissions need to be granted to the modules in this file, it is +// recommended that they be configured in a separate policy file or +// ${java.home}/conf/security/java.policy. +// + + +grant codeBase "jrt:/java.compiler" { + permission java.security.AllPermission; +}; + + +grant codeBase "jrt:/java.net.http" { + permission java.lang.RuntimePermission "accessClassInPackage.sun.net"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.net.util"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc"; + permission java.lang.RuntimePermission "modifyThread"; + permission java.net.SocketPermission "*","connect,resolve"; + permission java.net.URLPermission "http:*","*:*"; + permission java.net.URLPermission "https:*","*:*"; + permission java.net.URLPermission "ws:*","*:*"; + permission java.net.URLPermission "wss:*","*:*"; + permission java.net.URLPermission "socket:*","CONNECT"; // proxy + // For request/response body processors, fromFile, asFile + permission java.io.FilePermission "<>","read,write,delete"; + permission java.util.PropertyPermission "*","read"; + permission java.net.NetPermission "getProxySelector"; +}; + +grant codeBase "jrt:/java.scripting" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/java.security.jgss" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/java.smartcardio" { + permission javax.smartcardio.CardPermission "*", "*"; + permission java.lang.RuntimePermission "loadLibrary.j2pcsc"; + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.jca"; + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.util"; + permission java.util.PropertyPermission + "javax.smartcardio.TerminalFactory.DefaultType", "read"; + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "sun.arch.data.model", "read"; + permission java.util.PropertyPermission + "sun.security.smartcardio.library", "read"; + permission java.util.PropertyPermission + "sun.security.smartcardio.t0GetResponse", "read"; + permission java.util.PropertyPermission + "sun.security.smartcardio.t1GetResponse", "read"; + permission java.util.PropertyPermission + "sun.security.smartcardio.t1StripLe", "read"; + // needed for looking up native PC/SC library + permission java.io.FilePermission "<>","read"; + permission java.security.SecurityPermission "putProviderProperty.SunPCSC"; + permission java.security.SecurityPermission + "clearProviderProperties.SunPCSC"; + permission java.security.SecurityPermission + "removeProviderProperty.SunPCSC"; +}; + +grant codeBase "jrt:/java.sql" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/java.sql.rowset" { + permission java.security.AllPermission; +}; + + +grant codeBase "jrt:/java.xml.crypto" { + permission java.lang.RuntimePermission + "getStackWalkerWithClassReference"; + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.util"; + permission java.util.PropertyPermission "*", "read"; + permission java.security.SecurityPermission "putProviderProperty.XMLDSig"; + permission java.security.SecurityPermission + "clearProviderProperties.XMLDSig"; + permission java.security.SecurityPermission + "removeProviderProperty.XMLDSig"; + permission java.security.SecurityPermission + "com.sun.org.apache.xml.internal.security.register"; + permission java.security.SecurityPermission + "getProperty.jdk.xml.dsig.secureValidationPolicy"; + permission java.lang.RuntimePermission + "accessClassInPackage.com.sun.org.apache.xml.internal.*"; + permission java.lang.RuntimePermission + "accessClassInPackage.com.sun.org.apache.xpath.internal"; + permission java.lang.RuntimePermission + "accessClassInPackage.com.sun.org.apache.xpath.internal.*"; + permission java.io.FilePermission "<>","read"; + permission java.net.SocketPermission "*", "connect,resolve"; +}; + + +grant codeBase "jrt:/jdk.accessibility" { + permission java.lang.RuntimePermission "accessClassInPackage.sun.awt"; +}; + +grant codeBase "jrt:/jdk.charsets" { + permission java.util.PropertyPermission "os.name", "read"; + permission java.lang.RuntimePermission "charsetProvider"; + permission java.lang.RuntimePermission + "accessClassInPackage.jdk.internal.access"; + permission java.lang.RuntimePermission + "accessClassInPackage.jdk.internal.misc"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.cs"; +}; + +grant codeBase "jrt:/jdk.crypto.ec" { + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.*"; + permission java.lang.RuntimePermission "loadLibrary.sunec"; + permission java.security.SecurityPermission "putProviderProperty.SunEC"; + permission java.security.SecurityPermission "clearProviderProperties.SunEC"; + permission java.security.SecurityPermission "removeProviderProperty.SunEC"; +}; + +grant codeBase "jrt:/jdk.crypto.cryptoki" { + permission java.lang.RuntimePermission + "accessClassInPackage.com.sun.crypto.provider"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc"; + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.*"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch"; + permission java.lang.RuntimePermission "loadLibrary.j2pkcs11"; + permission java.util.PropertyPermission "sun.security.pkcs11.allowSingleThreadedModules", "read"; + permission java.util.PropertyPermission "sun.security.pkcs11.disableKeyExtraction", "read"; + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "jdk.crypto.KeyAgreement.legacyKDF", "read"; + permission java.security.SecurityPermission "putProviderProperty.*"; + permission java.security.SecurityPermission "clearProviderProperties.*"; + permission java.security.SecurityPermission "removeProviderProperty.*"; + permission java.security.SecurityPermission + "getProperty.auth.login.defaultCallbackHandler"; + permission java.security.SecurityPermission "authProvider.*"; + // Needed for reading PKCS11 config file and NSS library check + permission java.io.FilePermission "<>", "read"; +}; + +grant codeBase "jrt:/jdk.dynalink" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.httpserver" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.internal.le" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.internal.vm.compiler" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.internal.vm.compiler.management" { + permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.compiler.collections"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.vm.ci.runtime"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.vm.ci.services"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.core.common"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.debug"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.hotspot"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.options"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.phases.common.jmx"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.serviceprovider"; +}; + +grant codeBase "jrt:/jdk.jsobject" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.localedata" { + permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*"; +}; + +grant codeBase "jrt:/jdk.naming.dns" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.scripting.nashorn" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.scripting.nashorn.shell" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.security.auth" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.security.jgss" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.zipfs" { + permission java.io.FilePermission "<>", "read,write,delete"; + permission java.lang.RuntimePermission "fileSystemProvider"; + permission java.lang.RuntimePermission "accessUserInformation"; + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "user.dir", "read"; + permission java.util.PropertyPermission "user.name", "read"; +}; + +// permissions needed by applications using java.desktop module +grant { + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.beans"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.beans.*"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.java.swing.plaf.*"; + permission java.lang.RuntimePermission "accessClassInPackage.com.apple.*"; +}; diff --git a/src/FourthDimension/resources/jdk/lib/security/public_suffix_list.dat b/src/FourthDimension/resources/jdk/lib/security/public_suffix_list.dat new file mode 100644 index 0000000000000000000000000000000000000000..207d491fdc7a45e47dd4594c3915f8dd6c72e435 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/security/public_suffix_list.dat differ diff --git a/src/FourthDimension/resources/jdk/lib/server/classes.jsa b/src/FourthDimension/resources/jdk/lib/server/classes.jsa new file mode 100644 index 0000000000000000000000000000000000000000..a72863e6c07d9dc2055a2dab5fcd13b0f6b104dc Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/server/classes.jsa differ diff --git a/src/FourthDimension/resources/jdk/lib/server/classes_nocoops.jsa b/src/FourthDimension/resources/jdk/lib/server/classes_nocoops.jsa new file mode 100644 index 0000000000000000000000000000000000000000..a57a273b9720b96d0528b6d93439e56560e87a97 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/server/classes_nocoops.jsa differ diff --git a/src/FourthDimension/resources/jdk/lib/server/libjsig.so b/src/FourthDimension/resources/jdk/lib/server/libjsig.so new file mode 100644 index 0000000000000000000000000000000000000000..8e40f8c43ae93a0b2a96d476d40dd047b9cadd49 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/server/libjsig.so differ diff --git a/src/FourthDimension/resources/jdk/lib/server/libjvm.so b/src/FourthDimension/resources/jdk/lib/server/libjvm.so new file mode 100644 index 0000000000000000000000000000000000000000..abff3f8b53f754a5e556b69fe34d7aecb99f03bd Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/server/libjvm.so differ diff --git a/src/FourthDimension/resources/jdk/lib/tzdb.dat b/src/FourthDimension/resources/jdk/lib/tzdb.dat new file mode 100644 index 0000000000000000000000000000000000000000..671b6fa55d4cc32c2d3259edb60e795097df65a5 Binary files /dev/null and b/src/FourthDimension/resources/jdk/lib/tzdb.dat differ diff --git a/src/FourthDimension/resources/jdk/release b/src/FourthDimension/resources/jdk/release new file mode 100644 index 0000000000000000000000000000000000000000..df3ee426a7d030ce834d0a78e63a3f6a2ec63718 --- /dev/null +++ b/src/FourthDimension/resources/jdk/release @@ -0,0 +1,19 @@ +IMPLEMENTOR="Eclipse Adoptium" +IMPLEMENTOR_VERSION="Temurin-17.0.9+9" +JAVA_RUNTIME_VERSION="17.0.9+9" +JAVA_VERSION="17.0.9" +JAVA_VERSION_DATE="2023-10-17" +LIBC="gnu" +MODULES="java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.incubator.foreign jdk.incubator.vector jdk.internal.le jdk.internal.opt jdk.internal.vm.ci jdk.internal.vm.compiler jdk.internal.vm.compiler.management jdk.jartool jdk.javadoc jdk.jcmd jdk.management jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.random jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported jdk.unsupported.desktop jdk.xml.dom jdk.zipfs" +OS_ARCH="x86_64" +OS_NAME="Linux" +SOURCE=".:git:a4bbf40198b1" +BUILD_SOURCE="git:0a454394ec842383e3d7c03aae5972ab24e10d85" +BUILD_SOURCE_REPO="https://github.com/adoptium/temurin-build.git" +SOURCE_REPO="https://github.com/adoptium/jdk17u.git" +FULL_VERSION="17.0.9+9" +SEMANTIC_VERSION="17.0.9+9" +BUILD_INFO="OS: Linux Version: 5.15.0-48-generic" +JVM_VARIANT="Hotspot" +JVM_VERSION="17.0.9+9" +IMAGE_TYPE="JRE" diff --git a/src/config/question_regex.txt b/src/FourthDimension/resources/question_regex.txt similarity index 100% rename from src/config/question_regex.txt rename to src/FourthDimension/resources/question_regex.txt diff --git a/src/FourthDimension/util/__init__.py b/src/FourthDimension/util/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8206e03bc9aa97e4b91f621d844710e20e04291c --- /dev/null +++ b/src/FourthDimension/util/__init__.py @@ -0,0 +1,3 @@ +""" +FD工具类 +""" \ No newline at end of file diff --git a/src/FourthDimension/util/fd_util.py b/src/FourthDimension/util/fd_util.py new file mode 100644 index 0000000000000000000000000000000000000000..d271157aefa59ddbd78d91dbb6104d3312f8fd39 --- /dev/null +++ b/src/FourthDimension/util/fd_util.py @@ -0,0 +1,150 @@ +import hashlib +import re +from typing import List + +import jieba +import numpy as np +import tiktoken +import torch + +from FourthDimension.config import patternsLen, patterns, config_setting +from FourthDimension.config.config import embed_model +from FourthDimension.docstore.document import FDDocument + + +def get_tokens_from_string(string: str) -> int: + """Returns the number of tokens in a text string.""" + num_tokens = len(tiktoken.get_encoding("cl100k_base").encode(string)) + return num_tokens + + +def replace_multiple_newlines(text: str) -> str: + pattern = r'\n{1,}' # 匹配连续一个以上的换行符 + replacement = '\n' # 替换为一个换行符 + updated_text = re.sub(pattern, replacement, text) + return updated_text + + +def get_embedding(sentence): + import torch + from FourthDimension.config.config import embed_model as model + from FourthDimension.config.config import embed_tokenizer as tokenizer + from FourthDimension.config.config import embed_model_device as device + encoded_input = tokenizer([sentence], padding=True, truncation=True, return_tensors='pt', max_length=512) + # Compute token embeddings + with torch.no_grad(): + model_output = model(input_ids=encoded_input['input_ids'].to(device), + token_type_ids=encoded_input['token_type_ids'].to(device), + attention_mask=encoded_input['attention_mask'].to(device)) + # Perform pooling. In this case, cls pooling. + sentence_embeddings = model_output[0][:, 0] + # normalize embeddings + sentence_embeddings = torch.nn.functional.normalize(sentence_embeddings, p=2, dim=1) + # print("Sentence embeddings:", sentence_embeddings.tolist()[0]) + return sentence_embeddings[0].tolist() + + +def compute_sha1_from_file(file_path): + with open(file_path, "rb") as file: + bytes = file.read() + readable_hash = compute_sha1_from_content(bytes) + return readable_hash + + +def compute_sha1_from_content(content): + readable_hash = hashlib.sha1(content).hexdigest() + return readable_hash + + +# 问题处理 +def question_analysis(question): + find = False + query = question.replace(",", "") + matchIndex = [] + for i in range(patternsLen): + regex = patterns[i] + matcher = re.search(regex, query) + if matcher is not None: + find = True + for match in re.finditer(regex, query): + start = match.start() + end = match.end() + matchIndex.append([start, end]) + if find: + mergeIndex = merge(matchIndex) + res = [] + startI = 0 + for i in range(len(mergeIndex)): + if startI != mergeIndex[i][0]: + res.append(query[startI:mergeIndex[i][0]]) + startI = mergeIndex[i][1] + if mergeIndex[-1][1] < len(query): + res.append(query[mergeIndex[-1][1]:]) + return ''.join(res) + return query + + +def merge(intervals): + intervals.sort(key=lambda x: x[0]) + res = [] + for i in range(len(intervals)): + l, r = intervals[i][0], intervals[i][1] + if len(res) == 0 or res[-1][1] < l: + res.append([l, r]) + else: + res[-1][1] = max(res[-1][1], r) + return res + + +def chinese_segment(text): + sentences = [] + seg_list = jieba.cut(text, cut_all=False) + sentence = [] + for word in seg_list: + if word in ['。', '?', '!', ';']: + sentence.append(word) + sentences.append("".join(sentence)) + sentence = [] + elif word == '\n': + if len(sentence) > 0: + sentences.append("".join(sentence)) + sentence = [] + else: + sentence.append(word) + if sentence: + sentences.append("".join(sentence)) + return sentences + + +def get_simi_score(question, context) -> float: + query_embed = get_embedding(question) + contexts_embed = get_embedding(context) + # D = 0 + D = index_search(embed_1=query_embed, embed_2=contexts_embed) + return D + + +def index_search(embed_1: List[float], embed_2: List[float]) -> float: + a = torch.tensor(embed_1, dtype=torch.float) + b = torch.tensor(embed_2, dtype=torch.float) + s = torch.pow(a - b, 2).sum() + return float(s) + + +def calculate_mrr(ranks): + reciprocal_ranks = [1 / rank for rank in ranks] + mrr = np.mean(reciprocal_ranks) + return mrr + +# 获取前十分数的下标 +def get_topk_index(scores, topk): + ranks = np.argsort(scores)[-topk:][::-1] + return ranks + +# 对数组排名 +def rank_array(arr): + sorted_arr = sorted(enumerate(arr), key=lambda x: x[1], reverse=True) + ranks = [0] * len(arr) + for i, (index, _) in enumerate(sorted_arr): + ranks[index] = i + 1 + return ranks diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index a552e1de1719d815c9eaa6d4ef849c5f4cf446ea..0000000000000000000000000000000000000000 --- a/src/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - -""" -文件说明: -""" -from FourthDimension.main import upload, query, clean diff --git a/src/callbacks/__init__.py b/src/callbacks/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/callbacks/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/callbacks/base.py b/src/callbacks/base.py deleted file mode 100644 index 967c2495b60563ce7ede549a60da0f4ea07ed5f5..0000000000000000000000000000000000000000 --- a/src/callbacks/base.py +++ /dev/null @@ -1,604 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, TypeVar, Union -from uuid import UUID - -from tenacity import RetryCallState - -""" -文件说明: -""" - -if TYPE_CHECKING: - from FourthDimension.schema.agent import AgentAction, AgentFinish - from FourthDimension.doc.document import Document - from FourthDimension.schema.messages import BaseMessage - from FourthDimension.schema.output import ChatGenerationChunk, GenerationChunk, LLMResult - - -class RetrieverManagerMixin: - """Mixin for Retriever callbacks.""" - - def on_retriever_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when Retriever errors.""" - - def on_retriever_end( - self, - documents: Sequence[Document], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when Retriever ends running.""" - - -class LLMManagerMixin: - """Mixin for LLM callbacks.""" - - def on_llm_new_token( - self, - token: str, - *, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run on new LLM token. Only available when streaming is enabled. - - Args: - token (str): The new token. - chunk (GenerationChunk | ChatGenerationChunk): The new generated chunk, - containing content and other information. - """ - - def on_llm_end( - self, - response: LLMResult, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when LLM ends running.""" - - def on_llm_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when LLM errors.""" - - -class ChainManagerMixin: - """Mixin for chain callbacks.""" - - def on_chain_end( - self, - outputs: Dict[str, Any], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when chain ends running.""" - - def on_chain_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when chain errors.""" - - def on_agent_action( - self, - action: AgentAction, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run on agent action.""" - - def on_agent_finish( - self, - finish: AgentFinish, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run on agent end.""" - - -class ToolManagerMixin: - """Mixin for tool callbacks.""" - - def on_tool_end( - self, - output: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when tool ends running.""" - - def on_tool_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run when tool errors.""" - - -class CallbackManagerMixin: - """Mixin for callback manager.""" - - def on_llm_start( - self, - serialized: Dict[str, Any], - prompts: List[str], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Any: - """Run when LLM starts running.""" - - def on_chat_model_start( - self, - serialized: Dict[str, Any], - messages: List[List[BaseMessage]], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Any: - """Run when a chat model starts running.""" - raise NotImplementedError( - f"{self.__class__.__name__} does not implement `on_chat_model_start`" - ) - - def on_retriever_start( - self, - serialized: Dict[str, Any], - query: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Any: - """Run when Retriever starts running.""" - - def on_chain_start( - self, - serialized: Dict[str, Any], - inputs: Dict[str, Any], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Any: - """Run when chain starts running.""" - - def on_tool_start( - self, - serialized: Dict[str, Any], - input_str: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Any: - """Run when tool starts running.""" - - -class RunManagerMixin: - """Mixin for run manager.""" - - def on_text( - self, - text: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run on arbitrary text.""" - - def on_retry( - self, - retry_state: RetryCallState, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run on a retry event.""" - - -class BaseCallbackHandler( - LLMManagerMixin, - ChainManagerMixin, - ToolManagerMixin, - RetrieverManagerMixin, - CallbackManagerMixin, - RunManagerMixin, -): - - raise_error: bool = False - - run_inline: bool = False - - @property - def ignore_llm(self) -> bool: - """Whether to ignore LLM callbacks.""" - return False - - @property - def ignore_retry(self) -> bool: - """Whether to ignore retry callbacks.""" - return False - - @property - def ignore_chain(self) -> bool: - """Whether to ignore chain callbacks.""" - return False - - @property - def ignore_agent(self) -> bool: - """Whether to ignore agent callbacks.""" - return False - - @property - def ignore_retriever(self) -> bool: - """Whether to ignore retriever callbacks.""" - return False - - @property - def ignore_chat_model(self) -> bool: - """Whether to ignore chat model callbacks.""" - return False - - -class AsyncCallbackHandler(BaseCallbackHandler): - - async def on_llm_start( - self, - serialized: Dict[str, Any], - prompts: List[str], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> None: - """Run when LLM starts running.""" - - async def on_chat_model_start( - self, - serialized: Dict[str, Any], - messages: List[List[BaseMessage]], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Any: - """Run when a chat model starts running.""" - raise NotImplementedError( - f"{self.__class__.__name__} does not implement `on_chat_model_start`" - ) - - async def on_llm_new_token( - self, - token: str, - *, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run on new LLM token. Only available when streaming is enabled.""" - - async def on_llm_end( - self, - response: LLMResult, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run when LLM ends running.""" - - async def on_llm_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run when LLM errors.""" - - async def on_chain_start( - self, - serialized: Dict[str, Any], - inputs: Dict[str, Any], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> None: - """Run when chain starts running.""" - - async def on_chain_end( - self, - outputs: Dict[str, Any], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run when chain ends running.""" - - async def on_chain_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run when chain errors.""" - - async def on_tool_start( - self, - serialized: Dict[str, Any], - input_str: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> None: - """Run when tool starts running.""" - - async def on_tool_end( - self, - output: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run when tool ends running.""" - - async def on_tool_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run when tool errors.""" - - async def on_text( - self, - text: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run on arbitrary text.""" - - async def on_retry( - self, - retry_state: RetryCallState, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Any: - """Run on a retry event.""" - - async def on_agent_action( - self, - action: AgentAction, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run on agent action.""" - - async def on_agent_finish( - self, - finish: AgentFinish, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run on agent end.""" - - async def on_retriever_start( - self, - serialized: Dict[str, Any], - query: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> None: - """Run on retriever start.""" - - async def on_retriever_end( - self, - documents: Sequence[Document], - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run on retriever end.""" - - async def on_retriever_error( - self, - error: BaseException, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """Run on retriever error.""" - - -T = TypeVar("T", bound="BaseCallbackManager") - - -class BaseCallbackManager(CallbackManagerMixin): - """Base callback manager that handles callbacks from LangChain.""" - - def __init__( - self, - handlers: List[BaseCallbackHandler], - inheritable_handlers: Optional[List[BaseCallbackHandler]] = None, - parent_run_id: Optional[UUID] = None, - *, - tags: Optional[List[str]] = None, - inheritable_tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - inheritable_metadata: Optional[Dict[str, Any]] = None, - ) -> None: - """Initialize callback manager.""" - self.handlers: List[BaseCallbackHandler] = handlers - self.inheritable_handlers: List[BaseCallbackHandler] = ( - inheritable_handlers or [] - ) - self.parent_run_id: Optional[UUID] = parent_run_id - self.tags = tags or [] - self.inheritable_tags = inheritable_tags or [] - self.metadata = metadata or {} - self.inheritable_metadata = inheritable_metadata or {} - - def copy(self: T) -> T: - """Copy the callback manager.""" - return self.__class__( - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - @property - def is_async(self) -> bool: - """Whether the callback manager is async.""" - return False - - def add_handler(self, handler: BaseCallbackHandler, inherit: bool = True) -> None: - """Add a handler to the callback manager.""" - if handler not in self.handlers: - self.handlers.append(handler) - if inherit and handler not in self.inheritable_handlers: - self.inheritable_handlers.append(handler) - - def remove_handler(self, handler: BaseCallbackHandler) -> None: - """Remove a handler from the callback manager.""" - self.handlers.remove(handler) - self.inheritable_handlers.remove(handler) - - def set_handlers( - self, handlers: List[BaseCallbackHandler], inherit: bool = True - ) -> None: - """Set handlers as the only handlers on the callback manager.""" - self.handlers = [] - self.inheritable_handlers = [] - for handler in handlers: - self.add_handler(handler, inherit=inherit) - - def set_handler(self, handler: BaseCallbackHandler, inherit: bool = True) -> None: - """Set handler as the only handler on the callback manager.""" - self.set_handlers([handler], inherit=inherit) - - def add_tags(self, tags: List[str], inherit: bool = True) -> None: - for tag in tags: - if tag in self.tags: - self.remove_tags([tag]) - self.tags.extend(tags) - if inherit: - self.inheritable_tags.extend(tags) - - def remove_tags(self, tags: List[str]) -> None: - for tag in tags: - self.tags.remove(tag) - self.inheritable_tags.remove(tag) - - def add_metadata(self, metadata: Dict[str, Any], inherit: bool = True) -> None: - self.metadata.update(metadata) - if inherit: - self.inheritable_metadata.update(metadata) - - def remove_metadata(self, keys: List[str]) -> None: - for key in keys: - self.metadata.pop(key) - self.inheritable_metadata.pop(key) - - -Callbacks = Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] diff --git a/src/callbacks/manager.py b/src/callbacks/manager.py deleted file mode 100644 index 0a5548eac50b49dd528baa2f12d0882a65667365..0000000000000000000000000000000000000000 --- a/src/callbacks/manager.py +++ /dev/null @@ -1,1941 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -import asyncio -import functools -import logging -import os -import uuid -from contextlib import asynccontextmanager, contextmanager -from contextvars import ContextVar -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - Dict, - Generator, - List, - Optional, - Sequence, - Type, - TypeVar, - Union, - cast, -) -from uuid import UUID - -from tenacity import RetryCallState - -from FourthDimension.callbacks.base import ( - BaseCallbackHandler, - BaseCallbackManager, - Callbacks, - ChainManagerMixin, - LLMManagerMixin, - RetrieverManagerMixin, - RunManagerMixin, - ToolManagerMixin, -) -from FourthDimension.callbacks.openai_info import OpenAICallbackHandler -from FourthDimension.callbacks.stdout import StdOutCallbackHandler -from FourthDimension.callbacks.tracers import run_collector -from FourthDimension.callbacks.tracers.lc import LangChainTracer -from FourthDimension.callbacks.tracers.lc_v1 import LangChainTracerV1, TracerSessionV1 -from FourthDimension.callbacks.tracers.stdout import ConsoleCallbackHandler -from FourthDimension.callbacks.tracers.wandb import WandbTracer -from FourthDimension.schema.agent import AgentAction, AgentFinish -from FourthDimension.schema.output import LLMResult -from FourthDimension.doc.document import Document -from FourthDimension.schema.messages import BaseMessage, get_buffer_string -from FourthDimension.schema.output import ChatGenerationChunk, GenerationChunk - -if TYPE_CHECKING: - from langsmith import Client as LangSmithClient - -logger = logging.getLogger(__name__) - -openai_callback_var: ContextVar[Optional[OpenAICallbackHandler]] = ContextVar( - "openai_callback", default=None -) -tracing_callback_var: ContextVar[ - Optional[LangChainTracerV1] -] = ContextVar( # noqa: E501 - "tracing_callback", default=None -) -wandb_tracing_callback_var: ContextVar[ - Optional[WandbTracer] -] = ContextVar( # noqa: E501 - "tracing_wandb_callback", default=None -) - -tracing_v2_callback_var: ContextVar[ - Optional[LangChainTracer] -] = ContextVar( # noqa: E501 - "tracing_callback_v2", default=None -) -run_collector_var: ContextVar[ - Optional[run_collector.RunCollectorCallbackHandler] -] = ContextVar( # noqa: E501 - "run_collector", default=None -) - - -# def _get_debug() -> bool: -# return langchain.debug - - -@contextmanager -def get_openai_callback() -> Generator[OpenAICallbackHandler, None, None]: - """Get the OpenAI callback handler in a context manager. - which conveniently exposes token and cost information. - - Returns: - OpenAICallbackHandler: The OpenAI callback handler. - - Example: - >>> with get_openai_callback() as cb: - ... # Use the OpenAI callback handler - """ - cb = OpenAICallbackHandler() - openai_callback_var.set(cb) - yield cb - openai_callback_var.set(None) - - -@contextmanager -def tracing_enabled( - session_name: str = "default", -) -> Generator[TracerSessionV1, None, None]: - """Get the Deprecated LangChainTracer in a context manager. - - Args: - session_name (str, optional): The name of the session. - Defaults to "default". - - Returns: - TracerSessionV1: The LangChainTracer session. - - Example: - >>> with tracing_enabled() as session: - ... # Use the LangChainTracer session - """ - cb = LangChainTracerV1() - session = cast(TracerSessionV1, cb.load_session(session_name)) - tracing_callback_var.set(cb) - yield session - tracing_callback_var.set(None) - - -@contextmanager -def wandb_tracing_enabled( - session_name: str = "default", -) -> Generator[None, None, None]: - """Get the WandbTracer in a context manager. - - Args: - session_name (str, optional): The name of the session. - Defaults to "default". - - Returns: - None - - Example: - >>> with wandb_tracing_enabled() as session: - ... # Use the WandbTracer session - """ - cb = WandbTracer() - wandb_tracing_callback_var.set(cb) - yield None - wandb_tracing_callback_var.set(None) - - -@contextmanager -def tracing_v2_enabled( - project_name: Optional[str] = None, - *, - example_id: Optional[Union[str, UUID]] = None, - tags: Optional[List[str]] = None, - client: Optional[LangSmithClient] = None, -) -> Generator[None, None, None]: - """Instruct LangChain to log all runs in context to LangSmith. - - Args: - project_name (str, optional): The name of the project. - Defaults to "default". - example_id (str or UUID, optional): The ID of the example. - Defaults to None. - tags (List[str], optional): The tags to add to the run. - Defaults to None. - - Returns: - None - - Example: - >>> with tracing_v2_enabled(): - ... # LangChain code will automatically be traced - """ - if isinstance(example_id, str): - example_id = UUID(example_id) - cb = LangChainTracer( - example_id=example_id, - project_name=project_name, - tags=tags, - client=client, - ) - tracing_v2_callback_var.set(cb) - yield - tracing_v2_callback_var.set(None) - - -@contextmanager -def collect_runs() -> Generator[run_collector.RunCollectorCallbackHandler, None, None]: - """Collect all run traces in context. - - Returns: - run_collector.RunCollectorCallbackHandler: The run collector callback handler. - - Example: - >>> with collect_runs() as runs_cb: - chain.invoke("foo") - run_id = runs_cb.traced_runs[0].id - """ - cb = run_collector.RunCollectorCallbackHandler() - run_collector_var.set(cb) - yield cb - run_collector_var.set(None) - - -@contextmanager -def trace_as_chain_group( - group_name: str, - callback_manager: Optional[CallbackManager] = None, - *, - inputs: Optional[Dict[str, Any]] = None, - project_name: Optional[str] = None, - example_id: Optional[Union[str, UUID]] = None, - run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, -) -> Generator[CallbackManagerForChainGroup, None, None]: - """Get a callback manager for a chain group in a context manager. - Useful for grouping different calls together as a single run even if - they aren't composed in a single chain. - - Args: - group_name (str): The name of the chain group. - callback_manager (CallbackManager, optional): The callback manager to use. - inputs (Dict[str, Any], optional): The inputs to the chain group. - project_name (str, optional): The name of the project. - Defaults to None. - example_id (str or UUID, optional): The ID of the example. - Defaults to None. - run_id (UUID, optional): The ID of the run. - tags (List[str], optional): The inheritable tags to apply to all runs. - Defaults to None. - - Returns: - CallbackManagerForChainGroup: The callback manager for the chain group. - - Example: - .. code-block:: python - - llm_input = "Foo" - with trace_as_chain_group("group_name", inputs={"input": llm_input}) as manager: - # Use the callback manager for the chain group - res = llm.predict(llm_input, callbacks=manager) - manager.on_chain_end({"output": res}) - """ # noqa: E501 - cb = cast( - Callbacks, - [ - LangChainTracer( - project_name=project_name, - example_id=example_id, - ) - ] - if callback_manager is None - else callback_manager, - ) - cm = CallbackManager.configure( - inheritable_callbacks=cb, - inheritable_tags=tags, - ) - - run_manager = cm.on_chain_start({"name": group_name}, inputs or {}, run_id=run_id) - child_cm = run_manager.get_child() - group_cm = CallbackManagerForChainGroup( - child_cm.handlers, - child_cm.inheritable_handlers, - child_cm.parent_run_id, - parent_run_manager=run_manager, - tags=child_cm.tags, - inheritable_tags=child_cm.inheritable_tags, - metadata=child_cm.metadata, - inheritable_metadata=child_cm.inheritable_metadata, - ) - try: - yield group_cm - except Exception as e: - if not group_cm.ended: - run_manager.on_chain_error(e) - raise e - else: - if not group_cm.ended: - run_manager.on_chain_end({}) - - -@asynccontextmanager -async def atrace_as_chain_group( - group_name: str, - callback_manager: Optional[AsyncCallbackManager] = None, - *, - inputs: Optional[Dict[str, Any]] = None, - project_name: Optional[str] = None, - example_id: Optional[Union[str, UUID]] = None, - run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, -) -> AsyncGenerator[AsyncCallbackManagerForChainGroup, None]: - """Get an async callback manager for a chain group in a context manager. - Useful for grouping different async calls together as a single run even if - they aren't composed in a single chain. - - Args: - group_name (str): The name of the chain group. - callback_manager (AsyncCallbackManager, optional): The async callback manager to use, - which manages tracing and other callback behavior. - project_name (str, optional): The name of the project. - Defaults to None. - example_id (str or UUID, optional): The ID of the example. - Defaults to None. - run_id (UUID, optional): The ID of the run. - tags (List[str], optional): The inheritable tags to apply to all runs. - Defaults to None. - Returns: - AsyncCallbackManager: The async callback manager for the chain group. - - Example: - .. code-block:: python - - llm_input = "Foo" - async with atrace_as_chain_group("group_name", inputs={"input": llm_input}) as manager: - # Use the async callback manager for the chain group - res = await llm.apredict(llm_input, callbacks=manager) - await manager.on_chain_end({"output": res}) - """ # noqa: E501 - cb = cast( - Callbacks, - [ - LangChainTracer( - project_name=project_name, - example_id=example_id, - ) - ] - if callback_manager is None - else callback_manager, - ) - cm = AsyncCallbackManager.configure(inheritable_callbacks=cb, inheritable_tags=tags) - - run_manager = await cm.on_chain_start( - {"name": group_name}, inputs or {}, run_id=run_id - ) - child_cm = run_manager.get_child() - group_cm = AsyncCallbackManagerForChainGroup( - child_cm.handlers, - child_cm.inheritable_handlers, - child_cm.parent_run_id, - parent_run_manager=run_manager, - tags=child_cm.tags, - inheritable_tags=child_cm.inheritable_tags, - metadata=child_cm.metadata, - inheritable_metadata=child_cm.inheritable_metadata, - ) - try: - yield group_cm - except Exception as e: - if not group_cm.ended: - await run_manager.on_chain_error(e) - raise e - else: - if not group_cm.ended: - await run_manager.on_chain_end({}) - - -def _handle_event( - handlers: List[BaseCallbackHandler], - event_name: str, - ignore_condition_name: Optional[str], - *args: Any, - **kwargs: Any, -) -> None: - """Generic event handler for CallbackManager.""" - message_strings: Optional[List[str]] = None - for handler in handlers: - try: - if ignore_condition_name is None or not getattr( - handler, ignore_condition_name - ): - getattr(handler, event_name)(*args, **kwargs) - except NotImplementedError as e: - if event_name == "on_chat_model_start": - if message_strings is None: - message_strings = [get_buffer_string(m) for m in args[1]] - _handle_event( - [handler], - "on_llm_start", - "ignore_llm", - args[0], - message_strings, - *args[2:], - **kwargs, - ) - else: - logger.warning( - f"NotImplementedError in {handler.__class__.__name__}.{event_name}" - f" callback: {e}" - ) - except Exception as e: - logger.warning( - f"Error in {handler.__class__.__name__}.{event_name} callback: {e}" - ) - if handler.raise_error: - raise e - - -async def _ahandle_event_for_handler( - handler: BaseCallbackHandler, - event_name: str, - ignore_condition_name: Optional[str], - *args: Any, - **kwargs: Any, -) -> None: - try: - if ignore_condition_name is None or not getattr(handler, ignore_condition_name): - event = getattr(handler, event_name) - if asyncio.iscoroutinefunction(event): - await event(*args, **kwargs) - else: - if handler.run_inline: - event(*args, **kwargs) - else: - await asyncio.get_event_loop().run_in_executor( - None, functools.partial(event, *args, **kwargs) - ) - except NotImplementedError as e: - if event_name == "on_chat_model_start": - message_strings = [get_buffer_string(m) for m in args[1]] - await _ahandle_event_for_handler( - handler, - "on_llm_start", - "ignore_llm", - args[0], - message_strings, - *args[2:], - **kwargs, - ) - else: - logger.warning( - f"NotImplementedError in {handler.__class__.__name__}.{event_name}" - f" callback: {e}" - ) - except Exception as e: - logger.warning( - f"Error in {handler.__class__.__name__}.{event_name} callback: {e}" - ) - if handler.raise_error: - raise e - - -async def _ahandle_event( - handlers: List[BaseCallbackHandler], - event_name: str, - ignore_condition_name: Optional[str], - *args: Any, - **kwargs: Any, -) -> None: - """Generic event handler for AsyncCallbackManager.""" - for handler in [h for h in handlers if h.run_inline]: - await _ahandle_event_for_handler( - handler, event_name, ignore_condition_name, *args, **kwargs - ) - await asyncio.gather( - *( - _ahandle_event_for_handler( - handler, event_name, ignore_condition_name, *args, **kwargs - ) - for handler in handlers - if not handler.run_inline - ) - ) - - -BRM = TypeVar("BRM", bound="BaseRunManager") - - -class BaseRunManager(RunManagerMixin): - """Base class for run manager (a bound callback manager).""" - - def __init__( - self, - *, - run_id: UUID, - handlers: List[BaseCallbackHandler], - inheritable_handlers: List[BaseCallbackHandler], - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - inheritable_tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - inheritable_metadata: Optional[Dict[str, Any]] = None, - ) -> None: - """Initialize the run manager. - - Args: - run_id (UUID): The ID of the run. - handlers (List[BaseCallbackHandler]): The list of handlers. - inheritable_handlers (List[BaseCallbackHandler]): - The list of inheritable handlers. - parent_run_id (UUID, optional): The ID of the parent run. - Defaults to None. - tags (Optional[List[str]]): The list of tags. - inheritable_tags (Optional[List[str]]): The list of inheritable tags. - metadata (Optional[Dict[str, Any]]): The metadata. - inheritable_metadata (Optional[Dict[str, Any]]): The inheritable metadata. - """ - self.run_id = run_id - self.handlers = handlers - self.inheritable_handlers = inheritable_handlers - self.parent_run_id = parent_run_id - self.tags = tags or [] - self.inheritable_tags = inheritable_tags or [] - self.metadata = metadata or {} - self.inheritable_metadata = inheritable_metadata or {} - - @classmethod - def get_noop_manager(cls: Type[BRM]) -> BRM: - """Return a manager that doesn't perform any operations. - - Returns: - BaseRunManager: The noop manager. - """ - return cls( - run_id=uuid.uuid4(), - handlers=[], - inheritable_handlers=[], - tags=[], - inheritable_tags=[], - metadata={}, - inheritable_metadata={}, - ) - - -class RunManager(BaseRunManager): - """Sync Run Manager.""" - - def on_text( - self, - text: str, - **kwargs: Any, - ) -> Any: - """Run when text is received. - - Args: - text (str): The received text. - - Returns: - Any: The result of the callback. - """ - _handle_event( - self.handlers, - "on_text", - None, - text, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_retry( - self, - retry_state: RetryCallState, - **kwargs: Any, - ) -> None: - _handle_event( - self.handlers, - "on_retry", - "ignore_retry", - retry_state, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class ParentRunManager(RunManager): - """Sync Parent Run Manager.""" - - def get_child(self, tag: Optional[str] = None) -> CallbackManager: - """Get a child callback manager. - - Args: - tag (str, optional): The tag for the child callback manager. - Defaults to None. - - Returns: - CallbackManager: The child callback manager. - """ - manager = CallbackManager(handlers=[], parent_run_id=self.run_id) - manager.set_handlers(self.inheritable_handlers) - manager.add_tags(self.inheritable_tags) - manager.add_metadata(self.inheritable_metadata) - if tag is not None: - manager.add_tags([tag], False) - return manager - - -class AsyncRunManager(BaseRunManager): - """Async Run Manager.""" - - async def on_text( - self, - text: str, - **kwargs: Any, - ) -> Any: - """Run when text is received. - - Args: - text (str): The received text. - - Returns: - Any: The result of the callback. - """ - await _ahandle_event( - self.handlers, - "on_text", - None, - text, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_retry( - self, - retry_state: RetryCallState, - **kwargs: Any, - ) -> None: - await _ahandle_event( - self.handlers, - "on_retry", - "ignore_retry", - retry_state, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class AsyncParentRunManager(AsyncRunManager): - """Async Parent Run Manager.""" - - def get_child(self, tag: Optional[str] = None) -> AsyncCallbackManager: - """Get a child callback manager. - - Args: - tag (str, optional): The tag for the child callback manager. - Defaults to None. - - Returns: - AsyncCallbackManager: The child callback manager. - """ - manager = AsyncCallbackManager(handlers=[], parent_run_id=self.run_id) - manager.set_handlers(self.inheritable_handlers) - manager.add_tags(self.inheritable_tags) - manager.add_metadata(self.inheritable_metadata) - if tag is not None: - manager.add_tags([tag], False) - return manager - - -class CallbackManagerForLLMRun(RunManager, LLMManagerMixin): - """Callback manager for LLM run.""" - - def on_llm_new_token( - self, - token: str, - *, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, - **kwargs: Any, - ) -> None: - """Run when LLM generates a new token. - - Args: - token (str): The new token. - """ - _handle_event( - self.handlers, - "on_llm_new_token", - "ignore_llm", - token=token, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - chunk=chunk, - **kwargs, - ) - - def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: - """Run when LLM ends running. - - Args: - response (LLMResult): The LLM result. - """ - _handle_event( - self.handlers, - "on_llm_end", - "ignore_llm", - response, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_llm_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when LLM errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - _handle_event( - self.handlers, - "on_llm_error", - "ignore_llm", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class AsyncCallbackManagerForLLMRun(AsyncRunManager, LLMManagerMixin): - """Async callback manager for LLM run.""" - - async def on_llm_new_token( - self, - token: str, - *, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, - **kwargs: Any, - ) -> None: - """Run when LLM generates a new token. - - Args: - token (str): The new token. - """ - await _ahandle_event( - self.handlers, - "on_llm_new_token", - "ignore_llm", - token, - chunk=chunk, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: - """Run when LLM ends running. - - Args: - response (LLMResult): The LLM result. - """ - await _ahandle_event( - self.handlers, - "on_llm_end", - "ignore_llm", - response, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_llm_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when LLM errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - await _ahandle_event( - self.handlers, - "on_llm_error", - "ignore_llm", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class CallbackManagerForChainRun(ParentRunManager, ChainManagerMixin): - """Callback manager for chain run.""" - - def on_chain_end(self, outputs: Union[Dict[str, Any], Any], **kwargs: Any) -> None: - """Run when chain ends running. - - Args: - outputs (Union[Dict[str, Any], Any]): The outputs of the chain. - """ - _handle_event( - self.handlers, - "on_chain_end", - "ignore_chain", - outputs, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_chain_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when chain errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - _handle_event( - self.handlers, - "on_chain_error", - "ignore_chain", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_agent_action(self, action: AgentAction, **kwargs: Any) -> Any: - """Run when agent action is received. - - Args: - action (AgentAction): The agent action. - - Returns: - Any: The result of the callback. - """ - _handle_event( - self.handlers, - "on_agent_action", - "ignore_agent", - action, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_agent_finish(self, finish: AgentFinish, **kwargs: Any) -> Any: - """Run when agent finish is received. - - Args: - finish (AgentFinish): The agent finish. - - Returns: - Any: The result of the callback. - """ - _handle_event( - self.handlers, - "on_agent_finish", - "ignore_agent", - finish, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class AsyncCallbackManagerForChainRun(AsyncParentRunManager, ChainManagerMixin): - """Async callback manager for chain run.""" - - async def on_chain_end( - self, outputs: Union[Dict[str, Any], Any], **kwargs: Any - ) -> None: - """Run when chain ends running. - - Args: - outputs (Union[Dict[str, Any], Any]): The outputs of the chain. - """ - await _ahandle_event( - self.handlers, - "on_chain_end", - "ignore_chain", - outputs, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_chain_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when chain errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - await _ahandle_event( - self.handlers, - "on_chain_error", - "ignore_chain", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_agent_action(self, action: AgentAction, **kwargs: Any) -> Any: - """Run when agent action is received. - - Args: - action (AgentAction): The agent action. - - Returns: - Any: The result of the callback. - """ - await _ahandle_event( - self.handlers, - "on_agent_action", - "ignore_agent", - action, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_agent_finish(self, finish: AgentFinish, **kwargs: Any) -> Any: - """Run when agent finish is received. - - Args: - finish (AgentFinish): The agent finish. - - Returns: - Any: The result of the callback. - """ - await _ahandle_event( - self.handlers, - "on_agent_finish", - "ignore_agent", - finish, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class CallbackManagerForToolRun(ParentRunManager, ToolManagerMixin): - """Callback manager for tool run.""" - - def on_tool_end( - self, - output: str, - **kwargs: Any, - ) -> None: - """Run when tool ends running. - - Args: - output (str): The output of the tool. - """ - _handle_event( - self.handlers, - "on_tool_end", - "ignore_agent", - output, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_tool_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when tool errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - _handle_event( - self.handlers, - "on_tool_error", - "ignore_agent", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class AsyncCallbackManagerForToolRun(AsyncParentRunManager, ToolManagerMixin): - """Async callback manager for tool run.""" - - async def on_tool_end(self, output: str, **kwargs: Any) -> None: - """Run when tool ends running. - - Args: - output (str): The output of the tool. - """ - await _ahandle_event( - self.handlers, - "on_tool_end", - "ignore_agent", - output, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_tool_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when tool errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - await _ahandle_event( - self.handlers, - "on_tool_error", - "ignore_agent", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class CallbackManagerForRetrieverRun(ParentRunManager, RetrieverManagerMixin): - """Callback manager for retriever run.""" - - def on_retriever_end( - self, - documents: Sequence[Document], - **kwargs: Any, - ) -> None: - """Run when retriever ends running.""" - _handle_event( - self.handlers, - "on_retriever_end", - "ignore_retriever", - documents, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - def on_retriever_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when retriever errors.""" - _handle_event( - self.handlers, - "on_retriever_error", - "ignore_retriever", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class AsyncCallbackManagerForRetrieverRun( - AsyncParentRunManager, - RetrieverManagerMixin, -): - """Async callback manager for retriever run.""" - - async def on_retriever_end( - self, documents: Sequence[Document], **kwargs: Any - ) -> None: - """Run when retriever ends running.""" - await _ahandle_event( - self.handlers, - "on_retriever_end", - "ignore_retriever", - documents, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - async def on_retriever_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when retriever errors.""" - await _ahandle_event( - self.handlers, - "on_retriever_error", - "ignore_retriever", - error, - run_id=self.run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - **kwargs, - ) - - -class CallbackManager(BaseCallbackManager): - """Callback manager that handles callbacks from langchain.""" - - def on_llm_start( - self, - serialized: Dict[str, Any], - prompts: List[str], - **kwargs: Any, - ) -> List[CallbackManagerForLLMRun]: - """Run when LLM starts running. - - Args: - serialized (Dict[str, Any]): The serialized LLM. - prompts (List[str]): The list of prompts. - run_id (UUID, optional): The ID of the run. Defaults to None. - - Returns: - List[CallbackManagerForLLMRun]: A callback manager for each - prompt as an LLM run. - """ - managers = [] - for prompt in prompts: - run_id_ = uuid.uuid4() - _handle_event( - self.handlers, - "on_llm_start", - "ignore_llm", - serialized, - [prompt], - run_id=run_id_, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - managers.append( - CallbackManagerForLLMRun( - run_id=run_id_, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - ) - - return managers - - def on_chat_model_start( - self, - serialized: Dict[str, Any], - messages: List[List[BaseMessage]], - **kwargs: Any, - ) -> List[CallbackManagerForLLMRun]: - """Run when LLM starts running. - - Args: - serialized (Dict[str, Any]): The serialized LLM. - messages (List[List[BaseMessage]]): The list of messages. - run_id (UUID, optional): The ID of the run. Defaults to None. - - Returns: - List[CallbackManagerForLLMRun]: A callback manager for each - list of messages as an LLM run. - """ - - managers = [] - for message_list in messages: - run_id_ = uuid.uuid4() - _handle_event( - self.handlers, - "on_chat_model_start", - "ignore_chat_model", - serialized, - [message_list], - run_id=run_id_, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - managers.append( - CallbackManagerForLLMRun( - run_id=run_id_, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - ) - - return managers - - def on_chain_start( - self, - serialized: Dict[str, Any], - inputs: Union[Dict[str, Any], Any], - run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> CallbackManagerForChainRun: - """Run when chain starts running. - - Args: - serialized (Dict[str, Any]): The serialized chain. - inputs (Union[Dict[str, Any], Any]): The inputs to the chain. - run_id (UUID, optional): The ID of the run. Defaults to None. - - Returns: - CallbackManagerForChainRun: The callback manager for the chain run. - """ - if run_id is None: - run_id = uuid.uuid4() - _handle_event( - self.handlers, - "on_chain_start", - "ignore_chain", - serialized, - inputs, - run_id=run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - return CallbackManagerForChainRun( - run_id=run_id, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - def on_tool_start( - self, - serialized: Dict[str, Any], - input_str: str, - run_id: Optional[UUID] = None, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> CallbackManagerForToolRun: - """Run when tool starts running. - - Args: - serialized (Dict[str, Any]): The serialized tool. - input_str (str): The input to the tool. - run_id (UUID, optional): The ID of the run. Defaults to None. - parent_run_id (UUID, optional): The ID of the parent run. Defaults to None. - - Returns: - CallbackManagerForToolRun: The callback manager for the tool run. - """ - if run_id is None: - run_id = uuid.uuid4() - - _handle_event( - self.handlers, - "on_tool_start", - "ignore_agent", - serialized, - input_str, - run_id=run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - return CallbackManagerForToolRun( - run_id=run_id, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - def on_retriever_start( - self, - serialized: Dict[str, Any], - query: str, - run_id: Optional[UUID] = None, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> CallbackManagerForRetrieverRun: - """Run when retriever starts running.""" - if run_id is None: - run_id = uuid.uuid4() - - _handle_event( - self.handlers, - "on_retriever_start", - "ignore_retriever", - serialized, - query, - run_id=run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - return CallbackManagerForRetrieverRun( - run_id=run_id, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - @classmethod - def configure( - cls, - inheritable_callbacks: Callbacks = None, - local_callbacks: Callbacks = None, - verbose: bool = False, - inheritable_tags: Optional[List[str]] = None, - local_tags: Optional[List[str]] = None, - inheritable_metadata: Optional[Dict[str, Any]] = None, - local_metadata: Optional[Dict[str, Any]] = None, - ) -> CallbackManager: - """Configure the callback manager. - - Args: - inheritable_callbacks (Optional[Callbacks], optional): The inheritable - callbacks. Defaults to None. - local_callbacks (Optional[Callbacks], optional): The local callbacks. - Defaults to None. - verbose (bool, optional): Whether to enable verbose mode. Defaults to False. - inheritable_tags (Optional[List[str]], optional): The inheritable tags. - Defaults to None. - local_tags (Optional[List[str]], optional): The local tags. - Defaults to None. - inheritable_metadata (Optional[Dict[str, Any]], optional): The inheritable - metadata. Defaults to None. - local_metadata (Optional[Dict[str, Any]], optional): The local metadata. - Defaults to None. - - Returns: - CallbackManager: The configured callback manager. - """ - return _configure( - cls, - inheritable_callbacks, - local_callbacks, - verbose, - inheritable_tags, - local_tags, - inheritable_metadata, - local_metadata, - ) - - -class CallbackManagerForChainGroup(CallbackManager): - def __init__( - self, - handlers: List[BaseCallbackHandler], - inheritable_handlers: List[BaseCallbackHandler] | None = None, - parent_run_id: UUID | None = None, - *, - parent_run_manager: CallbackManagerForChainRun, - **kwargs: Any, - ) -> None: - super().__init__( - handlers, - inheritable_handlers, - parent_run_id, - **kwargs, - ) - self.parent_run_manager = parent_run_manager - self.ended = False - - def on_chain_end(self, outputs: Union[Dict[str, Any], Any], **kwargs: Any) -> None: - """Run when traced chain group ends. - - Args: - outputs (Union[Dict[str, Any], Any]): The outputs of the chain. - """ - self.ended = True - return self.parent_run_manager.on_chain_end(outputs, **kwargs) - - def on_chain_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when chain errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - self.ended = True - return self.parent_run_manager.on_chain_error(error, **kwargs) - - -class AsyncCallbackManager(BaseCallbackManager): - - @property - def is_async(self) -> bool: - """Return whether the handler is async.""" - return True - - async def on_llm_start( - self, - serialized: Dict[str, Any], - prompts: List[str], - **kwargs: Any, - ) -> List[AsyncCallbackManagerForLLMRun]: - """Run when LLM starts running. - - Args: - serialized (Dict[str, Any]): The serialized LLM. - prompts (List[str]): The list of prompts. - run_id (UUID, optional): The ID of the run. Defaults to None. - - Returns: - List[AsyncCallbackManagerForLLMRun]: The list of async - callback managers, one for each LLM Run corresponding - to each prompt. - """ - - tasks = [] - managers = [] - - for prompt in prompts: - run_id_ = uuid.uuid4() - - tasks.append( - _ahandle_event( - self.handlers, - "on_llm_start", - "ignore_llm", - serialized, - [prompt], - run_id=run_id_, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - ) - - managers.append( - AsyncCallbackManagerForLLMRun( - run_id=run_id_, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - ) - - await asyncio.gather(*tasks) - - return managers - - async def on_chat_model_start( - self, - serialized: Dict[str, Any], - messages: List[List[BaseMessage]], - **kwargs: Any, - ) -> List[AsyncCallbackManagerForLLMRun]: - """Run when LLM starts running. - - Args: - serialized (Dict[str, Any]): The serialized LLM. - messages (List[List[BaseMessage]]): The list of messages. - run_id (UUID, optional): The ID of the run. Defaults to None. - - Returns: - List[AsyncCallbackManagerForLLMRun]: The list of - async callback managers, one for each LLM Run - corresponding to each inner message list. - """ - tasks = [] - managers = [] - - for message_list in messages: - run_id_ = uuid.uuid4() - - tasks.append( - _ahandle_event( - self.handlers, - "on_chat_model_start", - "ignore_chat_model", - serialized, - [message_list], - run_id=run_id_, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - ) - - managers.append( - AsyncCallbackManagerForLLMRun( - run_id=run_id_, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - ) - - await asyncio.gather(*tasks) - return managers - - async def on_chain_start( - self, - serialized: Dict[str, Any], - inputs: Union[Dict[str, Any], Any], - run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> AsyncCallbackManagerForChainRun: - """Run when chain starts running. - - Args: - serialized (Dict[str, Any]): The serialized chain. - inputs (Union[Dict[str, Any], Any]): The inputs to the chain. - run_id (UUID, optional): The ID of the run. Defaults to None. - - Returns: - AsyncCallbackManagerForChainRun: The async callback manager - for the chain run. - """ - if run_id is None: - run_id = uuid.uuid4() - - await _ahandle_event( - self.handlers, - "on_chain_start", - "ignore_chain", - serialized, - inputs, - run_id=run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - return AsyncCallbackManagerForChainRun( - run_id=run_id, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - async def on_tool_start( - self, - serialized: Dict[str, Any], - input_str: str, - run_id: Optional[UUID] = None, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> AsyncCallbackManagerForToolRun: - """Run when tool starts running. - - Args: - serialized (Dict[str, Any]): The serialized tool. - input_str (str): The input to the tool. - run_id (UUID, optional): The ID of the run. Defaults to None. - parent_run_id (UUID, optional): The ID of the parent run. - Defaults to None. - - Returns: - AsyncCallbackManagerForToolRun: The async callback manager - for the tool run. - """ - if run_id is None: - run_id = uuid.uuid4() - - await _ahandle_event( - self.handlers, - "on_tool_start", - "ignore_agent", - serialized, - input_str, - run_id=run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - return AsyncCallbackManagerForToolRun( - run_id=run_id, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - async def on_retriever_start( - self, - serialized: Dict[str, Any], - query: str, - run_id: Optional[UUID] = None, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> AsyncCallbackManagerForRetrieverRun: - """Run when retriever starts running.""" - if run_id is None: - run_id = uuid.uuid4() - - await _ahandle_event( - self.handlers, - "on_retriever_start", - "ignore_retriever", - serialized, - query, - run_id=run_id, - parent_run_id=self.parent_run_id, - tags=self.tags, - metadata=self.metadata, - **kwargs, - ) - - return AsyncCallbackManagerForRetrieverRun( - run_id=run_id, - handlers=self.handlers, - inheritable_handlers=self.inheritable_handlers, - parent_run_id=self.parent_run_id, - tags=self.tags, - inheritable_tags=self.inheritable_tags, - metadata=self.metadata, - inheritable_metadata=self.inheritable_metadata, - ) - - @classmethod - def configure( - cls, - inheritable_callbacks: Callbacks = None, - local_callbacks: Callbacks = None, - verbose: bool = False, - inheritable_tags: Optional[List[str]] = None, - local_tags: Optional[List[str]] = None, - inheritable_metadata: Optional[Dict[str, Any]] = None, - local_metadata: Optional[Dict[str, Any]] = None, - ) -> AsyncCallbackManager: - """Configure the async callback manager. - - Args: - inheritable_callbacks (Optional[Callbacks], optional): The inheritable - callbacks. Defaults to None. - local_callbacks (Optional[Callbacks], optional): The local callbacks. - Defaults to None. - verbose (bool, optional): Whether to enable verbose mode. Defaults to False. - inheritable_tags (Optional[List[str]], optional): The inheritable tags. - Defaults to None. - local_tags (Optional[List[str]], optional): The local tags. - Defaults to None. - inheritable_metadata (Optional[Dict[str, Any]], optional): The inheritable - metadata. Defaults to None. - local_metadata (Optional[Dict[str, Any]], optional): The local metadata. - Defaults to None. - - Returns: - AsyncCallbackManager: The configured async callback manager. - """ - return _configure( - cls, - inheritable_callbacks, - local_callbacks, - verbose, - inheritable_tags, - local_tags, - inheritable_metadata, - local_metadata, - ) - - -class AsyncCallbackManagerForChainGroup(AsyncCallbackManager): - def __init__( - self, - handlers: List[BaseCallbackHandler], - inheritable_handlers: List[BaseCallbackHandler] | None = None, - parent_run_id: UUID | None = None, - *, - parent_run_manager: AsyncCallbackManagerForChainRun, - **kwargs: Any, - ) -> None: - super().__init__( - handlers, - inheritable_handlers, - parent_run_id, - **kwargs, - ) - self.parent_run_manager = parent_run_manager - self.ended = False - - async def on_chain_end( - self, outputs: Union[Dict[str, Any], Any], **kwargs: Any - ) -> None: - """Run when traced chain group ends. - - Args: - outputs (Union[Dict[str, Any], Any]): The outputs of the chain. - """ - self.ended = True - await self.parent_run_manager.on_chain_end(outputs, **kwargs) - - async def on_chain_error( - self, - error: BaseException, - **kwargs: Any, - ) -> None: - """Run when chain errors. - - Args: - error (Exception or KeyboardInterrupt): The error. - """ - self.ended = True - await self.parent_run_manager.on_chain_error(error, **kwargs) - - -T = TypeVar("T", CallbackManager, AsyncCallbackManager) - - -def env_var_is_set(env_var: str) -> bool: - """Check if an environment variable is set. - - Args: - env_var (str): The name of the environment variable. - - Returns: - bool: True if the environment variable is set, False otherwise. - """ - return env_var in os.environ and os.environ[env_var] not in ( - "", - "0", - "false", - "False", - ) - - -def _configure( - callback_manager_cls: Type[T], - inheritable_callbacks: Callbacks = None, - local_callbacks: Callbacks = None, - verbose: bool = False, - inheritable_tags: Optional[List[str]] = None, - local_tags: Optional[List[str]] = None, - inheritable_metadata: Optional[Dict[str, Any]] = None, - local_metadata: Optional[Dict[str, Any]] = None, -) -> T: - """Configure the callback manager. - - Args: - callback_manager_cls (Type[T]): The callback manager class. - inheritable_callbacks (Optional[Callbacks], optional): The inheritable - callbacks. Defaults to None. - local_callbacks (Optional[Callbacks], optional): The local callbacks. - Defaults to None. - verbose (bool, optional): Whether to enable verbose mode. Defaults to False. - inheritable_tags (Optional[List[str]], optional): The inheritable tags. - Defaults to None. - local_tags (Optional[List[str]], optional): The local tags. Defaults to None. - inheritable_metadata (Optional[Dict[str, Any]], optional): The inheritable - metadata. Defaults to None. - local_metadata (Optional[Dict[str, Any]], optional): The local metadata. - Defaults to None. - - Returns: - T: The configured callback manager. - """ - callback_manager = callback_manager_cls(handlers=[]) - if inheritable_callbacks or local_callbacks: - if isinstance(inheritable_callbacks, list) or inheritable_callbacks is None: - inheritable_callbacks_ = inheritable_callbacks or [] - callback_manager = callback_manager_cls( - handlers=inheritable_callbacks_.copy(), - inheritable_handlers=inheritable_callbacks_.copy(), - ) - else: - callback_manager = callback_manager_cls( - handlers=inheritable_callbacks.handlers, - inheritable_handlers=inheritable_callbacks.inheritable_handlers, - parent_run_id=inheritable_callbacks.parent_run_id, - tags=inheritable_callbacks.tags, - inheritable_tags=inheritable_callbacks.inheritable_tags, - metadata=inheritable_callbacks.metadata, - inheritable_metadata=inheritable_callbacks.inheritable_metadata, - ) - local_handlers_ = ( - local_callbacks - if isinstance(local_callbacks, list) - else (local_callbacks.handlers if local_callbacks else []) - ) - for handler in local_handlers_: - callback_manager.add_handler(handler, False) - if inheritable_tags or local_tags: - callback_manager.add_tags(inheritable_tags or []) - callback_manager.add_tags(local_tags or [], False) - if inheritable_metadata or local_metadata: - callback_manager.add_metadata(inheritable_metadata or {}) - callback_manager.add_metadata(local_metadata or {}, False) - - tracer = tracing_callback_var.get() - wandb_tracer = wandb_tracing_callback_var.get() - open_ai = openai_callback_var.get() - tracing_enabled_ = ( - env_var_is_set("LANGCHAIN_TRACING") - or tracer is not None - or env_var_is_set("LANGCHAIN_HANDLER") - ) - wandb_tracing_enabled_ = ( - env_var_is_set("LANGCHAIN_WANDB_TRACING") or wandb_tracer is not None - ) - - tracer_v2 = tracing_v2_callback_var.get() - tracing_v2_enabled_ = ( - env_var_is_set("LANGCHAIN_TRACING_V2") or tracer_v2 is not None - ) - tracer_project = os.environ.get( - "LANGCHAIN_PROJECT", os.environ.get("LANGCHAIN_SESSION", "default") - ) - run_collector_ = run_collector_var.get() - debug = _get_debug() - if ( - verbose - or debug - or tracing_enabled_ - or tracing_v2_enabled_ - or wandb_tracing_enabled_ - or open_ai is not None - ): - if verbose and not any( - isinstance(handler, StdOutCallbackHandler) - for handler in callback_manager.handlers - ): - if debug: - pass - else: - callback_manager.add_handler(StdOutCallbackHandler(), False) - if debug and not any( - isinstance(handler, ConsoleCallbackHandler) - for handler in callback_manager.handlers - ): - callback_manager.add_handler(ConsoleCallbackHandler(), True) - if tracing_enabled_ and not any( - isinstance(handler, LangChainTracerV1) - for handler in callback_manager.handlers - ): - if tracer: - callback_manager.add_handler(tracer, True) - else: - handler = LangChainTracerV1() - handler.load_session(tracer_project) - callback_manager.add_handler(handler, True) - if wandb_tracing_enabled_ and not any( - isinstance(handler, WandbTracer) for handler in callback_manager.handlers - ): - if wandb_tracer: - callback_manager.add_handler(wandb_tracer, True) - else: - handler = WandbTracer() - callback_manager.add_handler(handler, True) - if tracing_v2_enabled_ and not any( - isinstance(handler, LangChainTracer) - for handler in callback_manager.handlers - ): - if tracer_v2: - callback_manager.add_handler(tracer_v2, True) - else: - try: - handler = LangChainTracer(project_name=tracer_project) - callback_manager.add_handler(handler, True) - except Exception as e: - logger.warning( - "Unable to load requested LangChainTracer." - " To disable this warning," - " unset the LANGCHAIN_TRACING_V2 environment variables.", - e, - ) - if open_ai is not None and not any( - isinstance(handler, OpenAICallbackHandler) - for handler in callback_manager.handlers - ): - callback_manager.add_handler(open_ai, True) - if run_collector_ is not None and not any( - handler is run_collector_ # direct pointer comparison - for handler in callback_manager.handlers - ): - callback_manager.add_handler(run_collector_, False) - return callback_manager diff --git a/src/callbacks/openai_info.py b/src/callbacks/openai_info.py deleted file mode 100644 index 8f63ccb72a6a2aed59817b38dae05cbdeae96c71..0000000000000000000000000000000000000000 --- a/src/callbacks/openai_info.py +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""Callback Handler that prints to std out.""" -from typing import Any, Dict, List - -from FourthDimension.callbacks.base import BaseCallbackHandler -from FourthDimension.schema.output import LLMResult - -MODEL_COST_PER_1K_TOKENS = { - # GPT-4 input - "gpt-4": 0.03, - "gpt-4-0314": 0.03, - "gpt-4-0613": 0.03, - "gpt-4-32k": 0.06, - "gpt-4-32k-0314": 0.06, - "gpt-4-32k-0613": 0.06, - # GPT-4 output - "gpt-4-completion": 0.06, - "gpt-4-0314-completion": 0.06, - "gpt-4-0613-completion": 0.06, - "gpt-4-32k-completion": 0.12, - "gpt-4-32k-0314-completion": 0.12, - "gpt-4-32k-0613-completion": 0.12, - # GPT-3.5 input - "gpt-3.5-turbo": 0.0015, - "gpt-3.5-turbo-0301": 0.0015, - "gpt-3.5-turbo-0613": 0.0015, - "gpt-3.5-turbo-16k": 0.003, - "gpt-3.5-turbo-16k-0613": 0.003, - # GPT-3.5 output - "gpt-3.5-turbo-completion": 0.002, - "gpt-3.5-turbo-0301-completion": 0.002, - "gpt-3.5-turbo-0613-completion": 0.002, - "gpt-3.5-turbo-16k-completion": 0.004, - "gpt-3.5-turbo-16k-0613-completion": 0.004, - # Azure GPT-35 input - "gpt-35-turbo": 0.0015, # Azure OpenAI version of ChatGPT - "gpt-35-turbo-0301": 0.0015, # Azure OpenAI version of ChatGPT - "gpt-35-turbo-0613": 0.0015, - "gpt-35-turbo-16k": 0.003, - "gpt-35-turbo-16k-0613": 0.003, - # Azure GPT-35 output - "gpt-35-turbo-completion": 0.002, # Azure OpenAI version of ChatGPT - "gpt-35-turbo-0301-completion": 0.002, # Azure OpenAI version of ChatGPT - "gpt-35-turbo-0613-completion": 0.002, - "gpt-35-turbo-16k-completion": 0.004, - "gpt-35-turbo-16k-0613-completion": 0.004, - # Others - "text-ada-001": 0.0004, - "ada": 0.0004, - "text-babbage-001": 0.0005, - "babbage": 0.0005, - "text-curie-001": 0.002, - "curie": 0.002, - "text-davinci-003": 0.02, - "text-davinci-002": 0.02, - "code-davinci-002": 0.02, - "ada-finetuned": 0.0016, - "babbage-finetuned": 0.0024, - "curie-finetuned": 0.012, - "davinci-finetuned": 0.12, -} - - -def standardize_model_name( - model_name: str, - is_completion: bool = False, -) -> str: - """ - Standardize the model name to a format that can be used in the OpenAI API. - - Args: - model_name: Model name to standardize. - is_completion: Whether the model is used for completion or not. - Defaults to False. - - Returns: - Standardized model name. - - """ - model_name = model_name.lower() - if "ft-" in model_name: - return model_name.split(":")[0] + "-finetuned" - elif is_completion and ( - model_name.startswith("gpt-4") - or model_name.startswith("gpt-3.5") - or model_name.startswith("gpt-35") - ): - return model_name + "-completion" - else: - return model_name - - -def get_openai_token_cost_for_model( - model_name: str, num_tokens: int, is_completion: bool = False -) -> float: - """ - Get the cost in USD for a given model and number of tokens. - - Args: - model_name: Name of the model - num_tokens: Number of tokens. - is_completion: Whether the model is used for completion or not. - Defaults to False. - - Returns: - Cost in USD. - """ - model_name = standardize_model_name(model_name, is_completion=is_completion) - if model_name not in MODEL_COST_PER_1K_TOKENS: - raise ValueError( - f"Unknown model: {model_name}. Please provide a valid OpenAI model name." - "Known models are: " + ", ".join(MODEL_COST_PER_1K_TOKENS.keys()) - ) - return MODEL_COST_PER_1K_TOKENS[model_name] * (num_tokens / 1000) - - -class OpenAICallbackHandler(BaseCallbackHandler): - """Callback Handler that tracks OpenAI info.""" - - total_tokens: int = 0 - prompt_tokens: int = 0 - completion_tokens: int = 0 - successful_requests: int = 0 - total_cost: float = 0.0 - - def __repr__(self) -> str: - return ( - f"Tokens Used: {self.total_tokens}\n" - f"\tPrompt Tokens: {self.prompt_tokens}\n" - f"\tCompletion Tokens: {self.completion_tokens}\n" - f"Successful Requests: {self.successful_requests}\n" - f"Total Cost (USD): ${self.total_cost}" - ) - - @property - def always_verbose(self) -> bool: - """Whether to call verbose callbacks even if verbose is False.""" - return True - - def on_llm_start( - self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any - ) -> None: - """Print out the prompts.""" - pass - - def on_llm_new_token(self, token: str, **kwargs: Any) -> None: - """Print out the token.""" - pass - - def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: - """Collect token usage.""" - if response.llm_output is None: - return None - self.successful_requests += 1 - if "token_usage" not in response.llm_output: - return None - token_usage = response.llm_output["token_usage"] - completion_tokens = token_usage.get("completion_tokens", 0) - prompt_tokens = token_usage.get("prompt_tokens", 0) - model_name = standardize_model_name(response.llm_output.get("model_name", "")) - if model_name in MODEL_COST_PER_1K_TOKENS: - completion_cost = get_openai_token_cost_for_model( - model_name, completion_tokens, is_completion=True - ) - prompt_cost = get_openai_token_cost_for_model(model_name, prompt_tokens) - self.total_cost += prompt_cost + completion_cost - self.total_tokens += token_usage.get("total_tokens", 0) - self.prompt_tokens += prompt_tokens - self.completion_tokens += completion_tokens - - def __copy__(self) -> "OpenAICallbackHandler": - """Return a copy of the callback handler.""" - return self - - def __deepcopy__(self, memo: Any) -> "OpenAICallbackHandler": - """Return a deep copy of the callback handler.""" - return self - diff --git a/src/callbacks/stdout.py b/src/callbacks/stdout.py deleted file mode 100644 index d02568e00e33b1e16915bdc67a6ff3adb3115b49..0000000000000000000000000000000000000000 --- a/src/callbacks/stdout.py +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""Callback Handler that prints to std out.""" -from typing import Any, Dict, List, Optional - -from FourthDimension.callbacks.base import BaseCallbackHandler -from FourthDimension.schema.agent import AgentAction, AgentFinish -from FourthDimension.utils.input import print_text - -from FourthDimension.schema.output import LLMResult - - -class StdOutCallbackHandler(BaseCallbackHandler): - """Callback Handler that prints to std out.""" - - def __init__(self, color: Optional[str] = None) -> None: - """Initialize callback handler.""" - self.color = color - - def on_llm_start( - self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any - ) -> None: - """Print out the prompts.""" - pass - - def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: - """Do nothing.""" - pass - - def on_llm_new_token(self, token: str, **kwargs: Any) -> None: - """Do nothing.""" - pass - - def on_llm_error(self, error: BaseException, **kwargs: Any) -> None: - """Do nothing.""" - pass - - def on_chain_start( - self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any - ) -> None: - """Print out that we are entering a chain.""" - class_name = serialized.get("name", serialized.get("id", [""])[-1]) - print(f"\n\n\033[1m> Entering new {class_name} chain...\033[0m") - - def on_chain_end(self, outputs: Dict[str, Any], **kwargs: Any) -> None: - """Print out that we finished a chain.""" - print("\n\033[1m> Finished chain.\033[0m") - - def on_chain_error(self, error: BaseException, **kwargs: Any) -> None: - """Do nothing.""" - pass - - def on_tool_start( - self, - serialized: Dict[str, Any], - input_str: str, - **kwargs: Any, - ) -> None: - """Do nothing.""" - pass - - def on_agent_action( - self, action: AgentAction, color: Optional[str] = None, **kwargs: Any - ) -> Any: - """Run on agent action.""" - print_text(action.log, color=color or self.color) - - def on_tool_end( - self, - output: str, - color: Optional[str] = None, - observation_prefix: Optional[str] = None, - llm_prefix: Optional[str] = None, - **kwargs: Any, - ) -> None: - """If not the final action, print out observation.""" - if observation_prefix is not None: - print_text(f"\n{observation_prefix}") - print_text(output, color=color or self.color) - if llm_prefix is not None: - print_text(f"\n{llm_prefix}") - - def on_tool_error(self, error: BaseException, **kwargs: Any) -> None: - """Do nothing.""" - pass - - def on_text( - self, - text: str, - color: Optional[str] = None, - end: str = "", - **kwargs: Any, - ) -> None: - """Run when agent ends.""" - print_text(text, color=color or self.color, end=end) - - def on_agent_finish( - self, finish: AgentFinish, color: Optional[str] = None, **kwargs: Any - ) -> None: - """Run on agent end.""" - print_text(finish.log, color=color or self.color, end="\n") - diff --git a/src/callbacks/tracers.py b/src/callbacks/tracers.py deleted file mode 100644 index 4248c56400f1e4132fcb134caca09d91a2eb8864..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers.py +++ /dev/null @@ -1,295 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - -from __future__ import annotations - -import math -import threading -from typing import ( - Any, - AsyncIterator, - Dict, - List, - Optional, - Sequence, - TypedDict, - Union, -) -from uuid import UUID - -import jsonpatch -from anyio import create_memory_object_stream - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import Run -from FourthDimension.schema.output import ChatGenerationChunk, GenerationChunk - - -class LogEntry(TypedDict): - id: str - """ID of the sub-run.""" - name: str - """Name of the object being run.""" - type: str - """Type of the object being run, eg. prompt, chain, llm, etc.""" - tags: List[str] - """List of tags for the run.""" - metadata: Dict[str, Any] - """Key-value pairs of metadata for the run.""" - start_time: str - """ISO-8601 timestamp of when the run started.""" - - streamed_output_str: List[str] - """List of LLM tokens streamed by this run, if applicable.""" - final_output: Optional[Any] - """Final output of this run. - Only available after the run has finished successfully.""" - end_time: Optional[str] - """ISO-8601 timestamp of when the run ended. - Only available after the run has finished.""" - - -class RunState(TypedDict): - id: str - """ID of the run.""" - streamed_output: List[Any] - """List of output chunks streamed by Runnable.stream()""" - final_output: Optional[Any] - """Final output of the run, usually the result of aggregating streamed_output. - Only available after the run has finished successfully.""" - - logs: list[LogEntry] - """List of sub-runs contained in this run, if any, in the order they were started. - If filters were supplied, this list will contain only the runs that matched the - filters.""" - - -class RunLogPatch: - ops: List[Dict[str, Any]] - """List of jsonpatch operations, which describe how to create the run state - from an empty dict. This is the minimal representation of the log, designed to - be serialized as JSON and sent over the wire to reconstruct the log on the other - side. Reconstruction of the state can be done with any jsonpatch-compliant library, - see https://jsonpatch.com for more information.""" - - def __init__(self, *ops: Dict[str, Any]) -> None: - self.ops = list(ops) - - def __add__(self, other: Union[RunLogPatch, Any]) -> RunLogPatch: - if type(other) == RunLogPatch: - ops = self.ops + other.ops - state = jsonpatch.apply_patch(None, ops) - return RunLog(*ops, state=state) - - raise TypeError( - f"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'" - ) - - def __repr__(self) -> str: - from pprint import pformat - - return f"RunLogPatch(ops={pformat(self.ops)})" - - def __eq__(self, other: object) -> bool: - return isinstance(other, RunLogPatch) and self.ops == other.ops - - -class RunLog(RunLogPatch): - state: RunState - """Current state of the log, obtained from applying all ops in sequence.""" - - def __init__(self, *ops: Dict[str, Any], state: RunState) -> None: - super().__init__(*ops) - self.state = state - - def __add__(self, other: Union[RunLogPatch, Any]) -> RunLogPatch: - if type(other) == RunLogPatch: - ops = self.ops + other.ops - state = jsonpatch.apply_patch(self.state, other.ops) - return RunLog(*ops, state=state) - - raise TypeError( - f"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'" - ) - - def __repr__(self) -> str: - from pprint import pformat - - return f"RunLog(state={pformat(self.state)})" - - -class LogStreamCallbackHandler(BaseTracer): - def __init__( - self, - *, - auto_close: bool = True, - include_names: Optional[Sequence[str]] = None, - include_types: Optional[Sequence[str]] = None, - include_tags: Optional[Sequence[str]] = None, - exclude_names: Optional[Sequence[str]] = None, - exclude_types: Optional[Sequence[str]] = None, - exclude_tags: Optional[Sequence[str]] = None, - ) -> None: - super().__init__() - - self.auto_close = auto_close - self.include_names = include_names - self.include_types = include_types - self.include_tags = include_tags - self.exclude_names = exclude_names - self.exclude_types = exclude_types - self.exclude_tags = exclude_tags - - send_stream, receive_stream = create_memory_object_stream( - math.inf, item_type=RunLogPatch - ) - self.lock = threading.Lock() - self.send_stream = send_stream - self.receive_stream = receive_stream - self._index_map: Dict[UUID, int] = {} - - def __aiter__(self) -> AsyncIterator[RunLogPatch]: - return self.receive_stream.__aiter__() - - def include_run(self, run: Run) -> bool: - if run.parent_run_id is None: - return False - - run_tags = run.tags or [] - - if ( - self.include_names is None - and self.include_types is None - and self.include_tags is None - ): - include = True - else: - include = False - - if self.include_names is not None: - include = include or run.name in self.include_names - if self.include_types is not None: - include = include or run.run_type in self.include_types - if self.include_tags is not None: - include = include or any(tag in self.include_tags for tag in run_tags) - - if self.exclude_names is not None: - include = include and run.name not in self.exclude_names - if self.exclude_types is not None: - include = include and run.run_type not in self.exclude_types - if self.exclude_tags is not None: - include = include and all(tag not in self.exclude_tags for tag in run_tags) - - return include - - def _persist_run(self, run: Run) -> None: - # This is a legacy method only called once for an entire run tree - # therefore not useful here - pass - - def _on_run_create(self, run: Run) -> None: - """Start a run.""" - if run.parent_run_id is None: - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "replace", - "path": "", - "value": RunState( - id=run.id, - streamed_output=[], - final_output=None, - logs=[], - ), - } - ) - ) - - if not self.include_run(run): - return - - # Determine previous index, increment by 1 - with self.lock: - self._index_map[run.id] = max(self._index_map.values(), default=-1) + 1 - - # Add the run to the stream - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "add", - "path": f"/logs/{self._index_map[run.id]}", - "value": LogEntry( - id=str(run.id), - name=run.name, - type=run.run_type, - tags=run.tags or [], - metadata=run.extra.get("metadata", {}), - start_time=run.start_time.isoformat(timespec="milliseconds"), - streamed_output_str=[], - final_output=None, - end_time=None, - ), - } - ) - ) - - def _on_run_update(self, run: Run) -> None: - """Finish a run.""" - try: - index = self._index_map.get(run.id) - - if index is None: - return - - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "add", - "path": f"/logs/{index}/final_output", - "value": run.outputs, - }, - { - "op": "add", - "path": f"/logs/{index}/end_time", - "value": run.end_time.isoformat(timespec="milliseconds"), - }, - ) - ) - finally: - if run.parent_run_id is None: - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "replace", - "path": "/final_output", - "value": run.outputs, - } - ) - ) - if self.auto_close: - self.send_stream.close() - - def _on_llm_new_token( - self, - run: Run, - token: str, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]], - ) -> None: - """Process new LLM token.""" - index = self._index_map.get(run.id) - - if index is None: - return - - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "add", - "path": f"/logs/{index}/streamed_output_str/-", - "value": token, - } - ) - ) - diff --git a/src/callbacks/tracers/__init__.py b/src/callbacks/tracers/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/callbacks/tracers/base.py b/src/callbacks/tracers/base.py deleted file mode 100644 index 15200098c66f78dd48db03c370e550a6f16d18f2..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/base.py +++ /dev/null @@ -1,540 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -import logging -from abc import ABC, abstractmethod -from datetime import datetime -from typing import Any, Dict, List, Optional, Sequence, Union, cast -from uuid import UUID - -from tenacity import RetryCallState - -from FourthDimension.callbacks.base import BaseCallbackHandler -from FourthDimension.callbacks.tracers.schemas import Run -from FourthDimension.schema.output import ( - ChatGeneration, - ChatGenerationChunk, - GenerationChunk, - LLMResult, -) -from FourthDimension.doc.document import Document -from FourthDimension.load.dump import dumpd - -logger = logging.getLogger(__name__) - - -class TracerException(Exception): - """Base class for exceptions in tracers module.""" - - -class BaseTracer(BaseCallbackHandler, ABC): - """Base interface for tracers.""" - - def __init__(self, **kwargs: Any) -> None: - super().__init__(**kwargs) - self.run_map: Dict[str, Run] = {} - - @staticmethod - def _add_child_run( - parent_run: Run, - child_run: Run, - ) -> None: - """Add child run to a chain run or tool run.""" - parent_run.child_runs.append(child_run) - - @abstractmethod - def _persist_run(self, run: Run) -> None: - """Persist a run.""" - - def _start_trace(self, run: Run) -> None: - """Start a trace for a run.""" - if run.parent_run_id: - parent_run = self.run_map[str(run.parent_run_id)] - if parent_run: - self._add_child_run(parent_run, run) - parent_run.child_execution_order = max( - parent_run.child_execution_order, run.child_execution_order - ) - else: - logger.debug(f"Parent run with UUID {run.parent_run_id} not found.") - self.run_map[str(run.id)] = run - self._on_run_create(run) - - def _end_trace(self, run: Run) -> None: - """End a trace for a run.""" - if not run.parent_run_id: - self._persist_run(run) - else: - parent_run = self.run_map.get(str(run.parent_run_id)) - if parent_run is None: - logger.debug(f"Parent run with UUID {run.parent_run_id} not found.") - elif ( - run.child_execution_order is not None - and parent_run.child_execution_order is not None - and run.child_execution_order > parent_run.child_execution_order - ): - parent_run.child_execution_order = run.child_execution_order - self.run_map.pop(str(run.id)) - self._on_run_update(run) - - def _get_execution_order(self, parent_run_id: Optional[str] = None) -> int: - """Get the execution order for a run.""" - if parent_run_id is None: - return 1 - - parent_run = self.run_map.get(parent_run_id) - if parent_run is None: - logger.debug(f"Parent run with UUID {parent_run_id} not found.") - return 1 - if parent_run.child_execution_order is None: - raise TracerException( - f"Parent run with UUID {parent_run_id} has no child execution order." - ) - - return parent_run.child_execution_order + 1 - - def on_llm_start( - self, - serialized: Dict[str, Any], - prompts: List[str], - *, - run_id: UUID, - tags: Optional[List[str]] = None, - parent_run_id: Optional[UUID] = None, - metadata: Optional[Dict[str, Any]] = None, - name: Optional[str] = None, - **kwargs: Any, - ) -> Run: - """Start a trace for an LLM run.""" - parent_run_id_ = str(parent_run_id) if parent_run_id else None - execution_order = self._get_execution_order(parent_run_id_) - start_time = datetime.utcnow() - if metadata: - kwargs.update({"metadata": metadata}) - llm_run = Run( - id=run_id, - parent_run_id=parent_run_id, - serialized=serialized, - inputs={"prompts": prompts}, - extra=kwargs, - events=[{"name": "start", "time": start_time}], - start_time=start_time, - execution_order=execution_order, - child_execution_order=execution_order, - run_type="llm", - tags=tags or [], - name=name, - ) - self._start_trace(llm_run) - self._on_llm_start(llm_run) - return llm_run - - def on_llm_new_token( - self, - token: str, - *, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]] = None, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - **kwargs: Any, - ) -> Run: - """Run on new LLM token. Only available when streaming is enabled.""" - if not run_id: - raise TracerException("No run_id provided for on_llm_new_token callback.") - - run_id_ = str(run_id) - llm_run = self.run_map.get(run_id_) - if llm_run is None or llm_run.run_type != "llm": - raise TracerException(f"No LLM Run found to be traced for {run_id}") - event_kwargs: Dict[str, Any] = {"token": token} - if chunk: - event_kwargs["chunk"] = chunk - llm_run.events.append( - { - "name": "new_token", - "time": datetime.utcnow(), - "kwargs": event_kwargs, - }, - ) - self._on_llm_new_token(llm_run, token, chunk) - return llm_run - - def on_retry( - self, - retry_state: RetryCallState, - *, - run_id: UUID, - **kwargs: Any, - ) -> Run: - if not run_id: - raise TracerException("No run_id provided for on_retry callback.") - run_id_ = str(run_id) - llm_run = self.run_map.get(run_id_) - if llm_run is None: - raise TracerException("No Run found to be traced for on_retry") - retry_d: Dict[str, Any] = { - "slept": retry_state.idle_for, - "attempt": retry_state.attempt_number, - } - if retry_state.outcome is None: - retry_d["outcome"] = "N/A" - elif retry_state.outcome.failed: - retry_d["outcome"] = "failed" - exception = retry_state.outcome.exception() - retry_d["exception"] = str(exception) - retry_d["exception_type"] = exception.__class__.__name__ - else: - retry_d["outcome"] = "success" - retry_d["result"] = str(retry_state.outcome.result()) - llm_run.events.append( - { - "name": "retry", - "time": datetime.utcnow(), - "kwargs": retry_d, - }, - ) - return llm_run - - def on_llm_end(self, response: LLMResult, *, run_id: UUID, **kwargs: Any) -> Run: - """End a trace for an LLM run.""" - if not run_id: - raise TracerException("No run_id provided for on_llm_end callback.") - - run_id_ = str(run_id) - llm_run = self.run_map.get(run_id_) - if llm_run is None or llm_run.run_type != "llm": - raise TracerException(f"No LLM Run found to be traced for {run_id}") - llm_run.outputs = response.dict() - for i, generations in enumerate(response.generations): - for j, generation in enumerate(generations): - output_generation = llm_run.outputs["generations"][i][j] - if "message" in output_generation: - output_generation["message"] = dumpd( - cast(ChatGeneration, generation).message - ) - llm_run.end_time = datetime.utcnow() - llm_run.events.append({"name": "end", "time": llm_run.end_time}) - self._end_trace(llm_run) - self._on_llm_end(llm_run) - return llm_run - - def on_llm_error( - self, - error: BaseException, - *, - run_id: UUID, - **kwargs: Any, - ) -> Run: - """Handle an error for an LLM run.""" - if not run_id: - raise TracerException("No run_id provided for on_llm_error callback.") - - run_id_ = str(run_id) - llm_run = self.run_map.get(run_id_) - if llm_run is None or llm_run.run_type != "llm": - raise TracerException(f"No LLM Run found to be traced for {run_id}") - llm_run.error = repr(error) - llm_run.end_time = datetime.utcnow() - llm_run.events.append({"name": "error", "time": llm_run.end_time}) - self._end_trace(llm_run) - self._on_chain_error(llm_run) - return llm_run - - def on_chain_start( - self, - serialized: Dict[str, Any], - inputs: Dict[str, Any], - *, - run_id: UUID, - tags: Optional[List[str]] = None, - parent_run_id: Optional[UUID] = None, - metadata: Optional[Dict[str, Any]] = None, - run_type: Optional[str] = None, - name: Optional[str] = None, - **kwargs: Any, - ) -> Run: - """Start a trace for a chain run.""" - parent_run_id_ = str(parent_run_id) if parent_run_id else None - execution_order = self._get_execution_order(parent_run_id_) - start_time = datetime.utcnow() - if metadata: - kwargs.update({"metadata": metadata}) - chain_run = Run( - id=run_id, - parent_run_id=parent_run_id, - serialized=serialized, - inputs=inputs if isinstance(inputs, dict) else {"input": inputs}, - extra=kwargs, - events=[{"name": "start", "time": start_time}], - start_time=start_time, - execution_order=execution_order, - child_execution_order=execution_order, - child_runs=[], - run_type=run_type or "chain", - name=name, - tags=tags or [], - ) - self._start_trace(chain_run) - self._on_chain_start(chain_run) - return chain_run - - def on_chain_end( - self, - outputs: Dict[str, Any], - *, - run_id: UUID, - inputs: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Run: - """End a trace for a chain run.""" - if not run_id: - raise TracerException("No run_id provided for on_chain_end callback.") - chain_run = self.run_map.get(str(run_id)) - if chain_run is None: - raise TracerException(f"No chain Run found to be traced for {run_id}") - - chain_run.outputs = ( - outputs if isinstance(outputs, dict) else {"output": outputs} - ) - chain_run.end_time = datetime.utcnow() - chain_run.events.append({"name": "end", "time": chain_run.end_time}) - if inputs is not None: - chain_run.inputs = inputs if isinstance(inputs, dict) else {"input": inputs} - self._end_trace(chain_run) - self._on_chain_end(chain_run) - return chain_run - - def on_chain_error( - self, - error: BaseException, - *, - inputs: Optional[Dict[str, Any]] = None, - run_id: UUID, - **kwargs: Any, - ) -> Run: - """Handle an error for a chain run.""" - if not run_id: - raise TracerException("No run_id provided for on_chain_error callback.") - chain_run = self.run_map.get(str(run_id)) - if chain_run is None: - raise TracerException(f"No chain Run found to be traced for {run_id}") - - chain_run.error = repr(error) - chain_run.end_time = datetime.utcnow() - chain_run.events.append({"name": "error", "time": chain_run.end_time}) - if inputs is not None: - chain_run.inputs = inputs if isinstance(inputs, dict) else {"input": inputs} - self._end_trace(chain_run) - self._on_chain_error(chain_run) - return chain_run - - def on_tool_start( - self, - serialized: Dict[str, Any], - input_str: str, - *, - run_id: UUID, - tags: Optional[List[str]] = None, - parent_run_id: Optional[UUID] = None, - metadata: Optional[Dict[str, Any]] = None, - name: Optional[str] = None, - **kwargs: Any, - ) -> Run: - """Start a trace for a tool run.""" - parent_run_id_ = str(parent_run_id) if parent_run_id else None - execution_order = self._get_execution_order(parent_run_id_) - start_time = datetime.utcnow() - if metadata: - kwargs.update({"metadata": metadata}) - tool_run = Run( - id=run_id, - parent_run_id=parent_run_id, - serialized=serialized, - inputs={"input": input_str}, - extra=kwargs, - events=[{"name": "start", "time": start_time}], - start_time=start_time, - execution_order=execution_order, - child_execution_order=execution_order, - child_runs=[], - run_type="tool", - tags=tags or [], - name=name, - ) - self._start_trace(tool_run) - self._on_tool_start(tool_run) - return tool_run - - def on_tool_end(self, output: str, *, run_id: UUID, **kwargs: Any) -> Run: - """End a trace for a tool run.""" - if not run_id: - raise TracerException("No run_id provided for on_tool_end callback.") - tool_run = self.run_map.get(str(run_id)) - if tool_run is None or tool_run.run_type != "tool": - raise TracerException(f"No tool Run found to be traced for {run_id}") - - tool_run.outputs = {"output": output} - tool_run.end_time = datetime.utcnow() - tool_run.events.append({"name": "end", "time": tool_run.end_time}) - self._end_trace(tool_run) - self._on_tool_end(tool_run) - return tool_run - - def on_tool_error( - self, - error: BaseException, - *, - run_id: UUID, - **kwargs: Any, - ) -> Run: - """Handle an error for a tool run.""" - if not run_id: - raise TracerException("No run_id provided for on_tool_error callback.") - tool_run = self.run_map.get(str(run_id)) - if tool_run is None or tool_run.run_type != "tool": - raise TracerException(f"No tool Run found to be traced for {run_id}") - - tool_run.error = repr(error) - tool_run.end_time = datetime.utcnow() - tool_run.events.append({"name": "error", "time": tool_run.end_time}) - self._end_trace(tool_run) - self._on_tool_error(tool_run) - return tool_run - - def on_retriever_start( - self, - serialized: Dict[str, Any], - query: str, - *, - run_id: UUID, - parent_run_id: Optional[UUID] = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - name: Optional[str] = None, - **kwargs: Any, - ) -> Run: - """Run when Retriever starts running.""" - parent_run_id_ = str(parent_run_id) if parent_run_id else None - execution_order = self._get_execution_order(parent_run_id_) - start_time = datetime.utcnow() - if metadata: - kwargs.update({"metadata": metadata}) - retrieval_run = Run( - id=run_id, - name=name or "Retriever", - parent_run_id=parent_run_id, - serialized=serialized, - inputs={"query": query}, - extra=kwargs, - events=[{"name": "start", "time": start_time}], - start_time=start_time, - execution_order=execution_order, - child_execution_order=execution_order, - tags=tags, - child_runs=[], - run_type="retriever", - ) - self._start_trace(retrieval_run) - self._on_retriever_start(retrieval_run) - return retrieval_run - - def on_retriever_error( - self, - error: BaseException, - *, - run_id: UUID, - **kwargs: Any, - ) -> Run: - """Run when Retriever errors.""" - if not run_id: - raise TracerException("No run_id provided for on_retriever_error callback.") - retrieval_run = self.run_map.get(str(run_id)) - if retrieval_run is None or retrieval_run.run_type != "retriever": - raise TracerException(f"No retriever Run found to be traced for {run_id}") - - retrieval_run.error = repr(error) - retrieval_run.end_time = datetime.utcnow() - retrieval_run.events.append({"name": "error", "time": retrieval_run.end_time}) - self._end_trace(retrieval_run) - self._on_retriever_error(retrieval_run) - return retrieval_run - - def on_retriever_end( - self, documents: Sequence[Document], *, run_id: UUID, **kwargs: Any - ) -> Run: - """Run when Retriever ends running.""" - if not run_id: - raise TracerException("No run_id provided for on_retriever_end callback.") - retrieval_run = self.run_map.get(str(run_id)) - if retrieval_run is None or retrieval_run.run_type != "retriever": - raise TracerException(f"No retriever Run found to be traced for {run_id}") - retrieval_run.outputs = {"documents": documents} - retrieval_run.end_time = datetime.utcnow() - retrieval_run.events.append({"name": "end", "time": retrieval_run.end_time}) - self._end_trace(retrieval_run) - self._on_retriever_end(retrieval_run) - return retrieval_run - - def __deepcopy__(self, memo: dict) -> BaseTracer: - """Deepcopy the tracer.""" - return self - - def __copy__(self) -> BaseTracer: - """Copy the tracer.""" - return self - - def _on_run_create(self, run: Run) -> None: - """Process a run upon creation.""" - - def _on_run_update(self, run: Run) -> None: - """Process a run upon update.""" - - def _on_llm_start(self, run: Run) -> None: - """Process the LLM Run upon start.""" - - def _on_llm_new_token( - self, - run: Run, - token: str, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]], - ) -> None: - """Process new LLM token.""" - - def _on_llm_end(self, run: Run) -> None: - """Process the LLM Run.""" - - def _on_llm_error(self, run: Run) -> None: - """Process the LLM Run upon error.""" - - def _on_chain_start(self, run: Run) -> None: - """Process the Chain Run upon start.""" - - def _on_chain_end(self, run: Run) -> None: - """Process the Chain Run.""" - - def _on_chain_error(self, run: Run) -> None: - """Process the Chain Run upon error.""" - - def _on_tool_start(self, run: Run) -> None: - """Process the Tool Run upon start.""" - - def _on_tool_end(self, run: Run) -> None: - """Process the Tool Run.""" - - def _on_tool_error(self, run: Run) -> None: - """Process the Tool Run upon error.""" - - def _on_chat_model_start(self, run: Run) -> None: - """Process the Chat Model Run upon start.""" - - def _on_retriever_start(self, run: Run) -> None: - """Process the Retriever Run upon start.""" - - def _on_retriever_end(self, run: Run) -> None: - """Process the Retriever Run.""" - - def _on_retriever_error(self, run: Run) -> None: - """Process the Retriever Run upon error.""" diff --git a/src/callbacks/tracers/lc.py b/src/callbacks/tracers/lc.py deleted file mode 100644 index f627256e650390b6f6588c032e840ebe6c830595..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/lc.py +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""A Tracer implementation that records to LangChain endpoint.""" -from __future__ import annotations - -import logging -import os -import weakref -from concurrent.futures import Future, ThreadPoolExecutor, wait -from datetime import datetime -from typing import Any, Callable, Dict, List, Optional, Set, Union -from uuid import UUID - -from langsmith import Client - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import Run, TracerSession -from FourthDimension.load.dump import dumpd -from FourthDimension.schema.messages import BaseMessage - -logger = logging.getLogger(__name__) -_LOGGED = set() -_TRACERS: weakref.WeakSet[LangChainTracer] = weakref.WeakSet() -_CLIENT: Optional[Client] = None -_MAX_EXECUTORS = 10 # TODO: Remove once write queue is implemented -_EXECUTORS: List[ThreadPoolExecutor] = [] - - -def log_error_once(method: str, exception: Exception) -> None: - """Log an error once.""" - global _LOGGED - if (method, type(exception)) in _LOGGED: - return - _LOGGED.add((method, type(exception))) - logger.error(exception) - - -def wait_for_all_tracers() -> None: - """Wait for all tracers to finish.""" - global _TRACERS - for tracer in list(_TRACERS): - if tracer is not None: - tracer.wait_for_futures() - - -def get_client() -> Client: - """Get the client.""" - global _CLIENT - if _CLIENT is None: - _CLIENT = Client() - return _CLIENT - - -class LangChainTracer(BaseTracer): - """An implementation of the SharedTracer that POSTS to the langchain endpoint.""" - - def __init__( - self, - example_id: Optional[Union[UUID, str]] = None, - project_name: Optional[str] = None, - client: Optional[Client] = None, - tags: Optional[List[str]] = None, - use_threading: bool = True, - **kwargs: Any, - ) -> None: - """Initialize the LangChain tracer.""" - super().__init__(**kwargs) - self.session: Optional[TracerSession] = None - self.example_id = ( - UUID(example_id) if isinstance(example_id, str) else example_id - ) - self.project_name = project_name or os.getenv( - "LANGCHAIN_PROJECT", os.getenv("LANGCHAIN_SESSION", "default") - ) - if use_threading: - global _MAX_EXECUTORS - if len(_EXECUTORS) < _MAX_EXECUTORS: - self.executor: Optional[ThreadPoolExecutor] = ThreadPoolExecutor( - max_workers=1 - ) - _EXECUTORS.append(self.executor) - else: - self.executor = _EXECUTORS.pop(0) - _EXECUTORS.append(self.executor) - else: - self.executor = None - self.client = client or get_client() - self._futures: Set[Future] = set() - self.tags = tags or [] - global _TRACERS - _TRACERS.add(self) - - def on_chat_model_start( - self, - serialized: Dict[str, Any], - messages: List[List[BaseMessage]], - *, - run_id: UUID, - tags: Optional[List[str]] = None, - parent_run_id: Optional[UUID] = None, - metadata: Optional[Dict[str, Any]] = None, - name: Optional[str] = None, - **kwargs: Any, - ) -> None: - """Start a trace for an LLM run.""" - parent_run_id_ = str(parent_run_id) if parent_run_id else None - execution_order = self._get_execution_order(parent_run_id_) - start_time = datetime.utcnow() - if metadata: - kwargs.update({"metadata": metadata}) - chat_model_run = Run( - id=run_id, - parent_run_id=parent_run_id, - serialized=serialized, - inputs={"messages": [[dumpd(msg) for msg in batch] for batch in messages]}, - extra=kwargs, - events=[{"name": "start", "time": start_time}], - start_time=start_time, - execution_order=execution_order, - child_execution_order=execution_order, - run_type="llm", - tags=tags, - name=name, - ) - self._start_trace(chat_model_run) - self._on_chat_model_start(chat_model_run) - - def _persist_run(self, run: Run) -> None: - """The Langchain Tracer uses Post/Patch rather than persist.""" - - def _get_tags(self, run: Run) -> List[str]: - """Get combined tags for a run.""" - tags = set(run.tags or []) - tags.update(self.tags or []) - return list(tags) - - def _persist_run_single(self, run: Run) -> None: - """Persist a run.""" - run_dict = run.dict(exclude={"child_runs"}) - run_dict["tags"] = self._get_tags(run) - extra = run_dict.get("extra", {}) - # extra["runtime"] = get_runtime_environment() - run_dict["extra"] = extra - try: - self.client.create_run(**run_dict, project_name=self.project_name) - except Exception as e: - # Errors are swallowed by the thread executor so we need to log them here - log_error_once("post", e) - raise - - def _update_run_single(self, run: Run) -> None: - """Update a run.""" - try: - run_dict = run.dict() - run_dict["tags"] = self._get_tags(run) - self.client.update_run(run.id, **run_dict) - except Exception as e: - # Errors are swallowed by the thread executor so we need to log them here - log_error_once("patch", e) - raise - - def _submit(self, function: Callable[[Run], None], run: Run) -> None: - """Submit a function to the executor.""" - if self.executor is None: - function(run) - else: - self._futures.add(self.executor.submit(function, run)) - - def _on_llm_start(self, run: Run) -> None: - """Persist an LLM run.""" - if run.parent_run_id is None: - run.reference_example_id = self.example_id - self._submit(self._persist_run_single, run.copy(deep=True)) - - def _on_chat_model_start(self, run: Run) -> None: - """Persist an LLM run.""" - if run.parent_run_id is None: - run.reference_example_id = self.example_id - self._submit(self._persist_run_single, run.copy(deep=True)) - - def _on_llm_end(self, run: Run) -> None: - """Process the LLM Run.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_llm_error(self, run: Run) -> None: - """Process the LLM Run upon error.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_chain_start(self, run: Run) -> None: - """Process the Chain Run upon start.""" - if run.parent_run_id is None: - run.reference_example_id = self.example_id - self._submit(self._persist_run_single, run.copy(deep=True)) - - def _on_chain_end(self, run: Run) -> None: - """Process the Chain Run.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_chain_error(self, run: Run) -> None: - """Process the Chain Run upon error.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_tool_start(self, run: Run) -> None: - """Process the Tool Run upon start.""" - if run.parent_run_id is None: - run.reference_example_id = self.example_id - self._submit(self._persist_run_single, run.copy(deep=True)) - - def _on_tool_end(self, run: Run) -> None: - """Process the Tool Run.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_tool_error(self, run: Run) -> None: - """Process the Tool Run upon error.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_retriever_start(self, run: Run) -> None: - """Process the Retriever Run upon start.""" - if run.parent_run_id is None: - run.reference_example_id = self.example_id - self._submit(self._persist_run_single, run.copy(deep=True)) - - def _on_retriever_end(self, run: Run) -> None: - """Process the Retriever Run.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def _on_retriever_error(self, run: Run) -> None: - """Process the Retriever Run upon error.""" - self._submit(self._update_run_single, run.copy(deep=True)) - - def wait_for_futures(self) -> None: - """Wait for the given futures to complete.""" - futures = list(self._futures) - wait(futures) - for future in futures: - self._futures.remove(future) - diff --git a/src/callbacks/tracers/lc_v1.py b/src/callbacks/tracers/lc_v1.py deleted file mode 100644 index a7e005c88e64e6b0305b30b7ee4d7c67cae86559..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/lc_v1.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -import logging -import os -from typing import Any, Dict, Optional, Union - -import requests - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import ( - ChainRun, - LLMRun, - Run, - ToolRun, - TracerSession, - TracerSessionV1, - TracerSessionV1Base, -) -from FourthDimension.schema.messages import get_buffer_string -from FourthDimension.utils.utils import raise_for_status_with_text - -logger = logging.getLogger(__name__) - - -def get_headers() -> Dict[str, Any]: - """Get the headers for the LangChain API.""" - headers: Dict[str, Any] = {"Content-Type": "application/json"} - if os.getenv("LANGCHAIN_API_KEY"): - headers["x-api-key"] = os.getenv("LANGCHAIN_API_KEY") - return headers - - -def _get_endpoint() -> str: - return os.getenv("LANGCHAIN_ENDPOINT", "http://localhost:8000") - - -class LangChainTracerV1(BaseTracer): - """An implementation of the SharedTracer that POSTS to the langchain endpoint.""" - - def __init__(self, **kwargs: Any) -> None: - """Initialize the LangChain tracer.""" - super().__init__(**kwargs) - self.session: Optional[TracerSessionV1] = None - self._endpoint = _get_endpoint() - self._headers = get_headers() - - def _convert_to_v1_run(self, run: Run) -> Union[LLMRun, ChainRun, ToolRun]: - session = self.session or self.load_default_session() - if not isinstance(session, TracerSessionV1): - raise ValueError( - "LangChainTracerV1 is not compatible with" - f" session of type {type(session)}" - ) - - if run.run_type == "llm": - if "prompts" in run.inputs: - prompts = run.inputs["prompts"] - elif "messages" in run.inputs: - prompts = [get_buffer_string(batch) for batch in run.inputs["messages"]] - else: - raise ValueError("No prompts found in LLM run inputs") - return LLMRun( - uuid=str(run.id) if run.id else None, - parent_uuid=str(run.parent_run_id) if run.parent_run_id else None, - start_time=run.start_time, - end_time=run.end_time, - extra=run.extra, - execution_order=run.execution_order, - child_execution_order=run.child_execution_order, - serialized=run.serialized, - session_id=session.id, - error=run.error, - prompts=prompts, - response=run.outputs if run.outputs else None, - ) - if run.run_type == "chain": - child_runs = [self._convert_to_v1_run(run) for run in run.child_runs] - return ChainRun( - uuid=str(run.id) if run.id else None, - parent_uuid=str(run.parent_run_id) if run.parent_run_id else None, - start_time=run.start_time, - end_time=run.end_time, - execution_order=run.execution_order, - child_execution_order=run.child_execution_order, - serialized=run.serialized, - session_id=session.id, - inputs=run.inputs, - outputs=run.outputs, - error=run.error, - extra=run.extra, - child_llm_runs=[run for run in child_runs if isinstance(run, LLMRun)], - child_chain_runs=[ - run for run in child_runs if isinstance(run, ChainRun) - ], - child_tool_runs=[run for run in child_runs if isinstance(run, ToolRun)], - ) - if run.run_type == "tool": - child_runs = [self._convert_to_v1_run(run) for run in run.child_runs] - return ToolRun( - uuid=str(run.id) if run.id else None, - parent_uuid=str(run.parent_run_id) if run.parent_run_id else None, - start_time=run.start_time, - end_time=run.end_time, - execution_order=run.execution_order, - child_execution_order=run.child_execution_order, - serialized=run.serialized, - session_id=session.id, - action=str(run.serialized), - tool_input=run.inputs.get("input", ""), - output=None if run.outputs is None else run.outputs.get("output"), - error=run.error, - extra=run.extra, - child_chain_runs=[ - run for run in child_runs if isinstance(run, ChainRun) - ], - child_tool_runs=[run for run in child_runs if isinstance(run, ToolRun)], - child_llm_runs=[run for run in child_runs if isinstance(run, LLMRun)], - ) - raise ValueError(f"Unknown run type: {run.run_type}") - - def _persist_run(self, run: Union[Run, LLMRun, ChainRun, ToolRun]) -> None: - """Persist a run.""" - if isinstance(run, Run): - v1_run = self._convert_to_v1_run(run) - else: - v1_run = run - if isinstance(v1_run, LLMRun): - endpoint = f"{self._endpoint}/llm-runs" - elif isinstance(v1_run, ChainRun): - endpoint = f"{self._endpoint}/chain-runs" - else: - endpoint = f"{self._endpoint}/tool-runs" - - try: - response = requests.post( - endpoint, - data=v1_run.json(), - headers=self._headers, - ) - raise_for_status_with_text(response) - except Exception as e: - logger.warning(f"Failed to persist run: {e}") - - def _persist_session( - self, session_create: TracerSessionV1Base - ) -> Union[TracerSessionV1, TracerSession]: - """Persist a session.""" - try: - r = requests.post( - f"{self._endpoint}/sessions", - data=session_create.json(), - headers=self._headers, - ) - session = TracerSessionV1(id=r.json()["id"], **session_create.dict()) - except Exception as e: - logger.warning(f"Failed to create session, using default session: {e}") - session = TracerSessionV1(id=1, **session_create.dict()) - return session - - def _load_session(self, session_name: Optional[str] = None) -> TracerSessionV1: - """Load a session from the tracer.""" - try: - url = f"{self._endpoint}/sessions" - if session_name: - url += f"?name={session_name}" - r = requests.get(url, headers=self._headers) - - tracer_session = TracerSessionV1(**r.json()[0]) - except Exception as e: - session_type = "default" if not session_name else session_name - logger.warning( - f"Failed to load {session_type} session, using empty session: {e}" - ) - tracer_session = TracerSessionV1(id=1) - - self.session = tracer_session - return tracer_session - - def load_session(self, session_name: str) -> Union[TracerSessionV1, TracerSession]: - """Load a session with the given name from the tracer.""" - return self._load_session(session_name) - - def load_default_session(self) -> Union[TracerSessionV1, TracerSession]: - """Load the default tracing session and set it as the Tracer's session.""" - return self._load_session("default") - diff --git a/src/callbacks/tracers/log_stream.py b/src/callbacks/tracers/log_stream.py deleted file mode 100644 index 7635a4706e4686b0bbdbacce502d0ea57a121781..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/log_stream.py +++ /dev/null @@ -1,294 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -import math -import threading -from typing import ( - Any, - AsyncIterator, - Dict, - List, - Optional, - Sequence, - TypedDict, - Union, -) -from uuid import UUID - -import jsonpatch -from anyio import create_memory_object_stream - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import Run -from FourthDimension.schema.output import ChatGenerationChunk, GenerationChunk - - -class LogEntry(TypedDict): - id: str - """ID of the sub-run.""" - name: str - """Name of the object being run.""" - type: str - """Type of the object being run, eg. prompt, chain, llm, etc.""" - tags: List[str] - """List of tags for the run.""" - metadata: Dict[str, Any] - """Key-value pairs of metadata for the run.""" - start_time: str - """ISO-8601 timestamp of when the run started.""" - - streamed_output_str: List[str] - """List of LLM tokens streamed by this run, if applicable.""" - final_output: Optional[Any] - """Final output of this run. - Only available after the run has finished successfully.""" - end_time: Optional[str] - """ISO-8601 timestamp of when the run ended. - Only available after the run has finished.""" - - -class RunState(TypedDict): - id: str - """ID of the run.""" - streamed_output: List[Any] - """List of output chunks streamed by Runnable.stream()""" - final_output: Optional[Any] - """Final output of the run, usually the result of aggregating streamed_output. - Only available after the run has finished successfully.""" - - logs: list[LogEntry] - """List of sub-runs contained in this run, if any, in the order they were started. - If filters were supplied, this list will contain only the runs that matched the - filters.""" - - -class RunLogPatch: - ops: List[Dict[str, Any]] - """List of jsonpatch operations, which describe how to create the run state - from an empty dict. This is the minimal representation of the log, designed to - be serialized as JSON and sent over the wire to reconstruct the log on the other - side. Reconstruction of the state can be done with any jsonpatch-compliant library, - see https://jsonpatch.com for more information.""" - - def __init__(self, *ops: Dict[str, Any]) -> None: - self.ops = list(ops) - - def __add__(self, other: Union[RunLogPatch, Any]) -> RunLogPatch: - if type(other) == RunLogPatch: - ops = self.ops + other.ops - state = jsonpatch.apply_patch(None, ops) - return RunLog(*ops, state=state) - - raise TypeError( - f"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'" - ) - - def __repr__(self) -> str: - from pprint import pformat - - return f"RunLogPatch(ops={pformat(self.ops)})" - - def __eq__(self, other: object) -> bool: - return isinstance(other, RunLogPatch) and self.ops == other.ops - - -class RunLog(RunLogPatch): - state: RunState - """Current state of the log, obtained from applying all ops in sequence.""" - - def __init__(self, *ops: Dict[str, Any], state: RunState) -> None: - super().__init__(*ops) - self.state = state - - def __add__(self, other: Union[RunLogPatch, Any]) -> RunLogPatch: - if type(other) == RunLogPatch: - ops = self.ops + other.ops - state = jsonpatch.apply_patch(self.state, other.ops) - return RunLog(*ops, state=state) - - raise TypeError( - f"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'" - ) - - def __repr__(self) -> str: - from pprint import pformat - - return f"RunLog(state={pformat(self.state)})" - - -class LogStreamCallbackHandler(BaseTracer): - def __init__( - self, - *, - auto_close: bool = True, - include_names: Optional[Sequence[str]] = None, - include_types: Optional[Sequence[str]] = None, - include_tags: Optional[Sequence[str]] = None, - exclude_names: Optional[Sequence[str]] = None, - exclude_types: Optional[Sequence[str]] = None, - exclude_tags: Optional[Sequence[str]] = None, - ) -> None: - super().__init__() - - self.auto_close = auto_close - self.include_names = include_names - self.include_types = include_types - self.include_tags = include_tags - self.exclude_names = exclude_names - self.exclude_types = exclude_types - self.exclude_tags = exclude_tags - - send_stream, receive_stream = create_memory_object_stream( - math.inf, item_type=RunLogPatch - ) - self.lock = threading.Lock() - self.send_stream = send_stream - self.receive_stream = receive_stream - self._index_map: Dict[UUID, int] = {} - - def __aiter__(self) -> AsyncIterator[RunLogPatch]: - return self.receive_stream.__aiter__() - - def include_run(self, run: Run) -> bool: - if run.parent_run_id is None: - return False - - run_tags = run.tags or [] - - if ( - self.include_names is None - and self.include_types is None - and self.include_tags is None - ): - include = True - else: - include = False - - if self.include_names is not None: - include = include or run.name in self.include_names - if self.include_types is not None: - include = include or run.run_type in self.include_types - if self.include_tags is not None: - include = include or any(tag in self.include_tags for tag in run_tags) - - if self.exclude_names is not None: - include = include and run.name not in self.exclude_names - if self.exclude_types is not None: - include = include and run.run_type not in self.exclude_types - if self.exclude_tags is not None: - include = include and all(tag not in self.exclude_tags for tag in run_tags) - - return include - - def _persist_run(self, run: Run) -> None: - # This is a legacy method only called once for an entire run tree - # therefore not useful here - pass - - def _on_run_create(self, run: Run) -> None: - """Start a run.""" - if run.parent_run_id is None: - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "replace", - "path": "", - "value": RunState( - id=run.id, - streamed_output=[], - final_output=None, - logs=[], - ), - } - ) - ) - - if not self.include_run(run): - return - - # Determine previous index, increment by 1 - with self.lock: - self._index_map[run.id] = max(self._index_map.values(), default=-1) + 1 - - # Add the run to the stream - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "add", - "path": f"/logs/{self._index_map[run.id]}", - "value": LogEntry( - id=str(run.id), - name=run.name, - type=run.run_type, - tags=run.tags or [], - metadata=run.extra.get("metadata", {}), - start_time=run.start_time.isoformat(timespec="milliseconds"), - streamed_output_str=[], - final_output=None, - end_time=None, - ), - } - ) - ) - - def _on_run_update(self, run: Run) -> None: - """Finish a run.""" - try: - index = self._index_map.get(run.id) - - if index is None: - return - - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "add", - "path": f"/logs/{index}/final_output", - "value": run.outputs, - }, - { - "op": "add", - "path": f"/logs/{index}/end_time", - "value": run.end_time.isoformat(timespec="milliseconds"), - }, - ) - ) - finally: - if run.parent_run_id is None: - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "replace", - "path": "/final_output", - "value": run.outputs, - } - ) - ) - if self.auto_close: - self.send_stream.close() - - def _on_llm_new_token( - self, - run: Run, - token: str, - chunk: Optional[Union[GenerationChunk, ChatGenerationChunk]], - ) -> None: - """Process new LLM token.""" - index = self._index_map.get(run.id) - - if index is None: - return - - self.send_stream.send_nowait( - RunLogPatch( - { - "op": "add", - "path": f"/logs/{index}/streamed_output_str/-", - "value": token, - } - ) - ) - diff --git a/src/callbacks/tracers/run_collector.py b/src/callbacks/tracers/run_collector.py deleted file mode 100644 index 0887d67538086bbdaf7fa9c863c29fb3d73b0c03..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/run_collector.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""A tracer that collects all nested runs in a list.""" - -from typing import Any, List, Optional, Union -from uuid import UUID - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import Run - - -class RunCollectorCallbackHandler(BaseTracer): - """ - A tracer that collects all nested runs in a list. - - This tracer is useful for inspection and evaluation purposes. - - Parameters - ---------- - example_id : Optional[Union[UUID, str]], default=None - The ID of the example being traced. It can be either a UUID or a string. - """ - - name: str = "run-collector_callback_handler" - - def __init__( - self, example_id: Optional[Union[UUID, str]] = None, **kwargs: Any - ) -> None: - """ - Initialize the RunCollectorCallbackHandler. - - Parameters - ---------- - example_id : Optional[Union[UUID, str]], default=None - The ID of the example being traced. It can be either a UUID or a string. - """ - super().__init__(**kwargs) - self.example_id = ( - UUID(example_id) if isinstance(example_id, str) else example_id - ) - self.traced_runs: List[Run] = [] - - def _persist_run(self, run: Run) -> None: - """ - Persist a run by adding it to the traced_runs list. - - Parameters - ---------- - run : Run - The run to be persisted. - """ - run_ = run.copy() - run_.reference_example_id = self.example_id - self.traced_runs.append(run_) - diff --git a/src/callbacks/tracers/schemas.py b/src/callbacks/tracers/schemas.py deleted file mode 100644 index 8e48d7fdb0e9b57a21f4a3eac6c4533934369181..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/schemas.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""Schemas for tracers.""" -from __future__ import annotations - -import datetime -import warnings -from typing import Any, Dict, List, Optional -from uuid import UUID - -from pydantic import Field, root_validator -from pydantic.main import BaseModel - -from FourthDimension.faiss_process.ls_schemas import RunBase as BaseRunV2 -from FourthDimension.faiss_process.ls_schemas import RunTypeEnum as RunTypeEnumDep - -from FourthDimension.schema.output import LLMResult - - -def RunTypeEnum() -> RunTypeEnumDep: - """RunTypeEnum.""" - warnings.warn( - "RunTypeEnum is deprecated. Please directly use a string instead" - " (e.g. 'llm', 'chain', 'tool').", - DeprecationWarning, - ) - return RunTypeEnumDep - - -class TracerSessionV1Base(BaseModel): - """Base class for TracerSessionV1.""" - - start_time: datetime.datetime = Field(default_factory=datetime.datetime.utcnow) - name: Optional[str] = None - extra: Optional[Dict[str, Any]] = None - - -class TracerSessionV1Create(TracerSessionV1Base): - """Create class for TracerSessionV1.""" - - -class TracerSessionV1(TracerSessionV1Base): - """TracerSessionV1 schema.""" - - id: int - - -class TracerSessionBase(TracerSessionV1Base): - """Base class for TracerSession.""" - - tenant_id: UUID - - -class TracerSession(TracerSessionBase): - """TracerSessionV1 schema for the V2 API.""" - - id: UUID - - -class BaseRun(BaseModel): - """Base class for Run.""" - - uuid: str - parent_uuid: Optional[str] = None - start_time: datetime.datetime = Field(default_factory=datetime.datetime.utcnow) - end_time: datetime.datetime = Field(default_factory=datetime.datetime.utcnow) - extra: Optional[Dict[str, Any]] = None - execution_order: int - child_execution_order: int - serialized: Dict[str, Any] - session_id: int - error: Optional[str] = None - - -class LLMRun(BaseRun): - """Class for LLMRun.""" - - prompts: List[str] - response: Optional[LLMResult] = None - - -class ChainRun(BaseRun): - """Class for ChainRun.""" - - inputs: Dict[str, Any] - outputs: Optional[Dict[str, Any]] = None - child_llm_runs: List[LLMRun] = Field(default_factory=list) - child_chain_runs: List[ChainRun] = Field(default_factory=list) - child_tool_runs: List[ToolRun] = Field(default_factory=list) - - -class ToolRun(BaseRun): - """Class for ToolRun.""" - - tool_input: str - output: Optional[str] = None - action: str - child_llm_runs: List[LLMRun] = Field(default_factory=list) - child_chain_runs: List[ChainRun] = Field(default_factory=list) - child_tool_runs: List[ToolRun] = Field(default_factory=list) - - -# Begin V2 API Schemas - - -class Run(BaseRunV2): - """Run schema for the V2 API in the Tracer.""" - - execution_order: int - child_execution_order: int - child_runs: List[Run] = Field(default_factory=list) - tags: Optional[List[str]] = Field(default_factory=list) - - @root_validator(pre=True) - def assign_name(cls, values: dict) -> dict: - """Assign name to the run.""" - if values.get("name") is None: - if "name" in values["serialized"]: - values["name"] = values["serialized"]["name"] - elif "id" in values["serialized"]: - values["name"] = values["serialized"]["id"][-1] - return values - - -ChainRun.update_forward_refs() -ToolRun.update_forward_refs() -Run.update_forward_refs() - -__all__ = [ - "BaseRun", - "ChainRun", - "LLMRun", - "Run", - "RunTypeEnum", - "ToolRun", - "TracerSession", - "TracerSessionBase", - "TracerSessionV1", - "TracerSessionV1Base", - "TracerSessionV1Create", -] diff --git a/src/callbacks/tracers/stdout.py b/src/callbacks/tracers/stdout.py deleted file mode 100644 index f00ab9f8441431a9154127b18fa2915adbc5cfb1..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/stdout.py +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -import json -from typing import Any, Callable, List - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import Run -from FourthDimension.utils.input import get_bolded_text, get_colored_text - - -def try_json_stringify(obj: Any, fallback: str) -> str: - """ - Try to stringify an object to JSON. - Args: - obj: Object to stringify. - fallback: Fallback string to return if the object cannot be stringified. - - Returns: - A JSON string if the object can be stringified, otherwise the fallback string. - - """ - try: - return json.dumps(obj, indent=2, ensure_ascii=False) - except Exception: - return fallback - - -def elapsed(run: Any) -> str: - """Get the elapsed time of a run. - - Args: - run: any object with a start_time and end_time attribute. - - Returns: - A string with the elapsed time in seconds or - milliseconds if time is less than a second. - - """ - elapsed_time = run.end_time - run.start_time - milliseconds = elapsed_time.total_seconds() * 1000 - if milliseconds < 1000: - return f"{milliseconds:.0f}ms" - return f"{(milliseconds / 1000):.2f}s" - - -class FunctionCallbackHandler(BaseTracer): - """Tracer that calls a function with a single str parameter.""" - - name: str = "function_callback_handler" - - def __init__(self, function: Callable[[str], None], **kwargs: Any) -> None: - super().__init__(**kwargs) - self.function_callback = function - - def _persist_run(self, run: Run) -> None: - pass - - def get_parents(self, run: Run) -> List[Run]: - parents = [] - current_run = run - while current_run.parent_run_id: - parent = self.run_map.get(str(current_run.parent_run_id)) - if parent: - parents.append(parent) - current_run = parent - else: - break - return parents - - def get_breadcrumbs(self, run: Run) -> str: - parents = self.get_parents(run)[::-1] - string = " > ".join( - f"{parent.execution_order}:{parent.run_type}:{parent.name}" - if i != len(parents) - 1 - else f"{parent.execution_order}:{parent.run_type}:{parent.name}" - for i, parent in enumerate(parents + [run]) - ) - return string - - # logging methods - def _on_chain_start(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - run_type = run.run_type.capitalize() - self.function_callback( - f"{get_colored_text('[chain/start]', color='green')} " - + get_bolded_text(f"[{crumbs}] Entering {run_type} run with input:\n") - + f"{try_json_stringify(run.inputs, '[inputs]')}" - ) - - def _on_chain_end(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - run_type = run.run_type.capitalize() - self.function_callback( - f"{get_colored_text('[chain/end]', color='blue')} " - + get_bolded_text( - f"[{crumbs}] [{elapsed(run)}] Exiting {run_type} run with output:\n" - ) - + f"{try_json_stringify(run.outputs, '[outputs]')}" - ) - - def _on_chain_error(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - run_type = run.run_type.capitalize() - self.function_callback( - f"{get_colored_text('[chain/error]', color='red')} " - + get_bolded_text( - f"[{crumbs}] [{elapsed(run)}] {run_type} run errored with error:\n" - ) - + f"{try_json_stringify(run.error, '[error]')}" - ) - - def _on_llm_start(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - inputs = ( - {"prompts": [p.strip() for p in run.inputs["prompts"]]} - if "prompts" in run.inputs - else run.inputs - ) - self.function_callback( - f"{get_colored_text('[llm/start]', color='green')} " - + get_bolded_text(f"[{crumbs}] Entering LLM run with input:\n") - + f"{try_json_stringify(inputs, '[inputs]')}" - ) - - def _on_llm_end(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - self.function_callback( - f"{get_colored_text('[llm/end]', color='blue')} " - + get_bolded_text( - f"[{crumbs}] [{elapsed(run)}] Exiting LLM run with output:\n" - ) - + f"{try_json_stringify(run.outputs, '[response]')}" - ) - - def _on_llm_error(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - self.function_callback( - f"{get_colored_text('[llm/error]', color='red')} " - + get_bolded_text( - f"[{crumbs}] [{elapsed(run)}] LLM run errored with error:\n" - ) - + f"{try_json_stringify(run.error, '[error]')}" - ) - - def _on_tool_start(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - self.function_callback( - f'{get_colored_text("[tool/start]", color="green")} ' - + get_bolded_text(f"[{crumbs}] Entering Tool run with input:\n") - + f'"{run.inputs["input"].strip()}"' - ) - - def _on_tool_end(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - if run.outputs: - self.function_callback( - f'{get_colored_text("[tool/end]", color="blue")} ' - + get_bolded_text( - f"[{crumbs}] [{elapsed(run)}] Exiting Tool run with output:\n" - ) - + f'"{run.outputs["output"].strip()}"' - ) - - def _on_tool_error(self, run: Run) -> None: - crumbs = self.get_breadcrumbs(run) - self.function_callback( - f"{get_colored_text('[tool/error]', color='red')} " - + get_bolded_text(f"[{crumbs}] [{elapsed(run)}] ") - + f"Tool run errored with error:\n" - f"{run.error}" - ) - - -class ConsoleCallbackHandler(FunctionCallbackHandler): - """Tracer that prints to the console.""" - - name: str = "console_callback_handler" - - def __init__(self, **kwargs: Any) -> None: - super().__init__(function=print, **kwargs) - diff --git a/src/callbacks/tracers/wandb.py b/src/callbacks/tracers/wandb.py deleted file mode 100644 index 3f1a681d140cad048d3bddf2948d254af87d8c69..0000000000000000000000000000000000000000 --- a/src/callbacks/tracers/wandb.py +++ /dev/null @@ -1,514 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""A Tracer Implementation that records activity to Weights & Biases.""" -from __future__ import annotations - -import json -from typing import ( - TYPE_CHECKING, - Any, - Dict, - List, - Optional, - Sequence, - Tuple, - TypedDict, - Union, -) - -from FourthDimension.callbacks.tracers.base import BaseTracer -from FourthDimension.callbacks.tracers.schemas import Run - -if TYPE_CHECKING: - from wandb import Settings as WBSettings - from wandb.sdk.data_types.trace_tree import Span - from wandb.sdk.lib.paths import StrPath - from wandb.wandb_run import Run as WBRun - - -PRINT_WARNINGS = True - - -def _serialize_io(run_inputs: dict) -> dict: - from google.protobuf.json_format import MessageToJson - from google.protobuf.message import Message - - serialized_inputs = {} - for key, value in run_inputs.items(): - if isinstance(value, Message): - serialized_inputs[key] = MessageToJson(value) - elif key == "input_documents": - serialized_inputs.update( - {f"input_document_{i}": doc.json() for i, doc in enumerate(value)} - ) - else: - serialized_inputs[key] = value - return serialized_inputs - - -class RunProcessor: - """Handles the conversion of a LangChain Runs into a WBTraceTree.""" - - def __init__(self, wandb_module: Any, trace_module: Any): - self.wandb = wandb_module - self.trace_tree = trace_module - - def process_span(self, run: Run) -> Optional["Span"]: - """Converts a LangChain Run into a W&B Trace Span. - :param run: The LangChain Run to convert. - :return: The converted W&B Trace Span. - """ - try: - span = self._convert_lc_run_to_wb_span(run) - return span - except Exception as e: - if PRINT_WARNINGS: - self.wandb.termwarn( - f"Skipping trace saving - unable to safely convert LangChain Run " - f"into W&B Trace due to: {e}" - ) - return None - - def _convert_run_to_wb_span(self, run: Run) -> "Span": - """Base utility to create a span from a run. - :param run: The run to convert. - :return: The converted Span. - """ - attributes = {**run.extra} if run.extra else {} - attributes["execution_order"] = run.execution_order - - return self.trace_tree.Span( - span_id=str(run.id) if run.id is not None else None, - name=run.name, - start_time_ms=int(run.start_time.timestamp() * 1000), - end_time_ms=int(run.end_time.timestamp() * 1000), - status_code=self.trace_tree.StatusCode.SUCCESS - if run.error is None - else self.trace_tree.StatusCode.ERROR, - status_message=run.error, - attributes=attributes, - ) - - def _convert_llm_run_to_wb_span(self, run: Run) -> "Span": - """Converts a LangChain LLM Run into a W&B Trace Span. - :param run: The LangChain LLM Run to convert. - :return: The converted W&B Trace Span. - """ - base_span = self._convert_run_to_wb_span(run) - if base_span.attributes is None: - base_span.attributes = {} - base_span.attributes["llm_output"] = run.outputs.get("llm_output", {}) - - base_span.results = [ - self.trace_tree.Result( - inputs={"prompt": prompt}, - outputs={ - f"gen_{g_i}": gen["text"] - for g_i, gen in enumerate(run.outputs["generations"][ndx]) - } - if ( - run.outputs is not None - and len(run.outputs["generations"]) > ndx - and len(run.outputs["generations"][ndx]) > 0 - ) - else None, - ) - for ndx, prompt in enumerate(run.inputs["prompts"] or []) - ] - base_span.span_kind = self.trace_tree.SpanKind.LLM - - return base_span - - def _convert_chain_run_to_wb_span(self, run: Run) -> "Span": - """Converts a LangChain Chain Run into a W&B Trace Span. - :param run: The LangChain Chain Run to convert. - :return: The converted W&B Trace Span. - """ - base_span = self._convert_run_to_wb_span(run) - - base_span.results = [ - self.trace_tree.Result( - inputs=_serialize_io(run.inputs), outputs=_serialize_io(run.outputs) - ) - ] - base_span.child_spans = [ - self._convert_lc_run_to_wb_span(child_run) for child_run in run.child_runs - ] - base_span.span_kind = ( - self.trace_tree.SpanKind.AGENT - if "agent" in run.name.lower() - else self.trace_tree.SpanKind.CHAIN - ) - - return base_span - - def _convert_tool_run_to_wb_span(self, run: Run) -> "Span": - """Converts a LangChain Tool Run into a W&B Trace Span. - :param run: The LangChain Tool Run to convert. - :return: The converted W&B Trace Span. - """ - base_span = self._convert_run_to_wb_span(run) - base_span.results = [ - self.trace_tree.Result( - inputs=_serialize_io(run.inputs), outputs=_serialize_io(run.outputs) - ) - ] - base_span.child_spans = [ - self._convert_lc_run_to_wb_span(child_run) for child_run in run.child_runs - ] - base_span.span_kind = self.trace_tree.SpanKind.TOOL - - return base_span - - def _convert_lc_run_to_wb_span(self, run: Run) -> "Span": - """Utility to convert any generic LangChain Run into a W&B Trace Span. - :param run: The LangChain Run to convert. - :return: The converted W&B Trace Span. - """ - if run.run_type == "llm": - return self._convert_llm_run_to_wb_span(run) - elif run.run_type == "chain": - return self._convert_chain_run_to_wb_span(run) - elif run.run_type == "tool": - return self._convert_tool_run_to_wb_span(run) - else: - return self._convert_run_to_wb_span(run) - - def process_model(self, run: Run) -> Optional[Dict[str, Any]]: - """Utility to process a run for wandb model_dict serialization. - :param run: The run to process. - :return: The convert model_dict to pass to WBTraceTree. - """ - try: - data = json.loads(run.json()) - processed = self.flatten_run(data) - keep_keys = ( - "id", - "name", - "serialized", - "inputs", - "outputs", - "parent_run_id", - "execution_order", - ) - processed = self.truncate_run_iterative(processed, keep_keys=keep_keys) - exact_keys, partial_keys = ("lc", "type"), ("api_key",) - processed = self.modify_serialized_iterative( - processed, exact_keys=exact_keys, partial_keys=partial_keys - ) - output = self.build_tree(processed) - return output - except Exception as e: - if PRINT_WARNINGS: - self.wandb.termwarn(f"WARNING: Failed to serialize model: {e}") - return None - - def flatten_run(self, run: Dict[str, Any]) -> List[Dict[str, Any]]: - """Utility to flatten a nest run object into a list of runs. - :param run: The base run to flatten. - :return: The flattened list of runs. - """ - - def flatten(child_runs: List[Dict[str, Any]]) -> List[Dict[str, Any]]: - """Utility to recursively flatten a list of child runs in a run. - :param child_runs: The list of child runs to flatten. - :return: The flattened list of runs. - """ - if child_runs is None: - return [] - - result = [] - for item in child_runs: - child_runs = item.pop("child_runs", []) - result.append(item) - result.extend(flatten(child_runs)) - - return result - - return flatten([run]) - - def truncate_run_iterative( - self, runs: List[Dict[str, Any]], keep_keys: Tuple[str, ...] = () - ) -> List[Dict[str, Any]]: - """Utility to truncate a list of runs dictionaries to only keep the specified - keys in each run. - :param runs: The list of runs to truncate. - :param keep_keys: The keys to keep in each run. - :return: The truncated list of runs. - """ - - def truncate_single(run: Dict[str, Any]) -> Dict[str, Any]: - """Utility to truncate a single run dictionary to only keep the specified - keys. - :param run: The run dictionary to truncate. - :return: The truncated run dictionary - """ - new_dict = {} - for key in run: - if key in keep_keys: - new_dict[key] = run.get(key) - return new_dict - - return list(map(truncate_single, runs)) - - def modify_serialized_iterative( - self, - runs: List[Dict[str, Any]], - exact_keys: Tuple[str, ...] = (), - partial_keys: Tuple[str, ...] = (), - ) -> List[Dict[str, Any]]: - """Utility to modify the serialized field of a list of runs dictionaries. - removes any keys that match the exact_keys and any keys that contain any of the - partial_keys. - recursively moves the dictionaries under the kwargs key to the top level. - changes the "id" field to a string "_kind" field that tells WBTraceTree how to - visualize the run. promotes the "serialized" field to the top level. - - :param runs: The list of runs to modify. - :param exact_keys: A tuple of keys to remove from the serialized field. - :param partial_keys: A tuple of partial keys to remove from the serialized - field. - :return: The modified list of runs. - """ - - def remove_exact_and_partial_keys(obj: Dict[str, Any]) -> Dict[str, Any]: - """Recursively removes exact and partial keys from a dictionary. - :param obj: The dictionary to remove keys from. - :return: The modified dictionary. - """ - if isinstance(obj, dict): - obj = { - k: v - for k, v in obj.items() - if k not in exact_keys - and not any(partial in k for partial in partial_keys) - } - for k, v in obj.items(): - obj[k] = remove_exact_and_partial_keys(v) - elif isinstance(obj, list): - obj = [remove_exact_and_partial_keys(x) for x in obj] - return obj - - def handle_id_and_kwargs( - obj: Dict[str, Any], root: bool = False - ) -> Dict[str, Any]: - """Recursively handles the id and kwargs fields of a dictionary. - changes the id field to a string "_kind" field that tells WBTraceTree how - to visualize the run. recursively moves the dictionaries under the kwargs - key to the top level. - :param obj: a run dictionary with id and kwargs fields. - :param root: whether this is the root dictionary or the serialized - dictionary. - :return: The modified dictionary. - """ - if isinstance(obj, dict): - if ("id" in obj or "name" in obj) and not root: - _kind = obj.get("id") - if not _kind: - _kind = [obj.get("name")] - obj["_kind"] = _kind[-1] - obj.pop("id", None) - obj.pop("name", None) - if "kwargs" in obj: - kwargs = obj.pop("kwargs") - for k, v in kwargs.items(): - obj[k] = v - for k, v in obj.items(): - obj[k] = handle_id_and_kwargs(v) - elif isinstance(obj, list): - obj = [handle_id_and_kwargs(x) for x in obj] - return obj - - def transform_serialized(serialized: Dict[str, Any]) -> Dict[str, Any]: - """Transforms the serialized field of a run dictionary to be compatible - with WBTraceTree. - :param serialized: The serialized field of a run dictionary. - :return: The transformed serialized field. - """ - serialized = handle_id_and_kwargs(serialized, root=True) - serialized = remove_exact_and_partial_keys(serialized) - return serialized - - def transform_run(run: Dict[str, Any]) -> Dict[str, Any]: - """Transforms a run dictionary to be compatible with WBTraceTree. - :param run: The run dictionary to transform. - :return: The transformed run dictionary. - """ - transformed_dict = transform_serialized(run) - - serialized = transformed_dict.pop("serialized") - for k, v in serialized.items(): - transformed_dict[k] = v - - _kind = transformed_dict.get("_kind", None) - name = transformed_dict.pop("name", None) - exec_ord = transformed_dict.pop("execution_order", None) - - if not name: - name = _kind - - output_dict = { - f"{exec_ord}_{name}": transformed_dict, - } - return output_dict - - return list(map(transform_run, runs)) - - def build_tree(self, runs: List[Dict[str, Any]]) -> Dict[str, Any]: - """Builds a nested dictionary from a list of runs. - :param runs: The list of runs to build the tree from. - :return: The nested dictionary representing the langchain Run in a tree - structure compatible with WBTraceTree. - """ - id_to_data = {} - child_to_parent = {} - - for entity in runs: - for key, data in entity.items(): - id_val = data.pop("id", None) - parent_run_id = data.pop("parent_run_id", None) - id_to_data[id_val] = {key: data} - if parent_run_id: - child_to_parent[id_val] = parent_run_id - - for child_id, parent_id in child_to_parent.items(): - parent_dict = id_to_data[parent_id] - parent_dict[next(iter(parent_dict))][ - next(iter(id_to_data[child_id])) - ] = id_to_data[child_id][next(iter(id_to_data[child_id]))] - - root_dict = next( - data for id_val, data in id_to_data.items() if id_val not in child_to_parent - ) - - return root_dict - - -class WandbRunArgs(TypedDict): - """Arguments for the WandbTracer.""" - - job_type: Optional[str] - dir: Optional[StrPath] - config: Union[Dict, str, None] - project: Optional[str] - entity: Optional[str] - reinit: Optional[bool] - tags: Optional[Sequence] - group: Optional[str] - name: Optional[str] - notes: Optional[str] - magic: Optional[Union[dict, str, bool]] - config_exclude_keys: Optional[List[str]] - config_include_keys: Optional[List[str]] - anonymous: Optional[str] - mode: Optional[str] - allow_val_change: Optional[bool] - resume: Optional[Union[bool, str]] - force: Optional[bool] - tensorboard: Optional[bool] - sync_tensorboard: Optional[bool] - monitor_gym: Optional[bool] - save_code: Optional[bool] - id: Optional[str] - settings: Union[WBSettings, Dict[str, Any], None] - - -class WandbTracer(BaseTracer): - """Callback Handler that logs to Weights and Biases. - - This handler will log the model architecture and run traces to Weights and Biases. - This will ensure that all LangChain activity is logged to W&B. - """ - - _run: Optional[WBRun] = None - _run_args: Optional[WandbRunArgs] = None - - def __init__(self, run_args: Optional[WandbRunArgs] = None, **kwargs: Any) -> None: - """Initializes the WandbTracer. - - Parameters: - run_args: (dict, optional) Arguments to pass to `wandb.init()`. If not - provided, `wandb.init()` will be called with no arguments. Please - refer to the `wandb.init` for more details. - - To use W&B to monitor all LangChain activity, add this tracer like any other - LangChain callback: - ``` - from wandb.integration.langchain import WandbTracer - - tracer = WandbTracer() - chain = LLMChain(llm, callbacks=[tracer]) - # ...end of notebook / script: - tracer.finish() - ``` - """ - super().__init__(**kwargs) - try: - import wandb - from wandb.sdk.data_types import trace_tree - except ImportError as e: - raise ImportError( - "Could not import wandb python package." - "Please install it with `pip install -U wandb`." - ) from e - self._wandb = wandb - self._trace_tree = trace_tree - self._run_args = run_args - self._ensure_run(should_print_url=(wandb.run is None)) - self.run_processor = RunProcessor(self._wandb, self._trace_tree) - - def finish(self) -> None: - """Waits for all asynchronous processes to finish and data to upload. - - Proxy for `wandb.finish()`. - """ - self._wandb.finish() - - def _log_trace_from_run(self, run: Run) -> None: - """Logs a LangChain Run to W*B as a W&B Trace.""" - self._ensure_run() - - root_span = self.run_processor.process_span(run) - model_dict = self.run_processor.process_model(run) - - if root_span is None: - return - - model_trace = self._trace_tree.WBTraceTree( - root_span=root_span, - model_dict=model_dict, - ) - if self._wandb.run is not None: - self._wandb.run.log({"langchain_trace": model_trace}) - - def _ensure_run(self, should_print_url: bool = False) -> None: - """Ensures an active W&B run exists. - - If not, will start a new run with the provided run_args. - """ - if self._wandb.run is None: - run_args = self._run_args or {} # type: ignore - run_args: dict = {**run_args} # type: ignore - - if "settings" not in run_args: # type: ignore - run_args["settings"] = {"silent": True} # type: ignore - - self._wandb.init(**run_args) - if self._wandb.run is not None: - if should_print_url: - run_url = self._wandb.run.settings.run_url - self._wandb.termlog( - f"Streaming LangChain activity to W&B at {run_url}\n" - "`WandbTracer` is currently in beta.\n" - "Please report any issues to " - "https://github.com/wandb/wandb/issues with the tag " - "`langchain`." - ) - - self._wandb.run._label(repo="langchain") - - def _persist_run(self, run: "Run") -> None: - """Persist a run.""" - self._log_trace_from_run(run) diff --git a/src/config/__init__.py b/src/config/__init__.py deleted file mode 100644 index 83d8d7254ec1ef5a3441663f8d933c5342b52c71..0000000000000000000000000000000000000000 --- a/src/config/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - - diff --git a/src/doc/__init__.py b/src/doc/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/doc/base.py b/src/doc/base.py deleted file mode 100644 index c1cc1a99abaf3d4c12ba3a377727cfbe05365044..0000000000000000000000000000000000000000 --- a/src/doc/base.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from abc import ABC, abstractmethod -from typing import Dict, List, Union - -from FourthDimension.doc.document import Document - -""" -文件说明: -""" - - -class Docstore(ABC): - """Interface to access to place that stores documents.""" - - @abstractmethod - def search(self, search: str) -> Union[str, Document]: - """Search for document. - - If page exists, return the page summary, and a Document object. - If page does not exist, return similar entries. - """ - - def delete(self, ids: List) -> None: - """Deleting IDs from in memory dictionary.""" - raise NotImplementedError - - -class AddableMixin(ABC): - """Mixin class that supports adding texts.""" - - @abstractmethod - def add(self, texts: Dict[str, Document]) -> None: - """Add more documents.""" - diff --git a/src/doc/in_memory.py b/src/doc/in_memory.py deleted file mode 100644 index 0b793fb4a0c9ed4fd60b2e019356ff3f4bde4f96..0000000000000000000000000000000000000000 --- a/src/doc/in_memory.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from FourthDimension.doc.document import Document -from FourthDimension.doc.base import Docstore, AddableMixin -from typing import Dict, List, Optional, Union - - -class InMemoryDocstore(Docstore, AddableMixin): - """Simple in memory docstore in the form of a dict.""" - - def __init__(self, _dict: Optional[Dict[str, Document]] = None): - """Initialize with dict.""" - self._dict = _dict if _dict is not None else {} - - def add(self, texts: Dict[str, Document]) -> None: - """Add texts to in memory dictionary. - - Args: - texts: dictionary of id -> document. - - Returns: - None - """ - overlapping = set(texts).intersection(self._dict) - if overlapping: - raise ValueError(f"Tried to add ids that already exist: {overlapping}") - self._dict = {**self._dict, **texts} - - def delete(self, ids: List) -> None: - """Deleting IDs from in memory dictionary.""" - overlapping = set(ids).intersection(self._dict) - if not overlapping: - raise ValueError(f"Tried to delete ids that does not exist: {ids}") - for _id in ids: - self._dict.pop(_id) - - def search(self, search: str) -> Union[str, Document]: - """Search via direct lookup. - - Args: - search: id of a document to search for. - - Returns: - Document if found, else error message. - """ - if search not in self._dict: - return f"ID {search} not found." - else: - return self._dict[search] diff --git a/src/doc/loader.py b/src/doc/loader.py deleted file mode 100644 index f0f5ed555b07d31372c3da0a6cfd84e0ff4b9a0f..0000000000000000000000000000000000000000 --- a/src/doc/loader.py +++ /dev/null @@ -1,109 +0,0 @@ -import os -import tempfile -from abc import ABC, abstractmethod -from typing import Iterator, List, Optional - -import requests -from urllib.parse import urlparse - -from FourthDimension.doc.document import Document -from FourthDimension.doc.spliter import TextSplitter, RecursiveCharacterTextSplitter - - -class BaseLoader(ABC): - """Interface for Document Loader. - - Implementations should implement the lazy-loading method using generators - to avoid loading all Documents into memory at once. - - The `load` method will remain as is for backwards compatibility, but its - implementation should be just `list(self.lazy_load())`. - """ - - # Sub-classes should implement this method - # as return list(self.lazy_load()). - # This method returns a List which is materialized in memory. - @abstractmethod - def load(self) -> List[Document]: - """Load data into Document objects.""" - - def load_and_split( - self, text_splitter: Optional[TextSplitter] = None - ) -> List[Document]: - """Load Documents and split into chunks. Chunks are returned as Documents. - - Args: - text_splitter: TextSplitter instance to use for splitting documents. - Defaults to RecursiveCharacterTextSplitter. - - Returns: - List of Documents. - """ - if text_splitter is None: - _text_splitter: TextSplitter = RecursiveCharacterTextSplitter() - else: - _text_splitter = text_splitter - docs = self.load() - return _text_splitter.split_documents(docs) - - # Attention: This method will be upgraded into an abstractmethod once it's - # implemented in all the existing subclasses. - def lazy_load( - self, - ) -> Iterator[Document]: - """A lazy loader for Documents.""" - raise NotImplementedError( - f"{self.__class__.__name__} does not implement lazy_load()" - ) - - -class Docx2txtLoader(BaseLoader, ABC): - """Load `DOCX` file using `docx2txt` and chunks at character level. - - Defaults to check for local file, but if the file is a web path, it will download it - to a temporary file, and use that, then clean up the temporary file after completion - """ - - def __init__(self, file_path: str): - """Initialize with file path.""" - self.file_path = file_path - if "~" in self.file_path: - self.file_path = os.path.expanduser(self.file_path) - - # If the file is a web path, download it to a temporary file, and use that - if not os.path.isfile(self.file_path) and self._is_valid_url(self.file_path): - r = requests.get(self.file_path) - - if r.status_code != 200: - raise ValueError( - "Check the url of your file; returned status code %s" - % r.status_code - ) - - self.web_path = self.file_path - self.temp_file = tempfile.NamedTemporaryFile() - self.temp_file.write(r.content) - self.file_path = self.temp_file.name - elif not os.path.isfile(self.file_path): - raise ValueError("File path %s is not a valid file or url" % self.file_path) - - def __del__(self) -> None: - if hasattr(self, "temp_file"): - self.temp_file.close() - - def load(self) -> List[Document]: - """Load given path as single page.""" - import docx2txt - - return [ - Document( - page_content=docx2txt.process(self.file_path), - metadata={"source": self.file_path}, - ) - ] - - @staticmethod - def _is_valid_url(url: str) -> bool: - """Check if the url is valid.""" - parsed = urlparse(url) - return bool(parsed.netloc) and bool(parsed.scheme) \ No newline at end of file diff --git a/src/es/__init__.py b/src/es/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/es/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/es/es_client.py b/src/es/es_client.py deleted file mode 100644 index e0c5d9f6c3fb1509ebb93b839008f5319e8a825e..0000000000000000000000000000000000000000 --- a/src/es/es_client.py +++ /dev/null @@ -1,195 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - -from elasticsearch import Elasticsearch - -from FourthDimension.config.config import config_setting -from FourthDimension.es.es_sort import ( - question_analysis, - getDetailResult -) - -""" -文件说明: -""" -# Elasticsearch连接信息 -host = config_setting['elasticsearch_setting']['host'] -port = config_setting['elasticsearch_setting']['port'] -username = config_setting['elasticsearch_setting']['username'] -password = config_setting['elasticsearch_setting']['password'] -index_name = config_setting['elasticsearch_setting']['index_name'] -analyzer = config_setting['elasticsearch_setting']['analyzer'] - - -class DocQAAnswerEntity: - def init(self, content, question, fuzz_score, words_ratio): - self.content = content - self.question = question - self.fuzz_score = fuzz_score - self.words_ratio = words_ratio - - -class ElasticsearchClient: - def __init__(self, host=host, port=port, username=username, password=password): - self.host = host - self.port = port - self.username = username - self.password = password - self.client = Elasticsearch( - [self.host], - http_auth=(self.username, self.password), - port=self.port, - use_ssl=False, - verify_certs=False, - timeout=30, - max_retries=3, - retry_on_timeout=True - ) - - def create_index(self): - index_exists = self.client.indices.exists(index=index_name) - if index_exists: - # print(f"索引 '{index_name}' 已存在") - pass - else: - # 创建索引 - settings = { - "settings": { - "number_of_shards": 1, - "number_of_replicas": 0 - }, - "index": { - "refresh_interval": "20s" - }, - "mappings": { - "_doc": { - "dynamic": "strict", - "properties": { - "file_name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "text": { - "type": "text", - "analyzer": analyzer, - "search_analyzer": analyzer - } - } - } - } - } - self.client.indices.create(index=index_name, ignore=400, body=settings) - print(f"索引 '{index_name}' 创建成功") - - def insert_data(self, all_context): - file_names = self.search_filename() - for i, d in enumerate(all_context): - filename = d.metadata['source'] - if filename not in file_names: - context = d.page_content - self.client.index(index=index_name, doc_type='_doc', body={ - 'file_name': filename, - 'type': 'part', - 'text': context}) - return all_context - - def search_filename(self): - # 构建查询语句 - query = { - "size": 10000, - "_source": ["file_name"], - "query": { - "match_all": {} - } - } - # 执行查询 - result = self.client.search(index=index_name, body=query) - - # 从查询结果中提取文件名 - file_names = [hit["_source"]["file_name"] for hit in result["hits"]["hits"]] - - # 去重文件名列表 - unique_file_names = list(set(file_names)) - return unique_file_names - - def clean_data(self): - """ - 清除数据 - """ - self.client.delete_by_query(index=index_name, body={"query": {"match_all": {}}}) - - def es_search(self, question): - question_anal = question_analysis(question) - searchHits = [] - try: - # es查询 - sourceBuilder = { - "query": { - "bool": { - "must": [ - { - "bool": { - "should": [ - { - "match": { - "text": { - "query": question, - "boost": 1, - "analyzer": analyzer - } - } - }, - { - "match": { - "text": { - "query": question_anal, - "boost": 3, - "analyzer": analyzer - } - } - } - ] - } - }, - { - "term": { - "type": "part" - } - } - ], - "filter": [ - { - "term": { - "type": "part" - } - } - ] - } - }, - "size": 10 - } - response = self.client.search(index=index_name, body=sourceBuilder) - hits = response["hits"]["hits"] - searchHits = hits - except Exception as e: - print(e) - - esResponses = [] - - # 获取es查询命中结果 - for hit in searchHits: - esResponse = DocQAAnswerEntity() - hitString = hit["_source"] - content = hitString['text'] - esResponse.question = question - esResponse.content = content - esResponses.append(esResponse) - sorted_es_response = getDetailResult(esResponses, question, question_anal) - top_k_content = [] - for i, d in enumerate(sorted_es_response): - top_k_content.append(d.content) - return top_k_content diff --git a/src/es/es_sort.py b/src/es/es_sort.py deleted file mode 100644 index dd3efbdf73a9c11ae70a4c815b3f0df46aa711c5..0000000000000000000000000000000000000000 --- a/src/es/es_sort.py +++ /dev/null @@ -1,159 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -import re - -import jieba -from fuzzywuzzy import fuzz - -from FourthDimension.config.config import patterns, patternsLen - - -class DocQAAnswerEntity: - def init(self, content, question, fuzz_score, words_ratio): - self.content = content - self.question = question - self.fuzz_score = fuzz_score - self.words_ratio = words_ratio - - -def init_question_template(file_path): - question_template = [] - with open(file_path, 'r', encoding='utf-8') as file: - for line in file: - # 去除行尾的换行符 - line = line.strip() - question_template.append(line) - for i, line in enumerate(question_template): - patterns.append(re.compile(line)) - - -def merge(intervals): - intervals.sort(key=lambda x: x[0]) - res = [] - for i in range(len(intervals)): - l, r = intervals[i][0], intervals[i][1] - if len(res) == 0 or res[-1][1] < l: - res.append([l, r]) - else: - res[-1][1] = max(res[-1][1], r) - return res - - -def question_analysis(question): - find = False - query = question.replace(",", "") - matchIndex = [] - for i in range(patternsLen): - regex = patterns[i] - matcher = re.search(regex, query) - if matcher is not None: - find = True - for match in re.finditer(regex, query): - start = match.start() - end = match.end() - matchIndex.append([start, end]) - if find: - mergeIndex = merge(matchIndex) - res = [] - startI = 0 - for i in range(len(mergeIndex)): - if startI != mergeIndex[i][0]: - res.append(query[startI:mergeIndex[i][0]]) - startI = mergeIndex[i][1] - if mergeIndex[-1][1] < len(query): - res.append(query[mergeIndex[-1][1]:]) - return ''.join(res) - return query - - -def getDetailResult(datas, question, question_anal): - question_analysisCut = jieba.lcut(question_anal) - for scoreContent in datas: - content = scoreContent.content - content = content.lower().replace(" ", "") - cutContent = cut_sentence_short(content) - max_score = -1 - max_len = -1 - for con in cutContent: - score = fuzzSimilarity(question, con) - length = longestLen(question_anal, con) - max_score = max(max_score, score) - max_len = max(max_len, length) - cnt = 0 - exist_words = 0 - for word in question_analysisCut: - count = filter(content, word) - if count != 0: - exist_words += 1 - cnt += count - quesSize = len(question_analysisCut) - if quesSize == 0: - scoreContent.words_ratio = 1.0 - else: - scoreContent.words_ratio = exist_words / quesSize * max_len - scoreContent.fuzz_score = max_score - return es_sorted(datas) - - -def fuzzSimilarity(question, content): - similarityScore = fuzz.token_sort_ratio(question, content) - return similarityScore - - -def cut_sentence_short(content): - regex = "[。!!??;;]" - cons = re.split(regex, content) - return cons - - -def zeros(context_char_idxs): - for i in range(len(context_char_idxs)): - for j in range(len(context_char_idxs[i])): - context_char_idxs[i][j] = 0 - return context_char_idxs - - -def longestLen(question_analysis, content): - q_len = len(question_analysis) - c_len = len(content) - dp = [[0] * (c_len + 1) for _ in range(q_len + 1)] - dp = zeros(dp) - ques_char = list(question_analysis) - con_char = list(content) - for i in range(1, q_len + 1): - for j in range(1, c_len + 1): - if ques_char[i - 1] == con_char[j - 1]: - dp[i][j] = dp[i - 1][j - 1] + 1 - else: - dp[i][j] = max(dp[i - 1][j], dp[i][j - 1]) - return dp[q_len][c_len] - - -def filter(string, sub_str): - index = 0 - count = 0 - while True: - index = string.find(sub_str, index) - if index == -1: - break - index += 1 - count += 1 - return count - - -def es_sorted(datas): - sorted_compare(datas) - return datas - - -def sorted_compare(datas): - datas.sort(key=lambda o: (o.words_ratio, o.fuzz_score)) - datas.reverse() - return datas diff --git a/src/faiss_process/FAISS.py b/src/faiss_process/FAISS.py deleted file mode 100644 index 48e4dda442ff8f8f1c0f3dd9a9632986006f1337..0000000000000000000000000000000000000000 --- a/src/faiss_process/FAISS.py +++ /dev/null @@ -1,776 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -from __future__ import annotations - -import operator -import os -import pickle -import uuid -import warnings -from pathlib import Path -from typing import ( - Any, - Callable, - Dict, - Iterable, - List, - Optional, - Sized, - Tuple, -) - -import numpy as np -from FourthDimension.doc.document import Document -from FourthDimension.doc.base import Docstore, AddableMixin -from FourthDimension.vectorstores.utils import DistanceStrategy, maximal_marginal_relevance -from FourthDimension.doc.in_memory import InMemoryDocstore -from FourthDimension.schema.vectorstore import VectorStore -from FourthDimension.schema.embeddings import Embeddings - - -def dependable_faiss_import(no_avx2: Optional[bool] = None) -> Any: - """ - Import faiss if available, otherwise raise error. - If FAISS_NO_AVX2 environment variable is set, it will be considered - to load FAISS with no AVX2 optimization. - - Args: - no_avx2: Load FAISS strictly with no AVX2 optimization - so that the vectorstore is portable and compatible with other devices. - """ - if no_avx2 is None and "FAISS_NO_AVX2" in os.environ: - no_avx2 = bool(os.getenv("FAISS_NO_AVX2")) - - try: - if no_avx2: - from faiss import swigfaiss as faiss - else: - import faiss - except ImportError: - raise ImportError( - "Could not import faiss python package. " - "Please install it with `pip install faiss-gpu` (for CUDA supported GPU) " - "or `pip install faiss-cpu` (depending on Python version)." - ) - return faiss - - -def _len_check_if_sized(x: Any, y: Any, x_name: str, y_name: str) -> None: - if isinstance(x, Sized) and isinstance(y, Sized) and len(x) != len(y): - raise ValueError( - f"{x_name} and {y_name} expected to be equal length but " - f"len({x_name})={len(x)} and len({y_name})={len(y)}" - ) - return - - -class FAISS(VectorStore): - """`Meta Faiss` vector store. - - To use, you must have the ``faiss`` python package installed. - - Example: - .. code-block:: python - - embeddings = OpenAIEmbeddings() - texts = ["FAISS is an important library""] - faiss = FAISS.from_texts(texts, embeddings) - - """ - - def __init__( - self, - embedding_function: Callable, - index: Any, - docstore: Docstore, - index_to_docstore_id: Dict[int, str], - relevance_score_fn: Optional[Callable[[float], float]] = None, - normalize_L2: bool = False, - distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE, - ): - """Initialize with necessary components.""" - self.embedding_function = embedding_function - self.index = index - self.docstore = docstore - self.index_to_docstore_id = index_to_docstore_id - self.distance_strategy = distance_strategy - self.override_relevance_score_fn = relevance_score_fn - self._normalize_L2 = normalize_L2 - if ( - self.distance_strategy != DistanceStrategy.EUCLIDEAN_DISTANCE - and self._normalize_L2 - ): - warnings.warn( - "Normalizing L2 is not applicable for metric type: {strategy}".format( - strategy=self.distance_strategy - ) - ) - - def __add( - self, - texts: Iterable[str], - embeddings: Iterable[List[float]], - metadatas: Optional[Iterable[dict]] = None, - ids: Optional[List[str]] = None, - ) -> List[str]: - faiss = dependable_faiss_import() - - if not isinstance(self.docstore, AddableMixin): - raise ValueError( - "If trying to add texts, the underlying docstore should support " - f"adding items, which {self.docstore} does not" - ) - - _len_check_if_sized(texts, metadatas, "texts", "metadatas") - _metadatas = metadatas or ({} for _ in texts) - documents = [ - Document(page_content=t, metadata=m) for t, m in zip(texts, _metadatas) - ] - - _len_check_if_sized(documents, embeddings, "documents", "embeddings") - _len_check_if_sized(documents, ids, "documents", "ids") - - # Add to the index. - vector = np.array(embeddings, dtype=np.float32) - if self._normalize_L2: - faiss.normalize_L2(vector) - self.index.add(vector) - - # Add information to docstore and index. - ids = ids or [str(uuid.uuid4()) for _ in texts] - self.docstore.add({id_: doc for id_, doc in zip(ids, documents)}) - starting_len = len(self.index_to_docstore_id) - index_to_id = {starting_len + j: id_ for j, id_ in enumerate(ids)} - self.index_to_docstore_id.update(index_to_id) - return ids - - def add_texts( - self, - texts: Iterable[str], - metadatas: Optional[List[dict]] = None, - ids: Optional[List[str]] = None, - **kwargs: Any, - ) -> List[str]: - """Run more texts through the embeddings and add to the vectorstore. - - Args: - texts: Iterable of strings to add to the vectorstore. - metadatas: Optional list of metadatas associated with the texts. - ids: Optional list of unique IDs. - - Returns: - List of ids from adding the texts into the vectorstore. - """ - embeddings = [self.embedding_function(text) for text in texts] - return self.__add(texts, embeddings, metadatas=metadatas, ids=ids) - - def add_embeddings( - self, - text_embeddings: Iterable[Tuple[str, List[float]]], - metadatas: Optional[List[dict]] = None, - ids: Optional[List[str]] = None, - **kwargs: Any, - ) -> List[str]: - """Run more texts through the embeddings and add to the vectorstore. - - Args: - text_embeddings: Iterable pairs of string and embedding to - add to the vectorstore. - metadatas: Optional list of metadatas associated with the texts. - ids: Optional list of unique IDs. - - Returns: - List of ids from adding the texts into the vectorstore. - """ - # Embed and create the documents. - texts, embeddings = zip(*text_embeddings) - return self.__add(texts, embeddings, metadatas=metadatas, ids=ids) - - def similarity_search_with_score_by_vector( - self, - embedding: List[float], - k: int = 4, - filter: Optional[Dict[str, Any]] = None, - fetch_k: int = 20, - **kwargs: Any, - ) -> List[Tuple[Document, float]]: - """Return docs most similar to query. - - Args: - embedding: Embedding vector to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - filter (Optional[Dict[str, Any]]): Filter by metadata. Defaults to None. - fetch_k: (Optional[int]) Number of Documents to fetch before filtering. - Defaults to 20. - **kwargs: kwargs to be passed to similarity search. Can include: - score_threshold: Optional, a floating point value between 0 to 1 to - filter the resulting set of retrieved docs - - Returns: - List of documents most similar to the query text and L2 distance - in float for each. Lower score represents more similarity. - """ - faiss = dependable_faiss_import() - vector = np.array([embedding], dtype=np.float32) - if self._normalize_L2: - faiss.normalize_L2(vector) - scores, indices = self.index.search(vector, k if filter is None else fetch_k) - docs = [] - for j, i in enumerate(indices[0]): - if i == -1: - # This happens when not enough docs are returned. - continue - _id = self.index_to_docstore_id[i] - doc = self.docstore.search(_id) - if not isinstance(doc, Document): - raise ValueError(f"Could not find document for id {_id}, got {doc}") - if filter is not None: - filter = { - key: [value] if not isinstance(value, list) else value - for key, value in filter.items() - } - if all(doc.metadata.get(key) in value for key, value in filter.items()): - docs.append((doc, scores[0][j])) - else: - docs.append((doc, scores[0][j])) - - score_threshold = kwargs.get("score_threshold") - if score_threshold is not None: - cmp = ( - operator.ge - if self.distance_strategy - in (DistanceStrategy.MAX_INNER_PRODUCT, DistanceStrategy.JACCARD) - else operator.le - ) - docs = [ - (doc, similarity) - for doc, similarity in docs - if cmp(similarity, score_threshold) - ] - return docs[:k] - - def similarity_search_with_score( - self, - query: str, - k: int = 4, - filter: Optional[Dict[str, Any]] = None, - fetch_k: int = 20, - **kwargs: Any, - ) -> List[Tuple[Document, float]]: - """Return docs most similar to query. - - Args: - query: Text to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - filter (Optional[Dict[str, str]]): Filter by metadata. Defaults to None. - fetch_k: (Optional[int]) Number of Documents to fetch before filtering. - Defaults to 20. - - Returns: - List of documents most similar to the query text with - L2 distance in float. Lower score represents more similarity. - """ - embedding = self.embedding_function(query) - docs = self.similarity_search_with_score_by_vector( - embedding, - k, - filter=filter, - fetch_k=fetch_k, - **kwargs, - ) - return docs - - def similarity_search_by_vector( - self, - embedding: List[float], - k: int = 4, - filter: Optional[Dict[str, Any]] = None, - fetch_k: int = 20, - **kwargs: Any, - ) -> List[Document]: - """Return docs most similar to embedding vector. - - Args: - embedding: Embedding to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - filter (Optional[Dict[str, str]]): Filter by metadata. Defaults to None. - fetch_k: (Optional[int]) Number of Documents to fetch before filtering. - Defaults to 20. - - Returns: - List of Documents most similar to the embedding. - """ - docs_and_scores = self.similarity_search_with_score_by_vector( - embedding, - k, - filter=filter, - fetch_k=fetch_k, - **kwargs, - ) - return [doc for doc, _ in docs_and_scores] - - def similarity_search( - self, - query: str, - k: int = 4, - filter: Optional[Dict[str, Any]] = None, - fetch_k: int = 20, - **kwargs: Any, - ) -> List[Document]: - """Return docs most similar to query. - - Args: - query: Text to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - filter: (Optional[Dict[str, str]]): Filter by metadata. Defaults to None. - fetch_k: (Optional[int]) Number of Documents to fetch before filtering. - Defaults to 20. - - Returns: - List of Documents most similar to the query. - """ - docs_and_scores = self.similarity_search_with_score( - query, k, filter=filter, fetch_k=fetch_k, **kwargs - ) - return [doc for doc, _ in docs_and_scores] - - def max_marginal_relevance_search_with_score_by_vector( - self, - embedding: List[float], - *, - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - filter: Optional[Dict[str, Any]] = None, - ) -> List[Tuple[Document, float]]: - """Return docs and their similarity scores selected using the maximal marginal - relevance. - - Maximal marginal relevance optimizes for similarity to query AND diversity - among selected documents. - - Args: - embedding: Embedding to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - fetch_k: Number of Documents to fetch before filtering to - pass to MMR algorithm. - lambda_mult: Number between 0 and 1 that determines the degree - of diversity among the results with 0 corresponding - to maximum diversity and 1 to minimum diversity. - Defaults to 0.5. - Returns: - List of Documents and similarity scores selected by maximal marginal - relevance and score for each. - """ - scores, indices = self.index.search( - np.array([embedding], dtype=np.float32), - fetch_k if filter is None else fetch_k * 2, - ) - if filter is not None: - filtered_indices = [] - for i in indices[0]: - if i == -1: - # This happens when not enough docs are returned. - continue - _id = self.index_to_docstore_id[i] - doc = self.docstore.search(_id) - if not isinstance(doc, Document): - raise ValueError(f"Could not find document for id {_id}, got {doc}") - if all( - doc.metadata.get(key) in value - if isinstance(value, list) - else doc.metadata.get(key) == value - for key, value in filter.items() - ): - filtered_indices.append(i) - indices = np.array([filtered_indices]) - # -1 happens when not enough docs are returned. - embeddings = [self.index.reconstruct(int(i)) for i in indices[0] if i != -1] - mmr_selected = maximal_marginal_relevance( - np.array([embedding], dtype=np.float32), - embeddings, - k=k, - lambda_mult=lambda_mult, - ) - selected_indices = [indices[0][i] for i in mmr_selected] - selected_scores = [scores[0][i] for i in mmr_selected] - docs_and_scores = [] - for i, score in zip(selected_indices, selected_scores): - if i == -1: - # This happens when not enough docs are returned. - continue - _id = self.index_to_docstore_id[i] - doc = self.docstore.search(_id) - if not isinstance(doc, Document): - raise ValueError(f"Could not find document for id {_id}, got {doc}") - docs_and_scores.append((doc, score)) - return docs_and_scores - - def max_marginal_relevance_search_by_vector( - self, - embedding: List[float], - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - filter: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> List[Document]: - """Return docs selected using the maximal marginal relevance. - - Maximal marginal relevance optimizes for similarity to query AND diversity - among selected documents. - - Args: - embedding: Embedding to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - fetch_k: Number of Documents to fetch before filtering to - pass to MMR algorithm. - lambda_mult: Number between 0 and 1 that determines the degree - of diversity among the results with 0 corresponding - to maximum diversity and 1 to minimum diversity. - Defaults to 0.5. - Returns: - List of Documents selected by maximal marginal relevance. - """ - docs_and_scores = self.max_marginal_relevance_search_with_score_by_vector( - embedding, k=k, fetch_k=fetch_k, lambda_mult=lambda_mult, filter=filter - ) - return [doc for doc, _ in docs_and_scores] - - def max_marginal_relevance_search( - self, - query: str, - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - filter: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> List[Document]: - """Return docs selected using the maximal marginal relevance. - - Maximal marginal relevance optimizes for similarity to query AND diversity - among selected documents. - - Args: - query: Text to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - fetch_k: Number of Documents to fetch before filtering (if needed) to - pass to MMR algorithm. - lambda_mult: Number between 0 and 1 that determines the degree - of diversity among the results with 0 corresponding - to maximum diversity and 1 to minimum diversity. - Defaults to 0.5. - Returns: - List of Documents selected by maximal marginal relevance. - """ - embedding = self.embedding_function(query) - docs = self.max_marginal_relevance_search_by_vector( - embedding, - k=k, - fetch_k=fetch_k, - lambda_mult=lambda_mult, - filter=filter, - **kwargs, - ) - return docs - - def delete(self, ids: Optional[List[str]] = None, **kwargs: Any) -> Optional[bool]: - """Delete by ID. These are the IDs in the vectorstore. - - Args: - ids: List of ids to delete. - - Returns: - Optional[bool]: True if deletion is successful, - False otherwise, None if not implemented. - """ - if ids is None: - raise ValueError("No ids provided to delete.") - missing_ids = set(ids).difference(self.index_to_docstore_id.values()) - if missing_ids: - raise ValueError( - f"Some specified ids do not exist in the current store. Ids not found: " - f"{missing_ids}" - ) - - reversed_index = {id_: idx for idx, id_ in self.index_to_docstore_id.items()} - index_to_delete = [reversed_index[id_] for id_ in ids] - - self.index.remove_ids(np.array(index_to_delete, dtype=np.int64)) - self.docstore.delete(ids) - - remaining_ids = [ - id_ - for i, id_ in sorted(self.index_to_docstore_id.items()) - if i not in index_to_delete - ] - self.index_to_docstore_id = {i: id_ for i, id_ in enumerate(remaining_ids)} - - return True - - def merge_from(self, target: FAISS) -> None: - """Merge another FAISS object with the current one. - - Add the target FAISS to the current one. - - Args: - target: FAISS object you wish to merge into the current one - - Returns: - None. - """ - if not isinstance(self.docstore, AddableMixin): - raise ValueError("Cannot merge with this type of docstore") - # Numerical index for target docs are incremental on existing ones - starting_len = len(self.index_to_docstore_id) - - # Merge two IndexFlatL2 - self.index.merge_from(target.index) - - # Get id and docs from target FAISS object - full_info = [] - for i, target_id in target.index_to_docstore_id.items(): - doc = target.docstore.search(target_id) - if not isinstance(doc, Document): - raise ValueError("Document should be returned") - full_info.append((starting_len + i, target_id, doc)) - - # Add information to docstore and index_to_docstore_id. - self.docstore.add({_id: doc for _, _id, doc in full_info}) - index_to_id = {index: _id for index, _id, _ in full_info} - self.index_to_docstore_id.update(index_to_id) - - @classmethod - def __from( - cls, - texts: Iterable[str], - embeddings: List[List[float]], - embedding: Embeddings, - metadatas: Optional[Iterable[dict]] = None, - ids: Optional[List[str]] = None, - normalize_L2: bool = False, - distance_strategy: DistanceStrategy = DistanceStrategy.EUCLIDEAN_DISTANCE, - **kwargs: Any, - ) -> FAISS: - faiss = dependable_faiss_import() - if distance_strategy == DistanceStrategy.MAX_INNER_PRODUCT: - index = faiss.IndexFlatIP(len(embeddings[0])) - else: - # Default to L2, currently other metric types not initialized. - index = faiss.IndexFlatL2(len(embeddings[0])) - vecstore = cls( - embedding.embed_query, - index, - InMemoryDocstore(), - {}, - normalize_L2=normalize_L2, - distance_strategy=distance_strategy, - **kwargs, - ) - vecstore.__add(texts, embeddings, metadatas=metadatas, ids=ids) - return vecstore - - @classmethod - def from_texts( - cls, - texts: List[str], - embedding: Embeddings, - metadatas: Optional[List[dict]] = None, - ids: Optional[List[str]] = None, - **kwargs: Any, - ) -> FAISS: - """Construct FAISS wrapper from raw documents. - - This is a user friendly interface that: - 1. Embeds documents. - 2. Creates an in memory docstore - 3. Initializes the FAISS database - - This is intended to be a quick way to get started. - - Example: - .. code-block:: python - embeddings = OpenAIEmbeddings() - faiss = FAISS.from_texts(texts, embeddings) - """ - embeddings = embedding.embed_documents(texts) - return cls.__from( - texts, - embeddings, - embedding, - metadatas=metadatas, - ids=ids, - **kwargs, - ) - - @classmethod - def from_embeddings( - cls, - text_embeddings: Iterable[Tuple[str, List[float]]], - embedding: Embeddings, - metadatas: Optional[Iterable[dict]] = None, - ids: Optional[List[str]] = None, - **kwargs: Any, - ) -> FAISS: - """Construct FAISS wrapper from raw documents. - - This is a user friendly interface that: - 1. Embeds documents. - 2. Creates an in memory docstore - 3. Initializes the FAISS database - - This is intended to be a quick way to get started. - - Example: - .. code-block:: python - - from langchain.vectorstores import FAISS - from langchain.embeddings import OpenAIEmbeddings - - embeddings = OpenAIEmbeddings() - text_embeddings = embeddings.embed_documents(texts) - text_embedding_pairs = zip(texts, text_embeddings) - faiss = FAISS.from_embeddings(text_embedding_pairs, embeddings) - """ - texts = [t[0] for t in text_embeddings] - embeddings = [t[1] for t in text_embeddings] - return cls.__from( - texts, - embeddings, - embedding, - metadatas=metadatas, - ids=ids, - **kwargs, - ) - - def save_local(self, folder_path: str, index_name: str = "index") -> None: - """Save FAISS index, docstore, and index_to_docstore_id to disk. - - Args: - folder_path: folder path to save index, docstore, - and index_to_docstore_id to. - index_name: for saving with a specific index file name - """ - path = Path(folder_path) - path.mkdir(exist_ok=True, parents=True) - - # save index separately since it is not picklable - faiss = dependable_faiss_import() - faiss.write_index( - self.index, str(path / "{index_name}.faiss".format(index_name=index_name)) - ) - - # save docstore and index_to_docstore_id - with open(path / "{index_name}.pkl".format(index_name=index_name), "wb") as f: - pickle.dump((self.docstore, self.index_to_docstore_id), f) - - @classmethod - def load_local( - cls, - folder_path: str, - embeddings: Embeddings, - index_name: str = "index", - **kwargs: Any, - ) -> FAISS: - """Load FAISS index, docstore, and index_to_docstore_id from disk. - - Args: - folder_path: folder path to load index, docstore, - and index_to_docstore_id from. - embeddings: Embeddings to use when generating queries - index_name: for saving with a specific index file name - """ - path = Path(folder_path) - # load index separately since it is not picklable - faiss = dependable_faiss_import() - index = faiss.read_index( - str(path / "{index_name}.faiss".format(index_name=index_name)) - ) - - # load docstore and index_to_docstore_id - with open(path / "{index_name}.pkl".format(index_name=index_name), "rb") as f: - docstore, index_to_docstore_id = pickle.load(f) - return cls( - embeddings.embed_query, index, docstore, index_to_docstore_id, **kwargs - ) - - def serialize_to_bytes(self) -> bytes: - """Serialize FAISS index, docstore, and index_to_docstore_id to bytes.""" - return pickle.dumps((self.index, self.docstore, self.index_to_docstore_id)) - - @classmethod - def deserialize_from_bytes( - cls, - serialized: bytes, - embeddings: Embeddings, - **kwargs: Any, - ) -> FAISS: - """Deserialize FAISS index, docstore, and index_to_docstore_id from bytes.""" - index, docstore, index_to_docstore_id = pickle.loads(serialized) - return cls( - embeddings.embed_query, index, docstore, index_to_docstore_id, **kwargs - ) - - def _select_relevance_score_fn(self) -> Callable[[float], float]: - """ - The 'correct' relevance function - may differ depending on a few things, including: - - the distance / similarity metric used by the VectorStore - - the scale of your embeddings (OpenAI's are unit normed. Many others are not!) - - embedding dimensionality - - etc. - """ - if self.override_relevance_score_fn is not None: - return self.override_relevance_score_fn - - # Default strategy is to rely on distance strategy provided in - # vectorstore constructor - if self.distance_strategy == DistanceStrategy.MAX_INNER_PRODUCT: - return self._max_inner_product_relevance_score_fn - elif self.distance_strategy == DistanceStrategy.EUCLIDEAN_DISTANCE: - # Default behavior is to use euclidean distance relevancy - return self._euclidean_relevance_score_fn - elif self.distance_strategy == DistanceStrategy.COSINE: - return self._cosine_relevance_score_fn - else: - raise ValueError( - "Unknown distance strategy, must be cosine, max_inner_product," - " or euclidean" - ) - - def _similarity_search_with_relevance_scores( - self, - query: str, - k: int = 4, - filter: Optional[Dict[str, Any]] = None, - fetch_k: int = 20, - **kwargs: Any, - ) -> List[Tuple[Document, float]]: - """Return docs and their similarity scores on a scale from 0 to 1.""" - # Pop score threshold so that only relevancy scores, not raw scores, are - # filtered. - relevance_score_fn = self._select_relevance_score_fn() - if relevance_score_fn is None: - raise ValueError( - "normalize_score_fn must be provided to" - " FAISS constructor to normalize scores" - ) - docs_and_scores = self.similarity_search_with_score( - query, - k=k, - filter=filter, - fetch_k=fetch_k, - **kwargs, - ) - docs_and_rel_scores = [ - (doc, relevance_score_fn(score)) for doc, score in docs_and_scores - ] - return docs_and_rel_scores diff --git a/src/faiss_process/__init__.py b/src/faiss_process/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/faiss_process/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/faiss_process/faiss_index.py b/src/faiss_process/faiss_index.py deleted file mode 100644 index c1e2ef7a75930c6d6fd97c95f38e707206c5c3d3..0000000000000000000000000000000000000000 --- a/src/faiss_process/faiss_index.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -import os - -from FourthDimension.config.config import config_setting, embedding_model -from FourthDimension.faiss_process.FAISS import FAISS - -top_k = config_setting['recall_config']['top_k'] - -# 获取当前脚本文件的路径 -current_path = os.path.abspath(__file__) - -# 获取当前脚本文件所在的目录 -current_dir = os.path.dirname(current_path) - -index_file = current_dir + '/../cache/faiss_cache' - - -def faiss_search(question): - top_k_contexts = [] - db = FAISS.load_local(index_file, embedding_model) - docs = db.similarity_search(question, k=top_k) - for i, doc in enumerate(docs): - top_k_contexts.append(doc.page_content) - return top_k_contexts diff --git a/src/faiss_process/faiss_storage.py b/src/faiss_process/faiss_storage.py deleted file mode 100644 index 13c7df90d9eb77e693d4b8072f149b71396fa90b..0000000000000000000000000000000000000000 --- a/src/faiss_process/faiss_storage.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -import os -import shutil - -from FourthDimension.config.config import embedding_model -from FourthDimension.faiss_process.FAISS import FAISS - -# 获取当前脚本文件的路径 -current_path = os.path.abspath(__file__) - -# 获取当前脚本文件所在的目录 -current_dir = os.path.dirname(current_path) - -index_file = current_dir + '/../cache/faiss_cache' - - -def clean_faiss(): - if os.path.exists(index_file): - shutil.rmtree(index_file) - - -def embeddings_storage(contexts): - insert_data = [] - insert_file_name = [] - exist_file_name = [] - if os.path.exists(index_file): - db = FAISS.load_local(index_file, embedding_model) - db_data = db.docstore.__dict__ - for i, doc in enumerate(db_data['_dict'].items()): - file_name = doc[1].metadata['source'] - exist_file_name.append(file_name) - exist_file_name = list(set(exist_file_name)) - for i, doc in enumerate(contexts): - file_name = doc.metadata['source'] - if file_name not in exist_file_name: - insert_data.append(doc) - insert_file_name.append(file_name) - if len(insert_data) > 0: - db.add_documents(insert_data) - db.save_local(index_file) - else: - for i, doc in enumerate(contexts): - file_name = doc.metadata['source'] - insert_file_name.append(file_name) - db = FAISS.from_documents(contexts, embedding_model) - db.save_local(index_file) - insert_file_name = list(set(insert_file_name)) - return insert_file_name diff --git a/src/faiss_process/in_memory.py b/src/faiss_process/in_memory.py deleted file mode 100644 index 0b793fb4a0c9ed4fd60b2e019356ff3f4bde4f96..0000000000000000000000000000000000000000 --- a/src/faiss_process/in_memory.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from FourthDimension.doc.document import Document -from FourthDimension.doc.base import Docstore, AddableMixin -from typing import Dict, List, Optional, Union - - -class InMemoryDocstore(Docstore, AddableMixin): - """Simple in memory docstore in the form of a dict.""" - - def __init__(self, _dict: Optional[Dict[str, Document]] = None): - """Initialize with dict.""" - self._dict = _dict if _dict is not None else {} - - def add(self, texts: Dict[str, Document]) -> None: - """Add texts to in memory dictionary. - - Args: - texts: dictionary of id -> document. - - Returns: - None - """ - overlapping = set(texts).intersection(self._dict) - if overlapping: - raise ValueError(f"Tried to add ids that already exist: {overlapping}") - self._dict = {**self._dict, **texts} - - def delete(self, ids: List) -> None: - """Deleting IDs from in memory dictionary.""" - overlapping = set(ids).intersection(self._dict) - if not overlapping: - raise ValueError(f"Tried to delete ids that does not exist: {ids}") - for _id in ids: - self._dict.pop(_id) - - def search(self, search: str) -> Union[str, Document]: - """Search via direct lookup. - - Args: - search: id of a document to search for. - - Returns: - Document if found, else error message. - """ - if search not in self._dict: - return f"ID {search} not found." - else: - return self._dict[search] diff --git a/src/faiss_process/ls_schemas.py b/src/faiss_process/ls_schemas.py deleted file mode 100644 index 48961744eaa5b59f897065da5fc3f56d4aaea735..0000000000000000000000000000000000000000 --- a/src/faiss_process/ls_schemas.py +++ /dev/null @@ -1,388 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""Schemas for the LangSmith API.""" -from __future__ import annotations - -from datetime import datetime, timedelta -from enum import Enum -from typing import Any, Dict, List, Optional, Protocol, Union, runtime_checkable -from uuid import UUID - -try: - from pydantic.v1 import ( # type: ignore[import] - BaseModel, - Field, - PrivateAttr, - StrictBool, - StrictFloat, - StrictInt, - ) -except ImportError: - from pydantic import ( - BaseModel, - Field, - PrivateAttr, - StrictBool, - StrictFloat, - StrictInt, - ) - -from typing_extensions import Literal - -SCORE_TYPE = Union[StrictBool, StrictInt, StrictFloat, None] -VALUE_TYPE = Union[Dict, StrictBool, StrictInt, StrictFloat, str, None] - - -class ExampleBase(BaseModel): - """Example base model.""" - - dataset_id: UUID - inputs: Dict[str, Any] - outputs: Optional[Dict[str, Any]] = Field(default=None) - - class Config: - frozen = True - - -class ExampleCreate(ExampleBase): - """Example create model.""" - - id: Optional[UUID] - created_at: datetime = Field(default_factory=datetime.utcnow) - - -class Example(ExampleBase): - """Example model.""" - - id: UUID - created_at: datetime - modified_at: Optional[datetime] = Field(default=None) - runs: List[Run] = Field(default_factory=list) - - -class ExampleUpdate(BaseModel): - """Update class for Example.""" - - dataset_id: Optional[UUID] = None - inputs: Optional[Dict[str, Any]] = None - outputs: Optional[Dict[str, Any]] = None - - class Config: - frozen = True - - -class DataType(str, Enum): - """Enum for dataset data types.""" - - kv = "kv" - llm = "llm" - chat = "chat" - - -class DatasetBase(BaseModel): - """Dataset base model.""" - - name: str - description: Optional[str] = None - data_type: Optional[DataType] = None - - class Config: - frozen = True - - -class DatasetCreate(DatasetBase): - """Dataset create model.""" - - id: Optional[UUID] = None - created_at: datetime = Field(default_factory=datetime.utcnow) - - -class Dataset(DatasetBase): - """Dataset ORM model.""" - - id: UUID - created_at: datetime - modified_at: Optional[datetime] = Field(default=None) - _host_url: Optional[str] = PrivateAttr(default=None) - - def __init__(self, _host_url: Optional[str] = None, **kwargs: Any) -> None: - """Initialize a Run object.""" - super().__init__(**kwargs) - self._host_url = _host_url - - @property - def url(self) -> Optional[str]: - """URL of this run within the app.""" - if self._host_url: - return f"{self._host_url}/datasets/{self.id}" - return None - - -class RunTypeEnum(str, Enum): - """(Deprecated) Enum for run types. Use string directly.""" - - tool = "tool" - chain = "chain" - llm = "llm" - retriever = "retriever" - embedding = "embedding" - prompt = "prompt" - parser = "parser" - - -class RunBase(BaseModel): - """ - Base Run schema. - Contains the fundamental fields to define a run in a system. - """ - - id: UUID - """Unique identifier for the run.""" - - name: str - """Human-readable name for the run.""" - - start_time: datetime - """Start time of the run.""" - - run_type: str - """The type of run, such as tool, chain, llm, retriever, - embedding, prompt, parser.""" - - end_time: Optional[datetime] = None - """End time of the run, if applicable.""" - - extra: Optional[dict] = None - """Additional metadata or settings related to the run.""" - - error: Optional[str] = None - """Error message, if the run encountered any issues.""" - - serialized: Optional[dict] = None - """Serialized object that executed the run for potential reuse.""" - - events: Optional[List[Dict]] = None - """List of events associated with the run, like - start and end events.""" - - inputs: dict - """Inputs used for the run.""" - - outputs: Optional[dict] = None - """Outputs generated by the run, if any.""" - - reference_example_id: Optional[UUID] = None - """Reference to an example that this run may be based on.""" - - parent_run_id: Optional[UUID] = None - """Identifier for a parent run, if this run is a sub-run.""" - - tags: Optional[List[str]] = None - """Tags for categorizing or annotating the run.""" - - -class Run(RunBase): - """Run schema when loading from the DB.""" - - execution_order: int - """The execution order of the run within a run trace.""" - session_id: Optional[UUID] = None - """The project ID this run belongs to.""" - child_run_ids: Optional[List[UUID]] = None - """The child run IDs of this run.""" - child_runs: Optional[List[Run]] = None - """The child runs of this run, if instructed to load using the client - These are not populated by default, as it is a heavier query to make.""" - feedback_stats: Optional[Dict[str, Any]] = None - """Feedback stats for this run.""" - app_path: Optional[str] = None - """Relative URL path of this run within the app.""" - manifest_id: Optional[UUID] = None - """Unique ID of the serialized object for this run.""" - status: Optional[str] = None - """Status of the run (e.g., 'success').""" - prompt_tokens: Optional[int] = None - """Number of tokens used for the prompt.""" - completion_tokens: Optional[int] = None - """Number of tokens generated as output.""" - total_tokens: Optional[int] = None - """Total tokens for prompt and completion.""" - first_token_time: Optional[datetime] = None - """Time the first token was processed.""" - parent_run_ids: Optional[List[UUID]] = None - """List of parent run IDs.""" - trace_id: Optional[UUID] = None - """Unique ID assigned to every run within this nested trace.""" - dotted_order: Optional[str] = None - """Dotted order for the run. - - This is a string composed of {time}{run-uuid}.* so that a trace can be - sorted in the order it was executed. - - Example: - - Parent: 20230914T223155647Z1b64098b-4ab7-43f6-afee-992304f198d8 - - Children: - - 20230914T223155647Z1b64098b-4ab7-43f6-afee-992304f198d8.20230914T223155649Z809ed3a2-0172-4f4d-8a02-a64e9b7a0f8a - - 20230915T223155647Z1b64098b-4ab7-43f6-afee-992304f198d8.20230914T223155650Zc8d9f4c5-6c5a-4b2d-9b1c-3d9d7a7c5c7c - """ # noqa: E501 - _host_url: Optional[str] = PrivateAttr(default=None) - - def __init__(self, _host_url: Optional[str] = None, **kwargs: Any) -> None: - """Initialize a Run object.""" - super().__init__(**kwargs) - self._host_url = _host_url - - @property - def url(self) -> Optional[str]: - """URL of this run within the app.""" - if self._host_url and self.app_path: - return f"{self._host_url}{self.app_path}" - return None - - -class FeedbackSourceBase(BaseModel): - type: str - metadata: Optional[Dict[str, Any]] = Field(default_factory=dict) - - -class APIFeedbackSource(FeedbackSourceBase): - """API feedback source.""" - - type: Literal["api"] = "api" - - -class ModelFeedbackSource(FeedbackSourceBase): - """Model feedback source.""" - - type: Literal["model"] = "model" - - -class FeedbackSourceType(Enum): - """Feedback source type.""" - - API = "api" - """General feedback submitted from the API.""" - MODEL = "model" - """Model-assisted feedback.""" - - -class FeedbackBase(BaseModel): - """Feedback schema.""" - - id: UUID - """The unique ID of the feedback.""" - created_at: Optional[datetime] = None - """The time the feedback was created.""" - modified_at: Optional[datetime] = None - """The time the feedback was last modified.""" - run_id: UUID - """The associated run ID this feedback is logged for.""" - key: str - """The metric name, tag, or aspect to provide feedback on.""" - score: SCORE_TYPE = None - """Value or score to assign the run.""" - value: VALUE_TYPE = None - """The display value, tag or other value for the feedback if not a metric.""" - comment: Optional[str] = None - """Comment or explanation for the feedback.""" - correction: Union[str, dict, None] = None - """Correction for the run.""" - feedback_source: Optional[FeedbackSourceBase] = None - """The source of the feedback.""" - - class Config: - frozen = True - - -class FeedbackCreate(FeedbackBase): - """Schema used for creating feedback.""" - - feedback_source: FeedbackSourceBase - """The source of the feedback.""" - - -class Feedback(FeedbackBase): - """Schema for getting feedback.""" - - id: UUID - created_at: datetime - """The time the feedback was created.""" - modified_at: datetime - """The time the feedback was last modified.""" - feedback_source: Optional[FeedbackSourceBase] = None - """The source of the feedback. In this case""" - - -class TracerSession(BaseModel): - """TracerSession schema for the API. - - Sessions are also referred to as "Projects" in the UI. - """ - - id: UUID - """The ID of the project.""" - start_time: datetime = Field(default_factory=datetime.utcnow) - """The time the project was created.""" - name: Optional[str] = None - """The name of the session.""" - extra: Optional[Dict[str, Any]] = None - """Extra metadata for the project.""" - tenant_id: UUID - """The tenant ID this project belongs to.""" - - _host_url: Optional[str] = PrivateAttr(default=None) - - def __init__(self, _host_url: Optional[str] = None, **kwargs: Any) -> None: - """Initialize a Run object.""" - super().__init__(**kwargs) - self._host_url = _host_url - - @property - def url(self) -> Optional[str]: - """URL of this run within the app.""" - if self._host_url: - return f"{self._host_url}/o/{self.tenant_id}/projects/p/{self.id}" - return None - - -class TracerSessionResult(TracerSession): - """TracerSession schema returned when reading a project - by ID. Sessions are also referred to as "Projects" in the UI.""" - - run_count: Optional[int] - """The number of runs in the project.""" - latency_p50: Optional[timedelta] - """The median (50th percentile) latency for the project.""" - latency_p99: Optional[timedelta] - """The 99th percentile latency for the project.""" - total_tokens: Optional[int] - """The total number of tokens consumed in the project.""" - prompt_tokens: Optional[int] - """The total number of prompt tokens consumed in the project.""" - completion_tokens: Optional[int] - """The total number of completion tokens consumed in the project.""" - last_run_start_time: Optional[datetime] - """The start time of the last run in the project.""" - feedback_stats: Optional[Dict[str, Any]] - """Feedback stats for the project.""" - reference_dataset_ids: Optional[List[UUID]] - """The reference dataset IDs this project's runs were generated on.""" - run_facets: Optional[List[Dict[str, Any]]] - """Facets for the runs in the project.""" - - -@runtime_checkable -class BaseMessageLike(Protocol): - """ - A protocol representing objects similar to BaseMessage. - """ - - content: str - additional_kwargs: Dict - - @property - def type(self) -> str: - """Type of the Message, used for serialization.""" - diff --git a/src/interface/__init__.py b/src/interface/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/interface/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/interface/clean.py b/src/interface/clean.py deleted file mode 100644 index 06fbfecb95d80e3b5f29c0b32b8ddbbd93b74e11..0000000000000000000000000000000000000000 --- a/src/interface/clean.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from FourthDimension.es.es_client import ElasticsearchClient -from FourthDimension.faiss_process.faiss_storage import clean_faiss - -es_client = ElasticsearchClient() - - -def clean_entrance(): - """ - 清除数据入口 - """ - print('开始清除数据...') - es_clean() - print('数据清除中...') - faiss_clean() - print('数据已清除') - print('---------------------------------') - - -def es_clean(): - """ - 清除es中数据 - """ - es_client.clean_data() - - -def faiss_clean(): - """ - 清空faiss数据 - :return: - """ - clean_faiss() diff --git a/src/interface/generate_answer.py b/src/interface/generate_answer.py deleted file mode 100644 index 0148276788323748455b7b7ed119ac0332f13bb1..0000000000000000000000000000000000000000 --- a/src/interface/generate_answer.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from FourthDimension.model.chatGPT import answer_generate - - -def generate_answers(question, data): - """ - 答案生成 - :param question: 问题 - :param data: 召回结果 - :return: - """ - if len(data) > 0: - print('检索已召回,答案生成中...') - answer = answer_generate(question, data) - print('答案:{}'.format(answer)) - print('---------------------------------') - return answer - else: - print('无检索结果,请确认是否上传文档') diff --git a/src/interface/parse.py b/src/interface/parse.py deleted file mode 100644 index 3763d7c44df8b7ea9db24164d8d3ea4a0f04869f..0000000000000000000000000000000000000000 --- a/src/interface/parse.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from FourthDimension.utils.file_parse import get_all_docx_contexts - - -def parse_data(doc_path): - """ - 数据解析 - :param doc_path: 文档路径 - :return: - """ - print('开始文档解析...') - all_contexts = get_all_docx_contexts(doc_path) - return all_contexts diff --git a/src/interface/query.py b/src/interface/query.py deleted file mode 100644 index bb314afca360e41b6090e10b5096aa9f79226a7f..0000000000000000000000000000000000000000 --- a/src/interface/query.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from FourthDimension.config.config import config_setting -from FourthDimension.es.es_client import ElasticsearchClient -from FourthDimension.faiss_process.faiss_index import faiss_search -from FourthDimension.utils.mix_sort import rerank - -word_storage = config_setting['word_storage'] -embedding_storage = config_setting['embedding_storage'] -search_select = config_setting['search_select'] -index_name = config_setting['elasticsearch_setting']['index_name'] - -elasticsearch = 'elasticsearch' -faiss = 'faiss' -elasticsearch_faiss = 'default' - -es_client = ElasticsearchClient() - - -def query_entrance(question): - """ - 查询入口 - :param question: 问题 - :return: - """ - print('开始检索问题:{}'.format(question)) - top_k_contexts = [] - if search_select == elasticsearch: - top_k_contexts = es_query(question) - elif search_select == faiss: - top_k_contexts = faiss_query(question) - elif search_select == elasticsearch_faiss: - top_k_contexts = es_faiss_query(question) - else: - print(f"参数search_select无法匹配,请检查参数:f{search_select}") - return top_k_contexts - - -def es_query(question): - """ - es检索增强生成 - :param question: 问题 - :return: - """ - top_k_contexts = es_client.es_search(question) - return top_k_contexts - - -def faiss_query(question): - """ - faiss检索 - :param question: 问题 - :return: - """ - top_k_contexts = faiss_search(question) - return top_k_contexts - - -def es_faiss_query(question): - """ - es+faiss重排查询 - :param question: 问题 - :return: - """ - es_top_k_contexts = es_query(question) - faiss_top_k_contexts = faiss_query(question) - merged_top_k = list(set(es_top_k_contexts + faiss_top_k_contexts)) - rerank_result = rerank(question, merged_top_k) - return rerank_result diff --git a/src/interface/recall.py b/src/interface/recall.py deleted file mode 100644 index 57b1fb1e4282dc5dbaec2740a5db3da1b6bffe7c..0000000000000000000000000000000000000000 --- a/src/interface/recall.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -def recall_test(dataset_path): - pass \ No newline at end of file diff --git a/src/interface/upload.py b/src/interface/upload.py deleted file mode 100644 index 064aebaab072bf4848dc471be91ece17eefed576..0000000000000000000000000000000000000000 --- a/src/interface/upload.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from FourthDimension.es.es_client import ElasticsearchClient -from FourthDimension.faiss_process.faiss_storage import embeddings_storage - -es_client = ElasticsearchClient() - - -def upload_entrance(contexts): - """ - 存储入口 - :param contexts: 段落 - :return: - """ - print('解析完成,文档上传中...') - filter_context = es_upload(contexts) - insert_file_name = faiss_upload(filter_context) - print('已存储文档:{}'.format(insert_file_name)) - print('---------------------------------') - - -def es_upload(contexts): - """ - es上传 - :param contexts: 段落 - :return: - """ - filter_context = es_client.insert_data(contexts) - return filter_context - - -def faiss_upload(contexts): - """ - es上传 - :param contexts: 段落 - :return: - """ - insert_file_name = embeddings_storage(contexts) - return insert_file_name - - -def upload_test(contexts_path): - pass diff --git a/src/load/__init__.py b/src/load/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/load/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/load/dump.py b/src/load/dump.py deleted file mode 100644 index a5a7de55be432d68db06a1d1552a9df02b221483..0000000000000000000000000000000000000000 --- a/src/load/dump.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -import json -from typing import Any, Dict - -from FourthDimension.load.serializable import Serializable, to_json_not_implemented - - -def default(obj: Any) -> Any: - """Return a default value for a Serializable object or - a SerializedNotImplemented object.""" - if isinstance(obj, Serializable): - return obj.to_json() - else: - return to_json_not_implemented(obj) - - -def dumps(obj: Any, *, pretty: bool = False) -> str: - """Return a json string representation of an object.""" - if pretty: - return json.dumps(obj, default=default, indent=2) - else: - return json.dumps(obj, default=default) - - -def dumpd(obj: Any) -> Dict[str, Any]: - """Return a json dict representation of an object.""" - return json.loads(dumps(obj)) diff --git a/src/load/serializable.py b/src/load/serializable.py deleted file mode 100644 index 82f0f8a855cb91163f9cd3446cf17200769959f2..0000000000000000000000000000000000000000 --- a/src/load/serializable.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from abc import ABC -from typing import Any, Dict, List, Literal, Optional, TypedDict, Union, cast - -from pydantic import PrivateAttr -from pydantic.main import BaseModel - - -class BaseSerialized(TypedDict): - """Base class for serialized objects.""" - - lc: int - id: List[str] - - -class SerializedConstructor(BaseSerialized): - """Serialized constructor.""" - - type: Literal["constructor"] - kwargs: Dict[str, Any] - - -class SerializedSecret(BaseSerialized): - """Serialized secret.""" - - type: Literal["secret"] - - -class SerializedNotImplemented(BaseSerialized): - """Serialized not implemented.""" - - type: Literal["not_implemented"] - repr: Optional[str] - - -class Serializable(BaseModel, ABC): - """Serializable base class.""" - - @classmethod - def is_lc_serializable(cls) -> bool: - """Is this class serializable?""" - return False - - @classmethod - def get_lc_namespace(cls) -> List[str]: - """Get the namespace of the langchain object. - - For example, if the class is `langchain.llms.openai.OpenAI`, then the - namespace is ["langchain", "llms", "openai"] - """ - return cls.__module__.split(".") - - @property - def lc_secrets(self) -> Dict[str, str]: - """ - Return a map of constructor argument names to secret ids. - eg. {"openai_api_key": "OPENAI_API_KEY"} - """ - return dict() - - @property - def lc_attributes(self) -> Dict: - """ - Return a list of attribute names that should be included in the - serialized kwargs. These attributes must be accepted by the - constructor. - """ - return {} - - class Config: - extra = "ignore" - - _lc_kwargs = PrivateAttr(default_factory=dict) - - def __init__(self, **kwargs: Any) -> None: - super().__init__(**kwargs) - self._lc_kwargs = kwargs - - def to_json(self) -> Union[SerializedConstructor, SerializedNotImplemented]: - if not self.is_lc_serializable(): - return self.to_json_not_implemented() - - secrets = dict() - # Get latest values for kwargs if there is an attribute with same name - lc_kwargs = { - k: getattr(self, k, v) - for k, v in self._lc_kwargs.items() - if not (self.__exclude_fields__ or {}).get(k, False) # type: ignore - } - - # Merge the lc_secrets and lc_attributes from every class in the MRO - for cls in [None, *self.__class__.mro()]: - # Once we get to Serializable, we're done - if cls is Serializable: - break - - if cls: - deprecated_attributes = [ - "lc_namespace", - "lc_serializable", - ] - - for attr in deprecated_attributes: - if hasattr(cls, attr): - raise ValueError( - f"Class {self.__class__} has a deprecated " - f"attribute {attr}. Please use the corresponding " - f"classmethod instead." - ) - - # Get a reference to self bound to each class in the MRO - this = cast(Serializable, self if cls is None else super(cls, self)) - - secrets.update(this.lc_secrets) - lc_kwargs.update(this.lc_attributes) - - # include all secrets, even if not specified in kwargs - # as these secrets may be passed as an environment variable instead - for key in secrets.keys(): - secret_value = getattr(self, key, None) or lc_kwargs.get(key) - if secret_value is not None: - lc_kwargs.update({key: secret_value}) - - return { - "lc": 1, - "type": "constructor", - "id": [*self.get_lc_namespace(), self.__class__.__name__], - "kwargs": lc_kwargs - if not secrets - else _replace_secrets(lc_kwargs, secrets), - } - - def to_json_not_implemented(self) -> SerializedNotImplemented: - return to_json_not_implemented(self) - - -def _replace_secrets( - root: Dict[Any, Any], secrets_map: Dict[str, str] -) -> Dict[Any, Any]: - result = root.copy() - for path, secret_id in secrets_map.items(): - [*parts, last] = path.split(".") - current = result - for part in parts: - if part not in current: - break - current[part] = current[part].copy() - current = current[part] - if last in current: - current[last] = { - "lc": 1, - "type": "secret", - "id": [secret_id], - } - return result - - -def to_json_not_implemented(obj: object) -> SerializedNotImplemented: - """Serialize a "not implemented" object. - - Args: - obj: object to serialize - - Returns: - SerializedNotImplemented - """ - _id: List[str] = [] - try: - if hasattr(obj, "__name__"): - _id = [*obj.__module__.split("."), obj.__name__] - elif hasattr(obj, "__class__"): - _id = [*obj.__class__.__module__.split("."), obj.__class__.__name__] - except Exception: - pass - - result: SerializedNotImplemented = { - "lc": 1, - "type": "not_implemented", - "id": _id, - "repr": None, - } - try: - result["repr"] = repr(obj) - except Exception: - pass - return result - diff --git a/src/main.py b/src/main.py deleted file mode 100644 index f4c503d0ff1d5a5610fe6315e0a648c7d2418ee8..0000000000000000000000000000000000000000 --- a/src/main.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from FourthDimension.interface.generate_answer import generate_answers -from FourthDimension.interface.upload import upload_entrance -from FourthDimension.interface.query import query_entrance -from FourthDimension.interface.clean import clean_entrance -from FourthDimension.interface.parse import parse_data - - -def upload(doc_path): - """ - 文档上传接口 - 数据格式List[Document] - :param doc_path: 文档路径 - :return: - """ - all_contexts = parse_data(doc_path) - upload_entrance(all_contexts) - - -def query(question): - """ - 检索增强生成(问答)接口 - :param question: 问题 - :return: - """ - top_k_contexts = query_entrance(question) - answer = generate_answers(question, top_k_contexts) - return answer - - -def clean(): - """ - 清除所有数据 - """ - clean_entrance() diff --git a/src/model/HuggingFaceBgeEmbeddings.py b/src/model/HuggingFaceBgeEmbeddings.py deleted file mode 100644 index e052af872b9912cda2689ba4492f67dba0699d97..0000000000000000000000000000000000000000 --- a/src/model/HuggingFaceBgeEmbeddings.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from pydantic import Field, Extra -from pydantic.main import BaseModel - -from FourthDimension.schema.embeddings import Embeddings -from typing import Any, Dict, List, Optional - -DEFAULT_BGE_MODEL = "BAAI/bge-large-en" -DEFAULT_QUERY_BGE_INSTRUCTION_EN = ( - "Represent this question for searching relevant passages: " -) -DEFAULT_QUERY_BGE_INSTRUCTION_ZH = "为这个句子生成表示以用于检索相关文章:" - - -class HuggingFaceBgeEmbeddings(BaseModel, Embeddings): - client: Any #: :meta private: - model_name: str = DEFAULT_BGE_MODEL - """Model name to use.""" - cache_folder: Optional[str] = None - """Path to store models. - Can be also set by SENTENCE_TRANSFORMERS_HOME environment variable.""" - model_kwargs: Dict[str, Any] = Field(default_factory=dict) - """Key word arguments to pass to the model.""" - encode_kwargs: Dict[str, Any] = Field(default_factory=dict) - """Key word arguments to pass when calling the `encode` method of the model.""" - query_instruction: str = DEFAULT_QUERY_BGE_INSTRUCTION_EN - """Instruction to use for embedding query.""" - - def __init__(self, **kwargs: Any): - """Initialize the sentence_transformer.""" - super().__init__(**kwargs) - try: - import sentence_transformers - - except ImportError as exc: - raise ImportError( - "Could not import sentence_transformers python package. " - "Please install it with `pip install sentence_transformers`." - ) from exc - - self.client = sentence_transformers.SentenceTransformer( - self.model_name, cache_folder=self.cache_folder, **self.model_kwargs - ) - if "-zh" in self.model_name: - self.query_instruction = DEFAULT_QUERY_BGE_INSTRUCTION_ZH - - class Config: - """Configuration for this pydantic object.""" - - extra = Extra.forbid - - def embed_documents(self, texts: List[str]) -> List[List[float]]: - """Compute doc embeddings using a HuggingFace transformer model. - - Args: - texts: The list of texts to embed. - - Returns: - List of embeddings, one for each text. - """ - texts = [t.replace("\n", " ") for t in texts] - embeddings = self.client.encode(texts, **self.encode_kwargs) - return embeddings.tolist() - - def embed_query(self, text: str) -> List[float]: - """Compute query embeddings using a HuggingFace transformer model. - - Args: - text: The text to embed. - - Returns: - Embeddings for the text. - """ - text = text.replace("\n", " ") - embedding = self.client.encode( - self.query_instruction + text, **self.encode_kwargs - ) - return embedding.tolist() diff --git a/src/model/__init__.py b/src/model/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/model/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/model/model_init.py b/src/model/model_init.py deleted file mode 100644 index 41d099140a7f6fdf97b82c5e0fd48d32eac9c5ee..0000000000000000000000000000000000000000 --- a/src/model/model_init.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明:模型初始化 -""" -import os -from FourthDimension.model.HuggingFaceBgeEmbeddings import HuggingFaceBgeEmbeddings - -os.environ['HF_ENDPOINT'] = "https://hf-mirror.com" - - -def init_embeddings_model(model_name, model_kwargs, encode_kwargs): - embeddings = HuggingFaceBgeEmbeddings( - model_name=model_name, - model_kwargs=model_kwargs, - encode_kwargs=encode_kwargs - ) - return embeddings diff --git a/src/parser/__init__.py b/src/parser/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/parser/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/parser/common.py b/src/parser/common.py deleted file mode 100644 index acdc78569d042c6ccdad474e9b23129d84402a5c..0000000000000000000000000000000000000000 --- a/src/parser/common.py +++ /dev/null @@ -1,9 +0,0 @@ -from FourthDimension.parser.files import File - - -def process_file( - file: File, - loader_class -): - file.compute_documents(loader_class) - return file.documents diff --git a/src/parser/docx_parser.py b/src/parser/docx_parser.py deleted file mode 100644 index d52090d601c0d2041aea158462e9f50435073f78..0000000000000000000000000000000000000000 --- a/src/parser/docx_parser.py +++ /dev/null @@ -1,48 +0,0 @@ -import io -import os.path -import re - -from fastapi import UploadFile -from FourthDimension.doc.loader import Docx2txtLoader - -from FourthDimension.parser.files import File -from .common import process_file - - -def replace_multiple_newlines(text): - pattern = r'\n{1,}' # 匹配连续一个以上的换行符 - replacement = '\n' # 替换为一个换行符 - updated_text = re.sub(pattern, replacement, text) - return updated_text - - -def process_docx(file: File): - document = process_file( - file=file, - loader_class=Docx2txtLoader - ) - for i, d in enumerate(document): - document[i].page_content = replace_multiple_newlines(document[i].page_content) - document[i].metadata['source'] = os.path.basename(document[i].metadata['source']) - return document - - -def parse_docx(file_path, file_name): - print('正在解析文档:' + file_name) - - with open(file_path, "rb") as f: - file_content = f.read() - - # Create a file-like object in memory using BytesIO - file_object = io.BytesIO(file_content) - upload_file = UploadFile( - file=file_object, filename=file_name, size=len(file_content) - ) - file_instance = File(file=upload_file) - file_instance.content = file_content - - document = process_docx(file_instance) - - for i, doc in enumerate(document): - document[i].metadata['source'] = file_name - return document diff --git a/src/parser/files.py b/src/parser/files.py deleted file mode 100644 index 1f8670f24fe947f25e94ee08e8a63e0652c962be..0000000000000000000000000000000000000000 --- a/src/parser/files.py +++ /dev/null @@ -1,81 +0,0 @@ -import os -import tempfile -from typing import Any, Optional -from uuid import UUID - -from fastapi import UploadFile -from FourthDimension.doc.spliter import RecursiveCharacterTextSplitter -from pydantic import BaseModel -from FourthDimension.utils.file import compute_sha1_from_file -from FourthDimension.config.config import config_setting - -chunk_size = config_setting['para_config']['chunk_size'] -chunk_overlap = config_setting['para_config']['overlap'] - - -class File(BaseModel): - id: Optional[UUID] = None - file: Optional[UploadFile] - file_name: Optional[str] = "" - file_size: Optional[int] = None - file_sha1: Optional[str] = "" - vectors_ids: Optional[list] = [] - file_extension: Optional[str] = "" - content: Optional[Any] = None - chunk_size: int = chunk_size - chunk_overlap: int = chunk_overlap - documents: Optional[Any] = None - - def __init__(self, **kwargs): - super().__init__(**kwargs) - - if self.file: - self.file_name = self.file.filename - self.file_size = self.file.size # pyright: ignore reportPrivateUsage=none - self.file_extension = os.path.splitext( - self.file.filename # pyright: ignore reportPrivateUsage=none - )[-1].lower() - - async def compute_file_sha1(self): - """ - Compute the sha1 of the file using a temporary file - """ - with tempfile.NamedTemporaryFile( - delete=False, - suffix=self.file.filename, # pyright: ignore reportPrivateUsage=none - ) as tmp_file: - await self.file.seek(0) # pyright: ignore reportPrivateUsage=none - self.content = ( - await self.file.read() # pyright: ignore reportPrivateUsage=none - ) - tmp_file.write(self.content) - tmp_file.flush() - self.file_sha1 = compute_sha1_from_file(tmp_file.name) - - os.remove(tmp_file.name) - - def compute_documents(self, loader_class): - """ - Compute the documents from the file - - Args: - loader_class (class): The class of the loader to use to load the file - """ - - documents = [] - with tempfile.NamedTemporaryFile( - delete=False, - suffix=self.file.filename, # pyright: ignore reportPrivateUsage=none - ) as tmp_file: - tmp_file.write(self.content) # pyright: ignore reportPrivateUsage=none - tmp_file.flush() - loader = loader_class(tmp_file.name) - documents = loader.load() - - os.remove(tmp_file.name) - - text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder( - chunk_size=self.chunk_size, chunk_overlap=self.chunk_overlap - ) - - self.documents = text_splitter.split_documents(documents) diff --git a/src/rerank/__init__.py b/src/rerank/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/rerank/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/schema/__init__.py b/src/schema/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/schema/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/schema/agent.py b/src/schema/agent.py deleted file mode 100644 index 135d342329a54743cbce2c9c99a160bedeaef7a4..0000000000000000000000000000000000000000 --- a/src/schema/agent.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -from typing import Any, Sequence, Union - -from FourthDimension.load.serializable import Serializable -from FourthDimension.schema.messages import BaseMessage - - -class AgentAction(Serializable): - """A full description of an action for an ActionAgent to execute.""" - - tool: str - """The name of the Tool to execute.""" - tool_input: Union[str, dict] - """The input to pass in to the Tool.""" - log: str - """Additional information to log about the action. - This log can be used in a few ways. First, it can be used to audit - what exactly the LLM predicted to lead to this (tool, tool_input). - Second, it can be used in future iterations to show the LLMs prior - thoughts. This is useful when (tool, tool_input) does not contain - full information about the LLM prediction (for example, any `thought` - before the tool/tool_input).""" - - def __init__( - self, tool: str, tool_input: Union[str, dict], log: str, **kwargs: Any - ): - super().__init__(tool=tool, tool_input=tool_input, log=log, **kwargs) - - @classmethod - def is_lc_serializable(cls) -> bool: - """Return whether or not the class is serializable.""" - return True - - -class AgentActionMessageLog(AgentAction): - message_log: Sequence[BaseMessage] - """Similar to log, this can be used to pass along extra - information about what exact messages were predicted by the LLM - before parsing out the (tool, tool_input). This is again useful - if (tool, tool_input) cannot be used to fully recreate the LLM - prediction, and you need that LLM prediction (for future agent iteration). - Compared to `log`, this is useful when the underlying LLM is a - ChatModel (and therefore returns messages rather than a string).""" - - -class AgentFinish(Serializable): - """The final return value of an ActionAgent.""" - - return_values: dict - """Dictionary of return values.""" - log: str - """Additional information to log about the return value. - This is used to pass along the full LLM prediction, not just the parsed out - return value. For example, if the full LLM prediction was - `Final Answer: 2` you may want to just return `2` as a return value, but pass - along the full string as a `log` (for debugging or observability purposes). - """ - - def __init__(self, return_values: dict, log: str, **kwargs: Any): - super().__init__(return_values=return_values, log=log, **kwargs) - - @classmethod - def is_lc_serializable(cls) -> bool: - """Return whether or not the class is serializable.""" - return True - diff --git a/src/schema/embeddings.py b/src/schema/embeddings.py deleted file mode 100644 index 3225bf674990b117163ded56affbcf4736d3a5c3..0000000000000000000000000000000000000000 --- a/src/schema/embeddings.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from abc import ABC, abstractmethod -from typing import List - - -class Embeddings(ABC): - """Interface for embedding models.""" - - @abstractmethod - def embed_documents(self, texts: List[str]) -> List[List[float]]: - """Embed search docs.""" - - @abstractmethod - def embed_query(self, text: str) -> List[float]: - """Embed query text.""" - - async def aembed_documents(self, texts: List[str]) -> List[List[float]]: - """Asynchronous Embed search docs.""" - raise NotImplementedError - - async def aembed_query(self, text: str) -> List[float]: - """Asynchronous Embed query text.""" - raise NotImplementedError \ No newline at end of file diff --git a/src/schema/messages.py b/src/schema/messages.py deleted file mode 100644 index 2e1319fe942a5cae5cfc4c41216195b69981553f..0000000000000000000000000000000000000000 --- a/src/schema/messages.py +++ /dev/null @@ -1,324 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -from abc import abstractmethod -from typing import Any, Dict, List, Sequence - -from pydantic import Field - -from FourthDimension.doc.document import Serializable - - -def get_buffer_string( - messages: Sequence[BaseMessage], human_prefix: str = "Human", ai_prefix: str = "AI" -) -> str: - """Convert sequence of Messages to strings and concatenate them into one string. - - Args: - messages: Messages to be converted to strings. - human_prefix: The prefix to prepend to contents of HumanMessages. - ai_prefix: THe prefix to prepend to contents of AIMessages. - - Returns: - A single string concatenation of all input messages. - - Example: - .. code-block:: python - - from langchain.schema import AIMessage, HumanMessage - - messages = [ - HumanMessage(content="Hi, how are you?"), - AIMessage(content="Good, how are you?"), - ] - get_buffer_string(messages) - # -> "Human: Hi, how are you?\nAI: Good, how are you?" - """ - string_messages = [] - for m in messages: - if isinstance(m, HumanMessage): - role = human_prefix - elif isinstance(m, AIMessage): - role = ai_prefix - elif isinstance(m, SystemMessage): - role = "System" - elif isinstance(m, FunctionMessage): - role = "Function" - elif isinstance(m, ChatMessage): - role = m.role - else: - raise ValueError(f"Got unsupported message type: {m}") - message = f"{role}: {m.content}" - if isinstance(m, AIMessage) and "function_call" in m.additional_kwargs: - message += f"{m.additional_kwargs['function_call']}" - string_messages.append(message) - - return "\n".join(string_messages) - - -class BaseMessage(Serializable): - """The base abstract Message class. - - Messages are the inputs and outputs of ChatModels. - """ - - content: str - """The string contents of the message.""" - - additional_kwargs: dict = Field(default_factory=dict) - """Any additional information.""" - - @property - @abstractmethod - def type(self) -> str: - """Type of the Message, used for serialization.""" - - @classmethod - def is_lc_serializable(cls) -> bool: - """Return whether this class is serializable.""" - return True - - # def __add__(self, other: Any) -> ChatPromptTemplate: - # from langchain.prompts.chat import ChatPromptTemplate - # - # prompt = ChatPromptTemplate(messages=[self]) - # return prompt + other - - -class BaseMessageChunk(BaseMessage): - """A Message chunk, which can be concatenated with other Message chunks.""" - - def _merge_kwargs_dict( - self, left: Dict[str, Any], right: Dict[str, Any] - ) -> Dict[str, Any]: - """Merge additional_kwargs from another BaseMessageChunk into this one.""" - merged = left.copy() - for k, v in right.items(): - if k not in merged: - merged[k] = v - elif type(merged[k]) != type(v): - raise ValueError( - f'additional_kwargs["{k}"] already exists in this message,' - " but with a different type." - ) - elif isinstance(merged[k], str): - merged[k] += v - elif isinstance(merged[k], dict): - merged[k] = self._merge_kwargs_dict(merged[k], v) - else: - raise ValueError( - f"Additional kwargs key {k} already exists in this message." - ) - return merged - - def __add__(self, other: Any) -> BaseMessageChunk: # type: ignore - if isinstance(other, BaseMessageChunk): - # If both are (subclasses of) BaseMessageChunk, - # concat into a single BaseMessageChunk - - if isinstance(self, ChatMessageChunk): - return self.__class__( - role=self.role, - content=self.content + other.content, - additional_kwargs=self._merge_kwargs_dict( - self.additional_kwargs, other.additional_kwargs - ), - ) - return self.__class__( - content=self.content + other.content, - additional_kwargs=self._merge_kwargs_dict( - self.additional_kwargs, other.additional_kwargs - ), - ) - else: - raise TypeError( - 'unsupported operand type(s) for +: "' - f"{self.__class__.__name__}" - f'" and "{other.__class__.__name__}"' - ) - - -class HumanMessage(BaseMessage): - """A Message from a human.""" - - example: bool = False - """Whether this Message is being passed in to the model as part of an example - conversation. - """ - - @property - def type(self) -> str: - """Type of the message, used for serialization.""" - return "human" - - -class HumanMessageChunk(HumanMessage, BaseMessageChunk): - """A Human Message chunk.""" - - pass - - -class AIMessage(BaseMessage): - """A Message from an AI.""" - - example: bool = False - """Whether this Message is being passed in to the model as part of an example - conversation. - """ - - @property - def type(self) -> str: - """Type of the message, used for serialization.""" - return "ai" - - -class AIMessageChunk(AIMessage, BaseMessageChunk): - """A Message chunk from an AI.""" - - def __add__(self, other: Any) -> BaseMessageChunk: # type: ignore - if isinstance(other, AIMessageChunk): - if self.example != other.example: - raise ValueError( - "Cannot concatenate AIMessageChunks with different example values." - ) - - return self.__class__( - example=self.example, - content=self.content + other.content, - additional_kwargs=self._merge_kwargs_dict( - self.additional_kwargs, other.additional_kwargs - ), - ) - - return super().__add__(other) - - -class SystemMessage(BaseMessage): - """A Message for priming AI behavior, usually passed in as the first of a sequence - of input messages. - """ - - @property - def type(self) -> str: - """Type of the message, used for serialization.""" - return "system" - - -class SystemMessageChunk(SystemMessage, BaseMessageChunk): - """A System Message chunk.""" - - pass - - -class FunctionMessage(BaseMessage): - """A Message for passing the result of executing a function back to a model.""" - - name: str - """The name of the function that was executed.""" - - @property - def type(self) -> str: - """Type of the message, used for serialization.""" - return "function" - - -class FunctionMessageChunk(FunctionMessage, BaseMessageChunk): - """A Function Message chunk.""" - - def __add__(self, other: Any) -> BaseMessageChunk: # type: ignore - if isinstance(other, FunctionMessageChunk): - if self.name != other.name: - raise ValueError( - "Cannot concatenate FunctionMessageChunks with different names." - ) - - return self.__class__( - name=self.name, - content=self.content + other.content, - additional_kwargs=self._merge_kwargs_dict( - self.additional_kwargs, other.additional_kwargs - ), - ) - - return super().__add__(other) - - -class ChatMessage(BaseMessage): - """A Message that can be assigned an arbitrary speaker (i.e. role).""" - - role: str - """The speaker / role of the Message.""" - - @property - def type(self) -> str: - """Type of the message, used for serialization.""" - return "chat" - - -class ChatMessageChunk(ChatMessage, BaseMessageChunk): - """A Chat Message chunk.""" - - def __add__(self, other: Any) -> BaseMessageChunk: # type: ignore - if isinstance(other, ChatMessageChunk): - if self.role != other.role: - raise ValueError( - "Cannot concatenate ChatMessageChunks with different roles." - ) - - return self.__class__( - role=self.role, - content=self.content + other.content, - additional_kwargs=self._merge_kwargs_dict( - self.additional_kwargs, other.additional_kwargs - ), - ) - - return super().__add__(other) - - -def _message_to_dict(message: BaseMessage) -> dict: - return {"type": message.type, "data": message.dict()} - - -def messages_to_dict(messages: Sequence[BaseMessage]) -> List[dict]: - """Convert a sequence of Messages to a list of dictionaries. - - Args: - messages: Sequence of messages (as BaseMessages) to convert. - - Returns: - List of messages as dicts. - """ - return [_message_to_dict(m) for m in messages] - - -def _message_from_dict(message: dict) -> BaseMessage: - _type = message["type"] - if _type == "human": - return HumanMessage(**message["data"]) - elif _type == "ai": - return AIMessage(**message["data"]) - elif _type == "system": - return SystemMessage(**message["data"]) - elif _type == "chat": - return ChatMessage(**message["data"]) - elif _type == "function": - return FunctionMessage(**message["data"]) - else: - raise ValueError(f"Got unexpected message type: {_type}") - - -def messages_from_dict(messages: List[dict]) -> List[BaseMessage]: - """Convert a sequence of messages from dicts to Message objects. - - Args: - messages: Sequence of messages (as dicts) to convert. - - Returns: - List of messages (BaseMessages). - """ - return [_message_from_dict(m) for m in messages] - diff --git a/src/schema/output.py b/src/schema/output.py deleted file mode 100644 index 3682814947aa6ad62b3415ba244226fc1d168591..0000000000000000000000000000000000000000 --- a/src/schema/output.py +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -from copy import deepcopy -from typing import Any, Dict, List, Optional -from uuid import UUID - -from pydantic import root_validator -from pydantic.main import BaseModel - -from FourthDimension.schema.messages import BaseMessage, BaseMessageChunk -from FourthDimension.doc.document import Serializable - - -class Generation(Serializable): - """A single text generation output.""" - - text: str - """Generated text output.""" - - generation_info: Optional[Dict[str, Any]] = None - """Raw response from the provider. May include things like the - reason for finishing or token log probabilities. - """ - # TODO: add log probs as separate attribute - - @classmethod - def is_lc_serializable(cls) -> bool: - """Return whether this class is serializable.""" - return True - - -class GenerationChunk(Generation): - """A Generation chunk, which can be concatenated with other Generation chunks.""" - - def __add__(self, other: GenerationChunk) -> GenerationChunk: - if isinstance(other, GenerationChunk): - generation_info = ( - {**(self.generation_info or {}), **(other.generation_info or {})} - if self.generation_info is not None or other.generation_info is not None - else None - ) - return GenerationChunk( - text=self.text + other.text, - generation_info=generation_info, - ) - else: - raise TypeError( - f"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'" - ) - - -class ChatGeneration(Generation): - """A single chat generation output.""" - - text: str = "" - """*SHOULD NOT BE SET DIRECTLY* The text contents of the output message.""" - message: BaseMessage - """The message output by the chat model.""" - - @root_validator - def set_text(cls, values: Dict[str, Any]) -> Dict[str, Any]: - """Set the text attribute to be the contents of the message.""" - values["text"] = values["message"].content - return values - - -class ChatGenerationChunk(ChatGeneration): - """A ChatGeneration chunk, which can be concatenated with other - ChatGeneration chunks. - - Attributes: - message: The message chunk output by the chat model. - """ - - message: BaseMessageChunk - - def __add__(self, other: ChatGenerationChunk) -> ChatGenerationChunk: - if isinstance(other, ChatGenerationChunk): - generation_info = ( - {**(self.generation_info or {}), **(other.generation_info or {})} - if self.generation_info is not None or other.generation_info is not None - else None - ) - return ChatGenerationChunk( - message=self.message + other.message, - generation_info=generation_info, - ) - else: - raise TypeError( - f"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'" - ) - - -class RunInfo(BaseModel): - """Class that contains metadata for a single execution of a Chain or model.""" - - run_id: UUID - """A unique identifier for the model or chain run.""" - - -class ChatResult(BaseModel): - """Class that contains all results for a single chat model call.""" - - generations: List[ChatGeneration] - """List of the chat generations. This is a List because an input can have multiple - candidate generations. - """ - llm_output: Optional[dict] = None - """For arbitrary LLM provider specific output.""" - - -class LLMResult(BaseModel): - """Class that contains all results for a batched LLM call.""" - - generations: List[List[Generation]] - """List of generated outputs. This is a List[List[]] because - each input could have multiple candidate generations.""" - llm_output: Optional[dict] = None - """Arbitrary LLM provider-specific output.""" - run: Optional[List[RunInfo]] = None - """List of metadata info for model call for each input.""" - - def flatten(self) -> List[LLMResult]: - """Flatten generations into a single list. - - Unpack List[List[Generation]] -> List[LLMResult] where each returned LLMResult - contains only a single Generation. If token usage information is available, - it is kept only for the LLMResult corresponding to the top-choice - Generation, to avoid over-counting of token usage downstream. - - Returns: - List of LLMResults where each returned LLMResult contains a single - Generation. - """ - llm_results = [] - for i, gen_list in enumerate(self.generations): - # Avoid double counting tokens in OpenAICallback - if i == 0: - llm_results.append( - LLMResult( - generations=[gen_list], - llm_output=self.llm_output, - ) - ) - else: - if self.llm_output is not None: - llm_output = deepcopy(self.llm_output) - llm_output["token_usage"] = dict() - else: - llm_output = None - llm_results.append( - LLMResult( - generations=[gen_list], - llm_output=llm_output, - ) - ) - return llm_results - - def __eq__(self, other: object) -> bool: - """Check for LLMResult equality by ignoring any metadata related to runs.""" - if not isinstance(other, LLMResult): - return NotImplemented - return ( - self.generations == other.generations - and self.llm_output == other.llm_output - ) diff --git a/src/schema/retriever.py b/src/schema/retriever.py deleted file mode 100644 index 529a70a89414db26b91671b7d5749a557c781a14..0000000000000000000000000000000000000000 --- a/src/schema/retriever.py +++ /dev/null @@ -1,283 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - -from __future__ import annotations - -import warnings -from abc import ABC, abstractmethod -from inspect import signature -from typing import TYPE_CHECKING, Any, Dict, List, Optional - -from FourthDimension.doc.document import Serializable, Document -from FourthDimension.load.dump import dumpd -from FourthDimension.schema.runnable.base import Runnable -from FourthDimension.schema.runnable.config import RunnableConfig - -""" -文件说明: -""" -if TYPE_CHECKING: - from FourthDimension.callbacks.manager import ( - AsyncCallbackManagerForRetrieverRun, - CallbackManagerForRetrieverRun, - Callbacks, - ) - -class BaseRetriever(Serializable, Runnable[str, List[Document]], ABC): - """Abstract base class for a Document retrieval system. - - A retrieval system is defined as something that can take string queries and return - the most 'relevant' Documents from some source. - - Example: - .. code-block:: python - - class TFIDFRetriever(BaseRetriever, BaseModel): - vectorizer: Any - docs: List[Document] - tfidf_array: Any - k: int = 4 - - class Config: - arbitrary_types_allowed = True - - def get_relevant_documents(self, query: str) -> List[Document]: - from sklearn.metrics.pairwise import cosine_similarity - - # Ip -- (n_docs,x), Op -- (n_docs,n_Feats) - query_vec = self.vectorizer.transform([query]) - # Op -- (n_docs,1) -- Cosine Sim with each doc - results = cosine_similarity(self.tfidf_array, query_vec).reshape((-1,)) - return [self.docs[i] for i in results.argsort()[-self.k :][::-1]] - """ # noqa: E501 - - class Config: - """Configuration for this pydantic object.""" - - arbitrary_types_allowed = True - - _new_arg_supported: bool = False - _expects_other_args: bool = False - tags: Optional[List[str]] = None - """Optional list of tags associated with the retriever. Defaults to None - These tags will be associated with each call to this retriever, - and passed as arguments to the handlers defined in `callbacks`. - You can use these to eg identify a specific instance of a retriever with its - use case. - """ - metadata: Optional[Dict[str, Any]] = None - """Optional metadata associated with the retriever. Defaults to None - This metadata will be associated with each call to this retriever, - and passed as arguments to the handlers defined in `callbacks`. - You can use these to eg identify a specific instance of a retriever with its - use case. - """ - - def __init_subclass__(cls, **kwargs: Any) -> None: - super().__init_subclass__(**kwargs) - # Version upgrade for old retrievers that implemented the public - # methods directly. - if cls.get_relevant_documents != BaseRetriever.get_relevant_documents: - warnings.warn( - "Retrievers must implement abstract `_get_relevant_documents` method" - " instead of `get_relevant_documents`", - DeprecationWarning, - ) - swap = cls.get_relevant_documents - cls.get_relevant_documents = ( # type: ignore[assignment] - BaseRetriever.get_relevant_documents - ) - cls._get_relevant_documents = swap # type: ignore[assignment] - if ( - hasattr(cls, "aget_relevant_documents") - and cls.aget_relevant_documents != BaseRetriever.aget_relevant_documents - ): - warnings.warn( - "Retrievers must implement abstract `_aget_relevant_documents` method" - " instead of `aget_relevant_documents`", - DeprecationWarning, - ) - aswap = cls.aget_relevant_documents - cls.aget_relevant_documents = ( # type: ignore[assignment] - BaseRetriever.aget_relevant_documents - ) - cls._aget_relevant_documents = aswap # type: ignore[assignment] - parameters = signature(cls._get_relevant_documents).parameters - cls._new_arg_supported = parameters.get("run_manager") is not None - # If a V1 retriever broke the interface and expects additional arguments - cls._expects_other_args = ( - len(set(parameters.keys()) - {"self", "query", "run_manager"}) > 0 - ) - - def invoke( - self, input: str, config: Optional[RunnableConfig] = None - ) -> List[Document]: - config = config or {} - return self.get_relevant_documents( - input, - callbacks=config.get("callbacks"), - tags=config.get("tags"), - metadata=config.get("metadata"), - run_name=config.get("run_name"), - ) - - async def ainvoke( - self, - input: str, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> List[Document]: - if type(self).aget_relevant_documents == BaseRetriever.aget_relevant_documents: - # If the retriever doesn't implement async, use default implementation - return await super().ainvoke(input, config) - - config = config or {} - return await self.aget_relevant_documents( - input, - callbacks=config.get("callbacks"), - tags=config.get("tags"), - metadata=config.get("metadata"), - run_name=config.get("run_name"), - ) - - @abstractmethod - def _get_relevant_documents( - self, query: str, *, run_manager: CallbackManagerForRetrieverRun - ) -> List[Document]: - """Get documents relevant to a query. - Args: - query: String to find relevant documents for - run_manager: The callbacks handler to use - Returns: - List of relevant documents - """ - - async def _aget_relevant_documents( - self, query: str, *, run_manager: AsyncCallbackManagerForRetrieverRun - ) -> List[Document]: - """Asynchronously get documents relevant to a query. - Args: - query: String to find relevant documents for - run_manager: The callbacks handler to use - Returns: - List of relevant documents - """ - raise NotImplementedError() - - def get_relevant_documents( - self, - query: str, - *, - callbacks: Callbacks = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - run_name: Optional[str] = None, - **kwargs: Any, - ) -> List[Document]: - """Retrieve documents relevant to a query. - Args: - query: string to find relevant documents for - callbacks: Callback manager or list of callbacks - tags: Optional list of tags associated with the retriever. Defaults to None - These tags will be associated with each call to this retriever, - and passed as arguments to the handlers defined in `callbacks`. - metadata: Optional metadata associated with the retriever. Defaults to None - This metadata will be associated with each call to this retriever, - and passed as arguments to the handlers defined in `callbacks`. - Returns: - List of relevant documents - """ - from FourthDimension.callbacks.manager import CallbackManager - - callback_manager = CallbackManager.configure( - callbacks, - None, - verbose=kwargs.get("verbose", False), - inheritable_tags=tags, - local_tags=self.tags, - inheritable_metadata=metadata, - local_metadata=self.metadata, - ) - run_manager = callback_manager.on_retriever_start( - dumpd(self), - query, - name=run_name, - **kwargs, - ) - try: - _kwargs = kwargs if self._expects_other_args else {} - if self._new_arg_supported: - result = self._get_relevant_documents( - query, run_manager=run_manager, **_kwargs - ) - else: - result = self._get_relevant_documents(query, **_kwargs) - except Exception as e: - run_manager.on_retriever_error(e) - raise e - else: - run_manager.on_retriever_end( - result, - **kwargs, - ) - return result - - async def aget_relevant_documents( - self, - query: str, - *, - callbacks: Callbacks = None, - tags: Optional[List[str]] = None, - metadata: Optional[Dict[str, Any]] = None, - run_name: Optional[str] = None, - **kwargs: Any, - ) -> List[Document]: - """Asynchronously get documents relevant to a query. - Args: - query: string to find relevant documents for - callbacks: Callback manager or list of callbacks - tags: Optional list of tags associated with the retriever. Defaults to None - These tags will be associated with each call to this retriever, - and passed as arguments to the handlers defined in `callbacks`. - metadata: Optional metadata associated with the retriever. Defaults to None - This metadata will be associated with each call to this retriever, - and passed as arguments to the handlers defined in `callbacks`. - Returns: - List of relevant documents - """ - from FourthDimension.callbacks.manager import AsyncCallbackManager - - callback_manager = AsyncCallbackManager.configure( - callbacks, - None, - verbose=kwargs.get("verbose", False), - inheritable_tags=tags, - local_tags=self.tags, - inheritable_metadata=metadata, - local_metadata=self.metadata, - ) - run_manager = await callback_manager.on_retriever_start( - dumpd(self), - query, - name=run_name, - **kwargs, - ) - try: - _kwargs = kwargs if self._expects_other_args else {} - if self._new_arg_supported: - result = await self._aget_relevant_documents( - query, run_manager=run_manager, **_kwargs - ) - else: - result = await self._aget_relevant_documents(query, **_kwargs) - except Exception as e: - await run_manager.on_retriever_error(e) - raise e - else: - await run_manager.on_retriever_end( - result, - **kwargs, - ) - return result diff --git a/src/schema/runnable/__init__.py b/src/schema/runnable/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/schema/runnable/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/schema/runnable/base.py b/src/schema/runnable/base.py deleted file mode 100644 index 71e5cf3f0d1fe1c15426bf61a4a2ebebc18d7ee2..0000000000000000000000000000000000000000 --- a/src/schema/runnable/base.py +++ /dev/null @@ -1,2318 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - -from __future__ import annotations - -import asyncio -import inspect -import threading -from abc import ABC, abstractmethod -from concurrent.futures import FIRST_COMPLETED, wait -from functools import partial -from itertools import tee -from typing import ( - TYPE_CHECKING, - Any, - AsyncIterator, - Awaitable, - Callable, - Dict, - Generic, - Iterator, - List, - Mapping, - Optional, - Sequence, - Tuple, - Type, - TypeVar, - Union, - cast, -) - -from pydantic import Field - -if TYPE_CHECKING: - from FourthDimension.callbacks.manager import ( - AsyncCallbackManagerForChainRun, - CallbackManagerForChainRun, - ) - -from FourthDimension.callbacks.base import BaseCallbackManager -from FourthDimension.callbacks.tracers.log_stream import LogStreamCallbackHandler, RunLogPatch -from FourthDimension.load.dump import dumpd -from FourthDimension.doc.document import Serializable -from FourthDimension.schema.runnable.config import ( - RunnableConfig, - acall_func_with_variable_args, - call_func_with_variable_args, - ensure_config, - get_async_callback_manager_for_config, - get_callback_manager_for_config, - get_config_list, - get_executor_for_config, - patch_config, -) -from FourthDimension.schema.runnable.utils import ( - Input, - Output, - accepts_config, - accepts_run_manager, - gather_with_concurrency, -) -from FourthDimension.utils.aiter import atee, py_anext -from FourthDimension.utils.iter import safetee - -Other = TypeVar("Other") - - -class Runnable(Generic[Input, Output], ABC): - """A Runnable is a unit of work that can be invoked, batched, streamed, or - transformed.""" - - def __or__( - self, - other: Union[ - Runnable[Any, Other], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Any, Other], Callable[[Any], Other], Any]], - ], - ) -> RunnableSequence[Input, Other]: - return RunnableSequence(first=self, last=coerce_to_runnable(other)) - - def __ror__( - self, - other: Union[ - Runnable[Other, Any], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Other, Any], Callable[[Other], Any], Any]], - ], - ) -> RunnableSequence[Other, Output]: - return RunnableSequence(first=coerce_to_runnable(other), last=self) - - """ --- Public API --- """ - - @abstractmethod - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - ... - - async def ainvoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - """ - Default implementation of ainvoke, which calls invoke in a thread pool. - Subclasses should override this method if they can run asynchronously. - """ - return await asyncio.get_running_loop().run_in_executor( - None, partial(self.invoke, **kwargs), input, config - ) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - """ - Default implementation of batch, which calls invoke N times. - Subclasses should override this method if they can batch more efficiently. - """ - if not inputs: - return [] - - configs = get_config_list(config, len(inputs)) - - def invoke(input: Input, config: RunnableConfig) -> Union[Output, Exception]: - if return_exceptions: - try: - return self.invoke(input, config, **kwargs) - except Exception as e: - return e - else: - return self.invoke(input, config, **kwargs) - - # If there's only one input, don't bother with the executor - if len(inputs) == 1: - return cast(List[Output], [invoke(inputs[0], configs[0])]) - - with get_executor_for_config(configs[0]) as executor: - return cast(List[Output], list(executor.map(invoke, inputs, configs))) - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - """ - Default implementation of abatch, which calls ainvoke N times. - Subclasses should override this method if they can batch more efficiently. - """ - if not inputs: - return [] - - configs = get_config_list(config, len(inputs)) - - async def ainvoke( - input: Input, config: RunnableConfig - ) -> Union[Output, Exception]: - if return_exceptions: - try: - return await self.ainvoke(input, config, **kwargs) - except Exception as e: - return e - else: - return await self.ainvoke(input, config, **kwargs) - - coros = map(ainvoke, inputs, configs) - return await gather_with_concurrency(configs[0].get("max_concurrency"), *coros) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - """ - Default implementation of stream, which calls invoke. - Subclasses should override this method if they support streaming output. - """ - yield self.invoke(input, config, **kwargs) - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - """ - Default implementation of astream, which calls ainvoke. - Subclasses should override this method if they support streaming output. - """ - yield await self.ainvoke(input, config, **kwargs) - - async def astream_log( - self, - input: Any, - config: Optional[RunnableConfig] = None, - *, - include_names: Optional[Sequence[str]] = None, - include_types: Optional[Sequence[str]] = None, - include_tags: Optional[Sequence[str]] = None, - exclude_names: Optional[Sequence[str]] = None, - exclude_types: Optional[Sequence[str]] = None, - exclude_tags: Optional[Sequence[str]] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[RunLogPatch]: - """ - Stream all output from a runnable, as reported to the callback system. - This includes all inner runs of LLMs, Retrievers, Tools, etc. - - Output is streamed as Log objects, which include a list of - jsonpatch ops that describe how the state of the run has changed in each - step, and the final state of the run. - - The jsonpatch ops can be applied in order to construct state. - """ - - # Create a stream handler that will emit Log objects - stream = LogStreamCallbackHandler( - auto_close=False, - include_names=include_names, - include_types=include_types, - include_tags=include_tags, - exclude_names=exclude_names, - exclude_types=exclude_types, - exclude_tags=exclude_tags, - ) - - # Assign the stream handler to the config - config = config or {} - callbacks = config.get("callbacks") - if callbacks is None: - config["callbacks"] = [stream] - elif isinstance(callbacks, list): - config["callbacks"] = callbacks + [stream] - elif isinstance(callbacks, BaseCallbackManager): - callbacks = callbacks.copy() - callbacks.inheritable_handlers.append(stream) - config["callbacks"] = callbacks - else: - raise ValueError( - f"Unexpected type for callbacks: {callbacks}." - "Expected None, list or AsyncCallbackManager." - ) - - # Call the runnable in streaming mode, - # add each chunk to the output stream - async def consume_astream() -> None: - try: - async for chunk in self.astream(input, config, **kwargs): - await stream.send_stream.send( - RunLogPatch( - { - "op": "add", - "path": "/streamed_output/-", - "value": chunk, - } - ) - ) - finally: - await stream.send_stream.aclose() - - # Start the runnable in a task, so we can start consuming output - task = asyncio.create_task(consume_astream()) - - try: - # Yield each chunk from the output stream - async for log in stream: - yield log - finally: - # Wait for the runnable to finish, if not cancelled (eg. by break) - try: - await task - except asyncio.CancelledError: - pass - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - """ - Default implementation of transform, which buffers input and then calls stream. - Subclasses should override this method if they can start producing output while - input is still being generated. - """ - final: Input - got_first_val = False - - for chunk in input: - if not got_first_val: - final = chunk - got_first_val = True - else: - # Make a best effort to gather, for any type that supports `+` - # This method should throw an error if gathering fails. - final += chunk # type: ignore[operator] - - if got_first_val: - yield from self.stream(final, config, **kwargs) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - """ - Default implementation of atransform, which buffers input and calls astream. - Subclasses should override this method if they can start producing output while - input is still being generated. - """ - final: Input - got_first_val = False - - async for chunk in input: - if not got_first_val: - final = chunk - got_first_val = True - else: - # Make a best effort to gather, for any type that supports `+` - # This method should throw an error if gathering fails. - final += chunk # type: ignore[operator] - - if got_first_val: - async for output in self.astream(final, config, **kwargs): - yield output - - def bind(self, **kwargs: Any) -> Runnable[Input, Output]: - """ - Bind arguments to a Runnable, returning a new Runnable. - """ - return RunnableBinding(bound=self, kwargs=kwargs, config={}) - - def with_config( - self, - config: Optional[RunnableConfig] = None, - # Sadly Unpack is not well supported by mypy so this will have to be untyped - **kwargs: Any, - ) -> Runnable[Input, Output]: - """ - Bind config to a Runnable, returning a new Runnable. - """ - return RunnableBinding( - bound=self, config={**(config or {}), **kwargs}, kwargs={} - ) - - def with_retry( - self, - *, - retry_if_exception_type: Tuple[Type[BaseException], ...] = (Exception,), - wait_exponential_jitter: bool = True, - stop_after_attempt: int = 3, - ) -> Runnable[Input, Output]: - from FourthDimension.schema.runnable.retry import RunnableRetry - - return RunnableRetry( - bound=self, - kwargs={}, - config={}, - retry_exception_types=retry_if_exception_type, - wait_exponential_jitter=wait_exponential_jitter, - max_attempt_number=stop_after_attempt, - ) - - def map(self) -> Runnable[List[Input], List[Output]]: - """ - Return a new Runnable that maps a list of inputs to a list of outputs, - by calling invoke() with each input. - """ - return RunnableEach(bound=self) - - def with_fallbacks( - self, - fallbacks: Sequence[Runnable[Input, Output]], - *, - exceptions_to_handle: Tuple[Type[BaseException], ...] = (Exception,), - ) -> RunnableWithFallbacks[Input, Output]: - return RunnableWithFallbacks( - runnable=self, - fallbacks=fallbacks, - exceptions_to_handle=exceptions_to_handle, - ) - - """ --- Helper methods for Subclasses --- """ - - def _call_with_config( - self, - func: Union[ - Callable[[Input], Output], - Callable[[Input, CallbackManagerForChainRun], Output], - Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output], - ], - input: Input, - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> Output: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement invoke() in subclasses.""" - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - try: - output = call_func_with_variable_args(func, input, run_manager, config) - except BaseException as e: - run_manager.on_chain_error(e) - raise - else: - run_manager.on_chain_end(dumpd(output)) - return output - - async def _acall_with_config( - self, - func: Union[ - Callable[[Input], Awaitable[Output]], - Callable[[Input, AsyncCallbackManagerForChainRun], Awaitable[Output]], - Callable[ - [Input, AsyncCallbackManagerForChainRun, RunnableConfig], - Awaitable[Output], - ], - ], - input: Input, - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> Output: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement ainvoke() in subclasses.""" - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - run_manager = await callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - try: - output = await acall_func_with_variable_args( - func, input, run_manager, config - ) - except BaseException as e: - await run_manager.on_chain_error(e) - raise - else: - await run_manager.on_chain_end(dumpd(output)) - return output - - def _batch_with_config( - self, - func: Union[ - Callable[[List[Input]], List[Union[Exception, Output]]], - Callable[ - [List[Input], List[CallbackManagerForChainRun]], - List[Union[Exception, Output]], - ], - Callable[ - [List[Input], List[CallbackManagerForChainRun], List[RunnableConfig]], - List[Union[Exception, Output]], - ], - ], - input: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - run_type: Optional[str] = None, - ) -> List[Output]: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement invoke() in subclasses.""" - if not input: - return [] - - configs = get_config_list(config, len(input)) - callback_managers = [get_callback_manager_for_config(c) for c in configs] - run_managers = [ - callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - for callback_manager, input, config in zip( - callback_managers, input, configs - ) - ] - try: - kwargs: Dict[str, Any] = {} - if accepts_config(func): - kwargs["config"] = [ - patch_config(c, callbacks=rm.get_child()) - for c, rm in zip(configs, run_managers) - ] - if accepts_run_manager(func): - kwargs["run_manager"] = run_managers - output = func(input, **kwargs) # type: ignore[call-arg] - except BaseException as e: - for run_manager in run_managers: - run_manager.on_chain_error(e) - if return_exceptions: - return cast(List[Output], [e for _ in input]) - else: - raise - else: - first_exception: Optional[Exception] = None - for run_manager, out in zip(run_managers, output): - if isinstance(out, Exception): - first_exception = first_exception or out - run_manager.on_chain_error(out) - else: - run_manager.on_chain_end(dumpd(out)) - if return_exceptions or first_exception is None: - return cast(List[Output], output) - else: - raise first_exception - - async def _abatch_with_config( - self, - func: Union[ - Callable[[List[Input]], Awaitable[List[Union[Exception, Output]]]], - Callable[ - [List[Input], List[AsyncCallbackManagerForChainRun]], - Awaitable[List[Union[Exception, Output]]], - ], - Callable[ - [ - List[Input], - List[AsyncCallbackManagerForChainRun], - List[RunnableConfig], - ], - Awaitable[List[Union[Exception, Output]]], - ], - ], - input: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - run_type: Optional[str] = None, - ) -> List[Output]: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement invoke() in subclasses.""" - if not input: - return [] - - configs = get_config_list(config, len(input)) - callback_managers = [get_async_callback_manager_for_config(c) for c in configs] - run_managers: List[AsyncCallbackManagerForChainRun] = await asyncio.gather( - *( - callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - for callback_manager, input, config in zip( - callback_managers, input, configs - ) - ) - ) - try: - kwargs: Dict[str, Any] = {} - if accepts_config(func): - kwargs["config"] = [ - patch_config(c, callbacks=rm.get_child()) - for c, rm in zip(configs, run_managers) - ] - if accepts_run_manager(func): - kwargs["run_manager"] = run_managers - output = await func(input, **kwargs) # type: ignore[call-arg] - except BaseException as e: - await asyncio.gather( - *(run_manager.on_chain_error(e) for run_manager in run_managers) - ) - if return_exceptions: - return cast(List[Output], [e for _ in input]) - else: - raise - else: - first_exception: Optional[Exception] = None - coros: List[Awaitable[None]] = [] - for run_manager, out in zip(run_managers, output): - if isinstance(out, Exception): - first_exception = first_exception or out - coros.append(run_manager.on_chain_error(out)) - else: - coros.append(run_manager.on_chain_end(dumpd(out))) - await asyncio.gather(*coros) - if return_exceptions or first_exception is None: - return cast(List[Output], output) - else: - raise first_exception - - def _transform_stream_with_config( - self, - input: Iterator[Input], - transformer: Union[ - Callable[[Iterator[Input]], Iterator[Output]], - Callable[[Iterator[Input], CallbackManagerForChainRun], Iterator[Output]], - Callable[ - [ - Iterator[Input], - CallbackManagerForChainRun, - RunnableConfig, - ], - Iterator[Output], - ], - ], - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> Iterator[Output]: - """Helper method to transform an Iterator of Input values into an Iterator of - Output values, with callbacks. - Use this to implement `stream()` or `transform()` in Runnable subclasses.""" - # tee the input so we can iterate over it twice - input_for_tracing, input_for_transform = tee(input, 2) - # Start the input iterator to ensure the input runnable starts before this one - final_input: Optional[Input] = next(input_for_tracing, None) - final_input_supported = True - final_output: Optional[Output] = None - final_output_supported = True - - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - {"input": ""}, - run_type=run_type, - name=config.get("run_name"), - ) - try: - kwargs: Dict[str, Any] = {} - if accepts_config(transformer): - kwargs["config"] = patch_config( - config, callbacks=run_manager.get_child() - ) - if accepts_run_manager(transformer): - kwargs["run_manager"] = run_manager - iterator = transformer( - input_for_transform, **kwargs - ) # type: ignore[call-arg] - for chunk in iterator: - yield chunk - if final_output_supported: - if final_output is None: - final_output = chunk - else: - try: - final_output += chunk # type: ignore[operator] - except TypeError: - final_output = None - final_output_supported = False - for ichunk in input_for_tracing: - if final_input_supported: - if final_input is None: - final_input = ichunk - else: - try: - final_input += ichunk # type: ignore[operator] - except TypeError: - final_input = None - final_input_supported = False - except BaseException as e: - run_manager.on_chain_error(e, inputs=final_input) - raise - else: - run_manager.on_chain_end(final_output, inputs=final_input) - - async def _atransform_stream_with_config( - self, - input: AsyncIterator[Input], - transformer: Union[ - Callable[[AsyncIterator[Input]], AsyncIterator[Output]], - Callable[ - [AsyncIterator[Input], AsyncCallbackManagerForChainRun], - AsyncIterator[Output], - ], - Callable[ - [ - AsyncIterator[Input], - AsyncCallbackManagerForChainRun, - RunnableConfig, - ], - AsyncIterator[Output], - ], - ], - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> AsyncIterator[Output]: - """Helper method to transform an Async Iterator of Input values into an Async - Iterator of Output values, with callbacks. - Use this to implement `astream()` or `atransform()` in Runnable subclasses.""" - # tee the input so we can iterate over it twice - input_for_tracing, input_for_transform = atee(input, 2) - # Start the input iterator to ensure the input runnable starts before this one - final_input: Optional[Input] = await py_anext(input_for_tracing, None) - final_input_supported = True - final_output: Optional[Output] = None - final_output_supported = True - - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - run_manager = await callback_manager.on_chain_start( - dumpd(self), - {"input": ""}, - run_type=run_type, - name=config.get("run_name"), - ) - try: - kwargs: Dict[str, Any] = {} - if accepts_config(transformer): - kwargs["config"] = patch_config( - config, callbacks=run_manager.get_child() - ) - if accepts_run_manager(transformer): - kwargs["run_manager"] = run_manager - iterator = transformer( - input_for_transform, **kwargs - ) # type: ignore[call-arg] - async for chunk in iterator: - yield chunk - if final_output_supported: - if final_output is None: - final_output = chunk - else: - try: - final_output += chunk # type: ignore[operator] - except TypeError: - final_output = None - final_output_supported = False - async for ichunk in input_for_tracing: - if final_input_supported: - if final_input is None: - final_input = ichunk - else: - try: - final_input += ichunk # type: ignore[operator] - except TypeError: - final_input = None - final_input_supported = False - except BaseException as e: - await run_manager.on_chain_error(e, inputs=final_input) - raise - else: - await run_manager.on_chain_end(final_output, inputs=final_input) - - -class RunnableBranch(Serializable, Runnable[Input, Output]): - """A Runnable that selects which branch to run based on a condition. - - The runnable is initialized with a list of (condition, runnable) pairs and - a default branch. - - When operating on an input, the first condition that evaluates to True is - selected, and the corresponding runnable is run on the input. - - If no condition evaluates to True, the default branch is run on the input. - - Examples: - - .. code-block:: python - - from langchain.schema.runnable import RunnableBranch - - branch = RunnableBranch( - (lambda x: isinstance(x, str), lambda x: x.upper()), - (lambda x: isinstance(x, int), lambda x: x + 1), - (lambda x: isinstance(x, float), lambda x: x * 2), - lambda x: "goodbye", - ) - - branch.invoke("hello") # "HELLO" - branch.invoke(None) # "goodbye" - """ - - branches: Sequence[Tuple[Runnable[Input, bool], Runnable[Input, Output]]] - default: Runnable[Input, Output] - - def __init__( - self, - *branches: Union[ - Tuple[ - Union[ - Runnable[Input, bool], - Callable[[Input], bool], - Callable[[Input], Awaitable[bool]], - ], - RunnableLike, - ], - RunnableLike, # To accommodate the default branch - ], - ) -> None: - """A Runnable that runs one of two branches based on a condition.""" - if len(branches) < 2: - raise ValueError("RunnableBranch requires at least two branches") - - default = branches[-1] - - if not isinstance( - default, (Runnable, Callable, Mapping) # type: ignore[arg-type] - ): - raise TypeError( - "RunnableBranch default must be runnable, callable or mapping." - ) - - default_ = cast( - Runnable[Input, Output], coerce_to_runnable(cast(RunnableLike, default)) - ) - - _branches = [] - - for branch in branches[:-1]: - if not isinstance(branch, (tuple, list)): # type: ignore[arg-type] - raise TypeError( - f"RunnableBranch branches must be " - f"tuples or lists, not {type(branch)}" - ) - - if not len(branch) == 2: - raise ValueError( - f"RunnableBranch branches must be " - f"tuples or lists of length 2, not {len(branch)}" - ) - condition, runnable = branch - condition = cast(Runnable[Input, bool], coerce_to_runnable(condition)) - runnable = coerce_to_runnable(runnable) - _branches.append((condition, runnable)) - - super().__init__(branches=_branches, default=default_) - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - """RunnableBranch is serializable if all its branches are serializable.""" - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - """The namespace of a RunnableBranch is the namespace of its default branch.""" - return cls.__module__.split(".")[:-1] - - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - """First evaluates the condition, then delegate to true or false branch.""" - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - - try: - for idx, branch in enumerate(self.branches): - condition, runnable = branch - - expression_value = condition.invoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"condition:{idx + 1}"), - ), - ) - - if expression_value: - return runnable.invoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"branch:{idx + 1}"), - ), - ) - - output = self.default.invoke( - input, - config=patch_config( - config, callbacks=run_manager.get_child(tag="branch:default") - ), - ) - except Exception as e: - run_manager.on_chain_error(e) - raise - run_manager.on_chain_end(dumpd(output)) - return output - - async def ainvoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - """Async version of invoke.""" - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - try: - for idx, branch in enumerate(self.branches): - condition, runnable = branch - - expression_value = await condition.ainvoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"condition:{idx + 1}"), - ), - ) - - if expression_value: - return await runnable.ainvoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"branch:{idx + 1}"), - ), - **kwargs, - ) - - output = await self.default.ainvoke( - input, - config=patch_config( - config, callbacks=run_manager.get_child(tag="branch:default") - ), - **kwargs, - ) - except Exception as e: - run_manager.on_chain_error(e) - raise - run_manager.on_chain_end(dumpd(output)) - return output - - -class RunnableWithFallbacks(Serializable, Runnable[Input, Output]): - """ - A Runnable that can fallback to other Runnables if it fails. - """ - - runnable: Runnable[Input, Output] - fallbacks: Sequence[Runnable[Input, Output]] - exceptions_to_handle: Tuple[Type[BaseException], ...] = (Exception,) - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - @property - def runnables(self) -> Iterator[Runnable[Input, Output]]: - yield self.runnable - yield from self.fallbacks - - def invoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - # start the root run - run_manager = callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - first_error = None - for runnable in self.runnables: - try: - output = runnable.invoke( - input, - patch_config(config, callbacks=run_manager.get_child()), - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - run_manager.on_chain_error(e) - raise e - else: - run_manager.on_chain_end(output) - return output - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - run_manager.on_chain_error(first_error) - raise first_error - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - # start the root run - run_manager = await callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - first_error = None - for runnable in self.runnables: - try: - output = await runnable.ainvoke( - input, - patch_config(config, callbacks=run_manager.get_child()), - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - await run_manager.on_chain_error(e) - raise e - else: - await run_manager.on_chain_end(output) - return output - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - await run_manager.on_chain_error(first_error) - raise first_error - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from FourthDimension.callbacks.manager import CallbackManager - - if return_exceptions: - raise NotImplementedError() - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers = [ - cm.on_chain_start( - dumpd(self), - input if isinstance(input, dict) else {"input": input}, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ] - - first_error = None - for runnable in self.runnables: - try: - outputs = runnable.batch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config(config, callbacks=rm.get_child()) - for rm, config in zip(run_managers, configs) - ], - return_exceptions=return_exceptions, - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - for rm in run_managers: - rm.on_chain_error(e) - raise e - else: - for rm, output in zip(run_managers, outputs): - rm.on_chain_end(output) - return outputs - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - for rm in run_managers: - rm.on_chain_error(first_error) - raise first_error - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from FourthDimension.callbacks.manager import AsyncCallbackManager - - if return_exceptions: - raise NotImplementedError() - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - AsyncCallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers: List[AsyncCallbackManagerForChainRun] = await asyncio.gather( - *( - cm.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ) - ) - - first_error = None - for runnable in self.runnables: - try: - outputs = await runnable.abatch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config(config, callbacks=rm.get_child()) - for rm, config in zip(run_managers, configs) - ], - return_exceptions=return_exceptions, - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - await asyncio.gather(*(rm.on_chain_error(e) for rm in run_managers)) - else: - await asyncio.gather( - *( - rm.on_chain_end(output) - for rm, output in zip(run_managers, outputs) - ) - ) - return outputs - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - await asyncio.gather(*(rm.on_chain_error(first_error) for rm in run_managers)) - raise first_error - - -class RunnableSequence(Serializable, Runnable[Input, Output]): - """ - A sequence of runnables, where the output of each is the input of the next. - """ - - first: Runnable[Input, Any] - middle: List[Runnable[Any, Any]] = Field(default_factory=list) - last: Runnable[Any, Output] - - @property - def steps(self) -> List[Runnable[Any, Any]]: - return [self.first] + self.middle + [self.last] - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - class Config: - arbitrary_types_allowed = True - - def __or__( - self, - other: Union[ - Runnable[Any, Other], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Any, Other], Callable[[Any], Other], Any]], - ], - ) -> RunnableSequence[Input, Other]: - if isinstance(other, RunnableSequence): - return RunnableSequence( - first=self.first, - middle=self.middle + [self.last] + [other.first] + other.middle, - last=other.last, - ) - else: - return RunnableSequence( - first=self.first, - middle=self.middle + [self.last], - last=coerce_to_runnable(other), - ) - - def __ror__( - self, - other: Union[ - Runnable[Other, Any], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Other, Any], Callable[[Other], Any], Any]], - ], - ) -> RunnableSequence[Other, Output]: - if isinstance(other, RunnableSequence): - return RunnableSequence( - first=other.first, - middle=other.middle + [other.last] + [self.first] + self.middle, - last=self.last, - ) - else: - return RunnableSequence( - first=coerce_to_runnable(other), - middle=[self.first] + self.middle, - last=self.last, - ) - - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - # start the root run - run_manager = callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # invoke all steps in sequence - try: - for i, step in enumerate(self.steps): - input = step.invoke( - input, - # mark each step as a child run - patch_config( - config, callbacks=run_manager.get_child(f"seq:step:{i + 1}") - ), - ) - # finish the root run - except BaseException as e: - run_manager.on_chain_error(e) - raise - else: - run_manager.on_chain_end(input) - return cast(Output, input) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - # start the root run - run_manager = await callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # invoke all steps in sequence - try: - for i, step in enumerate(self.steps): - input = await step.ainvoke( - input, - # mark each step as a child run - patch_config( - config, callbacks=run_manager.get_child(f"seq:step:{i + 1}") - ), - ) - # finish the root run - except BaseException as e: - await run_manager.on_chain_error(e) - raise - else: - await run_manager.on_chain_end(input) - return cast(Output, input) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from FourthDimension.callbacks.manager import CallbackManager - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers = [ - cm.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ] - - # invoke - try: - if return_exceptions: - # Track which inputs (by index) failed so far - # If an input has failed it will be present in this map, - # and the value will be the exception that was raised. - failed_inputs_map: Dict[int, Exception] = {} - for stepidx, step in enumerate(self.steps): - # Assemble the original indexes of the remaining inputs - # (i.e. the ones that haven't failed yet) - remaining_idxs = [ - i for i in range(len(configs)) if i not in failed_inputs_map - ] - # Invoke the step on the remaining inputs - inputs = step.batch( - [ - inp - for i, inp in zip(remaining_idxs, inputs) - if i not in failed_inputs_map - ], - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{stepidx + 1}") - ) - for i, (rm, config) in enumerate(zip(run_managers, configs)) - if i not in failed_inputs_map - ], - return_exceptions=return_exceptions, - **kwargs, - ) - # If an input failed, add it to the map - for i, inp in zip(remaining_idxs, inputs): - if isinstance(inp, Exception): - failed_inputs_map[i] = inp - inputs = [inp for inp in inputs if not isinstance(inp, Exception)] - # If all inputs have failed, stop processing - if len(failed_inputs_map) == len(configs): - break - - # Reassemble the outputs, inserting Exceptions for failed inputs - inputs_copy = inputs.copy() - inputs = [] - for i in range(len(configs)): - if i in failed_inputs_map: - inputs.append(cast(Input, failed_inputs_map[i])) - else: - inputs.append(inputs_copy.pop(0)) - else: - for i, step in enumerate(self.steps): - inputs = step.batch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{i + 1}") - ) - for rm, config in zip(run_managers, configs) - ], - ) - - # finish the root runs - except BaseException as e: - for rm in run_managers: - rm.on_chain_error(e) - if return_exceptions: - return cast(List[Output], [e for _ in inputs]) - else: - raise - else: - first_exception: Optional[Exception] = None - for run_manager, out in zip(run_managers, inputs): - if isinstance(out, Exception): - first_exception = first_exception or out - run_manager.on_chain_error(out) - else: - run_manager.on_chain_end(dumpd(out)) - if return_exceptions or first_exception is None: - return cast(List[Output], inputs) - else: - raise first_exception - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from FourthDimension.callbacks.manager import ( - AsyncCallbackManager, - ) - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - AsyncCallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers: List[AsyncCallbackManagerForChainRun] = await asyncio.gather( - *( - cm.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ) - ) - - # invoke .batch() on each step - # this uses batching optimizations in Runnable subclasses, like LLM - try: - if return_exceptions: - # Track which inputs (by index) failed so far - # If an input has failed it will be present in this map, - # and the value will be the exception that was raised. - failed_inputs_map: Dict[int, Exception] = {} - for stepidx, step in enumerate(self.steps): - # Assemble the original indexes of the remaining inputs - # (i.e. the ones that haven't failed yet) - remaining_idxs = [ - i for i in range(len(configs)) if i not in failed_inputs_map - ] - # Invoke the step on the remaining inputs - inputs = await step.abatch( - [ - inp - for i, inp in zip(remaining_idxs, inputs) - if i not in failed_inputs_map - ], - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{stepidx + 1}") - ) - for i, (rm, config) in enumerate(zip(run_managers, configs)) - if i not in failed_inputs_map - ], - return_exceptions=return_exceptions, - **kwargs, - ) - # If an input failed, add it to the map - for i, inp in zip(remaining_idxs, inputs): - if isinstance(inp, Exception): - failed_inputs_map[i] = inp - inputs = [inp for inp in inputs if not isinstance(inp, Exception)] - # If all inputs have failed, stop processing - if len(failed_inputs_map) == len(configs): - break - - # Reassemble the outputs, inserting Exceptions for failed inputs - inputs_copy = inputs.copy() - inputs = [] - for i in range(len(configs)): - if i in failed_inputs_map: - inputs.append(cast(Input, failed_inputs_map[i])) - else: - inputs.append(inputs_copy.pop(0)) - else: - for i, step in enumerate(self.steps): - inputs = await step.abatch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{i + 1}") - ) - for rm, config in zip(run_managers, configs) - ], - ) - # finish the root runs - except BaseException as e: - await asyncio.gather(*(rm.on_chain_error(e) for rm in run_managers)) - if return_exceptions: - return cast(List[Output], [e for _ in inputs]) - else: - raise - else: - first_exception: Optional[Exception] = None - coros: List[Awaitable[None]] = [] - for run_manager, out in zip(run_managers, inputs): - if isinstance(out, Exception): - first_exception = first_exception or out - coros.append(run_manager.on_chain_error(out)) - else: - coros.append(run_manager.on_chain_end(dumpd(out))) - await asyncio.gather(*coros) - if return_exceptions or first_exception is None: - return cast(List[Output], inputs) - else: - raise first_exception - - def _transform( - self, - input: Iterator[Input], - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Iterator[Output]: - steps = [self.first] + self.middle + [self.last] - - # transform the input stream of each step with the next - # steps that don't natively support transforming an input stream will - # buffer input in memory until all available, and then start emitting output - final_pipeline = cast(Iterator[Output], input) - for step in steps: - final_pipeline = step.transform( - final_pipeline, - patch_config( - config, - callbacks=run_manager.get_child(f"seq:step:{steps.index(step) + 1}"), - ), - ) - - for output in final_pipeline: - yield output - - async def _atransform( - self, - input: AsyncIterator[Input], - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> AsyncIterator[Output]: - steps = [self.first] + self.middle + [self.last] - - # stream the last steps - # transform the input stream of each step with the next - # steps that don't natively support transforming an input stream will - # buffer input in memory until all available, and then start emitting output - final_pipeline = cast(AsyncIterator[Output], input) - for step in steps: - final_pipeline = step.atransform( - final_pipeline, - patch_config( - config, - callbacks=run_manager.get_child(f"seq:step:{steps.index(step) + 1}"), - ), - ) - async for output in final_pipeline: - yield output - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self._transform_stream_with_config( - input, self._transform, config, **kwargs - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self.transform(iter([input]), config, **kwargs) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async for chunk in self._atransform_stream_with_config( - input, self._atransform, config, **kwargs - ): - yield chunk - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async def input_aiter() -> AsyncIterator[Input]: - yield input - - async for chunk in self.atransform(input_aiter(), config, **kwargs): - yield chunk - - -class RunnableMapChunk(Dict[str, Any]): - """ - Partial output from a RunnableMap - """ - - def __add__(self, other: RunnableMapChunk) -> RunnableMapChunk: - chunk = RunnableMapChunk(self) - for key in other: - if key not in chunk or chunk[key] is None: - chunk[key] = other[key] - elif other[key] is not None: - chunk[key] += other[key] - return chunk - - def __radd__(self, other: RunnableMapChunk) -> RunnableMapChunk: - chunk = RunnableMapChunk(other) - for key in self: - if key not in chunk or chunk[key] is None: - chunk[key] = self[key] - elif self[key] is not None: - chunk[key] += self[key] - return chunk - - -class RunnableMap(Serializable, Runnable[Input, Dict[str, Any]]): - """ - A runnable that runs a mapping of runnables in parallel, - and returns a mapping of their outputs. - """ - - steps: Mapping[str, Runnable[Input, Any]] - - def __init__( - self, - steps: Mapping[ - str, - Union[ - Runnable[Input, Any], - Callable[[Input], Any], - Mapping[str, Union[Runnable[Input, Any], Callable[[Input], Any]]], - ], - ], - ) -> None: - super().__init__(steps={key: coerce_to_runnable(r) for key, r in steps.items()}) - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - class Config: - arbitrary_types_allowed = True - - def invoke( - self, input: Input, config: Optional[RunnableConfig] = None - ) -> Dict[str, Any]: - from FourthDimension.callbacks.manager import CallbackManager - - # setup callbacks - config = ensure_config(config) - callback_manager = CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - # start the root run - run_manager = callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # gather results from all steps - try: - # copy to avoid issues from the caller mutating the steps during invoke() - steps = dict(self.steps) - with get_executor_for_config(config) as executor: - futures = [ - executor.submit( - step.invoke, - input, - # mark each step as a child run - patch_config( - config, - copy_locals=True, - callbacks=run_manager.get_child(f"map:key:{key}"), - ), - ) - for key, step in steps.items() - ] - output = {key: future.result() for key, future in zip(steps, futures)} - # finish the root run - except BaseException as e: - run_manager.on_chain_error(e) - raise - else: - run_manager.on_chain_end(output) - return output - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Dict[str, Any]: - # setup callbacks - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - # start the root run - run_manager = await callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # gather results from all steps - try: - # copy to avoid issues from the caller mutating the steps during invoke() - steps = dict(self.steps) - results = await asyncio.gather( - *( - step.ainvoke( - input, - # mark each step as a child run - patch_config( - config, callbacks=run_manager.get_child(f"map:key:{key}") - ), - ) - for key, step in steps.items() - ) - ) - output = {key: value for key, value in zip(steps, results)} - # finish the root run - except BaseException as e: - await run_manager.on_chain_error(e) - raise - else: - await run_manager.on_chain_end(output) - return output - - def _transform( - self, - input: Iterator[Input], - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Iterator[RunnableMapChunk]: - # Shallow copy steps to ignore mutations while in progress - steps = dict(self.steps) - # Each step gets a copy of the input iterator, - # which is consumed in parallel in a separate thread. - input_copies = list(safetee(input, len(steps), lock=threading.Lock())) - with get_executor_for_config(config) as executor: - # Create the transform() generator for each step - named_generators = [ - ( - name, - step.transform( - input_copies.pop(), - patch_config( - config, callbacks=run_manager.get_child(f"map:key:{name}") - ), - ), - ) - for name, step in steps.items() - ] - # Start the first iteration of each generator - futures = { - executor.submit(next, generator): (step_name, generator) - for step_name, generator in named_generators - } - # Yield chunks from each as they become available, - # and start the next iteration of that generator that yielded it. - # When all generators are exhausted, stop. - while futures: - completed_futures, _ = wait(futures, return_when=FIRST_COMPLETED) - for future in completed_futures: - (step_name, generator) = futures.pop(future) - try: - chunk = RunnableMapChunk({step_name: future.result()}) - yield chunk - futures[executor.submit(next, generator)] = ( - step_name, - generator, - ) - except StopIteration: - pass - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> Iterator[Dict[str, Any]]: - yield from self._transform_stream_with_config( - input, self._transform, config, **kwargs - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Dict[str, Any]]: - yield from self.transform(iter([input]), config) - - async def _atransform( - self, - input: AsyncIterator[Input], - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> AsyncIterator[RunnableMapChunk]: - # Shallow copy steps to ignore mutations while in progress - steps = dict(self.steps) - # Each step gets a copy of the input iterator, - # which is consumed in parallel in a separate thread. - input_copies = list(atee(input, len(steps), lock=asyncio.Lock())) - # Create the transform() generator for each step - named_generators = [ - ( - name, - step.atransform( - input_copies.pop(), - patch_config( - config, callbacks=run_manager.get_child(f"map:key:{name}") - ), - ), - ) - for name, step in steps.items() - ] - - # Wrap in a coroutine to satisfy linter - async def get_next_chunk(generator: AsyncIterator) -> Optional[Output]: - return await py_anext(generator) - - # Start the first iteration of each generator - tasks = { - asyncio.create_task(get_next_chunk(generator)): (step_name, generator) - for step_name, generator in named_generators - } - # Yield chunks from each as they become available, - # and start the next iteration of the generator that yielded it. - # When all generators are exhausted, stop. - while tasks: - completed_tasks, _ = await asyncio.wait( - tasks, return_when=asyncio.FIRST_COMPLETED - ) - for task in completed_tasks: - (step_name, generator) = tasks.pop(task) - try: - chunk = RunnableMapChunk({step_name: task.result()}) - yield chunk - new_task = asyncio.create_task(get_next_chunk(generator)) - tasks[new_task] = (step_name, generator) - except StopAsyncIteration: - pass - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> AsyncIterator[Dict[str, Any]]: - async for chunk in self._atransform_stream_with_config( - input, self._atransform, config, **kwargs - ): - yield chunk - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Dict[str, Any]]: - async def input_aiter() -> AsyncIterator[Input]: - yield input - - async for chunk in self.atransform(input_aiter(), config): - yield chunk - - -class RunnableLambda(Runnable[Input, Output]): - """ - A runnable that runs a callable. - """ - - def __init__( - self, - func: Union[Callable[[Input], Output], Callable[[Input], Awaitable[Output]]], - afunc: Optional[Callable[[Input], Awaitable[Output]]] = None, - ) -> None: - if afunc is not None: - self.afunc = afunc - - if inspect.iscoroutinefunction(func): - self.afunc = func - elif callable(func): - self.func = cast(Callable[[Input], Output], func) - else: - raise TypeError( - "Expected a callable type for `func`." - f"Instead got an unsupported type: {type(func)}" - ) - - def __eq__(self, other: Any) -> bool: - if isinstance(other, RunnableLambda): - if hasattr(self, "func") and hasattr(other, "func"): - return self.func == other.func - elif hasattr(self, "afunc") and hasattr(other, "afunc"): - return self.afunc == other.afunc - else: - return False - else: - return False - - def __repr__(self) -> str: - return "RunnableLambda(...)" - - def _invoke( - self, - input: Input, - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Output: - output = call_func_with_variable_args(self.func, input, run_manager, config) - # If the output is a runnable, invoke it - if isinstance(output, Runnable): - recursion_limit = config["recursion_limit"] - if recursion_limit <= 0: - raise RecursionError( - f"Recursion limit reached when invoking {self} with input {input}." - ) - output = output.invoke( - input, - patch_config( - config, - callbacks=run_manager.get_child(), - recursion_limit=recursion_limit - 1, - ), - ) - return output - - async def _ainvoke( - self, - input: Input, - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> Output: - output = await acall_func_with_variable_args( - self.afunc, input, run_manager, config - ) - # If the output is a runnable, invoke it - if isinstance(output, Runnable): - recursion_limit = config["recursion_limit"] - if recursion_limit <= 0: - raise RecursionError( - f"Recursion limit reached when invoking {self} with input {input}." - ) - output = await output.ainvoke( - input, - patch_config( - config, - callbacks=run_manager.get_child(), - recursion_limit=recursion_limit - 1, - ), - ) - return output - - def _config( - self, config: Optional[RunnableConfig], callable: Callable[..., Any] - ) -> RunnableConfig: - config = config or {} - - if config.get("run_name") is None: - try: - run_name = callable.__name__ - except AttributeError: - run_name = None - if run_name is not None: - return patch_config(config, run_name=run_name) - - return config - - def invoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - if hasattr(self, "func"): - return self._call_with_config( - self._invoke, - input, - self._config(config, self.func), - ) - else: - raise TypeError( - "Cannot invoke a coroutine function synchronously." - "Use `ainvoke` instead." - ) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - if hasattr(self, "afunc"): - return await self._acall_with_config( - self._ainvoke, - input, - self._config(config, self.afunc), - ) - else: - # Delegating to super implementation of ainvoke. - # Uses asyncio executor to run the sync version (invoke) - return await super().ainvoke(input, config) - - -class RunnableEach(Serializable, Runnable[List[Input], List[Output]]): - """ - A runnable that delegates calls to another runnable - with each element of the input sequence. - """ - - bound: Runnable[Input, Output] - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - def bind(self, **kwargs: Any) -> RunnableEach[Input, Output]: - return RunnableEach(bound=self.bound.bind(**kwargs)) - - def _invoke( - self, - inputs: List[Input], - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> List[Output]: - return self.bound.batch( - inputs, patch_config(config, callbacks=run_manager.get_child()) - ) - - def invoke( - self, input: List[Input], config: Optional[RunnableConfig] = None - ) -> List[Output]: - return self._call_with_config(self._invoke, input, config) - - async def _ainvoke( - self, - inputs: List[Input], - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> List[Output]: - return await self.bound.abatch( - inputs, patch_config(config, callbacks=run_manager.get_child()) - ) - - async def ainvoke( - self, input: List[Input], config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> List[Output]: - return await self._acall_with_config(self._ainvoke, input, config) - - -class RunnableBinding(Serializable, Runnable[Input, Output]): - """ - A runnable that delegates calls to another runnable with a set of kwargs. - """ - - bound: Runnable[Input, Output] - - kwargs: Mapping[str, Any] - - config: Mapping[str, Any] = Field(default_factory=dict) - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - def _merge_config(self, config: Optional[RunnableConfig]) -> RunnableConfig: - copy = cast(RunnableConfig, dict(self.config)) - if config: - for key in config: - if key == "metadata": - copy[key] = {**copy.get(key, {}), **config[key]} # type: ignore - elif key == "tags": - copy[key] = (copy.get(key) or []) + config[key] # type: ignore - else: - # Even though the keys aren't literals this is correct - # because both dicts are same type - copy[key] = config[key] or copy.get(key) # type: ignore - return copy - - def bind(self, **kwargs: Any) -> Runnable[Input, Output]: - return self.__class__( - bound=self.bound, config=self.config, kwargs={**self.kwargs, **kwargs} - ) - - def with_config( - self, - config: Optional[RunnableConfig] = None, - # Sadly Unpack is not well supported by mypy so this will have to be untyped - **kwargs: Any, - ) -> Runnable[Input, Output]: - return self.__class__( - bound=self.bound, - kwargs=self.kwargs, - config={**self.config, **(config or {}), **kwargs}, - ) - - def with_retry(self, **kwargs: Any) -> Runnable[Input, Output]: - return self.__class__( - bound=self.bound.with_retry(**kwargs), - kwargs=self.kwargs, - config=self.config, - ) - - def invoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - return self.bound.invoke( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - return await self.bound.ainvoke( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - if isinstance(config, list): - configs = cast( - List[RunnableConfig], [self._merge_config(conf) for conf in config] - ) - else: - configs = [ - patch_config(self._merge_config(config), copy_locals=True) - for _ in range(len(inputs)) - ] - return self.bound.batch( - inputs, - configs, - return_exceptions=return_exceptions, - **{**self.kwargs, **kwargs}, - ) - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - if isinstance(config, list): - configs = cast( - List[RunnableConfig], [self._merge_config(conf) for conf in config] - ) - else: - configs = [ - patch_config(self._merge_config(config), copy_locals=True) - for _ in range(len(inputs)) - ] - return await self.bound.abatch( - inputs, - configs, - return_exceptions=return_exceptions, - **{**self.kwargs, **kwargs}, - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self.bound.stream( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async for item in self.bound.astream( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ): - yield item - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> Iterator[Output]: - yield from self.bound.transform( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> AsyncIterator[Output]: - async for item in self.bound.atransform( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ): - yield item - - -RunnableBinding.update_forward_refs(RunnableConfig=RunnableConfig) - -RunnableLike = Union[ - Runnable[Input, Output], - Callable[[Input], Output], - Callable[[Input], Awaitable[Output]], - Mapping[str, Any], -] - - -def coerce_to_runnable(thing: RunnableLike) -> Runnable[Input, Output]: - if isinstance(thing, Runnable): - return thing - elif callable(thing): - return RunnableLambda(thing) - elif isinstance(thing, dict): - runnables: Mapping[str, Runnable[Any, Any]] = { - key: coerce_to_runnable(r) for key, r in thing.items() - } - return cast(Runnable[Input, Output], RunnableMap(steps=runnables)) - else: - raise TypeError( - f"Expected a Runnable, callable or dict." - f"Instead got an unsupported type: {type(thing)}" - ) diff --git a/src/schema/runnable/config.py b/src/schema/runnable/config.py deleted file mode 100644 index 12c0ffc9bb940e9bbf7f57a05e52e9a5f04a3b8f..0000000000000000000000000000000000000000 --- a/src/schema/runnable/config.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -from concurrent.futures import Executor, ThreadPoolExecutor -from contextlib import contextmanager -from typing import ( - TYPE_CHECKING, - Any, - Awaitable, - Callable, - Dict, - Generator, - List, - Optional, - Union, - cast, -) -from typing_extensions import TypedDict - -from FourthDimension.schema.runnable.utils import ( - Input, - Output, - accepts_config, - accepts_run_manager, -) -if TYPE_CHECKING: - from FourthDimension.callbacks.base import BaseCallbackManager, Callbacks - from FourthDimension.callbacks.manager import ( - AsyncCallbackManager, - AsyncCallbackManagerForChainRun, - CallbackManager, - CallbackManagerForChainRun, - ) - -""" -文件说明: -""" - - -class RunnableConfig(TypedDict, total=False): - """Configuration for a Runnable.""" - - tags: List[str] - """ - Tags for this call and any sub-calls (eg. a Chain calling an LLM). - You can use these to filter calls. - """ - - metadata: Dict[str, Any] - """ - Metadata for this call and any sub-calls (eg. a Chain calling an LLM). - Keys should be strings, values should be JSON-serializable. - """ - - callbacks: Callbacks - """ - Callbacks for this call and any sub-calls (eg. a Chain calling an LLM). - Tags are passed to all callbacks, metadata is passed to handle*Start callbacks. - """ - - run_name: str - """ - Name for the tracer run for this call. Defaults to the name of the class. - """ - - locals: Dict[str, Any] - """ - Variables scoped to this call and any sub-calls. Usually used with - GetLocalVar() and PutLocalVar(). Care should be taken when placing mutable - objects in locals, as they will be shared between parallel sub-calls. - """ - - max_concurrency: Optional[int] - """ - Maximum number of parallel calls to make. If not provided, defaults to - ThreadPoolExecutor's default. This is ignored if an executor is provided. - """ - - recursion_limit: int - """ - Maximum number of times a call can recurse. If not provided, defaults to 10. - """ - - -def ensure_config(config: Optional[RunnableConfig] = None) -> RunnableConfig: - empty = RunnableConfig( - tags=[], - metadata={}, - callbacks=None, - locals={}, - recursion_limit=10, - ) - if config is not None: - empty.update( - cast(RunnableConfig, {k: v for k, v in config.items() if v is not None}) - ) - return empty - - -def get_config_list( - config: Optional[Union[RunnableConfig, List[RunnableConfig]]], length: int -) -> List[RunnableConfig]: - """ - Helper method to get a list of configs from a single config or a list of - configs, useful for subclasses overriding batch() or abatch(). - """ - if length < 0: - raise ValueError(f"length must be >= 0, but got {length}") - if isinstance(config, list) and len(config) != length: - raise ValueError( - f"config must be a list of the same length as inputs, " - f"but got {len(config)} configs for {length} inputs" - ) - - return ( - list(map(ensure_config, config)) - if isinstance(config, list) - else [patch_config(config, copy_locals=True) for _ in range(length)] - ) - - -def patch_config( - config: Optional[RunnableConfig], - *, - copy_locals: bool = False, - callbacks: Optional[BaseCallbackManager] = None, - recursion_limit: Optional[int] = None, - max_concurrency: Optional[int] = None, - run_name: Optional[str] = None, -) -> RunnableConfig: - config = ensure_config(config) - if copy_locals: - config["locals"] = config["locals"].copy() - if callbacks is not None: - # If we're replacing callbacks we need to unset run_name - # As that should apply only to the same run as the original callbacks - config["callbacks"] = callbacks - if "run_name" in config: - del config["run_name"] - if recursion_limit is not None: - config["recursion_limit"] = recursion_limit - if max_concurrency is not None: - config["max_concurrency"] = max_concurrency - if run_name is not None: - config["run_name"] = run_name - return config - - -def call_func_with_variable_args( - func: Union[ - Callable[[Input], Output], - Callable[[Input, CallbackManagerForChainRun], Output], - Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output], - ], - input: Input, - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, -) -> Output: - """Call function that may optionally accept a run_manager and/or config.""" - kwargs: Dict[str, Any] = {} - if accepts_config(func): - kwargs["config"] = patch_config(config, callbacks=run_manager.get_child()) - if accepts_run_manager(func): - kwargs["run_manager"] = run_manager - return func(input, **kwargs) # type: ignore[call-arg] - - -async def acall_func_with_variable_args( - func: Union[ - Callable[[Input], Awaitable[Output]], - Callable[[Input, AsyncCallbackManagerForChainRun], Awaitable[Output]], - Callable[ - [Input, AsyncCallbackManagerForChainRun, RunnableConfig], - Awaitable[Output], - ], - ], - input: Input, - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, -) -> Output: - """Call function that may optionally accept a run_manager and/or config.""" - kwargs: Dict[str, Any] = {} - if accepts_config(func): - kwargs["config"] = patch_config(config, callbacks=run_manager.get_child()) - if accepts_run_manager(func): - kwargs["run_manager"] = run_manager - return await func(input, **kwargs) # type: ignore[call-arg] - - -def get_callback_manager_for_config(config: RunnableConfig) -> CallbackManager: - from FourthDimension.callbacks.manager import CallbackManager - - return CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - inheritable_tags=config.get("tags"), - inheritable_metadata=config.get("metadata"), - ) - - -def get_async_callback_manager_for_config( - config: RunnableConfig, -) -> AsyncCallbackManager: - from FourthDimension.callbacks.manager import AsyncCallbackManager - - return AsyncCallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - inheritable_tags=config.get("tags"), - inheritable_metadata=config.get("metadata"), - ) - - -@contextmanager -def get_executor_for_config(config: RunnableConfig) -> Generator[Executor, None, None]: - with ThreadPoolExecutor(max_workers=config.get("max_concurrency")) as executor: - yield executor diff --git a/src/schema/runnable/retry.py b/src/schema/runnable/retry.py deleted file mode 100644 index 27b9bbe36f6e8b5c3ba4e0c81318fc09e78fdeff..0000000000000000000000000000000000000000 --- a/src/schema/runnable/retry.py +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar, Union, cast - -from tenacity import ( - AsyncRetrying, - RetryCallState, - RetryError, - Retrying, - retry_if_exception_type, - stop_after_attempt, - wait_exponential_jitter, -) - -from FourthDimension.callbacks.manager import ( - AsyncCallbackManagerForChainRun, - CallbackManagerForChainRun, -) -from FourthDimension.schema.runnable.base import Input, Output, RunnableBinding -from FourthDimension.schema.runnable.config import RunnableConfig, patch_config - -T = TypeVar("T", CallbackManagerForChainRun, AsyncCallbackManagerForChainRun) -U = TypeVar("U") - - -class RunnableRetry(RunnableBinding[Input, Output]): - """Retry a Runnable if it fails.""" - - retry_exception_types: Tuple[Type[BaseException], ...] = (Exception,) - - wait_exponential_jitter: bool = True - - max_attempt_number: int = 3 - - @property - def _kwargs_retrying(self) -> Dict[str, Any]: - kwargs: Dict[str, Any] = dict() - - if self.max_attempt_number: - kwargs["stop"] = stop_after_attempt(self.max_attempt_number) - - if self.wait_exponential_jitter: - kwargs["wait"] = wait_exponential_jitter() - - if self.retry_exception_types: - kwargs["retry"] = retry_if_exception_type(self.retry_exception_types) - - return kwargs - - def _sync_retrying(self, **kwargs: Any) -> Retrying: - return Retrying(**self._kwargs_retrying, **kwargs) - - def _async_retrying(self, **kwargs: Any) -> AsyncRetrying: - return AsyncRetrying(**self._kwargs_retrying, **kwargs) - - def _patch_config( - self, - config: RunnableConfig, - run_manager: T, - retry_state: RetryCallState, - ) -> RunnableConfig: - attempt = retry_state.attempt_number - tag = "retry:attempt:{}".format(attempt) if attempt > 1 else None - return patch_config(config, callbacks=run_manager.get_child(tag)) - - def _patch_config_list( - self, - config: List[RunnableConfig], - run_manager: List[T], - retry_state: RetryCallState, - ) -> List[RunnableConfig]: - return [ - self._patch_config(c, rm, retry_state) for c, rm in zip(config, run_manager) - ] - - def _invoke( - self, - input: Input, - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Output: - for attempt in self._sync_retrying(reraise=True): - with attempt: - result = super().invoke( - input, - self._patch_config(config, run_manager, attempt.retry_state), - ) - if attempt.retry_state.outcome and not attempt.retry_state.outcome.failed: - attempt.retry_state.set_result(result) - return result - - def invoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - return self._call_with_config(self._invoke, input, config, **kwargs) - - async def _ainvoke( - self, - input: Input, - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> Output: - async for attempt in self._async_retrying(reraise=True): - with attempt: - result = await super().ainvoke( - input, - self._patch_config(config, run_manager, attempt.retry_state), - ) - if attempt.retry_state.outcome and not attempt.retry_state.outcome.failed: - attempt.retry_state.set_result(result) - return result - - async def ainvoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - return await self._acall_with_config(self._ainvoke, input, config, **kwargs) - - def _batch( - self, - inputs: List[Input], - run_manager: List[CallbackManagerForChainRun], - config: List[RunnableConfig], - ) -> List[Union[Output, Exception]]: - results_map: Dict[int, Output] = {} - - def pending(iterable: List[U]) -> List[U]: - return [item for idx, item in enumerate(iterable) if idx not in results_map] - - try: - for attempt in self._sync_retrying(): - with attempt: - # Get the results of the inputs that have not succeeded yet. - result = super().batch( - pending(inputs), - self._patch_config_list( - pending(config), pending(run_manager), attempt.retry_state - ), - return_exceptions=True, - ) - # Register the results of the inputs that have succeeded. - first_exception = None - for i, r in enumerate(result): - if isinstance(r, Exception): - if not first_exception: - first_exception = r - continue - results_map[i] = r - # If any exception occurred, raise it, to retry the failed ones - if first_exception: - raise first_exception - if ( - attempt.retry_state.outcome - and not attempt.retry_state.outcome.failed - ): - attempt.retry_state.set_result(result) - except RetryError as e: - try: - result - except UnboundLocalError: - result = cast(List[Output], [e] * len(inputs)) - - outputs: List[Union[Output, Exception]] = [] - for idx, _ in enumerate(inputs): - if idx in results_map: - outputs.append(results_map[idx]) - else: - outputs.append(result.pop(0)) - return outputs - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Any - ) -> List[Output]: - return self._batch_with_config( - self._batch, inputs, config, return_exceptions=return_exceptions, **kwargs - ) - - async def _abatch( - self, - inputs: List[Input], - run_manager: List[AsyncCallbackManagerForChainRun], - config: List[RunnableConfig], - ) -> List[Union[Output, Exception]]: - results_map: Dict[int, Output] = {} - - def pending(iterable: List[U]) -> List[U]: - return [item for idx, item in enumerate(iterable) if idx not in results_map] - - try: - async for attempt in self._async_retrying(): - with attempt: - # Get the results of the inputs that have not succeeded yet. - result = await super().abatch( - pending(inputs), - self._patch_config_list( - pending(config), pending(run_manager), attempt.retry_state - ), - return_exceptions=True, - ) - # Register the results of the inputs that have succeeded. - first_exception = None - for i, r in enumerate(result): - if isinstance(r, Exception): - if not first_exception: - first_exception = r - continue - results_map[i] = r - # If any exception occurred, raise it, to retry the failed ones - if first_exception: - raise first_exception - if ( - attempt.retry_state.outcome - and not attempt.retry_state.outcome.failed - ): - attempt.retry_state.set_result(result) - except RetryError as e: - try: - result - except UnboundLocalError: - result = cast(List[Output], [e] * len(inputs)) - - outputs: List[Union[Output, Exception]] = [] - for idx, _ in enumerate(inputs): - if idx in results_map: - outputs.append(results_map[idx]) - else: - outputs.append(result.pop(0)) - return outputs - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Any - ) -> List[Output]: - return await self._abatch_with_config( - self._abatch, inputs, config, return_exceptions=return_exceptions, **kwargs - ) - - # stream() and transform() are not retried because retrying a stream - # is not very intuitive. - diff --git a/src/schema/runnable/utils.py b/src/schema/runnable/utils.py deleted file mode 100644 index b9d07ab0a97e5e1af846b90d64a2009409404f6c..0000000000000000000000000000000000000000 --- a/src/schema/runnable/utils.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from __future__ import annotations - -import asyncio -from inspect import signature -from typing import Any, Callable, Coroutine, TypeVar, Union - -""" -文件说明: -""" - -Input = TypeVar("Input") -# Output type should implement __concat__, as eg str, list, dict do -Output = TypeVar("Output") - - -async def gated_coro(semaphore: asyncio.Semaphore, coro: Coroutine) -> Any: - async with semaphore: - return await coro - - -async def gather_with_concurrency(n: Union[int, None], *coros: Coroutine) -> list: - if n is None: - return await asyncio.gather(*coros) - - semaphore = asyncio.Semaphore(n) - - return await asyncio.gather(*(gated_coro(semaphore, c) for c in coros)) - - -def accepts_run_manager(callable: Callable[..., Any]) -> bool: - try: - return signature(callable).parameters.get("run_manager") is not None - except ValueError: - return False - - -def accepts_config(callable: Callable[..., Any]) -> bool: - try: - return signature(callable).parameters.get("config") is not None - except ValueError: - return False diff --git a/src/schema/runnables.py b/src/schema/runnables.py deleted file mode 100644 index fbfb8060add8873105253b9ce064a504eb5da377..0000000000000000000000000000000000000000 --- a/src/schema/runnables.py +++ /dev/null @@ -1,2318 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - -from __future__ import annotations - -import asyncio -import inspect -import threading -from abc import ABC, abstractmethod -from concurrent.futures import FIRST_COMPLETED, wait -from functools import partial -from itertools import tee -from typing import ( - TYPE_CHECKING, - Any, - AsyncIterator, - Awaitable, - Callable, - Dict, - Generic, - Iterator, - List, - Mapping, - Optional, - Sequence, - Tuple, - Type, - TypeVar, - Union, - cast, -) - -from pydantic import Field - -if TYPE_CHECKING: - from src.callbacks.manager import ( - AsyncCallbackManagerForChainRun, - CallbackManagerForChainRun, - ) - -from src.callbacks.base import BaseCallbackManager -from src.callbacks.tracers.log_stream import LogStreamCallbackHandler, RunLogPatch -from src.load.dump import dumpd -from src.doc.document import Serializable -from src.schema.runnable.config import ( - RunnableConfig, - acall_func_with_variable_args, - call_func_with_variable_args, - ensure_config, - get_async_callback_manager_for_config, - get_callback_manager_for_config, - get_config_list, - get_executor_for_config, - patch_config, -) -from src.schema.runnable.utils import ( - Input, - Output, - accepts_config, - accepts_run_manager, - gather_with_concurrency, -) -from src.utils.aiter import atee, py_anext -from src.utils.iter import safetee - -Other = TypeVar("Other") - - -class Runnable(Generic[Input, Output], ABC): - """A Runnable is a unit of work that can be invoked, batched, streamed, or - transformed.""" - - def __or__( - self, - other: Union[ - Runnable[Any, Other], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Any, Other], Callable[[Any], Other], Any]], - ], - ) -> RunnableSequence[Input, Other]: - return RunnableSequence(first=self, last=coerce_to_runnable(other)) - - def __ror__( - self, - other: Union[ - Runnable[Other, Any], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Other, Any], Callable[[Other], Any], Any]], - ], - ) -> RunnableSequence[Other, Output]: - return RunnableSequence(first=coerce_to_runnable(other), last=self) - - """ --- Public API --- """ - - @abstractmethod - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - ... - - async def ainvoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - """ - Default implementation of ainvoke, which calls invoke in a thread pool. - Subclasses should override this method if they can run asynchronously. - """ - return await asyncio.get_running_loop().run_in_executor( - None, partial(self.invoke, **kwargs), input, config - ) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - """ - Default implementation of batch, which calls invoke N times. - Subclasses should override this method if they can batch more efficiently. - """ - if not inputs: - return [] - - configs = get_config_list(config, len(inputs)) - - def invoke(input: Input, config: RunnableConfig) -> Union[Output, Exception]: - if return_exceptions: - try: - return self.invoke(input, config, **kwargs) - except Exception as e: - return e - else: - return self.invoke(input, config, **kwargs) - - # If there's only one input, don't bother with the executor - if len(inputs) == 1: - return cast(List[Output], [invoke(inputs[0], configs[0])]) - - with get_executor_for_config(configs[0]) as executor: - return cast(List[Output], list(executor.map(invoke, inputs, configs))) - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - """ - Default implementation of abatch, which calls ainvoke N times. - Subclasses should override this method if they can batch more efficiently. - """ - if not inputs: - return [] - - configs = get_config_list(config, len(inputs)) - - async def ainvoke( - input: Input, config: RunnableConfig - ) -> Union[Output, Exception]: - if return_exceptions: - try: - return await self.ainvoke(input, config, **kwargs) - except Exception as e: - return e - else: - return await self.ainvoke(input, config, **kwargs) - - coros = map(ainvoke, inputs, configs) - return await gather_with_concurrency(configs[0].get("max_concurrency"), *coros) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - """ - Default implementation of stream, which calls invoke. - Subclasses should override this method if they support streaming output. - """ - yield self.invoke(input, config, **kwargs) - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - """ - Default implementation of astream, which calls ainvoke. - Subclasses should override this method if they support streaming output. - """ - yield await self.ainvoke(input, config, **kwargs) - - async def astream_log( - self, - input: Any, - config: Optional[RunnableConfig] = None, - *, - include_names: Optional[Sequence[str]] = None, - include_types: Optional[Sequence[str]] = None, - include_tags: Optional[Sequence[str]] = None, - exclude_names: Optional[Sequence[str]] = None, - exclude_types: Optional[Sequence[str]] = None, - exclude_tags: Optional[Sequence[str]] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[RunLogPatch]: - """ - Stream all output from a runnable, as reported to the callback system. - This includes all inner runs of LLMs, Retrievers, Tools, etc. - - Output is streamed as Log objects, which include a list of - jsonpatch ops that describe how the state of the run has changed in each - step, and the final state of the run. - - The jsonpatch ops can be applied in order to construct state. - """ - - # Create a stream handler that will emit Log objects - stream = LogStreamCallbackHandler( - auto_close=False, - include_names=include_names, - include_types=include_types, - include_tags=include_tags, - exclude_names=exclude_names, - exclude_types=exclude_types, - exclude_tags=exclude_tags, - ) - - # Assign the stream handler to the config - config = config or {} - callbacks = config.get("callbacks") - if callbacks is None: - config["callbacks"] = [stream] - elif isinstance(callbacks, list): - config["callbacks"] = callbacks + [stream] - elif isinstance(callbacks, BaseCallbackManager): - callbacks = callbacks.copy() - callbacks.inheritable_handlers.append(stream) - config["callbacks"] = callbacks - else: - raise ValueError( - f"Unexpected type for callbacks: {callbacks}." - "Expected None, list or AsyncCallbackManager." - ) - - # Call the runnable in streaming mode, - # add each chunk to the output stream - async def consume_astream() -> None: - try: - async for chunk in self.astream(input, config, **kwargs): - await stream.send_stream.send( - RunLogPatch( - { - "op": "add", - "path": "/streamed_output/-", - "value": chunk, - } - ) - ) - finally: - await stream.send_stream.aclose() - - # Start the runnable in a task, so we can start consuming output - task = asyncio.create_task(consume_astream()) - - try: - # Yield each chunk from the output stream - async for log in stream: - yield log - finally: - # Wait for the runnable to finish, if not cancelled (eg. by break) - try: - await task - except asyncio.CancelledError: - pass - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - """ - Default implementation of transform, which buffers input and then calls stream. - Subclasses should override this method if they can start producing output while - input is still being generated. - """ - final: Input - got_first_val = False - - for chunk in input: - if not got_first_val: - final = chunk - got_first_val = True - else: - # Make a best effort to gather, for any type that supports `+` - # This method should throw an error if gathering fails. - final += chunk # type: ignore[operator] - - if got_first_val: - yield from self.stream(final, config, **kwargs) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - """ - Default implementation of atransform, which buffers input and calls astream. - Subclasses should override this method if they can start producing output while - input is still being generated. - """ - final: Input - got_first_val = False - - async for chunk in input: - if not got_first_val: - final = chunk - got_first_val = True - else: - # Make a best effort to gather, for any type that supports `+` - # This method should throw an error if gathering fails. - final += chunk # type: ignore[operator] - - if got_first_val: - async for output in self.astream(final, config, **kwargs): - yield output - - def bind(self, **kwargs: Any) -> Runnable[Input, Output]: - """ - Bind arguments to a Runnable, returning a new Runnable. - """ - return RunnableBinding(bound=self, kwargs=kwargs, config={}) - - def with_config( - self, - config: Optional[RunnableConfig] = None, - # Sadly Unpack is not well supported by mypy so this will have to be untyped - **kwargs: Any, - ) -> Runnable[Input, Output]: - """ - Bind config to a Runnable, returning a new Runnable. - """ - return RunnableBinding( - bound=self, config={**(config or {}), **kwargs}, kwargs={} - ) - - def with_retry( - self, - *, - retry_if_exception_type: Tuple[Type[BaseException], ...] = (Exception,), - wait_exponential_jitter: bool = True, - stop_after_attempt: int = 3, - ) -> Runnable[Input, Output]: - from langchain.schema.runnable.retry import RunnableRetry - - return RunnableRetry( - bound=self, - kwargs={}, - config={}, - retry_exception_types=retry_if_exception_type, - wait_exponential_jitter=wait_exponential_jitter, - max_attempt_number=stop_after_attempt, - ) - - def map(self) -> Runnable[List[Input], List[Output]]: - """ - Return a new Runnable that maps a list of inputs to a list of outputs, - by calling invoke() with each input. - """ - return RunnableEach(bound=self) - - def with_fallbacks( - self, - fallbacks: Sequence[Runnable[Input, Output]], - *, - exceptions_to_handle: Tuple[Type[BaseException], ...] = (Exception,), - ) -> RunnableWithFallbacks[Input, Output]: - return RunnableWithFallbacks( - runnable=self, - fallbacks=fallbacks, - exceptions_to_handle=exceptions_to_handle, - ) - - """ --- Helper methods for Subclasses --- """ - - def _call_with_config( - self, - func: Union[ - Callable[[Input], Output], - Callable[[Input, CallbackManagerForChainRun], Output], - Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output], - ], - input: Input, - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> Output: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement invoke() in subclasses.""" - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - try: - output = call_func_with_variable_args(func, input, run_manager, config) - except BaseException as e: - run_manager.on_chain_error(e) - raise - else: - run_manager.on_chain_end(dumpd(output)) - return output - - async def _acall_with_config( - self, - func: Union[ - Callable[[Input], Awaitable[Output]], - Callable[[Input, AsyncCallbackManagerForChainRun], Awaitable[Output]], - Callable[ - [Input, AsyncCallbackManagerForChainRun, RunnableConfig], - Awaitable[Output], - ], - ], - input: Input, - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> Output: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement ainvoke() in subclasses.""" - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - run_manager = await callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - try: - output = await acall_func_with_variable_args( - func, input, run_manager, config - ) - except BaseException as e: - await run_manager.on_chain_error(e) - raise - else: - await run_manager.on_chain_end(dumpd(output)) - return output - - def _batch_with_config( - self, - func: Union[ - Callable[[List[Input]], List[Union[Exception, Output]]], - Callable[ - [List[Input], List[CallbackManagerForChainRun]], - List[Union[Exception, Output]], - ], - Callable[ - [List[Input], List[CallbackManagerForChainRun], List[RunnableConfig]], - List[Union[Exception, Output]], - ], - ], - input: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - run_type: Optional[str] = None, - ) -> List[Output]: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement invoke() in subclasses.""" - if not input: - return [] - - configs = get_config_list(config, len(input)) - callback_managers = [get_callback_manager_for_config(c) for c in configs] - run_managers = [ - callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - for callback_manager, input, config in zip( - callback_managers, input, configs - ) - ] - try: - kwargs: Dict[str, Any] = {} - if accepts_config(func): - kwargs["config"] = [ - patch_config(c, callbacks=rm.get_child()) - for c, rm in zip(configs, run_managers) - ] - if accepts_run_manager(func): - kwargs["run_manager"] = run_managers - output = func(input, **kwargs) # type: ignore[call-arg] - except BaseException as e: - for run_manager in run_managers: - run_manager.on_chain_error(e) - if return_exceptions: - return cast(List[Output], [e for _ in input]) - else: - raise - else: - first_exception: Optional[Exception] = None - for run_manager, out in zip(run_managers, output): - if isinstance(out, Exception): - first_exception = first_exception or out - run_manager.on_chain_error(out) - else: - run_manager.on_chain_end(dumpd(out)) - if return_exceptions or first_exception is None: - return cast(List[Output], output) - else: - raise first_exception - - async def _abatch_with_config( - self, - func: Union[ - Callable[[List[Input]], Awaitable[List[Union[Exception, Output]]]], - Callable[ - [List[Input], List[AsyncCallbackManagerForChainRun]], - Awaitable[List[Union[Exception, Output]]], - ], - Callable[ - [ - List[Input], - List[AsyncCallbackManagerForChainRun], - List[RunnableConfig], - ], - Awaitable[List[Union[Exception, Output]]], - ], - ], - input: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - run_type: Optional[str] = None, - ) -> List[Output]: - """Helper method to transform an Input value to an Output value, - with callbacks. Use this method to implement invoke() in subclasses.""" - if not input: - return [] - - configs = get_config_list(config, len(input)) - callback_managers = [get_async_callback_manager_for_config(c) for c in configs] - run_managers: List[AsyncCallbackManagerForChainRun] = await asyncio.gather( - *( - callback_manager.on_chain_start( - dumpd(self), - input, - run_type=run_type, - name=config.get("run_name"), - ) - for callback_manager, input, config in zip( - callback_managers, input, configs - ) - ) - ) - try: - kwargs: Dict[str, Any] = {} - if accepts_config(func): - kwargs["config"] = [ - patch_config(c, callbacks=rm.get_child()) - for c, rm in zip(configs, run_managers) - ] - if accepts_run_manager(func): - kwargs["run_manager"] = run_managers - output = await func(input, **kwargs) # type: ignore[call-arg] - except BaseException as e: - await asyncio.gather( - *(run_manager.on_chain_error(e) for run_manager in run_managers) - ) - if return_exceptions: - return cast(List[Output], [e for _ in input]) - else: - raise - else: - first_exception: Optional[Exception] = None - coros: List[Awaitable[None]] = [] - for run_manager, out in zip(run_managers, output): - if isinstance(out, Exception): - first_exception = first_exception or out - coros.append(run_manager.on_chain_error(out)) - else: - coros.append(run_manager.on_chain_end(dumpd(out))) - await asyncio.gather(*coros) - if return_exceptions or first_exception is None: - return cast(List[Output], output) - else: - raise first_exception - - def _transform_stream_with_config( - self, - input: Iterator[Input], - transformer: Union[ - Callable[[Iterator[Input]], Iterator[Output]], - Callable[[Iterator[Input], CallbackManagerForChainRun], Iterator[Output]], - Callable[ - [ - Iterator[Input], - CallbackManagerForChainRun, - RunnableConfig, - ], - Iterator[Output], - ], - ], - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> Iterator[Output]: - """Helper method to transform an Iterator of Input values into an Iterator of - Output values, with callbacks. - Use this to implement `stream()` or `transform()` in Runnable subclasses.""" - # tee the input so we can iterate over it twice - input_for_tracing, input_for_transform = tee(input, 2) - # Start the input iterator to ensure the input runnable starts before this one - final_input: Optional[Input] = next(input_for_tracing, None) - final_input_supported = True - final_output: Optional[Output] = None - final_output_supported = True - - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - {"input": ""}, - run_type=run_type, - name=config.get("run_name"), - ) - try: - kwargs: Dict[str, Any] = {} - if accepts_config(transformer): - kwargs["config"] = patch_config( - config, callbacks=run_manager.get_child() - ) - if accepts_run_manager(transformer): - kwargs["run_manager"] = run_manager - iterator = transformer( - input_for_transform, **kwargs - ) # type: ignore[call-arg] - for chunk in iterator: - yield chunk - if final_output_supported: - if final_output is None: - final_output = chunk - else: - try: - final_output += chunk # type: ignore[operator] - except TypeError: - final_output = None - final_output_supported = False - for ichunk in input_for_tracing: - if final_input_supported: - if final_input is None: - final_input = ichunk - else: - try: - final_input += ichunk # type: ignore[operator] - except TypeError: - final_input = None - final_input_supported = False - except BaseException as e: - run_manager.on_chain_error(e, inputs=final_input) - raise - else: - run_manager.on_chain_end(final_output, inputs=final_input) - - async def _atransform_stream_with_config( - self, - input: AsyncIterator[Input], - transformer: Union[ - Callable[[AsyncIterator[Input]], AsyncIterator[Output]], - Callable[ - [AsyncIterator[Input], AsyncCallbackManagerForChainRun], - AsyncIterator[Output], - ], - Callable[ - [ - AsyncIterator[Input], - AsyncCallbackManagerForChainRun, - RunnableConfig, - ], - AsyncIterator[Output], - ], - ], - config: Optional[RunnableConfig], - run_type: Optional[str] = None, - ) -> AsyncIterator[Output]: - """Helper method to transform an Async Iterator of Input values into an Async - Iterator of Output values, with callbacks. - Use this to implement `astream()` or `atransform()` in Runnable subclasses.""" - # tee the input so we can iterate over it twice - input_for_tracing, input_for_transform = atee(input, 2) - # Start the input iterator to ensure the input runnable starts before this one - final_input: Optional[Input] = await py_anext(input_for_tracing, None) - final_input_supported = True - final_output: Optional[Output] = None - final_output_supported = True - - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - run_manager = await callback_manager.on_chain_start( - dumpd(self), - {"input": ""}, - run_type=run_type, - name=config.get("run_name"), - ) - try: - kwargs: Dict[str, Any] = {} - if accepts_config(transformer): - kwargs["config"] = patch_config( - config, callbacks=run_manager.get_child() - ) - if accepts_run_manager(transformer): - kwargs["run_manager"] = run_manager - iterator = transformer( - input_for_transform, **kwargs - ) # type: ignore[call-arg] - async for chunk in iterator: - yield chunk - if final_output_supported: - if final_output is None: - final_output = chunk - else: - try: - final_output += chunk # type: ignore[operator] - except TypeError: - final_output = None - final_output_supported = False - async for ichunk in input_for_tracing: - if final_input_supported: - if final_input is None: - final_input = ichunk - else: - try: - final_input += ichunk # type: ignore[operator] - except TypeError: - final_input = None - final_input_supported = False - except BaseException as e: - await run_manager.on_chain_error(e, inputs=final_input) - raise - else: - await run_manager.on_chain_end(final_output, inputs=final_input) - - -class RunnableBranch(Serializable, Runnable[Input, Output]): - """A Runnable that selects which branch to run based on a condition. - - The runnable is initialized with a list of (condition, runnable) pairs and - a default branch. - - When operating on an input, the first condition that evaluates to True is - selected, and the corresponding runnable is run on the input. - - If no condition evaluates to True, the default branch is run on the input. - - Examples: - - .. code-block:: python - - from langchain.schema.runnable import RunnableBranch - - branch = RunnableBranch( - (lambda x: isinstance(x, str), lambda x: x.upper()), - (lambda x: isinstance(x, int), lambda x: x + 1), - (lambda x: isinstance(x, float), lambda x: x * 2), - lambda x: "goodbye", - ) - - branch.invoke("hello") # "HELLO" - branch.invoke(None) # "goodbye" - """ - - branches: Sequence[Tuple[Runnable[Input, bool], Runnable[Input, Output]]] - default: Runnable[Input, Output] - - def __init__( - self, - *branches: Union[ - Tuple[ - Union[ - Runnable[Input, bool], - Callable[[Input], bool], - Callable[[Input], Awaitable[bool]], - ], - RunnableLike, - ], - RunnableLike, # To accommodate the default branch - ], - ) -> None: - """A Runnable that runs one of two branches based on a condition.""" - if len(branches) < 2: - raise ValueError("RunnableBranch requires at least two branches") - - default = branches[-1] - - if not isinstance( - default, (Runnable, Callable, Mapping) # type: ignore[arg-type] - ): - raise TypeError( - "RunnableBranch default must be runnable, callable or mapping." - ) - - default_ = cast( - Runnable[Input, Output], coerce_to_runnable(cast(RunnableLike, default)) - ) - - _branches = [] - - for branch in branches[:-1]: - if not isinstance(branch, (tuple, list)): # type: ignore[arg-type] - raise TypeError( - f"RunnableBranch branches must be " - f"tuples or lists, not {type(branch)}" - ) - - if not len(branch) == 2: - raise ValueError( - f"RunnableBranch branches must be " - f"tuples or lists of length 2, not {len(branch)}" - ) - condition, runnable = branch - condition = cast(Runnable[Input, bool], coerce_to_runnable(condition)) - runnable = coerce_to_runnable(runnable) - _branches.append((condition, runnable)) - - super().__init__(branches=_branches, default=default_) - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - """RunnableBranch is serializable if all its branches are serializable.""" - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - """The namespace of a RunnableBranch is the namespace of its default branch.""" - return cls.__module__.split(".")[:-1] - - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - """First evaluates the condition, then delegate to true or false branch.""" - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - - try: - for idx, branch in enumerate(self.branches): - condition, runnable = branch - - expression_value = condition.invoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"condition:{idx + 1}"), - ), - ) - - if expression_value: - return runnable.invoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"branch:{idx + 1}"), - ), - ) - - output = self.default.invoke( - input, - config=patch_config( - config, callbacks=run_manager.get_child(tag="branch:default") - ), - ) - except Exception as e: - run_manager.on_chain_error(e) - raise - run_manager.on_chain_end(dumpd(output)) - return output - - async def ainvoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - """Async version of invoke.""" - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - run_manager = callback_manager.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - try: - for idx, branch in enumerate(self.branches): - condition, runnable = branch - - expression_value = await condition.ainvoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"condition:{idx + 1}"), - ), - ) - - if expression_value: - return await runnable.ainvoke( - input, - config=patch_config( - config, - callbacks=run_manager.get_child(tag=f"branch:{idx + 1}"), - ), - **kwargs, - ) - - output = await self.default.ainvoke( - input, - config=patch_config( - config, callbacks=run_manager.get_child(tag="branch:default") - ), - **kwargs, - ) - except Exception as e: - run_manager.on_chain_error(e) - raise - run_manager.on_chain_end(dumpd(output)) - return output - - -class RunnableWithFallbacks(Serializable, Runnable[Input, Output]): - """ - A Runnable that can fallback to other Runnables if it fails. - """ - - runnable: Runnable[Input, Output] - fallbacks: Sequence[Runnable[Input, Output]] - exceptions_to_handle: Tuple[Type[BaseException], ...] = (Exception,) - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - @property - def runnables(self) -> Iterator[Runnable[Input, Output]]: - yield self.runnable - yield from self.fallbacks - - def invoke( - self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - # start the root run - run_manager = callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - first_error = None - for runnable in self.runnables: - try: - output = runnable.invoke( - input, - patch_config(config, callbacks=run_manager.get_child()), - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - run_manager.on_chain_error(e) - raise e - else: - run_manager.on_chain_end(output) - return output - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - run_manager.on_chain_error(first_error) - raise first_error - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - # start the root run - run_manager = await callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - first_error = None - for runnable in self.runnables: - try: - output = await runnable.ainvoke( - input, - patch_config(config, callbacks=run_manager.get_child()), - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - await run_manager.on_chain_error(e) - raise e - else: - await run_manager.on_chain_end(output) - return output - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - await run_manager.on_chain_error(first_error) - raise first_error - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from langchain.callbacks.manager import CallbackManager - - if return_exceptions: - raise NotImplementedError() - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers = [ - cm.on_chain_start( - dumpd(self), - input if isinstance(input, dict) else {"input": input}, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ] - - first_error = None - for runnable in self.runnables: - try: - outputs = runnable.batch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config(config, callbacks=rm.get_child()) - for rm, config in zip(run_managers, configs) - ], - return_exceptions=return_exceptions, - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - for rm in run_managers: - rm.on_chain_error(e) - raise e - else: - for rm, output in zip(run_managers, outputs): - rm.on_chain_end(output) - return outputs - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - for rm in run_managers: - rm.on_chain_error(first_error) - raise first_error - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from langchain.callbacks.manager import AsyncCallbackManager - - if return_exceptions: - raise NotImplementedError() - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - AsyncCallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers: List[AsyncCallbackManagerForChainRun] = await asyncio.gather( - *( - cm.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ) - ) - - first_error = None - for runnable in self.runnables: - try: - outputs = await runnable.abatch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config(config, callbacks=rm.get_child()) - for rm, config in zip(run_managers, configs) - ], - return_exceptions=return_exceptions, - **kwargs, - ) - except self.exceptions_to_handle as e: - if first_error is None: - first_error = e - except BaseException as e: - await asyncio.gather(*(rm.on_chain_error(e) for rm in run_managers)) - else: - await asyncio.gather( - *( - rm.on_chain_end(output) - for rm, output in zip(run_managers, outputs) - ) - ) - return outputs - if first_error is None: - raise ValueError("No error stored at end of fallbacks.") - await asyncio.gather(*(rm.on_chain_error(first_error) for rm in run_managers)) - raise first_error - - -class RunnableSequence(Serializable, Runnable[Input, Output]): - """ - A sequence of runnables, where the output of each is the input of the next. - """ - - first: Runnable[Input, Any] - middle: List[Runnable[Any, Any]] = Field(default_factory=list) - last: Runnable[Any, Output] - - @property - def steps(self) -> List[Runnable[Any, Any]]: - return [self.first] + self.middle + [self.last] - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - class Config: - arbitrary_types_allowed = True - - def __or__( - self, - other: Union[ - Runnable[Any, Other], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Any, Other], Callable[[Any], Other], Any]], - ], - ) -> RunnableSequence[Input, Other]: - if isinstance(other, RunnableSequence): - return RunnableSequence( - first=self.first, - middle=self.middle + [self.last] + [other.first] + other.middle, - last=other.last, - ) - else: - return RunnableSequence( - first=self.first, - middle=self.middle + [self.last], - last=coerce_to_runnable(other), - ) - - def __ror__( - self, - other: Union[ - Runnable[Other, Any], - Callable[[Any], Other], - Mapping[str, Union[Runnable[Other, Any], Callable[[Other], Any], Any]], - ], - ) -> RunnableSequence[Other, Output]: - if isinstance(other, RunnableSequence): - return RunnableSequence( - first=other.first, - middle=other.middle + [other.last] + [self.first] + self.middle, - last=self.last, - ) - else: - return RunnableSequence( - first=coerce_to_runnable(other), - middle=[self.first] + self.middle, - last=self.last, - ) - - def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_callback_manager_for_config(config) - # start the root run - run_manager = callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # invoke all steps in sequence - try: - for i, step in enumerate(self.steps): - input = step.invoke( - input, - # mark each step as a child run - patch_config( - config, callbacks=run_manager.get_child(f"seq:step:{i + 1}") - ), - ) - # finish the root run - except BaseException as e: - run_manager.on_chain_error(e) - raise - else: - run_manager.on_chain_end(input) - return cast(Output, input) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - # setup callbacks - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - # start the root run - run_manager = await callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # invoke all steps in sequence - try: - for i, step in enumerate(self.steps): - input = await step.ainvoke( - input, - # mark each step as a child run - patch_config( - config, callbacks=run_manager.get_child(f"seq:step:{i + 1}") - ), - ) - # finish the root run - except BaseException as e: - await run_manager.on_chain_error(e) - raise - else: - await run_manager.on_chain_end(input) - return cast(Output, input) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from langchain.callbacks.manager import CallbackManager - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers = [ - cm.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ] - - # invoke - try: - if return_exceptions: - # Track which inputs (by index) failed so far - # If an input has failed it will be present in this map, - # and the value will be the exception that was raised. - failed_inputs_map: Dict[int, Exception] = {} - for stepidx, step in enumerate(self.steps): - # Assemble the original indexes of the remaining inputs - # (i.e. the ones that haven't failed yet) - remaining_idxs = [ - i for i in range(len(configs)) if i not in failed_inputs_map - ] - # Invoke the step on the remaining inputs - inputs = step.batch( - [ - inp - for i, inp in zip(remaining_idxs, inputs) - if i not in failed_inputs_map - ], - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{stepidx + 1}") - ) - for i, (rm, config) in enumerate(zip(run_managers, configs)) - if i not in failed_inputs_map - ], - return_exceptions=return_exceptions, - **kwargs, - ) - # If an input failed, add it to the map - for i, inp in zip(remaining_idxs, inputs): - if isinstance(inp, Exception): - failed_inputs_map[i] = inp - inputs = [inp for inp in inputs if not isinstance(inp, Exception)] - # If all inputs have failed, stop processing - if len(failed_inputs_map) == len(configs): - break - - # Reassemble the outputs, inserting Exceptions for failed inputs - inputs_copy = inputs.copy() - inputs = [] - for i in range(len(configs)): - if i in failed_inputs_map: - inputs.append(cast(Input, failed_inputs_map[i])) - else: - inputs.append(inputs_copy.pop(0)) - else: - for i, step in enumerate(self.steps): - inputs = step.batch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{i + 1}") - ) - for rm, config in zip(run_managers, configs) - ], - ) - - # finish the root runs - except BaseException as e: - for rm in run_managers: - rm.on_chain_error(e) - if return_exceptions: - return cast(List[Output], [e for _ in inputs]) - else: - raise - else: - first_exception: Optional[Exception] = None - for run_manager, out in zip(run_managers, inputs): - if isinstance(out, Exception): - first_exception = first_exception or out - run_manager.on_chain_error(out) - else: - run_manager.on_chain_end(dumpd(out)) - if return_exceptions or first_exception is None: - return cast(List[Output], inputs) - else: - raise first_exception - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - from langchain.callbacks.manager import ( - AsyncCallbackManager, - ) - - if not inputs: - return [] - - # setup callbacks - configs = get_config_list(config, len(inputs)) - callback_managers = [ - AsyncCallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - for config in configs - ] - # start the root runs, one per input - run_managers: List[AsyncCallbackManagerForChainRun] = await asyncio.gather( - *( - cm.on_chain_start( - dumpd(self), - input, - name=config.get("run_name"), - ) - for cm, input, config in zip(callback_managers, inputs, configs) - ) - ) - - # invoke .batch() on each step - # this uses batching optimizations in Runnable subclasses, like LLM - try: - if return_exceptions: - # Track which inputs (by index) failed so far - # If an input has failed it will be present in this map, - # and the value will be the exception that was raised. - failed_inputs_map: Dict[int, Exception] = {} - for stepidx, step in enumerate(self.steps): - # Assemble the original indexes of the remaining inputs - # (i.e. the ones that haven't failed yet) - remaining_idxs = [ - i for i in range(len(configs)) if i not in failed_inputs_map - ] - # Invoke the step on the remaining inputs - inputs = await step.abatch( - [ - inp - for i, inp in zip(remaining_idxs, inputs) - if i not in failed_inputs_map - ], - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{stepidx + 1}") - ) - for i, (rm, config) in enumerate(zip(run_managers, configs)) - if i not in failed_inputs_map - ], - return_exceptions=return_exceptions, - **kwargs, - ) - # If an input failed, add it to the map - for i, inp in zip(remaining_idxs, inputs): - if isinstance(inp, Exception): - failed_inputs_map[i] = inp - inputs = [inp for inp in inputs if not isinstance(inp, Exception)] - # If all inputs have failed, stop processing - if len(failed_inputs_map) == len(configs): - break - - # Reassemble the outputs, inserting Exceptions for failed inputs - inputs_copy = inputs.copy() - inputs = [] - for i in range(len(configs)): - if i in failed_inputs_map: - inputs.append(cast(Input, failed_inputs_map[i])) - else: - inputs.append(inputs_copy.pop(0)) - else: - for i, step in enumerate(self.steps): - inputs = await step.abatch( - inputs, - [ - # each step a child run of the corresponding root run - patch_config( - config, callbacks=rm.get_child(f"seq:step:{i + 1}") - ) - for rm, config in zip(run_managers, configs) - ], - ) - # finish the root runs - except BaseException as e: - await asyncio.gather(*(rm.on_chain_error(e) for rm in run_managers)) - if return_exceptions: - return cast(List[Output], [e for _ in inputs]) - else: - raise - else: - first_exception: Optional[Exception] = None - coros: List[Awaitable[None]] = [] - for run_manager, out in zip(run_managers, inputs): - if isinstance(out, Exception): - first_exception = first_exception or out - coros.append(run_manager.on_chain_error(out)) - else: - coros.append(run_manager.on_chain_end(dumpd(out))) - await asyncio.gather(*coros) - if return_exceptions or first_exception is None: - return cast(List[Output], inputs) - else: - raise first_exception - - def _transform( - self, - input: Iterator[Input], - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Iterator[Output]: - steps = [self.first] + self.middle + [self.last] - - # transform the input stream of each step with the next - # steps that don't natively support transforming an input stream will - # buffer input in memory until all available, and then start emitting output - final_pipeline = cast(Iterator[Output], input) - for step in steps: - final_pipeline = step.transform( - final_pipeline, - patch_config( - config, - callbacks=run_manager.get_child(f"seq:step:{steps.index(step) + 1}"), - ), - ) - - for output in final_pipeline: - yield output - - async def _atransform( - self, - input: AsyncIterator[Input], - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> AsyncIterator[Output]: - steps = [self.first] + self.middle + [self.last] - - # stream the last steps - # transform the input stream of each step with the next - # steps that don't natively support transforming an input stream will - # buffer input in memory until all available, and then start emitting output - final_pipeline = cast(AsyncIterator[Output], input) - for step in steps: - final_pipeline = step.atransform( - final_pipeline, - patch_config( - config, - callbacks=run_manager.get_child(f"seq:step:{steps.index(step) + 1}"), - ), - ) - async for output in final_pipeline: - yield output - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self._transform_stream_with_config( - input, self._transform, config, **kwargs - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self.transform(iter([input]), config, **kwargs) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async for chunk in self._atransform_stream_with_config( - input, self._atransform, config, **kwargs - ): - yield chunk - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async def input_aiter() -> AsyncIterator[Input]: - yield input - - async for chunk in self.atransform(input_aiter(), config, **kwargs): - yield chunk - - -class RunnableMapChunk(Dict[str, Any]): - """ - Partial output from a RunnableMap - """ - - def __add__(self, other: RunnableMapChunk) -> RunnableMapChunk: - chunk = RunnableMapChunk(self) - for key in other: - if key not in chunk or chunk[key] is None: - chunk[key] = other[key] - elif other[key] is not None: - chunk[key] += other[key] - return chunk - - def __radd__(self, other: RunnableMapChunk) -> RunnableMapChunk: - chunk = RunnableMapChunk(other) - for key in self: - if key not in chunk or chunk[key] is None: - chunk[key] = self[key] - elif self[key] is not None: - chunk[key] += self[key] - return chunk - - -class RunnableMap(Serializable, Runnable[Input, Dict[str, Any]]): - """ - A runnable that runs a mapping of runnables in parallel, - and returns a mapping of their outputs. - """ - - steps: Mapping[str, Runnable[Input, Any]] - - def __init__( - self, - steps: Mapping[ - str, - Union[ - Runnable[Input, Any], - Callable[[Input], Any], - Mapping[str, Union[Runnable[Input, Any], Callable[[Input], Any]]], - ], - ], - ) -> None: - super().__init__(steps={key: coerce_to_runnable(r) for key, r in steps.items()}) - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - class Config: - arbitrary_types_allowed = True - - def invoke( - self, input: Input, config: Optional[RunnableConfig] = None - ) -> Dict[str, Any]: - from langchain.callbacks.manager import CallbackManager - - # setup callbacks - config = ensure_config(config) - callback_manager = CallbackManager.configure( - inheritable_callbacks=config.get("callbacks"), - local_callbacks=None, - verbose=False, - inheritable_tags=config.get("tags"), - local_tags=None, - inheritable_metadata=config.get("metadata"), - local_metadata=None, - ) - # start the root run - run_manager = callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # gather results from all steps - try: - # copy to avoid issues from the caller mutating the steps during invoke() - steps = dict(self.steps) - with get_executor_for_config(config) as executor: - futures = [ - executor.submit( - step.invoke, - input, - # mark each step as a child run - patch_config( - config, - copy_locals=True, - callbacks=run_manager.get_child(f"map:key:{key}"), - ), - ) - for key, step in steps.items() - ] - output = {key: future.result() for key, future in zip(steps, futures)} - # finish the root run - except BaseException as e: - run_manager.on_chain_error(e) - raise - else: - run_manager.on_chain_end(output) - return output - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Dict[str, Any]: - # setup callbacks - config = ensure_config(config) - callback_manager = get_async_callback_manager_for_config(config) - # start the root run - run_manager = await callback_manager.on_chain_start( - dumpd(self), input, name=config.get("run_name") - ) - - # gather results from all steps - try: - # copy to avoid issues from the caller mutating the steps during invoke() - steps = dict(self.steps) - results = await asyncio.gather( - *( - step.ainvoke( - input, - # mark each step as a child run - patch_config( - config, callbacks=run_manager.get_child(f"map:key:{key}") - ), - ) - for key, step in steps.items() - ) - ) - output = {key: value for key, value in zip(steps, results)} - # finish the root run - except BaseException as e: - await run_manager.on_chain_error(e) - raise - else: - await run_manager.on_chain_end(output) - return output - - def _transform( - self, - input: Iterator[Input], - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Iterator[RunnableMapChunk]: - # Shallow copy steps to ignore mutations while in progress - steps = dict(self.steps) - # Each step gets a copy of the input iterator, - # which is consumed in parallel in a separate thread. - input_copies = list(safetee(input, len(steps), lock=threading.Lock())) - with get_executor_for_config(config) as executor: - # Create the transform() generator for each step - named_generators = [ - ( - name, - step.transform( - input_copies.pop(), - patch_config( - config, callbacks=run_manager.get_child(f"map:key:{name}") - ), - ), - ) - for name, step in steps.items() - ] - # Start the first iteration of each generator - futures = { - executor.submit(next, generator): (step_name, generator) - for step_name, generator in named_generators - } - # Yield chunks from each as they become available, - # and start the next iteration of that generator that yielded it. - # When all generators are exhausted, stop. - while futures: - completed_futures, _ = wait(futures, return_when=FIRST_COMPLETED) - for future in completed_futures: - (step_name, generator) = futures.pop(future) - try: - chunk = RunnableMapChunk({step_name: future.result()}) - yield chunk - futures[executor.submit(next, generator)] = ( - step_name, - generator, - ) - except StopIteration: - pass - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> Iterator[Dict[str, Any]]: - yield from self._transform_stream_with_config( - input, self._transform, config, **kwargs - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Dict[str, Any]]: - yield from self.transform(iter([input]), config) - - async def _atransform( - self, - input: AsyncIterator[Input], - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> AsyncIterator[RunnableMapChunk]: - # Shallow copy steps to ignore mutations while in progress - steps = dict(self.steps) - # Each step gets a copy of the input iterator, - # which is consumed in parallel in a separate thread. - input_copies = list(atee(input, len(steps), lock=asyncio.Lock())) - # Create the transform() generator for each step - named_generators = [ - ( - name, - step.atransform( - input_copies.pop(), - patch_config( - config, callbacks=run_manager.get_child(f"map:key:{name}") - ), - ), - ) - for name, step in steps.items() - ] - - # Wrap in a coroutine to satisfy linter - async def get_next_chunk(generator: AsyncIterator) -> Optional[Output]: - return await py_anext(generator) - - # Start the first iteration of each generator - tasks = { - asyncio.create_task(get_next_chunk(generator)): (step_name, generator) - for step_name, generator in named_generators - } - # Yield chunks from each as they become available, - # and start the next iteration of the generator that yielded it. - # When all generators are exhausted, stop. - while tasks: - completed_tasks, _ = await asyncio.wait( - tasks, return_when=asyncio.FIRST_COMPLETED - ) - for task in completed_tasks: - (step_name, generator) = tasks.pop(task) - try: - chunk = RunnableMapChunk({step_name: task.result()}) - yield chunk - new_task = asyncio.create_task(get_next_chunk(generator)) - tasks[new_task] = (step_name, generator) - except StopAsyncIteration: - pass - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> AsyncIterator[Dict[str, Any]]: - async for chunk in self._atransform_stream_with_config( - input, self._atransform, config, **kwargs - ): - yield chunk - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Dict[str, Any]]: - async def input_aiter() -> AsyncIterator[Input]: - yield input - - async for chunk in self.atransform(input_aiter(), config): - yield chunk - - -class RunnableLambda(Runnable[Input, Output]): - """ - A runnable that runs a callable. - """ - - def __init__( - self, - func: Union[Callable[[Input], Output], Callable[[Input], Awaitable[Output]]], - afunc: Optional[Callable[[Input], Awaitable[Output]]] = None, - ) -> None: - if afunc is not None: - self.afunc = afunc - - if inspect.iscoroutinefunction(func): - self.afunc = func - elif callable(func): - self.func = cast(Callable[[Input], Output], func) - else: - raise TypeError( - "Expected a callable type for `func`." - f"Instead got an unsupported type: {type(func)}" - ) - - def __eq__(self, other: Any) -> bool: - if isinstance(other, RunnableLambda): - if hasattr(self, "func") and hasattr(other, "func"): - return self.func == other.func - elif hasattr(self, "afunc") and hasattr(other, "afunc"): - return self.afunc == other.afunc - else: - return False - else: - return False - - def __repr__(self) -> str: - return "RunnableLambda(...)" - - def _invoke( - self, - input: Input, - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> Output: - output = call_func_with_variable_args(self.func, input, run_manager, config) - # If the output is a runnable, invoke it - if isinstance(output, Runnable): - recursion_limit = config["recursion_limit"] - if recursion_limit <= 0: - raise RecursionError( - f"Recursion limit reached when invoking {self} with input {input}." - ) - output = output.invoke( - input, - patch_config( - config, - callbacks=run_manager.get_child(), - recursion_limit=recursion_limit - 1, - ), - ) - return output - - async def _ainvoke( - self, - input: Input, - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> Output: - output = await acall_func_with_variable_args( - self.afunc, input, run_manager, config - ) - # If the output is a runnable, invoke it - if isinstance(output, Runnable): - recursion_limit = config["recursion_limit"] - if recursion_limit <= 0: - raise RecursionError( - f"Recursion limit reached when invoking {self} with input {input}." - ) - output = await output.ainvoke( - input, - patch_config( - config, - callbacks=run_manager.get_child(), - recursion_limit=recursion_limit - 1, - ), - ) - return output - - def _config( - self, config: Optional[RunnableConfig], callable: Callable[..., Any] - ) -> RunnableConfig: - config = config or {} - - if config.get("run_name") is None: - try: - run_name = callable.__name__ - except AttributeError: - run_name = None - if run_name is not None: - return patch_config(config, run_name=run_name) - - return config - - def invoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - if hasattr(self, "func"): - return self._call_with_config( - self._invoke, - input, - self._config(config, self.func), - ) - else: - raise TypeError( - "Cannot invoke a coroutine function synchronously." - "Use `ainvoke` instead." - ) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - if hasattr(self, "afunc"): - return await self._acall_with_config( - self._ainvoke, - input, - self._config(config, self.afunc), - ) - else: - # Delegating to super implementation of ainvoke. - # Uses asyncio executor to run the sync version (invoke) - return await super().ainvoke(input, config) - - -class RunnableEach(Serializable, Runnable[List[Input], List[Output]]): - """ - A runnable that delegates calls to another runnable - with each element of the input sequence. - """ - - bound: Runnable[Input, Output] - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - def bind(self, **kwargs: Any) -> RunnableEach[Input, Output]: - return RunnableEach(bound=self.bound.bind(**kwargs)) - - def _invoke( - self, - inputs: List[Input], - run_manager: CallbackManagerForChainRun, - config: RunnableConfig, - ) -> List[Output]: - return self.bound.batch( - inputs, patch_config(config, callbacks=run_manager.get_child()) - ) - - def invoke( - self, input: List[Input], config: Optional[RunnableConfig] = None - ) -> List[Output]: - return self._call_with_config(self._invoke, input, config) - - async def _ainvoke( - self, - inputs: List[Input], - run_manager: AsyncCallbackManagerForChainRun, - config: RunnableConfig, - ) -> List[Output]: - return await self.bound.abatch( - inputs, patch_config(config, callbacks=run_manager.get_child()) - ) - - async def ainvoke( - self, input: List[Input], config: Optional[RunnableConfig] = None, **kwargs: Any - ) -> List[Output]: - return await self._acall_with_config(self._ainvoke, input, config) - - -class RunnableBinding(Serializable, Runnable[Input, Output]): - """ - A runnable that delegates calls to another runnable with a set of kwargs. - """ - - bound: Runnable[Input, Output] - - kwargs: Mapping[str, Any] - - config: Mapping[str, Any] = Field(default_factory=dict) - - class Config: - arbitrary_types_allowed = True - - @classmethod - def is_lc_serializable(cls) -> bool: - return True - - @classmethod - def get_lc_namespace(cls) -> List[str]: - return cls.__module__.split(".")[:-1] - - def _merge_config(self, config: Optional[RunnableConfig]) -> RunnableConfig: - copy = cast(RunnableConfig, dict(self.config)) - if config: - for key in config: - if key == "metadata": - copy[key] = {**copy.get(key, {}), **config[key]} # type: ignore - elif key == "tags": - copy[key] = (copy.get(key) or []) + config[key] # type: ignore - else: - # Even though the keys aren't literals this is correct - # because both dicts are same type - copy[key] = config[key] or copy.get(key) # type: ignore - return copy - - def bind(self, **kwargs: Any) -> Runnable[Input, Output]: - return self.__class__( - bound=self.bound, config=self.config, kwargs={**self.kwargs, **kwargs} - ) - - def with_config( - self, - config: Optional[RunnableConfig] = None, - # Sadly Unpack is not well supported by mypy so this will have to be untyped - **kwargs: Any, - ) -> Runnable[Input, Output]: - return self.__class__( - bound=self.bound, - kwargs=self.kwargs, - config={**self.config, **(config or {}), **kwargs}, - ) - - def with_retry(self, **kwargs: Any) -> Runnable[Input, Output]: - return self.__class__( - bound=self.bound.with_retry(**kwargs), - kwargs=self.kwargs, - config=self.config, - ) - - def invoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - return self.bound.invoke( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - async def ainvoke( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Output: - return await self.bound.ainvoke( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - def batch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - if isinstance(config, list): - configs = cast( - List[RunnableConfig], [self._merge_config(conf) for conf in config] - ) - else: - configs = [ - patch_config(self._merge_config(config), copy_locals=True) - for _ in range(len(inputs)) - ] - return self.bound.batch( - inputs, - configs, - return_exceptions=return_exceptions, - **{**self.kwargs, **kwargs}, - ) - - async def abatch( - self, - inputs: List[Input], - config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, - *, - return_exceptions: bool = False, - **kwargs: Optional[Any], - ) -> List[Output]: - if isinstance(config, list): - configs = cast( - List[RunnableConfig], [self._merge_config(conf) for conf in config] - ) - else: - configs = [ - patch_config(self._merge_config(config), copy_locals=True) - for _ in range(len(inputs)) - ] - return await self.bound.abatch( - inputs, - configs, - return_exceptions=return_exceptions, - **{**self.kwargs, **kwargs}, - ) - - def stream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> Iterator[Output]: - yield from self.bound.stream( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - async def astream( - self, - input: Input, - config: Optional[RunnableConfig] = None, - **kwargs: Optional[Any], - ) -> AsyncIterator[Output]: - async for item in self.bound.astream( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ): - yield item - - def transform( - self, - input: Iterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> Iterator[Output]: - yield from self.bound.transform( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ) - - async def atransform( - self, - input: AsyncIterator[Input], - config: Optional[RunnableConfig] = None, - **kwargs: Any, - ) -> AsyncIterator[Output]: - async for item in self.bound.atransform( - input, - self._merge_config(config), - **{**self.kwargs, **kwargs}, - ): - yield item - - -RunnableBinding.update_forward_refs(RunnableConfig=RunnableConfig) - -RunnableLike = Union[ - Runnable[Input, Output], - Callable[[Input], Output], - Callable[[Input], Awaitable[Output]], - Mapping[str, Any], -] - - -def coerce_to_runnable(thing: RunnableLike) -> Runnable[Input, Output]: - if isinstance(thing, Runnable): - return thing - elif callable(thing): - return RunnableLambda(thing) - elif isinstance(thing, dict): - runnables: Mapping[str, Runnable[Any, Any]] = { - key: coerce_to_runnable(r) for key, r in thing.items() - } - return cast(Runnable[Input, Output], RunnableMap(steps=runnables)) - else: - raise TypeError( - f"Expected a Runnable, callable or dict." - f"Instead got an unsupported type: {type(thing)}" - ) diff --git a/src/schema/vectorstore.py b/src/schema/vectorstore.py deleted file mode 100644 index 443c240d4363fee3eb41f62d64165593ad30a46b..0000000000000000000000000000000000000000 --- a/src/schema/vectorstore.py +++ /dev/null @@ -1,623 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -from __future__ import annotations - -import asyncio -import logging -import math -import warnings -from abc import ABC, abstractmethod -from functools import partial -from typing import ( - TYPE_CHECKING, - Any, - Callable, - ClassVar, - Collection, - Dict, - Iterable, - List, - Optional, - Tuple, - Type, - TypeVar, -) - -from pydantic import Field, root_validator - -from FourthDimension.doc.document import Document -from FourthDimension.schema.retriever import BaseRetriever -from FourthDimension.schema.embeddings import Embeddings - -if TYPE_CHECKING: - from FourthDimension.callbacks.manager import ( - AsyncCallbackManagerForRetrieverRun, - CallbackManagerForRetrieverRun, - ) - -logger = logging.getLogger(__name__) - -VST = TypeVar("VST", bound="VectorStore") - - -class VectorStore(ABC): - """Interface for vector store.""" - - @abstractmethod - def add_texts( - self, - texts: Iterable[str], - metadatas: Optional[List[dict]] = None, - **kwargs: Any, - ) -> List[str]: - """Run more texts through the embeddings and add to the vectorstore. - - Args: - texts: Iterable of strings to add to the vectorstore. - metadatas: Optional list of metadatas associated with the texts. - kwargs: vectorstore specific parameters - - Returns: - List of ids from adding the texts into the vectorstore. - """ - - @property - def embeddings(self) -> Optional[Embeddings]: - """Access the query embedding object if available.""" - logger.debug( - f"{Embeddings.__name__} is not implemented for {self.__class__.__name__}" - ) - return None - - def delete(self, ids: Optional[List[str]] = None, **kwargs: Any) -> Optional[bool]: - """Delete by vector ID or other criteria. - - Args: - ids: List of ids to delete. - **kwargs: Other keyword arguments that subclasses might use. - - Returns: - Optional[bool]: True if deletion is successful, - False otherwise, None if not implemented. - """ - - raise NotImplementedError("delete method must be implemented by subclass.") - - async def aadd_texts( - self, - texts: Iterable[str], - metadatas: Optional[List[dict]] = None, - **kwargs: Any, - ) -> List[str]: - """Run more texts through the embeddings and add to the vectorstore.""" - raise NotImplementedError - - def add_documents(self, documents: List[Document], **kwargs: Any) -> List[str]: - """Run more documents through the embeddings and add to the vectorstore. - - Args: - documents (List[Document]: Documents to add to the vectorstore. - - Returns: - List[str]: List of IDs of the added texts. - """ - # TODO: Handle the case where the user doesn't provide ids on the Collection - texts = [doc.page_content for doc in documents] - metadatas = [doc.metadata for doc in documents] - return self.add_texts(texts, metadatas, **kwargs) - - async def aadd_documents( - self, documents: List[Document], **kwargs: Any - ) -> List[str]: - """Run more documents through the embeddings and add to the vectorstore. - - Args: - documents (List[Document]: Documents to add to the vectorstore. - - Returns: - List[str]: List of IDs of the added texts. - """ - texts = [doc.page_content for doc in documents] - metadatas = [doc.metadata for doc in documents] - return await self.aadd_texts(texts, metadatas, **kwargs) - - def search(self, query: str, search_type: str, **kwargs: Any) -> List[Document]: - """Return docs most similar to query using specified search type.""" - if search_type == "similarity": - return self.similarity_search(query, **kwargs) - elif search_type == "mmr": - return self.max_marginal_relevance_search(query, **kwargs) - else: - raise ValueError( - f"search_type of {search_type} not allowed. Expected " - "search_type to be 'similarity' or 'mmr'." - ) - - async def asearch( - self, query: str, search_type: str, **kwargs: Any - ) -> List[Document]: - """Return docs most similar to query using specified search type.""" - if search_type == "similarity": - return await self.asimilarity_search(query, **kwargs) - elif search_type == "mmr": - return await self.amax_marginal_relevance_search(query, **kwargs) - else: - raise ValueError( - f"search_type of {search_type} not allowed. Expected " - "search_type to be 'similarity' or 'mmr'." - ) - - @abstractmethod - def similarity_search( - self, query: str, k: int = 4, **kwargs: Any - ) -> List[Document]: - """Return docs most similar to query.""" - - @staticmethod - def _euclidean_relevance_score_fn(distance: float) -> float: - """Return a similarity score on a scale [0, 1].""" - # The 'correct' relevance function - # may differ depending on a few things, including: - # - the distance / similarity metric used by the VectorStore - # - the scale of your embeddings (OpenAI's are unit normed. Many - # others are not!) - # - embedding dimensionality - # - etc. - # This function converts the euclidean norm of normalized embeddings - # (0 is most similar, sqrt(2) most dissimilar) - # to a similarity function (0 to 1) - return 1.0 - distance / math.sqrt(2) - - @staticmethod - def _cosine_relevance_score_fn(distance: float) -> float: - """Normalize the distance to a score on a scale [0, 1].""" - - return 1.0 - distance - - @staticmethod - def _max_inner_product_relevance_score_fn(distance: float) -> float: - """Normalize the distance to a score on a scale [0, 1].""" - if distance > 0: - return 1.0 - distance - - return -1.0 * distance - - def _select_relevance_score_fn(self) -> Callable[[float], float]: - """ - The 'correct' relevance function - may differ depending on a few things, including: - - the distance / similarity metric used by the VectorStore - - the scale of your embeddings (OpenAI's are unit normed. Many others are not!) - - embedding dimensionality - - etc. - - Vectorstores should define their own selection based method of relevance. - """ - raise NotImplementedError - - def similarity_search_with_score( - self, *args: Any, **kwargs: Any - ) -> List[Tuple[Document, float]]: - """Run similarity search with distance.""" - raise NotImplementedError - - def _similarity_search_with_relevance_scores( - self, - query: str, - k: int = 4, - **kwargs: Any, - ) -> List[Tuple[Document, float]]: - """ - Default similarity search with relevance scores. Modify if necessary - in subclass. - Return docs and relevance scores in the range [0, 1]. - - 0 is dissimilar, 1 is most similar. - - Args: - query: input text - k: Number of Documents to return. Defaults to 4. - **kwargs: kwargs to be passed to similarity search. Should include: - score_threshold: Optional, a floating point value between 0 to 1 to - filter the resulting set of retrieved docs - - Returns: - List of Tuples of (doc, similarity_score) - """ - relevance_score_fn = self._select_relevance_score_fn() - docs_and_scores = self.similarity_search_with_score(query, k, **kwargs) - return [(doc, relevance_score_fn(score)) for doc, score in docs_and_scores] - - def similarity_search_with_relevance_scores( - self, - query: str, - k: int = 4, - **kwargs: Any, - ) -> List[Tuple[Document, float]]: - """Return docs and relevance scores in the range [0, 1]. - - 0 is dissimilar, 1 is most similar. - - Args: - query: input text - k: Number of Documents to return. Defaults to 4. - **kwargs: kwargs to be passed to similarity search. Should include: - score_threshold: Optional, a floating point value between 0 to 1 to - filter the resulting set of retrieved docs - - Returns: - List of Tuples of (doc, similarity_score) - """ - score_threshold = kwargs.pop("score_threshold", None) - - docs_and_similarities = self._similarity_search_with_relevance_scores( - query, k=k, **kwargs - ) - if any( - similarity < 0.0 or similarity > 1.0 - for _, similarity in docs_and_similarities - ): - warnings.warn( - "Relevance scores must be between" - f" 0 and 1, got {docs_and_similarities}" - ) - - if score_threshold is not None: - docs_and_similarities = [ - (doc, similarity) - for doc, similarity in docs_and_similarities - if similarity >= score_threshold - ] - if len(docs_and_similarities) == 0: - warnings.warn( - "No relevant docs were retrieved using the relevance score" - f" threshold {score_threshold}" - ) - return docs_and_similarities - - async def asimilarity_search_with_relevance_scores( - self, query: str, k: int = 4, **kwargs: Any - ) -> List[Tuple[Document, float]]: - """Return docs most similar to query.""" - - # This is a temporary workaround to make the similarity search - # asynchronous. The proper solution is to make the similarity search - # asynchronous in the vector store implementations. - func = partial( - self.similarity_search_with_relevance_scores, query, k=k, **kwargs - ) - return await asyncio.get_event_loop().run_in_executor(None, func) - - async def asimilarity_search( - self, query: str, k: int = 4, **kwargs: Any - ) -> List[Document]: - """Return docs most similar to query.""" - - # This is a temporary workaround to make the similarity search - # asynchronous. The proper solution is to make the similarity search - # asynchronous in the vector store implementations. - func = partial(self.similarity_search, query, k=k, **kwargs) - return await asyncio.get_event_loop().run_in_executor(None, func) - - def similarity_search_by_vector( - self, embedding: List[float], k: int = 4, **kwargs: Any - ) -> List[Document]: - """Return docs most similar to embedding vector. - - Args: - embedding: Embedding to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - - Returns: - List of Documents most similar to the query vector. - """ - raise NotImplementedError - - async def asimilarity_search_by_vector( - self, embedding: List[float], k: int = 4, **kwargs: Any - ) -> List[Document]: - """Return docs most similar to embedding vector.""" - - # This is a temporary workaround to make the similarity search - # asynchronous. The proper solution is to make the similarity search - # asynchronous in the vector store implementations. - func = partial(self.similarity_search_by_vector, embedding, k=k, **kwargs) - return await asyncio.get_event_loop().run_in_executor(None, func) - - def max_marginal_relevance_search( - self, - query: str, - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - **kwargs: Any, - ) -> List[Document]: - """Return docs selected using the maximal marginal relevance. - - Maximal marginal relevance optimizes for similarity to query AND diversity - among selected documents. - - Args: - query: Text to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - fetch_k: Number of Documents to fetch to pass to MMR algorithm. - lambda_mult: Number between 0 and 1 that determines the degree - of diversity among the results with 0 corresponding - to maximum diversity and 1 to minimum diversity. - Defaults to 0.5. - Returns: - List of Documents selected by maximal marginal relevance. - """ - raise NotImplementedError - - async def amax_marginal_relevance_search( - self, - query: str, - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - **kwargs: Any, - ) -> List[Document]: - """Return docs selected using the maximal marginal relevance.""" - - # This is a temporary workaround to make the similarity search - # asynchronous. The proper solution is to make the similarity search - # asynchronous in the vector store implementations. - func = partial( - self.max_marginal_relevance_search, - query, - k=k, - fetch_k=fetch_k, - lambda_mult=lambda_mult, - **kwargs, - ) - return await asyncio.get_event_loop().run_in_executor(None, func) - - def max_marginal_relevance_search_by_vector( - self, - embedding: List[float], - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - **kwargs: Any, - ) -> List[Document]: - """Return docs selected using the maximal marginal relevance. - - Maximal marginal relevance optimizes for similarity to query AND diversity - among selected documents. - - Args: - embedding: Embedding to look up documents similar to. - k: Number of Documents to return. Defaults to 4. - fetch_k: Number of Documents to fetch to pass to MMR algorithm. - lambda_mult: Number between 0 and 1 that determines the degree - of diversity among the results with 0 corresponding - to maximum diversity and 1 to minimum diversity. - Defaults to 0.5. - Returns: - List of Documents selected by maximal marginal relevance. - """ - raise NotImplementedError - - async def amax_marginal_relevance_search_by_vector( - self, - embedding: List[float], - k: int = 4, - fetch_k: int = 20, - lambda_mult: float = 0.5, - **kwargs: Any, - ) -> List[Document]: - """Return docs selected using the maximal marginal relevance.""" - raise NotImplementedError - - @classmethod - def from_documents( - cls: Type[VST], - documents: List[Document], - embedding: Embeddings, - **kwargs: Any, - ) -> VST: - """Return VectorStore initialized from documents and embeddings.""" - texts = [d.page_content for d in documents] - metadatas = [d.metadata for d in documents] - return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs) - - @classmethod - async def afrom_documents( - cls: Type[VST], - documents: List[Document], - embedding: Embeddings, - **kwargs: Any, - ) -> VST: - """Return VectorStore initialized from documents and embeddings.""" - texts = [d.page_content for d in documents] - metadatas = [d.metadata for d in documents] - return await cls.afrom_texts(texts, embedding, metadatas=metadatas, **kwargs) - - @classmethod - @abstractmethod - def from_texts( - cls: Type[VST], - texts: List[str], - embedding: Embeddings, - metadatas: Optional[List[dict]] = None, - **kwargs: Any, - ) -> VST: - """Return VectorStore initialized from texts and embeddings.""" - - @classmethod - async def afrom_texts( - cls: Type[VST], - texts: List[str], - embedding: Embeddings, - metadatas: Optional[List[dict]] = None, - **kwargs: Any, - ) -> VST: - """Return VectorStore initialized from texts and embeddings.""" - raise NotImplementedError - - def _get_retriever_tags(self) -> List[str]: - """Get tags for retriever.""" - tags = [self.__class__.__name__] - if self.embeddings: - tags.append(self.embeddings.__class__.__name__) - return tags - - def as_retriever(self, **kwargs: Any) -> VectorStoreRetriever: - """Return VectorStoreRetriever initialized from this VectorStore. - - Args: - search_type (Optional[str]): Defines the type of search that - the Retriever should perform. - Can be "similarity" (default), "mmr", or - "similarity_score_threshold". - search_kwargs (Optional[Dict]): Keyword arguments to pass to the - search function. Can include things like: - k: Amount of documents to return (Default: 4) - score_threshold: Minimum relevance threshold - for similarity_score_threshold - fetch_k: Amount of documents to pass to MMR algorithm (Default: 20) - lambda_mult: Diversity of results returned by MMR; - 1 for minimum diversity and 0 for maximum. (Default: 0.5) - filter: Filter by document metadata - - Returns: - VectorStoreRetriever: Retriever class for VectorStore. - - Examples: - - .. code-block:: python - - # Retrieve more documents with higher diversity - # Useful if your dataset has many similar documents - docsearch.as_retriever( - search_type="mmr", - search_kwargs={'k': 6, 'lambda_mult': 0.25} - ) - - # Fetch more documents for the MMR algorithm to consider - # But only return the top 5 - docsearch.as_retriever( - search_type="mmr", - search_kwargs={'k': 5, 'fetch_k': 50} - ) - - # Only retrieve documents that have a relevance score - # Above a certain threshold - docsearch.as_retriever( - search_type="similarity_score_threshold", - search_kwargs={'score_threshold': 0.8} - ) - - # Only get the single most similar document from the dataset - docsearch.as_retriever(search_kwargs={'k': 1}) - - # Use a filter to only retrieve documents from a specific paper - docsearch.as_retriever( - search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}} - ) - """ - tags = kwargs.pop("tags", None) or [] - tags.extend(self._get_retriever_tags()) - - return VectorStoreRetriever(vectorstore=self, **kwargs, tags=tags) - - -class VectorStoreRetriever(BaseRetriever): - """Base Retriever class for VectorStore.""" - - vectorstore: VectorStore - """VectorStore to use for retrieval.""" - search_type: str = "similarity" - """Type of search to perform. Defaults to "similarity".""" - search_kwargs: dict = Field(default_factory=dict) - """Keyword arguments to pass to the search function.""" - allowed_search_types: ClassVar[Collection[str]] = ( - "similarity", - "similarity_score_threshold", - "mmr", - ) - - class Config: - """Configuration for this pydantic object.""" - - arbitrary_types_allowed = True - - @root_validator() - def validate_search_type(cls, values: Dict) -> Dict: - """Validate search type.""" - search_type = values["search_type"] - if search_type not in cls.allowed_search_types: - raise ValueError( - f"search_type of {search_type} not allowed. Valid values are: " - f"{cls.allowed_search_types}" - ) - if search_type == "similarity_score_threshold": - score_threshold = values["search_kwargs"].get("score_threshold") - if (score_threshold is None) or (not isinstance(score_threshold, float)): - raise ValueError( - "`score_threshold` is not specified with a float value(0~1) " - "in `search_kwargs`." - ) - return values - - def _get_relevant_documents( - self, query: str, *, run_manager: CallbackManagerForRetrieverRun - ) -> List[Document]: - if self.search_type == "similarity": - docs = self.vectorstore.similarity_search(query, **self.search_kwargs) - elif self.search_type == "similarity_score_threshold": - docs_and_similarities = ( - self.vectorstore.similarity_search_with_relevance_scores( - query, **self.search_kwargs - ) - ) - docs = [doc for doc, _ in docs_and_similarities] - elif self.search_type == "mmr": - docs = self.vectorstore.max_marginal_relevance_search( - query, **self.search_kwargs - ) - else: - raise ValueError(f"search_type of {self.search_type} not allowed.") - return docs - - async def _aget_relevant_documents( - self, query: str, *, run_manager: AsyncCallbackManagerForRetrieverRun - ) -> List[Document]: - if self.search_type == "similarity": - docs = await self.vectorstore.asimilarity_search( - query, **self.search_kwargs - ) - elif self.search_type == "similarity_score_threshold": - docs_and_similarities = ( - await self.vectorstore.asimilarity_search_with_relevance_scores( - query, **self.search_kwargs - ) - ) - docs = [doc for doc, _ in docs_and_similarities] - elif self.search_type == "mmr": - docs = await self.vectorstore.amax_marginal_relevance_search( - query, **self.search_kwargs - ) - else: - raise ValueError(f"search_type of {self.search_type} not allowed.") - return docs - - def add_documents(self, documents: List[Document], **kwargs: Any) -> List[str]: - """Add documents to vectorstore.""" - return self.vectorstore.add_documents(documents, **kwargs) - - async def aadd_documents( - self, documents: List[Document], **kwargs: Any - ) -> List[str]: - """Add documents to vectorstore.""" - return await self.vectorstore.aadd_documents(documents, **kwargs) - diff --git a/src/utils/__init__.py b/src/utils/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/utils/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/utils/aiter.py b/src/utils/aiter.py deleted file mode 100644 index 2c15e33a35e11cbb35f489b4b059f6dad93d508a..0000000000000000000000000000000000000000 --- a/src/utils/aiter.py +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -Adapted from -https://github.com/maxfischer2781/asyncstdlib/blob/master/asyncstdlib/itertools.py -MIT License -""" - -from collections import deque -from typing import ( - Any, - AsyncContextManager, - AsyncGenerator, - AsyncIterator, - Awaitable, - Callable, - Deque, - Generic, - Iterator, - List, - Optional, - Tuple, - TypeVar, - Union, - cast, - overload, -) - -T = TypeVar("T") - -_no_default = object() - - -# https://github.com/python/cpython/blob/main/Lib/test/test_asyncgen.py#L54 -# before 3.10, the builtin anext() was not available -def py_anext( - iterator: AsyncIterator[T], default: Union[T, Any] = _no_default -) -> Awaitable[Union[T, None, Any]]: - """Pure-Python implementation of anext() for testing purposes. - - Closely matches the builtin anext() C implementation. - Can be used to compare the built-in implementation of the inner - coroutines machinery to C-implementation of __anext__() and send() - or throw() on the returned generator. - """ - - try: - __anext__ = cast( - Callable[[AsyncIterator[T]], Awaitable[T]], type(iterator).__anext__ - ) - except AttributeError: - raise TypeError(f"{iterator!r} is not an async iterator") - - if default is _no_default: - return __anext__(iterator) - - async def anext_impl() -> Union[T, Any]: - try: - # The C code is way more low-level than this, as it implements - # all methods of the iterator protocol. In this implementation - # we're relying on higher-level coroutine concepts, but that's - # exactly what we want -- crosstest pure-Python high-level - # implementation and low-level C anext() iterators. - return await __anext__(iterator) - except StopAsyncIteration: - return default - - return anext_impl() - - -class NoLock: - """Dummy lock that provides the proper interface but no protection""" - - async def __aenter__(self) -> None: - pass - - async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> bool: - return False - - -async def tee_peer( - iterator: AsyncIterator[T], - # the buffer specific to this peer - buffer: Deque[T], - # the buffers of all peers, including our own - peers: List[Deque[T]], - lock: AsyncContextManager[Any], -) -> AsyncGenerator[T, None]: - """An individual iterator of a :py:func:`~.tee`""" - try: - while True: - if not buffer: - async with lock: - # Another peer produced an item while we were waiting for the lock. - # Proceed with the next loop iteration to yield the item. - if buffer: - continue - try: - item = await iterator.__anext__() - except StopAsyncIteration: - break - else: - # Append to all buffers, including our own. We'll fetch our - # item from the buffer again, instead of yielding it directly. - # This ensures the proper item ordering if any of our peers - # are fetching items concurrently. They may have buffered their - # item already. - for peer_buffer in peers: - peer_buffer.append(item) - yield buffer.popleft() - finally: - async with lock: - # this peer is done – remove its buffer - for idx, peer_buffer in enumerate(peers): # pragma: no branch - if peer_buffer is buffer: - peers.pop(idx) - break - # if we are the last peer, try and close the iterator - if not peers and hasattr(iterator, "aclose"): - await iterator.aclose() - - -class Tee(Generic[T]): - """ - Create ``n`` separate asynchronous iterators over ``iterable`` - - This splits a single ``iterable`` into multiple iterators, each providing - the same items in the same order. - All child iterators may advance separately but share the same items - from ``iterable`` -- when the most advanced iterator retrieves an item, - it is buffered until the least advanced iterator has yielded it as well. - A ``tee`` works lazily and can handle an infinite ``iterable``, provided - that all iterators advance. - - .. code-block:: python3 - - async def derivative(sensor_data): - previous, current = a.tee(sensor_data, n=2) - await a.anext(previous) # advance one iterator - return a.map(operator.sub, previous, current) - - Unlike :py:func:`itertools.tee`, :py:func:`~.tee` returns a custom type instead - of a :py:class:`tuple`. Like a tuple, it can be indexed, iterated and unpacked - to get the child iterators. In addition, its :py:meth:`~.tee.aclose` method - immediately closes all children, and it can be used in an ``async with`` context - for the same effect. - - If ``iterable`` is an iterator and read elsewhere, ``tee`` will *not* - provide these items. Also, ``tee`` must internally buffer each item until the - last iterator has yielded it; if the most and least advanced iterator differ - by most data, using a :py:class:`list` is more efficient (but not lazy). - - If the underlying iterable is concurrency safe (``anext`` may be awaited - concurrently) the resulting iterators are concurrency safe as well. Otherwise, - the iterators are safe if there is only ever one single "most advanced" iterator. - To enforce sequential use of ``anext``, provide a ``lock`` - - e.g. an :py:class:`asyncio.Lock` instance in an :py:mod:`asyncio` application - - and access is automatically synchronised. - """ - - def __init__( - self, - iterable: AsyncIterator[T], - n: int = 2, - *, - lock: Optional[AsyncContextManager[Any]] = None, - ): - self._iterator = iterable.__aiter__() # before 3.10 aiter() doesn't exist - self._buffers: List[Deque[T]] = [deque() for _ in range(n)] - self._children = tuple( - tee_peer( - iterator=self._iterator, - buffer=buffer, - peers=self._buffers, - lock=lock if lock is not None else NoLock(), - ) - for buffer in self._buffers - ) - - def __len__(self) -> int: - return len(self._children) - - @overload - def __getitem__(self, item: int) -> AsyncIterator[T]: - ... - - @overload - def __getitem__(self, item: slice) -> Tuple[AsyncIterator[T], ...]: - ... - - def __getitem__( - self, item: Union[int, slice] - ) -> Union[AsyncIterator[T], Tuple[AsyncIterator[T], ...]]: - return self._children[item] - - def __iter__(self) -> Iterator[AsyncIterator[T]]: - yield from self._children - - async def __aenter__(self) -> "Tee[T]": - return self - - async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> bool: - await self.aclose() - return False - - async def aclose(self) -> None: - for child in self._children: - await child.aclose() - - -atee = Tee - diff --git a/src/utils/file.py b/src/utils/file.py deleted file mode 100644 index 61d31de7ca625b4c747dd3401bbefd757a6ac91e..0000000000000000000000000000000000000000 --- a/src/utils/file.py +++ /dev/null @@ -1,40 +0,0 @@ -import hashlib - -from fastapi import UploadFile - - -def convert_bytes(bytes, precision=2): - """Converts bytes into a human-friendly format.""" - abbreviations = ["B", "KB", "MB"] - if bytes <= 0: - return "0 B" - size = bytes - index = 0 - while size >= 1024 and index < len(abbreviations) - 1: - size /= 1024 - index += 1 - return f"{size:.{precision}f} {abbreviations[index]}" - - -def get_file_size(file: UploadFile): - # move the cursor to the end of the file - file.file._file.seek(0, 2) # pyright: ignore reportPrivateUsage=none - file_size = ( - file.file._file.tell() # pyright: ignore reportPrivateUsage=none - ) # Getting the size of the file - # move the cursor back to the beginning of the file - file.file.seek(0) - - return file_size - - -def compute_sha1_from_file(file_path): - with open(file_path, "rb") as file: - bytes = file.read() - readable_hash = compute_sha1_from_content(bytes) - return readable_hash - - -def compute_sha1_from_content(content): - readable_hash = hashlib.sha1(content).hexdigest() - return readable_hash diff --git a/src/utils/file_parse.py b/src/utils/file_parse.py deleted file mode 100644 index 38116860510cebfa7c103e795e8e60627e3534c0..0000000000000000000000000000000000000000 --- a/src/utils/file_parse.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -import json -import os - -from FourthDimension.parser.docx_parser import parse_docx - - -def get_file_paths_and_names(folder_path): - if '.doc' in folder_path or '.docx' in folder_path or '.json' in folder_path: - return [(folder_path, os.path.basename(folder_path))] - else: - file_paths_and_names = [] - for root, dirs, files in os.walk(folder_path): - for file_name in files: - file_path = os.path.join(root, file_name) - file_paths_and_names.append((file_path, file_name)) - return file_paths_and_names - - -def get_all_docx_contexts(doc_path): - all_contexts = [] - file_paths_and_names = get_file_paths_and_names(doc_path) - for i, d in enumerate(file_paths_and_names): - file_path = d[0] - file_name = d[1] - document = parse_docx(file_path, file_name) - all_contexts.extend(document) - return all_contexts diff --git a/src/utils/input.py b/src/utils/input.py deleted file mode 100644 index 57ee836e869d07b45c505f019c6ea940bf17b4ca..0000000000000000000000000000000000000000 --- a/src/utils/input.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""Handle chained inputs.""" -from typing import Dict, List, Optional, TextIO - -_TEXT_COLOR_MAPPING = { - "blue": "36;1", - "yellow": "33;1", - "pink": "38;5;200", - "green": "32;1", - "red": "31;1", -} - - -def get_color_mapping( - items: List[str], excluded_colors: Optional[List] = None -) -> Dict[str, str]: - """Get mapping for items to a support color.""" - colors = list(_TEXT_COLOR_MAPPING.keys()) - if excluded_colors is not None: - colors = [c for c in colors if c not in excluded_colors] - color_mapping = {item: colors[i % len(colors)] for i, item in enumerate(items)} - return color_mapping - - -def get_colored_text(text: str, color: str) -> str: - """Get colored text.""" - color_str = _TEXT_COLOR_MAPPING[color] - return f"\u001b[{color_str}m\033[1;3m{text}\u001b[0m" - - -def get_bolded_text(text: str) -> str: - """Get bolded text.""" - return f"\033[1m{text}\033[0m" - - -def print_text( - text: str, color: Optional[str] = None, end: str = "", file: Optional[TextIO] = None -) -> None: - """Print text with highlighting and no end characters.""" - text_to_print = get_colored_text(text, color) if color else text - print(text_to_print, end=end, file=file) - if file: - file.flush() # ensure all printed content are written to file - diff --git a/src/utils/iter.py b/src/utils/iter.py deleted file mode 100644 index 88d472b0fcd8278b0afcc96adbd1336d2c96a9c1..0000000000000000000000000000000000000000 --- a/src/utils/iter.py +++ /dev/null @@ -1,186 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -from collections import deque -from itertools import islice -from typing import ( - Any, - ContextManager, - Deque, - Generator, - Generic, - Iterable, - Iterator, - List, - Optional, - Tuple, - TypeVar, - Union, - overload, -) - -from typing_extensions import Literal - -T = TypeVar("T") - - -class NoLock: - """Dummy lock that provides the proper interface but no protection""" - - def __enter__(self) -> None: - pass - - def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Literal[False]: - return False - - -def tee_peer( - iterator: Iterator[T], - # the buffer specific to this peer - buffer: Deque[T], - # the buffers of all peers, including our own - peers: List[Deque[T]], - lock: ContextManager[Any], -) -> Generator[T, None, None]: - """An individual iterator of a :py:func:`~.tee`""" - try: - while True: - if not buffer: - with lock: - # Another peer produced an item while we were waiting for the lock. - # Proceed with the next loop iteration to yield the item. - if buffer: - continue - try: - item = next(iterator) - except StopIteration: - break - else: - # Append to all buffers, including our own. We'll fetch our - # item from the buffer again, instead of yielding it directly. - # This ensures the proper item ordering if any of our peers - # are fetching items concurrently. They may have buffered their - # item already. - for peer_buffer in peers: - peer_buffer.append(item) - yield buffer.popleft() - finally: - with lock: - # this peer is done – remove its buffer - for idx, peer_buffer in enumerate(peers): # pragma: no branch - if peer_buffer is buffer: - peers.pop(idx) - break - # if we are the last peer, try and close the iterator - if not peers and hasattr(iterator, "close"): - iterator.close() - - -class Tee(Generic[T]): - """ - Create ``n`` separate asynchronous iterators over ``iterable`` - - This splits a single ``iterable`` into multiple iterators, each providing - the same items in the same order. - All child iterators may advance separately but share the same items - from ``iterable`` -- when the most advanced iterator retrieves an item, - it is buffered until the least advanced iterator has yielded it as well. - A ``tee`` works lazily and can handle an infinite ``iterable``, provided - that all iterators advance. - - .. code-block:: python3 - - async def derivative(sensor_data): - previous, current = a.tee(sensor_data, n=2) - await a.anext(previous) # advance one iterator - return a.map(operator.sub, previous, current) - - Unlike :py:func:`itertools.tee`, :py:func:`~.tee` returns a custom type instead - of a :py:class:`tuple`. Like a tuple, it can be indexed, iterated and unpacked - to get the child iterators. In addition, its :py:meth:`~.tee.aclose` method - immediately closes all children, and it can be used in an ``async with`` context - for the same effect. - - If ``iterable`` is an iterator and read elsewhere, ``tee`` will *not* - provide these items. Also, ``tee`` must internally buffer each item until the - last iterator has yielded it; if the most and least advanced iterator differ - by most data, using a :py:class:`list` is more efficient (but not lazy). - - If the underlying iterable is concurrency safe (``anext`` may be awaited - concurrently) the resulting iterators are concurrency safe as well. Otherwise, - the iterators are safe if there is only ever one single "most advanced" iterator. - To enforce sequential use of ``anext``, provide a ``lock`` - - e.g. an :py:class:`asyncio.Lock` instance in an :py:mod:`asyncio` application - - and access is automatically synchronised. - """ - - def __init__( - self, - iterable: Iterator[T], - n: int = 2, - *, - lock: Optional[ContextManager[Any]] = None, - ): - self._iterator = iter(iterable) - self._buffers: List[Deque[T]] = [deque() for _ in range(n)] - self._children = tuple( - tee_peer( - iterator=self._iterator, - buffer=buffer, - peers=self._buffers, - lock=lock if lock is not None else NoLock(), - ) - for buffer in self._buffers - ) - - def __len__(self) -> int: - return len(self._children) - - @overload - def __getitem__(self, item: int) -> Iterator[T]: - ... - - @overload - def __getitem__(self, item: slice) -> Tuple[Iterator[T], ...]: - ... - - def __getitem__( - self, item: Union[int, slice] - ) -> Union[Iterator[T], Tuple[Iterator[T], ...]]: - return self._children[item] - - def __iter__(self) -> Iterator[Iterator[T]]: - yield from self._children - - def __enter__(self) -> "Tee[T]": - return self - - def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Literal[False]: - self.close() - return False - - def close(self) -> None: - for child in self._children: - child.close() - - -# Why this is needed https://stackoverflow.com/a/44638570 -safetee = Tee - - -def batch_iterate(size: int, iterable: Iterable[T]) -> Iterator[List[T]]: - """Utility batching function.""" - it = iter(iterable) - while True: - chunk = list(islice(it, size)) - if not chunk: - return - yield chunk - diff --git a/src/utils/math.py b/src/utils/math.py deleted file mode 100644 index 77784ba2a491f3dfabf2d61e7baf75a9ee2cab23..0000000000000000000000000000000000000000 --- a/src/utils/math.py +++ /dev/null @@ -1,58 +0,0 @@ -"""Math utils.""" -from typing import List, Optional, Tuple, Union - -import numpy as np - -Matrix = Union[List[List[float]], List[np.ndarray], np.ndarray] - - -def cosine_similarity(X: Matrix, Y: Matrix) -> np.ndarray: - """Row-wise cosine similarity between two equal-width matrices.""" - if len(X) == 0 or len(Y) == 0: - return np.array([]) - X = np.array(X) - Y = np.array(Y) - if X.shape[1] != Y.shape[1]: - raise ValueError( - f"Number of columns in X and Y must be the same. X has shape {X.shape} " - f"and Y has shape {Y.shape}." - ) - - X_norm = np.linalg.norm(X, axis=1) - Y_norm = np.linalg.norm(Y, axis=1) - # Ignore divide by zero errors run time warnings as those are handled below. - with np.errstate(divide="ignore", invalid="ignore"): - similarity = np.dot(X, Y.T) / np.outer(X_norm, Y_norm) - similarity[np.isnan(similarity) | np.isinf(similarity)] = 0.0 - return similarity - - -def cosine_similarity_top_k( - X: Matrix, - Y: Matrix, - top_k: Optional[int] = 5, - score_threshold: Optional[float] = None, -) -> Tuple[List[Tuple[int, int]], List[float]]: - """Row-wise cosine similarity with optional top-k and score threshold filtering. - - Args: - X: Matrix. - Y: Matrix, same width as X. - top_k: Max number of results to return. - score_threshold: Minimum cosine similarity of results. - - Returns: - Tuple of two lists. First contains two-tuples of indices (X_idx, Y_idx), - second contains corresponding cosine similarities. - """ - if len(X) == 0 or len(Y) == 0: - return [], [] - score_array = cosine_similarity(X, Y) - score_threshold = score_threshold or -1.0 - score_array[score_array < score_threshold] = 0 - top_k = min(top_k or len(score_array), np.count_nonzero(score_array)) - top_k_idxs = np.argpartition(score_array, -top_k, axis=None)[-top_k:] - top_k_idxs = top_k_idxs[np.argsort(score_array.ravel()[top_k_idxs])][::-1] - ret_idxs = np.unravel_index(top_k_idxs, score_array.shape) - scores = score_array.ravel()[top_k_idxs].tolist() - return list(zip(*ret_idxs)), scores # type: ignore diff --git a/src/utils/mix_sort.py b/src/utils/mix_sort.py deleted file mode 100644 index c45d8ac6378c0f76445a5e845a458c6b3db5be2b..0000000000000000000000000000000000000000 --- a/src/utils/mix_sort.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" -from FourthDimension.utils.zutil import get_simi_score, chinese_segment -from FourthDimension.config.config import config_setting - -top_k = config_setting['recall_config']['top_k'] - - -def rerank(question, paras): - para_scores = [] - for i, para in enumerate(paras): - sents = chinese_segment(para) - sents_score = [] - for context in sents: - D = get_simi_score(question, context) - sents_score.append({ - 'sentence': context, - 'score': str(D[0][0]) - }) - result = [{k: float(v) if k == "score" else v for k, v in d.items()} for d in sents_score] - sorted_dict_list = sorted(result, key=lambda x: x['score']) - if len(sents) == 1: - score = sum(d["score"] for d in sorted_dict_list) / len(sents) - elif len(sents) == 2: - score = sorted_dict_list[0]["score"] * 0.7 + sorted_dict_list[1]["score"] - else: - score = sorted_dict_list[0]["score"] * 0.5 + sorted_dict_list[1]["score"] * 0.3 + sorted_dict_list[2][ - "score"] * 0.2 - para_scores.append([i, score]) - sorted_para = sorted(para_scores, key=lambda x: x[1]) - paras_rerank_index = [] - for i in range(len(sorted_para)): - paras_rerank_index.append(sorted_para[i][0]) - rerank_contexts = [] - for i, d in enumerate(paras_rerank_index): - rerank_contexts.append(paras[d]) - return rerank_contexts diff --git a/src/utils/upload_file.py b/src/utils/upload_file.py deleted file mode 100644 index bacfa4a4a265ce329820cd354e28b20726bfd26a..0000000000000000000000000000000000000000 --- a/src/utils/upload_file.py +++ /dev/null @@ -1,35 +0,0 @@ -import json -from FourthDimension.doc.pydantic import Field -from FourthDimension.doc.document import Document - - -class DocumentSerializable(Document): - """Class for storing a piece of text and associated metadata.""" - - page_content: str - metadata: dict = Field(default_factory=dict) - - @property - def lc_serializable(self) -> bool: - return True - - def __repr__(self): - return f"Document(page_content='{self.page_content[:50]}...', metadata={self.metadata})" - - def __str__(self): - return self.__repr__() - - def to_json(self) -> str: - """Convert the Document object to a JSON string.""" - return json.dumps( - { - "page_content": self.page_content, - "metadata": self.metadata, - } - ) - - @classmethod - def from_json(cls, json_str: str): - """Create a Document object from a JSON string.""" - data = json.loads(json_str) - return cls(page_content=data["page_content"], metadata=data["metadata"]) diff --git a/src/utils/utils.py b/src/utils/utils.py deleted file mode 100644 index 5f1d0615f6ad7b708e13049c0160a2c227fd9b95..0000000000000000000000000000000000000000 --- a/src/utils/utils.py +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -"""Generic utility functions.""" -import contextlib -import datetime -import functools -import importlib -import warnings -from importlib.metadata import version -from typing import Any, Callable, Dict, Optional, Set, Tuple - -from packaging.version import parse -from requests import HTTPError, Response - - -def xor_args(*arg_groups: Tuple[str, ...]) -> Callable: - """Validate specified keyword args are mutually exclusive.""" - - def decorator(func: Callable) -> Callable: - @functools.wraps(func) - def wrapper(*args: Any, **kwargs: Any) -> Any: - """Validate exactly one arg in each group is not None.""" - counts = [ - sum(1 for arg in arg_group if kwargs.get(arg) is not None) - for arg_group in arg_groups - ] - invalid_groups = [i for i, count in enumerate(counts) if count != 1] - if invalid_groups: - invalid_group_names = [", ".join(arg_groups[i]) for i in invalid_groups] - raise ValueError( - "Exactly one argument in each of the following" - " groups must be defined:" - f" {', '.join(invalid_group_names)}" - ) - return func(*args, **kwargs) - - return wrapper - - return decorator - - -def raise_for_status_with_text(response: Response) -> None: - """Raise an error with the response text.""" - try: - response.raise_for_status() - except HTTPError as e: - raise ValueError(response.text) from e - - -@contextlib.contextmanager -def mock_now(dt_value): # type: ignore - """Context manager for mocking out datetime.now() in unit tests. - - Example: - with mock_now(datetime.datetime(2011, 2, 3, 10, 11)): - assert datetime.datetime.now() == datetime.datetime(2011, 2, 3, 10, 11) - """ - - class MockDateTime(datetime.datetime): - """Mock datetime.datetime.now() with a fixed datetime.""" - - @classmethod - def now(cls): # type: ignore - # Create a copy of dt_value. - return datetime.datetime( - dt_value.year, - dt_value.month, - dt_value.day, - dt_value.hour, - dt_value.minute, - dt_value.second, - dt_value.microsecond, - dt_value.tzinfo, - ) - - real_datetime = datetime.datetime - datetime.datetime = MockDateTime - try: - yield datetime.datetime - finally: - datetime.datetime = real_datetime - - -def guard_import( - module_name: str, *, pip_name: Optional[str] = None, package: Optional[str] = None -) -> Any: - """Dynamically imports a module and raises a helpful exception if the module is not - installed.""" - try: - module = importlib.import_module(module_name, package) - except ImportError: - raise ImportError( - f"Could not import {module_name} python package. " - f"Please install it with `pip install {pip_name or module_name}`." - ) - return module - - -def check_package_version( - package: str, - lt_version: Optional[str] = None, - lte_version: Optional[str] = None, - gt_version: Optional[str] = None, - gte_version: Optional[str] = None, -) -> None: - """Check the version of a package.""" - imported_version = parse(version(package)) - if lt_version is not None and imported_version >= parse(lt_version): - raise ValueError( - f"Expected {package} version to be < {lt_version}. Received " - f"{imported_version}." - ) - if lte_version is not None and imported_version > parse(lte_version): - raise ValueError( - f"Expected {package} version to be <= {lte_version}. Received " - f"{imported_version}." - ) - if gt_version is not None and imported_version <= parse(gt_version): - raise ValueError( - f"Expected {package} version to be > {gt_version}. Received " - f"{imported_version}." - ) - if gte_version is not None and imported_version < parse(gte_version): - raise ValueError( - f"Expected {package} version to be >= {gte_version}. Received " - f"{imported_version}." - ) - - -def get_pydantic_field_names(pydantic_cls: Any) -> Set[str]: - """Get field names, including aliases, for a pydantic class. - - Args: - pydantic_cls: Pydantic class.""" - all_required_field_names = set() - for field in pydantic_cls.__fields__.values(): - all_required_field_names.add(field.name) - if field.has_alias: - all_required_field_names.add(field.alias) - return all_required_field_names - - -def build_extra_kwargs( - extra_kwargs: Dict[str, Any], - values: Dict[str, Any], - all_required_field_names: Set[str], -) -> Dict[str, Any]: - """Build extra kwargs from values and extra_kwargs. - - Args: - extra_kwargs: Extra kwargs passed in by user. - values: Values passed in by user. - all_required_field_names: All required field names for the pydantic class. - """ - for field_name in list(values): - if field_name in extra_kwargs: - raise ValueError(f"Found {field_name} supplied twice.") - if field_name not in all_required_field_names: - warnings.warn( - f"""WARNING! {field_name} is not default parameter. - {field_name} was transferred to model_kwargs. - Please confirm that {field_name} is what you intended.""" - ) - extra_kwargs[field_name] = values.pop(field_name) - - invalid_model_kwargs = all_required_field_names.intersection(extra_kwargs.keys()) - if invalid_model_kwargs: - raise ValueError( - f"Parameters {invalid_model_kwargs} should be specified explicitly. " - f"Instead they were passed in as part of `model_kwargs` parameter." - ) - - return extra_kwargs - diff --git a/src/utils/zutil.py b/src/utils/zutil.py deleted file mode 100644 index d66b755b369bbf2b3734a2f2cbff275d7e97d9f2..0000000000000000000000000000000000000000 --- a/src/utils/zutil.py +++ /dev/null @@ -1,49 +0,0 @@ -import json -from typing import Union -import faiss -import jieba -import numpy as np -from FourthDimension.config.config import embedding_model - - -def load_json(path): - with open(path, "r", encoding="utf-8") as f: - data = json.load(f) - f.close() - return data - - -def write_json(path, data): - with open(path, "w", encoding="utf-8") as f: - json_data = json.dumps(data, ensure_ascii=False, indent=4) - f.write(json_data) - f.close() - - -def chinese_segment(text): - sentences = [] - seg_list = jieba.cut(text, cut_all=False) - sentence = [] - for word in seg_list: - sentence.append(word) - if word in ['。', '?', '!']: - sentences.append("".join(sentence)) - sentence = [] - if sentence: - sentences.append("".join(sentence)) - return sentences - -def index_search(query_embed, context_embed): - contexts_embeddings = np.array([context_embed]).astype("float32") - index = faiss.IndexFlatL2(contexts_embeddings.shape[1]) # 创建Faiss索引 - index.add(contexts_embeddings) - query_embedding = np.array([query_embed]).astype("float32") - D, I = index.search(query_embedding, 1) - return D - - -def get_simi_score(question, context): - query_embed = embedding_model.embed_query(question) - contexts_embed = embedding_model.embed_query(context) - D = index_search(query_embed=query_embed, context_embed=contexts_embed) - return D diff --git a/src/vectorstores/__init__.py b/src/vectorstores/__init__.py deleted file mode 100644 index 51f60e14f73289f4dc1e5eb3902931ad8ee7258d..0000000000000000000000000000000000000000 --- a/src/vectorstores/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh - - -""" -文件说明: -""" - -if __name__ == '__main__': - exit(0) diff --git a/src/vectorstores/utils.py b/src/vectorstores/utils.py deleted file mode 100644 index 599a5567503fe182f4b017e34a715bfcebb54fde..0000000000000000000000000000000000000000 --- a/src/vectorstores/utils.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# @Time : -# @Author : wgh -from enum import Enum -from typing import List - -import numpy as np - -from FourthDimension.utils.math import cosine_similarity - - -class DistanceStrategy(str, Enum): - """Enumerator of the Distance strategies for calculating distances - between vectors.""" - - EUCLIDEAN_DISTANCE = "EUCLIDEAN_DISTANCE" - MAX_INNER_PRODUCT = "MAX_INNER_PRODUCT" - DOT_PRODUCT = "DOT_PRODUCT" - JACCARD = "JACCARD" - COSINE = "COSINE" - - -def maximal_marginal_relevance( - query_embedding: np.ndarray, - embedding_list: list, - lambda_mult: float = 0.5, - k: int = 4, -) -> List[int]: - """Calculate maximal marginal relevance.""" - if min(k, len(embedding_list)) <= 0: - return [] - if query_embedding.ndim == 1: - query_embedding = np.expand_dims(query_embedding, axis=0) - similarity_to_query = cosine_similarity(query_embedding, embedding_list)[0] - most_similar = int(np.argmax(similarity_to_query)) - idxs = [most_similar] - selected = np.array([embedding_list[most_similar]]) - while len(idxs) < min(k, len(embedding_list)): - best_score = -np.inf - idx_to_add = -1 - similarity_to_selected = cosine_similarity(embedding_list, selected) - for i, query_score in enumerate(similarity_to_query): - if i in idxs: - continue - redundant_score = max(similarity_to_selected[i]) - equation_score = ( - lambda_mult * query_score - (1 - lambda_mult) * redundant_score - ) - if equation_score > best_score: - best_score = equation_score - idx_to_add = i - idxs.append(idx_to_add) - selected = np.append(selected, [embedding_list[idx_to_add]], axis=0) - return idxs