├── test ├── data │ ├── arrayget.json │ ├── arraydelete.json │ ├── updatepost.json │ ├── dropindexspec.json │ ├── putcreate.json │ ├── putreplace.json │ ├── java.flv │ ├── oracle.jpg │ ├── createtextindex.json │ ├── colspec.json │ ├── createfuncindex.json │ ├── arrayinsert.json │ ├── createcollection.json │ └── getaccount.txt ├── datasource.properties ├── ant │ ├── init.sql │ ├── sql.xml │ └── sodatestsetup.sql ├── src │ └── oracle │ │ └── json │ │ ├── testharness │ │ ├── JsonTestCase.java │ │ ├── SodaUtils.java │ │ └── ConnectionFactory.java │ │ └── tests │ │ └── soda │ │ ├── test_SodaDependencies.java │ │ └── test_TimestampToString.java └── json.xml ├── lib └── README ├── orajsoda └── src │ └── main │ ├── java │ └── oracle │ │ ├── soda │ │ ├── rdbms │ │ │ ├── package-info.java │ │ │ └── impl │ │ │ │ ├── SQLTextCarrier.java │ │ │ │ ├── SODAConstants.java │ │ │ │ ├── cache │ │ │ │ ├── DescriptorCache.java │ │ │ │ ├── LRUCache.java │ │ │ │ ├── CacheOfDescriptorCaches.java │ │ │ │ ├── SynchronizedDescriptorCache.java │ │ │ │ ├── SynchronizedCacheOfDescriptorCaches.java │ │ │ │ ├── ConcurrentCacheOfDescriptorCaches.java │ │ │ │ └── ConcurrentDescriptorCache.java │ │ │ │ ├── WriteResult.java │ │ │ │ ├── WriteResultImpl.java │ │ │ │ ├── OracleDocumentFragmentImpl.java │ │ │ │ └── Operation.java │ │ ├── package-info.java │ │ ├── OracleDropResult.java │ │ ├── OracleDatabase.java │ │ ├── OracleCursor.java │ │ ├── overview.html │ │ ├── OracleClient.java │ │ └── OracleBatchException.java │ │ └── json │ │ ├── util │ │ ├── Pair.java │ │ ├── MimeTypeLookup.java │ │ └── LimitedInputStream.java │ │ ├── parser │ │ ├── JsonPath.java │ │ ├── ContainsClause.java │ │ ├── QueryException.java │ │ ├── Predicate.java │ │ ├── OrderBySpecification.java │ │ ├── ValueTypePair.java │ │ ├── SpatialClause.java │ │ └── IndexColumn.java │ │ ├── logging │ │ └── OracleLog.java │ │ └── common │ │ ├── Message.java │ │ └── SharedServices.java │ └── resources │ ├── oracle │ └── json │ │ ├── impl │ │ └── binary │ │ │ └── ExceptionMessages.properties │ │ ├── common │ │ ├── Messages.properties │ │ ├── Messages_da.properties │ │ ├── Messages_no.properties │ │ ├── Messages_nl.properties │ │ ├── Messages_sv.properties │ │ ├── Messages_it.properties │ │ ├── Messages_fi.properties │ │ ├── Messages_de.properties │ │ ├── Messages_es.properties │ │ ├── Messages_fr.properties │ │ ├── Messages_ro.properties │ │ ├── Messages_pt.properties │ │ ├── Messages_pt_BR.properties │ │ ├── Messages_pl.properties │ │ ├── Messages_sk.properties │ │ ├── Messages_zh_TW.properties │ │ ├── Messages_tr.properties │ │ ├── Messages_hu.properties │ │ ├── Messages_cs.properties │ │ └── Messages_zh_CN.properties │ │ └── rdbms │ │ ├── Messages.properties │ │ ├── Messages_no.properties │ │ ├── Messages_da.properties │ │ ├── Messages_sv.properties │ │ ├── Messages_it.properties │ │ ├── Messages_fi.properties │ │ ├── Messages_nl.properties │ │ ├── Messages_de.properties │ │ ├── Messages_pt_BR.properties │ │ ├── Messages_cs.properties │ │ ├── Messages_tr.properties │ │ ├── Messages_fr.properties │ │ ├── Messages_pl.properties │ │ ├── Messages_ro.properties │ │ ├── Messages_pt.properties │ │ ├── Messages_es.properties │ │ ├── Messages_sk.properties │ │ ├── Messages_zh_CN.properties │ │ ├── Messages_zh_TW.properties │ │ ├── Messages_hu.properties │ │ └── Messages_ko.properties │ └── META-INF │ └── LICENSE.txt ├── doc └── Building-source-code.md ├── SECURITY.md ├── CONTRIBUTING.md └── LICENSE.txt /test/data/arrayget.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id":["2", "3"] 3 | } -------------------------------------------------------------------------------- /test/data/arraydelete.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id":["4", "6", "8"] 3 | } -------------------------------------------------------------------------------- /test/data/updatepost.json: -------------------------------------------------------------------------------- 1 | { 2 | "what":"JUnit Update by post" 3 | } -------------------------------------------------------------------------------- /test/data/dropindexspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "jUnitIndex" 3 | } 4 | -------------------------------------------------------------------------------- /test/data/putcreate.json: -------------------------------------------------------------------------------- 1 | { 2 | "field":"JUnit created by post" 3 | } -------------------------------------------------------------------------------- /test/data/putreplace.json: -------------------------------------------------------------------------------- 1 | { 2 | "field":"jUnitCollection replaced by post" 3 | } -------------------------------------------------------------------------------- /test/data/java.flv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/soda-for-java/HEAD/test/data/java.flv -------------------------------------------------------------------------------- /test/data/oracle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/soda-for-java/HEAD/test/data/oracle.jpg -------------------------------------------------------------------------------- /test/data/createtextindex.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "jUnitIndex", 3 | "language" : "german" 4 | } 5 | -------------------------------------------------------------------------------- /lib/README: -------------------------------------------------------------------------------- 1 | This directory is used by the build to store SODA dependencies and the generated SODA jar 2 | -------------------------------------------------------------------------------- /test/datasource.properties: -------------------------------------------------------------------------------- 1 | UserName=account 2 | Password=password 3 | Server=oracleHost 4 | Port=oraclePort 5 | DBName=oracleServiceName 6 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains RDBMS-specific SODA interfaces and classes. 3 | *

4 | * These are used by the Oracle RDBMS-based implementation. 5 | *

6 | */ 7 | package oracle.soda.rdbms; 8 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the core SODA interfaces and classes. 3 | *

4 | * These are designed to be implementable across various Oracle 5 | * data stores. 6 | *

7 | */ 8 | package oracle.soda; 9 | -------------------------------------------------------------------------------- /test/data/colspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "tableName" : "col", 3 | "keyColumn" : 4 | { 5 | "name" : "ID", 6 | "assignmentMethod" : "CLIENT", 7 | "sqlType": "NUMBER" 8 | }, 9 | "versionColumn" : 10 | { 11 | "name" : "VERSION_NUM", 12 | "method" : "SEQUENTIAL" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/data/createfuncindex.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "jUnitIndex", 3 | "lax" : true, 4 | "fields": 5 | [ 6 | { "path" : "name.surname", 7 | "datatype" : "string", 8 | "maxLength" : 100, 9 | "order" : "asc" 10 | }, 11 | { "path" : "city.zip", 12 | "datatype" : "number", 13 | "order" : "desc" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /test/data/arrayinsert.json: -------------------------------------------------------------------------------- 1 | [ 2 | [ 3 | { 4 | "name": "Project", 5 | "product":"RestAPI" 6 | } 7 | ], 8 | 9 | { 10 | "name": "Rahul", 11 | "product":"Text" 12 | }, 13 | { 14 | "name": "Doug", 15 | "company":"Oracle" 16 | }, 17 | 18 | [ 19 | { 20 | "projname": "SDATA", 21 | "year":"2010" 22 | }, 23 | { 24 | "projname": "Lexer", 25 | "year":"2011", 26 | "month":"December" 27 | }, 28 | { 29 | "company": "Oracle America Inc" 30 | } 31 | ] 32 | ] 33 | -------------------------------------------------------------------------------- /test/data/createcollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "tableName" : "JUNIT", 3 | "contentColumn" : 4 | { 5 | "name" : "JUNIT_DOC", 6 | "sqlType" : "varchar2" 7 | }, 8 | "keyColumn" : 9 | { 10 | "name" : "JUNIT_ID", 11 | "sqlType" : "number", 12 | "assignmentMethod" : "sequence", 13 | "sequenceName" : "JUNIT_SEQ1" 14 | }, 15 | "lastModifiedColumn" : { 16 | "name" : "LAST_UPDATED" 17 | }, 18 | "versionColumn" : { 19 | "name" : "CHECKSUM", 20 | "method" : "SHA256" 21 | } 22 | } -------------------------------------------------------------------------------- /test/data/getaccount.txt: -------------------------------------------------------------------------------- 1 | {"collections":[{"name":"VersionMethod","table":"MYEMP"},{"name":"VersionMethodNew","table":"newVersionMethod"},{"name":"VersionMethodNewNew","table":"newnewtable"},{"name":"doug_random","table":"DOUG_RANDOM"},{"name":"employees","table":"EMPLOYEES"},{"name":"foo_bar","table":"FOO_BAR"},{"name":"het9","table":"het9"},{"name":"heterogeneous","table":"heterogeneous_table"},{"name":"max_stuff","table":"MAX_STUFF"},{"name":"plsql","table":"TEST_LIST_PKG"},{"name":"rahul","table":"createdbyPOST"},{"name":"rahuldebug","table":"rahuldebug"},{"name":"vmethodX","table":"vmethodX"}],"more":false} -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/SQLTextCarrier.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Provides access to the SQL String. Used for generating exceptions 7 | that have a SQL String attached. 8 | */ 9 | 10 | /** 11 | * This class is not part of the public API, and is 12 | * subject to change. 13 | * 14 | * Do not rely on it in your application code. 15 | * 16 | * @author Max Orgiyan 17 | */ 18 | 19 | package oracle.soda.rdbms.impl; 20 | 21 | public interface SQLTextCarrier 22 | { 23 | public String getSQL(); 24 | } 25 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/util/Pair.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2024, Oracle and/or its affiliates.*/ 2 | 3 | /* 4 | DESCRIPTION 5 | Pair of objects 6 | */ 7 | 8 | /** 9 | * This class is not part of the public API, and is 10 | * subject to change. 11 | * 12 | * Do not rely on it in your application code. 13 | * 14 | * @author Max Orgiyan 15 | */ 16 | 17 | package oracle.json.util; 18 | 19 | public class Pair { 20 | 21 | // First object in a pair 22 | private final F f; 23 | 24 | // Second object in a pair 25 | private final S s; 26 | 27 | public Pair(F f, S s) { 28 | this.f = f; 29 | this.s = s; 30 | } 31 | 32 | public F getFirst() { 33 | return f; 34 | } 35 | 36 | public S getSecond() { 37 | return s; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/SODAConstants.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.*/ 2 | 3 | /* 4 | DESCRIPTION 5 | Various SODA constants. Each one of these is used 6 | by multiple SODA classes, so they are centralized here. 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Max Orgiyan 16 | * @author Doug McMahon 17 | */ 18 | 19 | package oracle.soda.rdbms.impl; 20 | 21 | final class SODAConstants 22 | { 23 | static final int BATCH_FETCH_SIZE = 1000; 24 | static final int LOB_PREFETCH_SIZE = 65000; 25 | static final int SQL_STATEMENT_SIZE = 1000; 26 | 27 | // Private, so that this class can't be instantiated 28 | private SODAConstants() {}; 29 | } 30 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/OracleDropResult.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2016, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | package oracle.soda; 5 | 6 | 7 | /** 8 | * Holds the collection name that could not be dropped, 9 | * and the error encountered when attempting to drop this collection. 10 | *

11 | * An array of OracleDropResult objects is 12 | * returned by {@link OracleDatabaseAdmin#dropCollections(boolean)}. 13 | */ 14 | public interface OracleDropResult 15 | { 16 | /** 17 | * Gets the name of the collection that could not be dropped. 18 | * 19 | * @return collection name as a String 20 | */ 21 | public String getName(); 22 | 23 | /** 24 | * Gets the error encountered when attempting to drop the collection. 25 | * 26 | * @return error as a String 27 | */ 28 | public String getError(); 29 | } 30 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/util/MimeTypeLookup.java: -------------------------------------------------------------------------------- 1 | /* $Header: xdk/src/java/json/orajsoda/src/main/java/oracle/json/util/MimeTypeLookup.java /st_xdk_soda1/2 2024/08/02 02:37:36 vemahaja Exp $ */ 2 | 3 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates.*/ 4 | 5 | /* 6 | DESCRIPTION 7 | Interface providing access to a conversion function that can select 8 | a mime type based on the file name (extension). 9 | 10 | PRIVATE CLASSES 11 | 12 | NOTES 13 | 14 | MODIFIED (MM/DD/YY) 15 | dmcmahon 06/17/14 - Creation 16 | */ 17 | 18 | /** 19 | * @version $Header: xdk/src/java/json/orajsoda/src/main/java/oracle/json/util/MimeTypeLookup.java /st_xdk_soda1/2 2024/08/02 02:37:36 vemahaja Exp $ 20 | * @author dmcmahon 21 | * @since release specific (what release of product did this appear in) 22 | */ 23 | 24 | package oracle.json.util; 25 | 26 | public interface MimeTypeLookup 27 | { 28 | public String getMimeType(String fileName); 29 | } 30 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/JsonPath.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | This allows a path to be specified as a series of string member name steps. 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Doug McMahon 16 | */ 17 | 18 | package oracle.json.parser; 19 | 20 | import java.util.List; 21 | 22 | public class JsonPath 23 | { 24 | protected String[] steps; 25 | 26 | public JsonPath(String step) 27 | { 28 | steps = new String[1]; 29 | steps[0] = step; 30 | } 31 | 32 | public JsonPath(String[] steps) 33 | { 34 | this.steps = steps; 35 | } 36 | 37 | public JsonPath(List steps) 38 | { 39 | this.steps = steps.toArray(new String[steps.size()]); 40 | } 41 | 42 | public String[] getSteps() 43 | { 44 | return(steps); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/ant/init.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Creates tablespace for tests with ASSM enabled 4 | DROP TABLESPACE tbs_txjjson 5 | INCLUDING CONTENTS AND DATAFILES 6 | CASCADE CONSTRAINTS; 7 | 8 | -- testLargeConent() in test_OracleDocument2.java tested 100M doc 9 | -- so big datafile size is needed 10 | CREATE TABLESPACE tbs_txjjson 11 | DATAFILE 'tbs_txjjson.dbf' SIZE 200M 12 | EXTENT MANAGEMENT LOCAL 13 | SEGMENT SPACE MANAGEMENT AUTO; 14 | 15 | ALTER USER MYACCOUNT QUOTA UNLIMITED ON tbs_txjjson; 16 | ALTER USER MYACCOUNT default tablespace tbs_txjjson; 17 | 18 | -- Grant necessary privileges to the account used 19 | -- by the tests 20 | grant SODA_APP to MYACCOUNT; 21 | grant CREATE VIEW to MYACCOUNT; 22 | grant CREATE TABLE to MYACCOUNT; 23 | grant CREATE SEQUENCE to MYACCOUNT; 24 | grant CREATE PROCEDURE to MYACCOUNT; 25 | grant CREATE TRIGGER to MYACCOUNT; 26 | 27 | -- check db char set 28 | SELECT value FROM nls_database_parameters WHERE parameter='NLS_CHARACTERSET'; 29 | 30 | -- check encryption wallet info 31 | select * from V$ENCRYPTION_WALLET; 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/ant/sql.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/DescriptorCache.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Cache of collection descriptors for a particular account 7 | (i.e. Oracle schema), that can be shared among different 8 | threads. 9 | 10 | */ 11 | 12 | package oracle.soda.rdbms.impl.cache; 13 | 14 | import oracle.soda.rdbms.impl.CollectionDescriptor; 15 | 16 | /** 17 | * This class is not part of the public API, and is 18 | * subject to change. 19 | * 20 | * Do not rely on it in your application code. 21 | * 22 | * @author Doug McMahon 23 | * @author Max Orgiyan 24 | */ 25 | 26 | public interface DescriptorCache 27 | { 28 | public CollectionDescriptor get(String collectionName); 29 | 30 | public CollectionDescriptor putIfAbsent(CollectionDescriptor desc); 31 | 32 | public CollectionDescriptor put(CollectionDescriptor desc); 33 | 34 | public boolean containsDescriptor(String collectionName); 35 | 36 | public void remove(String collectionName); 37 | 38 | public void clear(); 39 | } 40 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/LRUCache.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.*/ 2 | 3 | /* 4 | DESCRIPTION 5 | LRU cache based on LinkedHashMap. Not thread safe. 6 | */ 7 | 8 | /** 9 | * This class is not part of the public API, and is 10 | * subject to change. 11 | * 12 | * Do not rely on it in your application code. 13 | * 14 | * @author Max Orgiyan 15 | */ 16 | package oracle.soda.rdbms.impl.cache; 17 | 18 | import java.util.LinkedHashMap; 19 | import java.util.Map; 20 | 21 | public class LRUCache extends LinkedHashMap { 22 | private int numberOfEntries; 23 | 24 | public LRUCache(int numberOfEntries) { 25 | // Use the default HashMap initial capacity (16) and load factor (0.75). 26 | // The last parameter is 'true', which forces access ordering, 27 | // as opposed to insertion ordering. This makes the cache LRU. 28 | super(16, 0.75f, true); 29 | this.numberOfEntries = numberOfEntries; 30 | } 31 | 32 | protected boolean removeEldestEntry(Map.Entry eldest) { 33 | return size() >= numberOfEntries; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/WriteResult.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2018, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | 7 | Represents result of a write operation. 8 | 9 | ### Currently resides under oracle/soda/rdbms/impl, not 10 | part of a public interface. If methods using it become 11 | public in the future, will need to be moved to 12 | oracle/soda. Currently there's no plan to make these 13 | methods public though. 14 | */ 15 | 16 | /** 17 | * This class is not part of the public API, and is 18 | * subject to change. 19 | * 20 | * Do not rely on it in your application code. 21 | * 22 | * @author Max Orgiyan 23 | */ 24 | package oracle.soda.rdbms.impl; 25 | 26 | public interface WriteResult { 27 | /** 28 | * Returns total number of documents processed 29 | * by the operation. 30 | * 31 | * @return total number of documents processed 32 | */ 33 | long getProcessedCount(); 34 | 35 | /** 36 | * Returns number of documents processed successfully 37 | * by the operation. 38 | * 39 | * @return total number of documents processed successfully 40 | */ 41 | long getSuccessfulCount(); 42 | } 43 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/impl/binary/ExceptionMessages.properties: -------------------------------------------------------------------------------- 1 | 2 | # JSON exceptions 3 | 1000=An i/o exception occurred 4 | 1001=The year "{0}" is not supported 5 | 1002=Overflow, value too large: {0} 6 | 1003=Unsupported option (not implemented) 7 | 1004=Binary JSON is invalid or corrupt 8 | 1005=Unsupported binary JSON version: {0} 9 | 1006=The UTF-8 encoded key length must not be greater than 256. The following key exceeds this limit: "{0}" 10 | 1007=The specified JSON is too large to be encoded as binary JSON. The encoded images size must not exceed 2GB 11 | 1008=Binary JSON is invalid or corrupt. Specified image only contains {0} bytes 12 | 1009=The specified java.time.Period has days set but the Oracle year to month interval does not support days 13 | 14 | # Generation exceptions 15 | 2001=Generator closed before before end 16 | 2002=An object key must be specified in this context 17 | 2003=Invalid write. A complete value has already been written 18 | 2004=End not allowed in this context 19 | 2005=Key not allowed in this context 20 | 2006=Expected value after key 21 | 22 | # IllegalStateException 23 | 3001=Parser state must be {0} 24 | 3002=Parser state must be {0}, {1}, or {2} 25 | 3003=Parser must be on a value -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/WriteResultImpl.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.*/ 2 | 3 | /* 4 | DESCRIPTION 5 | 6 | Implements WriteResult 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Max Orgiyan 16 | */ 17 | package oracle.soda.rdbms.impl; 18 | 19 | class WriteResultImpl implements WriteResult { 20 | 21 | final long processed; 22 | final long successful; 23 | 24 | WriteResultImpl(long processed, long successful) { 25 | this.processed = processed; 26 | this.successful = successful; 27 | } 28 | 29 | /** 30 | * Returns total number of documents processed 31 | * by the operation. 32 | * 33 | * @return total number of documents processed 34 | */ 35 | public long getProcessedCount() { 36 | return processed; 37 | } 38 | 39 | /** 40 | * Returns number of documents processed successfully 41 | * by the operation. 42 | * 43 | * @return total number of documents processed successfully 44 | */ 45 | public long getSuccessfulCount() { 46 | return successful; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /doc/Building-source-code.md: -------------------------------------------------------------------------------- 1 | # Building the source code 2 | 3 | SODA is built using Maven. Make sure you have Apache Maven 3.6.2 or above installed and configured. 4 | 5 | The following instructions require setting various environment variables. They assume you're on Linux, and using the C Shell (csh). On other OSes, you would set environment variables analogously, using a mechanism appropriate for your specific operating system. 6 | 7 | Set the JAVA_HOME environment variable to the JDK install directory. At a minimum, JDK 8 is required. For example, assuming you are using JDK 8 installed under /jdk8, and you're using the C Shell (csh) on Linux, do: 8 | 9 | setenv JAVA_HOME /jdk8 10 | 11 | ### Building with Maven 12 | 13 | `cd soda-for-java`\ 14 | `mvn clean install` 15 | 16 | If you're behind a firewall, you might need to set the proxy host and port 17 | number. For example, assuming your proxy host is myproxy.mycompany.com and the port is 80, do: 18 | 19 | `mvn clean install -Dhttp.proxyHost=myproxy.mycompany.com -Dhttp.proxyPort=80 -Dhttps.proxyHost=myproxy.mycompany.com -Dhttps.proxyPort=80` 20 | 21 | If the build is successful, you should see orajsoda.jar (the SODA jar) and other dependency jars in the /lib directory under the top SODA directory. 22 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/CacheOfDescriptorCaches.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | This a cache of DescriptorCache caches, each 7 | corresponding to an account (i.e. Oracle schema). This cache is 8 | thread-safe, and can be shared across threads. 9 | 10 | Thread safety is achieved by controlling access to the 11 | non-thread-safe LRUCache via synchronized methods of this class. 12 | 13 | */ 14 | 15 | /** 16 | * This class is not part of the public API, and is 17 | * subject to change. 18 | * 19 | * Do not rely on it in your application code. 20 | * 21 | * @author Doug McMahon 22 | * @author Max Orgiyan 23 | */ 24 | 25 | package oracle.soda.rdbms.impl.cache; 26 | 27 | public interface CacheOfDescriptorCaches 28 | { 29 | /** 30 | * Get the collection descriptor cache matching an account name (i.e. an 31 | * Oracle schema). Creates a new collection descriptor cache if necessary. 32 | */ 33 | public DescriptorCache putIfAbsentAndGet(String accountName); 34 | 35 | public DescriptorCache remove(String accountName); 36 | 37 | public void clear(); 38 | 39 | public void clear(String accountName); 40 | } 41 | -------------------------------------------------------------------------------- /test/src/oracle/json/testharness/JsonTestCase.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /** 5 | * DESCRIPTION 6 | * JsonTestCase 7 | * 8 | * All tests in txjjson should extend this. 9 | */ 10 | 11 | /** 12 | * @author Josh Spiegel 13 | */ 14 | 15 | package oracle.json.testharness; 16 | 17 | import java.util.regex.Pattern; 18 | 19 | import junit.framework.TestCase; 20 | import junit.framework.TestResult; 21 | 22 | public abstract class JsonTestCase extends TestCase { 23 | 24 | /** Used to filter by test method name */ 25 | private static final String TEST_MATCH = System.getProperty("test.match"); 26 | 27 | private static final Pattern PATTERN; 28 | 29 | static { 30 | if (TEST_MATCH == null || TEST_MATCH.trim().equals("")) { 31 | PATTERN = null; 32 | } else { 33 | PATTERN = Pattern.compile(".*" + TEST_MATCH, Pattern.CASE_INSENSITIVE); 34 | } 35 | } 36 | 37 | @Override 38 | public void run(TestResult result) { 39 | if (PATTERN == null) { 40 | super.run(result); 41 | return; 42 | } 43 | String name = getClass().getName() + "#" + getName(); 44 | if (PATTERN.matcher(name).lookingAt()) { 45 | super.run(result); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/OracleDatabase.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | package oracle.soda; 5 | 6 | /** 7 | * A database of document collections. 8 | */ 9 | public interface OracleDatabase extends OracleDocumentFactory 10 | { 11 | /** 12 | * Opens a collection with the specified name. 13 | * 14 | * @param collectionName the name of the collection. Cannot be 15 | * null 16 | * @return an OracleCollection, 17 | * null if the collection 18 | * with the specified collectionName 19 | * doesn't exist 20 | * 21 | * @throws OracleException if (1) the provided collectioName is 22 | * null, or (2) there's an 23 | * error opening the collection 24 | */ 25 | public OracleCollection openCollection(String collectionName) 26 | throws OracleException; 27 | 28 | /** 29 | * Gets a OracleDatabaseAdmin object 30 | * 31 | * @return a OracleDatabaseAdmin 32 | * object 33 | */ 34 | public OracleDatabaseAdmin admin(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/ContainsClause.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Full Text Search Contains clause 7 | 8 | PRIVATE CLASSES 9 | 10 | NOTES 11 | Simple carrier of information needed to generate a JSON_TextContains clause 12 | - String with the contains clause 13 | - Not flag (should use != 'TRUE') 14 | - Path within row source (e.g. "$.address.location") 15 | 16 | MODIFIED (MM/DD/YY) 17 | dmcmahon 08/14/15 - Creation 18 | */ 19 | 20 | /** 21 | * ContainsClause.java 22 | * 23 | * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 24 | * 25 | * @author Doug McMahon 26 | */ 27 | 28 | package oracle.json.parser; 29 | 30 | public class ContainsClause 31 | { 32 | private final JsonQueryPath containsPath; 33 | private final String searchString; 34 | private final boolean notFlag; 35 | 36 | ContainsClause(String searchString, boolean notFlag, JsonQueryPath path) 37 | { 38 | this.containsPath = path; 39 | this.searchString = searchString; 40 | this.notFlag = notFlag; 41 | } 42 | 43 | public JsonQueryPath getPath() 44 | { 45 | return(containsPath); 46 | } 47 | 48 | public String getSearchString() 49 | { 50 | return(searchString); 51 | } 52 | 53 | public boolean isNot() 54 | { 55 | return(notFlag); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2024, Oracle and/or its affiliates. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1003=Character set conversion failed while parsing form arguments. 8 | 1011=Invalid date/time string {0} (format is yyyy-MM-dd'T'HH:mm:ss.SSS). 9 | 1012=Query syntax error. 10 | 1013=Character encoding {0} not recognized. 11 | 1014=Encoded byte sequence could not be decoded as {0}. 12 | 1015=POST of media type {0} not allowed. 13 | 1016=Invalid servlet configuration: {0}. 14 | 1017=Unknown account {0}, current schema is {1}. 15 | 1018=Null or empty string is not a valid date/time. 16 | 1019=Document has multiple instances of key. 17 | 1020=No input document for key extraction/insertion. 18 | 1021=Path for key extraction/insertion cannot be empty. 19 | 1022=Document instance is not properly closed. 20 | 1023=Document instance is empty or is not a JSON object. 21 | 1024=Extracted key was not a string or number. 22 | 1025=Inserted key does not match existing key. 23 | 1026=Found a duplicate field for key step {0}. 24 | 1027=Unimplemented or unavailable format conversion. 25 | 1028=The extended JSON data type {0} is not supported. 26 | 1030=The key cannot be extracted with a key replacement pending. 27 | 1031=Key path not specified for conversion. 28 | 1032=Operation {0} not allowed on {1}. 29 | 1033=The document operation encountered an error: {0}. 30 | 1034=The document type {0} is not supported. 31 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Document {0} that is to be replaced was not found in {1}. 8 | 1102=Not implemented. 9 | 1103=Collection {0} is read-only, {1} not allowed. 10 | 1104=Updates not supported on package-based collection {0}. 11 | 1105=Filters and updates not supported on package-based collection {0}. 12 | 1106=Filters and projections not supported on package-based collection {0}. 13 | 1107=Filters not supported on package based collection {0}. 14 | 1108=Indexes not allowed on package based collection {0}. 15 | 1109=Collection {0} cannot have binary content in column type {1}. 16 | 1110=Index request has more than {0} columns. 17 | 1111=Collection {0} has no time stamp indicating when last modified. 18 | 1112=Collection {0} is configured so that it cannot be dropped. 19 | 1113=Invalid filter condition. 20 | 1114=Collection {0} uses {1} versioning, streaming writes not allowed. 21 | 1115=Descriptor does not match existing collection. 22 | 1116=Incremental updates or patches to documents are not supported. 23 | 1117=Query by {1} not implemented on package based collection {0}. 24 | 1118=Collection name must be specified. 25 | 1119=Collection {0} already exists. 26 | 1120=The value {0} is not a valid key of type {1}. 27 | 1121=Failed to insert document to collection {0}. 28 | 1122=Truncation not supported, collection {0} is not table based. 29 | 1123=Java Virtual Machine (JVM) does not support MD5 versioning algorithm. Switch to \ 30 | another versioning algorithm. 31 | 1124=Java Virtual Machine (JVM) does not support SHA256 versioning algorithm. Switch to \ 32 | another versioning algorithm. 33 | 34 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting security vulnerabilities 2 | 3 | Oracle values the independent security research community and believes that 4 | responsible disclosure of security vulnerabilities helps us ensure the security 5 | and privacy of all our users. 6 | 7 | Please do NOT raise a GitHub Issue to report a security vulnerability. If you 8 | believe you have found a security vulnerability, please submit a report to 9 | [secalert_us@oracle.com][1] preferably with a proof of concept. Please review 10 | some additional information on [how to report security vulnerabilities to Oracle][2]. 11 | We encourage people who contact Oracle Security to use email encryption using 12 | [our encryption key][3]. 13 | 14 | We ask that you do not use other channels or contact the project maintainers 15 | directly. 16 | 17 | Non-vulnerability related security issues including ideas for new or improved 18 | security features are welcome on GitHub Issues. 19 | 20 | ## Security updates, alerts and bulletins 21 | 22 | Security updates will be released on a regular cadence. Many of our projects 23 | will typically release security fixes in conjunction with the 24 | Oracle Critical Patch Update program. Additional 25 | information, including past advisories, is available on our [security alerts][4] 26 | page. 27 | 28 | ## Security-related information 29 | 30 | We will provide security related information such as a threat model, considerations 31 | for secure use, or any known security issues in our documentation. Please note 32 | that labs and sample code are intended to demonstrate a concept and may not be 33 | sufficiently hardened for production use. 34 | 35 | [1]: mailto:secalert_us@oracle.com 36 | [2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html 37 | [3]: https://www.oracle.com/security-alerts/encryptionkey.html 38 | [4]: https://www.oracle.com/security-alerts/ 39 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/OracleDocumentFragmentImpl.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | This is the RDBMS-specific implementation of OracleDocumentFragment 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Doug McMahon 16 | * @author Max Orgiyan 17 | */ 18 | 19 | package oracle.soda.rdbms.impl; 20 | 21 | import java.io.InputStream; 22 | 23 | public class OracleDocumentFragmentImpl extends OracleDocumentImpl 24 | { 25 | private long offset = 0L; 26 | private long totalLength = -1L; 27 | 28 | OracleDocumentFragmentImpl(String docid, 29 | String version, 30 | String tstamp, 31 | InputStream payloadStream, 32 | String contentType) 33 | { 34 | super(docid, version, tstamp, payloadStream, contentType); 35 | } 36 | 37 | OracleDocumentFragmentImpl(String docid, String version, String tstamp, byte[] payload) 38 | { 39 | super(docid, version, tstamp, payload); 40 | } 41 | 42 | void setFragmentInfo(long offset, long totalLength) 43 | { 44 | this.offset = offset; 45 | this.totalLength = totalLength; // this.len is just the fragment size 46 | } 47 | 48 | /** 49 | * Returns the offset of the range of bytes represented by 50 | * this document. 51 | * Returns 0L for documents that are not range transfer results. 52 | */ 53 | public long getOffset() 54 | { 55 | return(offset); 56 | } 57 | 58 | /** 59 | * Returns the total size of the base document of a range transfer. 60 | * Returns -1L for documents that are not range transfer results. 61 | */ 62 | public long getTotalDatabaseObjectLength() 63 | { 64 | return(totalLength); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_no.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Finner ikke dokumentet {0} som skal erstattes, i {1}. 8 | 1102=Ikke implementert. 9 | 1103=Samlingen {0} er skrivebeskyttet. {1} er ikke tillatt. 10 | 1104=Oppdateringer st\u00F8ttes ikke for den pakkebaserte samlingen {0}. 11 | 1105=Filtre og oppdateringer st\u00F8ttes ikke for den pakkebaserte samlingen {0}. 12 | 1106=Filtre og projiseringer st\u00F8ttes ikke for den pakkebaserte samlingen {0}. 13 | 1107=Filtre st\u00F8ttes ikke for den pakkebaserte samlingen {0}. 14 | 1108=Indekser tillates ikke for den pakkebaserte samlingen {0}. 15 | 1109=Samlingen {0} kan ikke ha bin\u00E6rt innhold i kolonnetypen {1}. 16 | 1110=Indeksforesp\u00F8rselen har flere enn {0} kolonner. 17 | 1111=Samlingen {0} har ikke noe tidsstempel som angir n\u00E5r den sist ble endret. 18 | 1112=Samlingen {0} er konfigurert slik at den ikke kan fjernes. 19 | 1113=Ugyldig filterbetingelse. 20 | 1114=Samlingen {0} bruker {1}-versjonsnummerering. Det er ikke tillatt \u00E5 str\u00F8mme skrivinger. 21 | 1115=Deskriptoren samsvarer ikke med den eksisterende samlingen. 22 | 1116=Trinnvise oppdateringer for dokumenter st\u00F8ttes ikke. 23 | 1117=Sp\u00F8rring etter {1} er ikke implementert for den pakkebaserte samlingen {0}. 24 | 1118=Samlingsnavnet m\u00E5 angis. 25 | 1119=Samlingen {0} finnes fra f\u00F8r. 26 | 1120=Verdien {0} er ikke en gyldig n\u00F8kkel av typen {1}. 27 | 1121=Kan ikke sette inn dokumentet i samlingen {0}. 28 | 1122=Avkorting st\u00F8ttes ikke. Samlingen {0} er ikke tabellbasert. 29 | 1123=Java Virtual Machine (JVM) st\u00F8tter ikke versjonsnummereringsalgoritmen MD5. Bytt til en annen versjonsnummereringsalgoritme. 30 | 1124=Java Virtual Machine (JVM) st\u00F8tter ikke versjonsnummereringsalgoritmen SHA256. Bytt til en annen versjonsnummereringsalgoritme. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_da.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Dokumentet {0}, der skal erstattes, blev ikke fundet i {1}. 8 | 1102=Ikke implementeret. 9 | 1103=Samlingen {0} er skrivebeskyttet, {1} er ikke tilladt. 10 | 1104=Opdateringer underst\u00F8ttes ikke p\u00E5 den pakkebaserede samling {0}. 11 | 1105=Filtre og opdateringer underst\u00F8ttes ikke p\u00E5 den pakkebaserede samling {0}. 12 | 1106=Filtre og projektioner underst\u00F8ttes ikke p\u00E5 den pakkebaserede samling {0}. 13 | 1107=Filtre underst\u00F8ttes ikke p\u00E5 den pakkebaserede samling {0}. 14 | 1108=Indekser er ikke tilladt p\u00E5 den pakkebaserede samling {0}. 15 | 1109=Samlingen {0} m\u00E5 ikke have bin\u00E6rt indhold i kolonnetypen {1}. 16 | 1110=Indeksanmodningen har mere end {0} kolonner. 17 | 1111=Samlingen {0} har ikke et tidsstempel, der angiver, hvorn\u00E5r den sidst blev \u00E6ndret. 18 | 1112=Samlingen {0} er konfigureret, s\u00E5 den ikke kan droppes. 19 | 1113=Ugyldig filterbetingelse. 20 | 1114=Samlingen {0} bruger {1}-versionering, streaming-skrivning er ikke tilladt. 21 | 1115=Descriptoren matcher ikke eksisterende samling. 22 | 1116=Trinvise opdateringer eller rettelser til dokumenter underst\u00F8ttes ikke. 23 | 1117=Foresp\u00F8rgsel efter {1} er ikke implementeret p\u00E5 den pakkebaserede samling {0}. 24 | 1118=Samlingsnavnet skal angives. 25 | 1119=Samlingen {0} findes allerede. 26 | 1120=V\u00E6rdien {0} er ikke en gyldig n\u00F8gle af typen {1}. 27 | 1121=Dokumentet kunne ikke inds\u00E6ttes til samlingen {0}. 28 | 1122=Afsk\u00E6ring underst\u00F8ttes ikke, samlingen {0} er ikke tabelbaseret. 29 | 1123=Java Virtual Machine (JVM) underst\u00F8tter ikke MD5-versioneringsalgoritme. Skift til en anden versioneringsalgoritme. 30 | 1124=Java Virtual Machine (JVM) underst\u00F8tter ikke SHA256-versioneringsalgoritme. Skift til en anden versioneringsalgoritme. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_sv.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Dokumentet {0} som ska ers\u00E4ttas hittades inte i {1}. 8 | 1102=Inte implementerat. 9 | 1103=Samlingen {0} \u00E4r skrivskyddad. {1} till\u00E5ts inte. 10 | 1104=Uppdateringar st\u00F6ds inte f\u00F6r den paketbaserade samlingen {0}. 11 | 1105=Filter och uppdateringar st\u00F6ds inte f\u00F6r den paketbaserade samlingen {0}. 12 | 1106=Filter och framskrivninger st\u00F6ds inte f\u00F6r den paketbaserade samlingen {0}. 13 | 1107=Filter st\u00F6ds inte f\u00F6r den paketbaserade samlingen {0}. 14 | 1108=Index till\u00E5ts inte f\u00F6r den paketbaserade samlingen {0}. 15 | 1109=Samlingen {0} kan inte ha bin\u00E4rt inneh\u00E5ll i kolumntypen {1}. 16 | 1110=Indexbeg\u00E4ran har fler \u00E4n {0} kolumner. 17 | 1111=Samlingen {0} har ingen tidsst\u00E4mpel som indikerar n\u00E4r den senast \u00E4ndrades. 18 | 1112=Samlingen {0} \u00E4r konfigurerad s\u00E5 att den inte kan tas bort. 19 | 1113=Ogiltigt filtervillkor. 20 | 1114=Samlingen {0} anv\u00E4nder {1}-versionshantering. Str\u00F6mmande skrivningar \u00E4r inte till\u00E5tna. 21 | 1115=Deskriptorn matchar inte befintlig samling. 22 | 1116=Inkrementella uppdateringar och korrigeringar av dokument st\u00F6ds inte. 23 | 1117=Fr\u00E5ga per {1} \u00E4r inte implementerat p\u00E5 den paketbaserade samlingen {0}. 24 | 1118=Samlingsnamnet m\u00E5ste anges. 25 | 1119=Samlingen {0} finns redan. 26 | 1120=V\u00E4rdet {0} \u00E4r inte en giltig nyckel av typen {1}. 27 | 1121=Kunde inte infoga dokument i samlingen {0}. 28 | 1122=Kapning st\u00F6ds inte. Samlingen {0} \u00E4r inte tabellbaserad. 29 | 1123=Java Virtual Machine (JVM) st\u00F6der inte MD5-versionshanteringsalgoritm. V\u00E4xla till en annan versionshanteringsalgoritm. 30 | 1124=Java Virtual Machine (JVM) st\u00F6der inte SHA256-versionshanteringsalgoritm. V\u00E4xla till en annan versionshanteringsalgoritm. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_it.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Documento da sostituire {0} non trovato in {1}. 8 | 1102=Non implementato. 9 | 1103=La raccolta {0} \u00E8 in sola lettura, {1} non consentito. 10 | 1104=Aggiornamenti non supportati nella raccolta basata su package {0}. 11 | 1105=Filtri e aggiornamenti non supportati nella raccolta basata su package {0}. 12 | 1106=Filtri e proiezioni non supportati nella raccolta basata su package {0}. 13 | 1107=Filtri non supportati nella raccolta basata su package {0}. 14 | 1108=Indici non consentiti nella raccolta basata su package {0}. 15 | 1109=La raccolta {0} non pu\u00F2 includere contenuto binario nel tipo di colonna {1}. 16 | 1110=La richiesta dell''indice include pi\u00F9 di {0} colonne. 17 | 1111=Nessun indicatore orario che indica l''ultima modifica alla raccolta {0}. 18 | 1112=La raccolta {0} \u00E8 configurata in modo da non poter essere eliminata. 19 | 1113=Condizione filtro non valida. 20 | 1114=La raccolta {0} utilizza il controllo delle versioni {1}, le scritture in streaming non sono consentite. 21 | 1115=Il descrittore non corrisponde alla raccolta esistente. 22 | 1116=Gli aggiornamenti incrementali o le patch ai documenti non sono supportati. 23 | 1117=Query in base a {1} non implementata sulla raccolta basata su package {0}. 24 | 1118=Specificare il nome della raccolta. 25 | 1119=La raccolta {0} esiste gi\u00E0. 26 | 1120=Il valore {0} non \u00E8 una chiave valida di tipo {1}. 27 | 1121=Impossibile inserire il documento nella raccolta {0}. 28 | 1122=Troncamento non supportato. La raccolta {0} non \u00E8 basata su tabella. 29 | 1123=La Java Virtual Machine (JVM) non supporta l'algoritmo di controllo delle versioni MD5. Passare a un altro algoritmo di controllo delle versioni. 30 | 1124=La Java Virtual Machine (JVM) non supporta l'algoritmo di controllo delle versioni SHA256. Passare a un altro algoritmo di controllo delle versioni. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_fi.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Korvattavaa asiakirjaa {0} ei l\u00F6ytynyt kohteesta {1}. 8 | 1102=Ei toteutettu. 9 | 1103=Ker\u00E4ily {0} on vain luku -muodossa, {1} ei ole sallittu. 10 | 1104=P\u00E4ivityksi\u00E4 ei tueta pakkausperustaisessa ker\u00E4ilyss\u00E4 {0}. 11 | 1105=Suodattimia ja p\u00E4ivityksi\u00E4 ei tueta pakkausperustaisessa ker\u00E4ilyss\u00E4 {0}. 12 | 1106=Suodattimia ja projektioita ei tueta pakkausperustaisessa ker\u00E4ilyss\u00E4 {0}. 13 | 1107=Suodattimia ei tueta pakkausperustaisessa ker\u00E4ilyss\u00E4 {0}. 14 | 1108=Indeksej\u00E4 ei sallita pakkausperustaisessa ker\u00E4ilyss\u00E4 {0}. 15 | 1109=Ker\u00E4ilyss\u00E4 {0} ei voi olla binaarisis\u00E4lt\u00F6\u00E4 saraketyypiss\u00E4 {1}. 16 | 1110=Indeksipyynn\u00F6ss\u00E4 on enemm\u00E4n kuin {0} saraketta. 17 | 1111=Ker\u00E4ilyll\u00E4 {0} ei ole aikaleimaa, joka osoittaisi viimeist\u00E4 muokkausta. 18 | 1112=Ker\u00E4ily {0} on m\u00E4\u00E4ritetty niin, ett\u00E4 sit\u00E4 ei voi poistaa. 19 | 1113=Virheellinen suodattimen ehto. 20 | 1114=Ker\u00E4ilyss\u00E4 {0} k\u00E4ytet\u00E4\u00E4n {1} -versiointia, virtakirjoitusta ei sallita. 21 | 1115=Kuvaaja ei vastaa olemassa olevaa ker\u00E4ily\u00E4. 22 | 1116=Asiakirjojen vaiheittaisia p\u00E4ivityksi\u00E4 tai korjaustiedostoja ei tueta. 23 | 1117=Kysely\u00E4 {1} ei ole toteutettu pakkausperustaisessa ker\u00E4ilyss\u00E4 {0}. 24 | 1118=Ker\u00E4ilyn nimi on m\u00E4\u00E4ritett\u00E4v\u00E4. 25 | 1119=Ker\u00E4ily {0} on jo olemassa. 26 | 1120=Arvo {0} ei ole sallittu tyypin {1} avain. 27 | 1121=Asiakirjan lis\u00E4ys ker\u00E4ilyyn {0} ep\u00E4onnistui. 28 | 1122=Katkaisua ei tueta, ker\u00E4ily {0} ei ole tauluperustainen. 29 | 1123=Java-virtuaalikone (JVM) ei tue MD5-versiointialgoritmia. Vaihda toiseen versiointialgoritmiin. 30 | 1124=Java-virtuaalikone (JVM) ei tue SHA256-versiointialgoritmia. Vaihda toiseen versiointialgoritmiin. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_nl.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Te vervangen document {0} is niet gevonden in {1}. 8 | 1102=Niet ge\u00EFmplementeerd. 9 | 1103=Verzameling {0} is alleen-lezen: {1} is niet toegestaan. 10 | 1104=Updates worden niet ondersteund voor verzameling {0} die is gebaseerd op packages. 11 | 1105=Filters en updates worden niet ondersteund voor verzameling {0} die is gebaseerd op packages. 12 | 1106=Filters en projecties worden niet ondersteund voor verzameling {0} die is gebaseerd op packages. 13 | 1107=Filters worden niet ondersteund voor verzameling {0} die is gebaseerd op packages. 14 | 1108=Indexen zijn niet toegestaan voor verzameling {0} die is gebaseerd op packages. 15 | 1109=Verzameling {0} kan geen binaire inhoud bevatten in kolomtype {1}. 16 | 1110=De indexaanvraag bevat meer dan {0} kolommen. 17 | 1111=Verzameling {0} heeft geen tijdstempel van de laatste wijziging. 18 | 1112=Verzameling {0} is zo geconfigureerd dat deze niet kan worden verwijderd. 19 | 1113=Ongeldige filtervoorwaarde 20 | 1114=Verzameling {0} maakt gebruik van {1}-versiebeheer: schrijfbewerkingen voor streaming zijn niet toegestaan. 21 | 1115=Descriptor komt niet overeen met de bestaande verzameling. 22 | 1116=Incrementele updates of patches voor documenten worden niet ondersteund. 23 | 1117=Zoekvraag volgens {1} is niet ge\u00EFmplementeerd voor verzameling {0} die is gebaseerd op packages. 24 | 1118=Er moet een naam voor de verzameling worden opgegeven. 25 | 1119=Verzameling {0} bestaat al. 26 | 1120=De waarde {0} is geen geldige sleutel van het type {1}. 27 | 1121=Invoegen van document in verzameling {0} is mislukt. 28 | 1122=Afkapping wordt niet ondersteund: verzameling {0} is niet gebaseerd op tabellen. 29 | 1123=Versiebeheeralgoritme 'MD5' wordt niet ondersteund door Java Virtual Machine (JVM). Gebruik een ander versiebeheeralgoritme. 30 | 1124=Versiebeheeralgoritme 'SHA256' wordt niet ondersteund door Java Virtual Machine (JVM). Gebruik een ander versiebeheeralgoritme. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/QueryException.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Exception thrown by the QBE parser. 7 | 8 | When used from SODA, QueryException might be the cause of a SODA 9 | OracleException. It's not, however, part of the public API, and is 10 | subject to change. 11 | */ 12 | 13 | /** 14 | * This class is not part of the public API, and is 15 | * subject to change. 16 | * 17 | * Do not rely on it in your application code. 18 | * 19 | * @author Doug McMahon 20 | */ 21 | 22 | package oracle.json.parser; 23 | 24 | import jakarta.json.JsonException; 25 | 26 | public class QueryException 27 | extends Exception 28 | { 29 | private static final long serialVersionUID = 1L; 30 | 31 | public QueryException(String message) 32 | { 33 | super(message); 34 | } 35 | 36 | public QueryException(Exception e) 37 | { 38 | super(e); 39 | } 40 | 41 | public QueryException(String message, Exception e) 42 | { 43 | super(message, e); 44 | } 45 | 46 | @Override 47 | public String getMessage() 48 | { 49 | String msg = null; 50 | Throwable t = this.getCause(); 51 | 52 | if (t != null) 53 | if (t instanceof JsonException) 54 | msg = ((Exception)t).getMessage(); 55 | 56 | if (msg == null) 57 | msg = super.getMessage(); 58 | 59 | return msg; 60 | } 61 | 62 | static QueryException getSyntaxException(QueryMessage msg, Object... params) 63 | { 64 | return new QueryException(msg.get(params)); 65 | } 66 | 67 | static QueryException getSyntaxException(QueryMessage msg, Exception e) 68 | { 69 | return new QueryException(msg.get(), e); 70 | } 71 | 72 | static void throwSyntaxException(QueryMessage msg, Object... params) 73 | throws QueryException 74 | { 75 | throw new QueryException(msg.get(params)); 76 | } 77 | 78 | static void throwExecutionException(QueryMessage msg, Object... params) 79 | throws QueryException 80 | { 81 | throw new QueryException(msg.get(params)); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_de.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Zu ersetzendes Dokument {0} wurde in {1} nicht gefunden. 8 | 1102=Nicht implementiert. 9 | 1103=Collection {0} ist schreibgesch\u00FCtzt, {1} nicht zul\u00E4ssig. 10 | 1104=Updates auf package-basierter Collection {0} nicht unterst\u00FCtzt. 11 | 1105=Filter und Updates auf package-basierter Collection {0} nicht unterst\u00FCtzt. 12 | 1106=Filter und Projizierungen auf package-basierter Collection {0} nicht unterst\u00FCtzt. 13 | 1107=Filter auf package-basierter Collection {0} nicht unterst\u00FCtzt. 14 | 1108=Indizes auf package-basierter Collection {0} nicht erlaubt. 15 | 1109=Collection {0} kann keinen bin\u00E4ren Inhalt in Spaltentyp {1} enthalten. 16 | 1110=Indexanforderung hat mehr als {0} Spalten. 17 | 1111=Collection {0} enth\u00E4lt keinen Zeitstempel mit Angabe der letzten \u00C4nderung. 18 | 1112=Collection {0} ist so konfiguriert, dass sie nicht gel\u00F6scht werden kann. 19 | 1113=Ung\u00FCltige Filterbedingung. 20 | 1114=Collection {0} verwendet {1}-Versionierung, Streaming von Schreibzugriffen ist nicht zul\u00E4ssig. 21 | 1115=Deskriptor stimmt nicht mit vorhandener Collection \u00FCberein. 22 | 1116=Inkrementelle Updates oder Patches f\u00FCr Dokumente werden nicht unterst\u00FCtzt. 23 | 1117=Abfrage durch {1} in package-basierter Collection {0} nicht implementiert. 24 | 1118=Collection-Name muss angegeben werden. 25 | 1119=Collection {0} ist bereits vorhanden. 26 | 1120=Der Wert {0} ist kein g\u00FCltiger Schl\u00FCssel vom Typ {1}. 27 | 1121=Dokument konnte nicht in Collection {0} eingef\u00FCgt werden. 28 | 1122=Abschneiden wird nicht unterst\u00FCtzt, Collection {0} ist nicht tabellenbasiert. 29 | 1123=Java Virtual Machine (JVM) unterst\u00FCtzt den Versionierungsalgorithmus MD5 nicht. Wechseln Sie zu einem anderen Versionierungsalgorithmus. 30 | 1124=Java Virtual Machine (JVM) unterst\u00FCtzt den Versionierungsalgorithmus SHA256 nicht. Wechseln Sie zu einem anderen Versionierungsalgorithmus. 31 | 32 | -------------------------------------------------------------------------------- /test/src/oracle/json/testharness/SodaUtils.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2020, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /** 5 | * DESCRIPTION 6 | * Soda Utils 7 | */ 8 | 9 | /** 10 | * @author Jianye Wang 11 | */ 12 | 13 | package oracle.json.testharness; 14 | 15 | import java.nio.charset.Charset; 16 | 17 | import java.io.IOException; 18 | import java.io.FileInputStream; 19 | 20 | import java.util.Arrays; 21 | 22 | public class SodaUtils { 23 | 24 | private static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); 25 | 26 | public static byte[] slurpFileAsByteArray(String fname) 27 | throws IOException 28 | { 29 | FileInputStream fin = new FileInputStream(fname); 30 | if (fin == null) return(null); 31 | 32 | int bufsize = 4096; 33 | int offset = 0; 34 | byte[] temp = new byte[bufsize]; 35 | 36 | while (true) 37 | { 38 | int remaining = bufsize - offset; 39 | if (remaining == 0) 40 | { 41 | remaining = bufsize; 42 | bufsize += remaining; 43 | temp = Arrays.copyOf(temp, bufsize); 44 | } 45 | 46 | int nbytes = fin.read(temp, offset, remaining); 47 | if (nbytes < 0) break; 48 | 49 | offset += nbytes; 50 | } 51 | 52 | fin.close(); 53 | 54 | return temp; 55 | } 56 | 57 | public static String slurpFile(String fname) 58 | throws IOException 59 | { 60 | FileInputStream fin = new FileInputStream(fname); 61 | if (fin == null) return(null); 62 | 63 | int bufsize = 4096; 64 | int offset = 0; 65 | byte[] temp = new byte[bufsize]; 66 | 67 | while (true) 68 | { 69 | int remaining = bufsize - offset; 70 | if (remaining == 0) 71 | { 72 | remaining = bufsize; 73 | bufsize += remaining; 74 | temp = Arrays.copyOf(temp, bufsize); 75 | } 76 | 77 | int nbytes = fin.read(temp, offset, remaining); 78 | if (nbytes < 0) break; 79 | 80 | offset += nbytes; 81 | } 82 | 83 | fin.close(); 84 | 85 | return(new String(temp, 0, offset, DEFAULT_CHARSET)); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/SynchronizedDescriptorCache.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Cache of collection descriptors for a particular account 7 | (i.e. Oracle schema), that can be shared among different 8 | threads. 9 | 10 | Thread safety is achieved by controlling access 11 | to the non-thread-safe LRUCache via synchronized methods 12 | of this class. 13 | */ 14 | 15 | package oracle.soda.rdbms.impl.cache; 16 | 17 | import oracle.soda.rdbms.impl.CollectionDescriptor; 18 | 19 | /** 20 | * This class is not part of the public API, and is 21 | * subject to change. 22 | * 23 | * Do not rely on it in your application code. 24 | * 25 | * @author Doug McMahon 26 | * @author Max Orgiyan 27 | */ 28 | 29 | class SynchronizedDescriptorCache implements DescriptorCache 30 | { 31 | private final LRUCache cache; 32 | 33 | public SynchronizedDescriptorCache(int numberOfEntries) 34 | { 35 | cache = new LRUCache(numberOfEntries); 36 | } 37 | 38 | public synchronized CollectionDescriptor get(String collectionName) 39 | { 40 | return cache.get(collectionName); 41 | } 42 | 43 | public synchronized CollectionDescriptor putIfAbsent(CollectionDescriptor desc) 44 | { 45 | String collectionName = desc.getName(); 46 | 47 | if (cache.containsKey(collectionName)) 48 | return cache.get(collectionName); 49 | 50 | cache.put(collectionName, desc); 51 | return null; 52 | } 53 | 54 | public synchronized CollectionDescriptor put(CollectionDescriptor desc) 55 | { 56 | String collectionName = desc.getName(); 57 | return cache.put(collectionName, desc); 58 | } 59 | 60 | public synchronized boolean containsDescriptor(String collectionName) 61 | { 62 | return cache.containsKey(collectionName); 63 | } 64 | 65 | public synchronized void remove(String collectionName) 66 | { 67 | cache.remove(collectionName); 68 | } 69 | 70 | public synchronized void clear() 71 | { 72 | cache.clear(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=O documento {0} que deve ser substitu\u00EDdo n\u00E3o foi encontrado em {1}. 8 | 1102=N\u00E3o implementado. 9 | 1103=O conjunto {0} \u00E9 somente para leitura; {1} n\u00E3o \u00E9 permitido. 10 | 1104=Atualiza\u00E7\u00F5es n\u00E3o suportadas no conjunto {0} baseado em pacote. 11 | 1105=Filtros e atualiza\u00E7\u00F5es n\u00E3o suportados no conjunto {0} baseado em pacote. 12 | 1106=Filtros e proje\u00E7\u00F5es n\u00E3o suportados no conjunto {0} baseado em pacote. 13 | 1107=Arquivos n\u00E3o suportados no conjunto {0} baseado em pacote. 14 | 1108=\u00CDndices n\u00E3o suportados no conjunto {0} baseado em pacote. 15 | 1109=O conjunto {0} n\u00E3o pode ter conte\u00FAdo bin\u00E1rio no tipo de coluna {1}. 16 | 1110=A solicita\u00E7\u00E3o de \u00EDndice tem mais de {0} colunas. 17 | 1111=O conjunto {0} n\u00E3o tem time stamp indicando quando foi modificado pela \u00FAltima vez. 18 | 1112=O conjunto {0} est\u00E1 configurado de forma que n\u00E3o possa ser eliminado. 19 | 1113=Condi\u00E7\u00E3o de filtro inv\u00E1lida. 20 | 1114=O conjunto {0} usa o controle de vers\u00E3o {1}; as grava\u00E7\u00F5es de streaming n\u00E3o s\u00E3o permitidas. 21 | 1115=O descritor n\u00E3o corresponde ao conjunto existente. 22 | 1116=As atualiza\u00E7\u00F5es ou patches incrementais em documentos n\u00E3o s\u00E3o suportados. 23 | 1117=Consulta por {1} n\u00E3o implementada no conjunto {0} baseado em pacote. 24 | 1118=O nome do conjunto deve ser especificado. 25 | 1119=O conjunto {0} j\u00E1 existe. 26 | 1120=O valor {0} n\u00E3o \u00E9 uma chave v\u00E1lida do tipo {1}. 27 | 1121=Falha ao inserir o documento no conjunto {0}. 28 | 1122=Truncamento n\u00E3o suportado. O conjunto {0} n\u00E3o \u00E9 baseado em tabela. 29 | 1123=A JVM (Java Virtual Machine) n\u00E3o suporta o algoritmo de vers\u00E3o MD5. Alterne para outro algoritmo de vers\u00E3o. 30 | 1124=A JVM (Java Virtual Machine) n\u00E3o suporta o algoritmo de vers\u00E3o SHA256. Alterne para outro algoritmo de vers\u00E3o. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/OracleCursor.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | package oracle.soda; 5 | 6 | import java.io.Closeable; 7 | import java.util.Iterator; 8 | 9 | /** 10 | * Operation result cursor. Returned by {@link OracleOperationBuilder#getCursor()} 11 | * method. 12 | */ 13 | public interface OracleCursor extends Closeable 14 | { 15 | /** 16 | * Returns the next OracleDocument. 17 | *

18 | * Note: any underlying exception (e.g. SQLException if 19 | * this API is implemented on top of an RDBMS), might be available in the 20 | * chain of causes of this OracleException. 21 | *

22 | *

23 | * For the Oracle RDBMS implementation of SODA, the current 24 | * limit for the maximum size of document that can be read is 2GB. 25 | * An exception will be thrown by this method if the next document's 26 | * size exceeds this limit. 27 | *

28 | * 29 | * @return the next OracleDocument 30 | * @throws OracleException might wrap another exception set as a 31 | * cause 32 | */ 33 | public OracleDocument next() throws OracleException; 34 | 35 | /** 36 | * Returns true if the next OracleDocument 37 | * is available. 38 | *

39 | * Note: any underlying exception (e.g. SQLException if 40 | * this API is implemented on top of an RDBMS), might be available in the 41 | * chain of causes of this OracleException 42 | *

43 | *

44 | * For the Oracle RDBMS implementation of SODA, the current 45 | * limit for the maximum size of document that can be read is 2GB. 46 | * An exception will be thrown by this method if the next document's 47 | * size exceeds this limit. 48 | *

49 | * 50 | * @return the next OracleDocument 51 | * @throws OracleException might wrap another exception set as a 52 | * cause 53 | */ 54 | public boolean hasNext() throws OracleException; 55 | } 56 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_cs.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Dokument {0}, kter\u00FD se m\u00E1 nahradit, nebyl nalezen v {1}. 8 | 1102=Neimplementov\u00E1no. 9 | 1103=Kolekce {0} je pouze pro \u010Dten\u00ED, {1} nepovoleno. 10 | 1104=V kolekci {0} na b\u00E1zi bal\u00EDku nejsou podporov\u00E1ny aktualizace. 11 | 1105=V kolekci {0} na b\u00E1zi bal\u00EDku nejsou podporov\u00E1ny filtry a aktualizace. 12 | 1106=V kolekci {0} na b\u00E1zi bal\u00EDku nejsou podporov\u00E1ny filtry a projekce. 13 | 1107=V kolekci {0} na b\u00E1zi bal\u00EDku nejsou podporov\u00E1ny filtry. 14 | 1108=V kolekci {0} na b\u00E1zi bal\u00EDku nejsou povoleny indexy. 15 | 1109=Kolekce {0} nem\u016F\u017Ee obsahovat bin\u00E1rn\u00ED obsah v typu sloupce {1}. 16 | 1110=Po\u017Eadavek na index obsahuje v\u00EDce ne\u017E {0} sloupc\u016F. 17 | 1111=Kolekce {0} nem\u00E1 \u017E\u00E1dnou \u010Dasovou zna\u010Dku s informac\u00ED o posledn\u00ED \u00FAprav\u011B. 18 | 1112=Kolekce {0} je konfigurov\u00E1na, tak\u017Ee ji nelze zru\u0161it. 19 | 1113=Neplatn\u00E1 podm\u00EDnka filtru. 20 | 1114=Kolekce {0} pou\u017E\u00EDv\u00E1 tvorbu verz\u00ED {1}. Proudov\u00FD z\u00E1pis nen\u00ED povolen. 21 | 1115=Deskriptor neodpov\u00EDd\u00E1 existuj\u00EDc\u00ED kolekci. 22 | 1116=P\u0159\u00EDr\u016Fstkov\u00E9 aktualizace nebo opravy dokument\u016F nejsou podporov\u00E1ny. 23 | 1117=V kolekci {0} na b\u00E1zi bal\u00EDku nen\u00ED implementov\u00E1n dotaz u\u017Eivatele {1}. 24 | 1118=Mus\u00ED b\u00FDt zad\u00E1n n\u00E1zev kolekce. 25 | 1119=Kolekce {0} ji\u017E existuje. 26 | 1120=Hodnota {0} nen\u00ED platn\u00FDm kl\u00ED\u010Dem typu {1}. 27 | 1121=Selhalo vlo\u017Een\u00ED dokumentu do kolekce {0}. 28 | 1122=Zkr\u00E1cen\u00ED nen\u00ED podporov\u00E1no, kolekce {0} nen\u00ED zalo\u017Eena na tabulce. 29 | 1123=Java Virtual Machine (JVM) nepodporuje algoritmus pro tvorbu verz\u00ED MD5. P\u0159epn\u011Bte na jin\u00FD algoritmus pro tvorbu verz\u00ED. 30 | 1124=Java Virtual Machine (JVM) nepodporuje algoritmus pro tvorbu verz\u00ED SHA256. P\u0159epn\u011Bte na jin\u00FD algoritmus pro tvorbu verz\u00ED. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_tr.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=De\u011Fi\u015Ftirilecek {0} dok\u00FCman\u0131 {1} i\u00E7inde bulunamad\u0131. 8 | 1102=Uygulanmad\u0131. 9 | 1103=Koleksiyon {0} salt okunur, {1} koleksiyonuna izin verilmiyor. 10 | 1104={0} paket tabanl\u0131 koleksiyonunda g\u00FCncellemeler desteklenmiyor. 11 | 1105={0} paket tabanl\u0131 koleksiyonunda filtreler ve g\u00FCncellemeler desteklenmiyor. 12 | 1106={0} paket tabanl\u0131 koleksiyonunda filtreler ve projeksiyonlar desteklenmiyor. 13 | 1107={0} paket tabanl\u0131 koleksiyonunda filtreler desteklenmiyor. 14 | 1108={0} paket tabanl\u0131 koleksiyonunda dizinlere izin verilmiyor. 15 | 1109={0} koleksiyonunun {1} s\u00FCtun t\u00FCr\u00FCnde ikili i\u00E7eri\u011Fi olamaz. 16 | 1110=Dizin iste\u011Finde {0} adetten fazla s\u00FCtun var. 17 | 1111={0} koleksiyonunda son de\u011Fi\u015Fikli\u011Fi g\u00F6steren zaman damgas\u0131 yok. 18 | 1112={0} koleksiyonu b\u0131rak\u0131lamayacak \u015Fekilde konfig\u00FCre edildi. 19 | 1113=Ge\u00E7ersiz filtre ko\u015Fulu. 20 | 1114={0} koleksiyonu {1} s\u00FCr\u00FCmlendirme kullan\u0131yor, yazma veri ak\u0131\u015F\u0131na izin verilmiyor. 21 | 1115=A\u00E7\u0131klay\u0131c\u0131 mevcut koleksiyonla e\u015Fle\u015Fmiyor. 22 | 1116=Dok\u00FCmanlarda art\u0131ml\u0131 g\u00FCncellemeler veya yamalar desteklenmiyor. 23 | 1117={0} paket tabanl\u0131 koleksiyonunda {1} baz\u0131nda sorgu uygulanmad\u0131. 24 | 1118=Koleksiyon ad\u0131 belirtilmelidir. 25 | 1119=Koleksiyon {0} zaten mevcut. 26 | 1120={0} de\u011Feri {1} t\u00FCr\u00FCnde ge\u00E7erli bir anahtar de\u011Fil. 27 | 1121=Dok\u00FCman {0} koleksiyonuna eklenemedi. 28 | 1122=Kesilme desteklenmiyor, {0} koleksiyonu tablo tabanl\u0131 de\u011Fil. 29 | 1123=Java Sanal Makinesi (JVM) MD5 s\u00FCr\u00FCmlendirme algoritmas\u0131n\u0131 desteklemiyor. Ba\u015Fka bir s\u00FCr\u00FCmlendirme algoritmas\u0131na ge\u00E7i\u015F yap\u0131n. 30 | 1124=Java Sanal Makinesi (JVM) SHA256 s\u00FCr\u00FCmlendirme algoritmas\u0131n\u0131 desteklemiyor. Ba\u015Fka bir s\u00FCr\u00FCmlendirme algoritmas\u0131na ge\u00E7i\u015F yap\u0131n. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_fr.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Le document {0} qui doit \u00EAtre remplac\u00E9 est introuvable dans {1}. 8 | 1102=Non impl\u00E9ment\u00E9. 9 | 1103=La collecte {0} est en lecture seule, {1} non autoris\u00E9. 10 | 1104=Mises \u00E0 jour non prises en charge sur la collecte bas\u00E9e sur un package {0}. 11 | 1105=Filtres et mises \u00E0 jour non pris en charge sur la collecte bas\u00E9e sur un package {0}. 12 | 1106=Filtres et projections non pris en charge sur la collecte bas\u00E9e sur un package {0}. 13 | 1107=Filtres non pris en charge sur la collecte bas\u00E9e sur un package {0}. 14 | 1108=Index non autoris\u00E9s sur la collecte bas\u00E9e sur un package {0}. 15 | 1109=La collecte {0} ne peut poss\u00E9der un contenu binaire dans le type de colonne {1}. 16 | 1110=La demande d''index contient plus de {0} colonnes. 17 | 1111=La collecte {0} ne comporte aucun horodatage indiquant la derni\u00E8re modification. 18 | 1112=La collecte {0} est configur\u00E9e de fa\u00E7on \u00E0 ne pas pouvoir \u00EAtre supprim\u00E9e. 19 | 1113=Condition de filtre non valide. 20 | 1114=La collecte {0} utilise la gestion des versions {1}, \u00E9critures de transmission en continu non autoris\u00E9es. 21 | 1115=Le descripteur ne correspond pas \u00E0 la collecte existante. 22 | 1116=Les mises \u00E0 jour incr\u00E9mentielles ou les patches sur les documents ne sont pas pris en charge. 23 | 1117=Requ\u00EAte par {1} non impl\u00E9ment\u00E9e sur la collecte bas\u00E9e sur un package {0} 24 | 1118=Le nom de la collecte doit \u00EAtre sp\u00E9cifi\u00E9. 25 | 1119=La collecte {0} existe d\u00E9j\u00E0. 26 | 1120=La valeur {0} n''est pas une cl\u00E9 valide de type {1}. 27 | 1121=Echec de l''insertion du document dans la collecte {0}. 28 | 1122=Troncature non prise en charge, la collecte {0} n''est pas bas\u00E9e sur une table. 29 | 1123=Java Virtual Machine (JVM) ne prend pas en charge l'algorithme de gestion des versions MD5. Utilisez un autre algorithme. 30 | 1124=Java Virtual Machine (JVM) ne prend pas en charge l'algorithme de gestion des versions SHA256. Utilisez un autre algorithme. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_pl.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Dokument {0}, kt\u00F3ry mia\u0142 zosta\u0107 zast\u0105piony, nie zosta\u0142 znaleziony w {1}. 8 | 1102=Niezaimplementowane. 9 | 1103=Kolekcja {0} jest tylko do odczytu; {1} nie jest dozwolone. 10 | 1104=Aktualizacje nie s\u0105 obs\u0142ugiwane dla kolekcji {0} opartej na pakietach. 11 | 1105=Filtry i aktualizacje nie s\u0105 obs\u0142ugiwane dla kolekcji {0} opartej na pakietach. 12 | 1106=Filtry i rzutowania nie s\u0105 obs\u0142ugiwane dla kolekcji {0} opartej na pakietach. 13 | 1107=Filtry nie s\u0105 obs\u0142ugiwane dla kolekcji {0} opartej na pakietach. 14 | 1108=Indeksy nie s\u0105 dozwolone dla kolekcji {0} opartej na pakietach. 15 | 1109=Kolekcja {0} nie mo\u017Ce mie\u0107 zawarto\u015Bci binarnej w kolumnie typu {1}. 16 | 1110=\u017B\u0105danie indeksowania ma wi\u0119cej ni\u017C {0} kolumn(y). 17 | 1111=Kolekcja {0} nie ma znacznika czasu, sygnalizuj\u0105cego dat\u0119 i godzin\u0119 ostatniej modyfikacji. 18 | 1112=Kolekcja {0} zosta\u0142a tak skonfigurowana, \u017Ce nie mo\u017Cna jej skasowa\u0107. 19 | 1113=Niepoprawny warunek filtrowania. 20 | 1114=Kolekcja {0} korzysta z obs\u0142ugi wersji {1}; zapisy strumieniowe nie s\u0105 dozwolone. 21 | 1115=Deskryptor nie odpowiada istniej\u0105cej kolekcji. 22 | 1116=Przyrostowe aktualizacje lub poprawki do dokument\u00F3w nie s\u0105 obs\u0142ugiwane. 23 | 1117=Zapytanie na podstawie "{1}" nie jest zaimplementowane dla kolekcji {0} opartej na pakietach. 24 | 1118=Trzeba poda\u0107 nazw\u0119 kolekcji. 25 | 1119=Kolekcja {0} ju\u017C istnieje. 26 | 1120=Warto\u015B\u0107 {0} nie jest poprawnym kluczem typu {1}. 27 | 1121=Nie uda\u0142o si\u0119 wstawi\u0107 dokumentu do kolekcji {0}. 28 | 1122=Przycinanie nie jest obs\u0142ugiwane; kolekcja {0} nie jest oparta na tabeli. 29 | 1123=Wirtualna maszyna Javy (JVM) nie obs\u0142uguje algorytmu tworzenia wersji MD5. Prosz\u0119 prze\u0142\u0105czy\u0107 na inny algorytm tworzenia wersji. 30 | 1124=Wirtualna maszyna Javy (JVM) nie obs\u0142uguje algorytmu tworzenia wersji SHA256. Prosz\u0119 prze\u0142\u0105czy\u0107 na inny algorytm tworzenia wersji. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_ro.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Documentul {0}, care urmeaz\u0103 s\u0103 fie \u00EEnlocuit, nu a fost g\u0103sit \u00EEn {1}. 8 | 1102=Neimplementat. 9 | 1103=Colec\u0163ia {0} este read-only; nu se permite {1}. 10 | 1104=Actualiz\u0103rile nu sunt acceptate \u00EEn colec\u0163ia bazat\u0103 pe pachete {0}. 11 | 1105=Filtrele \u015Fi actualiz\u0103rile nu sunt acceptate \u00EEn colec\u0163ia bazat\u0103 pe pachete {0}. 12 | 1106=Filtrele \u015Fi proiec\u0163iile nu sunt acceptate \u00EEn colec\u0163ia bazat\u0103 pe pachete {0}. 13 | 1107=Filtrele nu sunt acceptate \u00EEn colec\u0163ia bazat\u0103 pe pachete {0}. 14 | 1108=Index\u0103rile nu sunt permise \u00EEn colec\u0163ia bazat\u0103 pe pachete {0}. 15 | 1109=Colec\u0163ia {0} nu poate avea con\u0163inut binar \u00EEn tipul de coloan\u0103 {1}. 16 | 1110=Cererea de indexare are peste {0} coloane. 17 | 1111=Colec\u0163ia {0} nu are niciun marcaj temporal ce indic\u0103 data ultimei modific\u0103ri. 18 | 1112=Colec\u0163ia {0} este configurat\u0103 astfel \u00EEnc\u00E2t nu poate fi abandonat\u0103. 19 | 1113=Condi\u0163ie de filtrare nevalid\u0103. 20 | 1114=Colec\u0163ia {0} utilizeaz\u0103 crearea de versiuni {1}; transmiterea \u00EEn flux a scrierilor nu este permis\u0103. 21 | 1115=Descriptorul nu corespunde cu colec\u0163ia existent\u0103. 22 | 1116=Actualiz\u0103rile sau patch-urile incrementale nu sunt acceptate. 23 | 1117=Interogarea dup\u0103 {1} nu a fost implementat\u0103 \u00EEn colec\u0163ia bazat\u0103 pe pachete {0}. 24 | 1118=Trebuie specificat numele colec\u0163iei. 25 | 1119=Colec\u0163ia {0} exist\u0103 deja. 26 | 1120=Valoarea {0} nu este o cheie valid\u0103 de tip {1}. 27 | 1121=E\u015Fec la inserarea documentului \u00EEn colec\u0163ia {0}. 28 | 1122=Trunchierea nu este acceptat\u0103; colec\u0163ia {0} nu este bazat\u0103 pe tabel. 29 | 1123=Java Virtual Machine (JVM) nu accept\u0103 algoritmul MD5 de creare a versiunilor. \u00CEncerca\u0163i cu alt algoritm pt. versiuni. 30 | 1124=Java Virtual Machine (JVM) nu accept\u0103 algoritmul SHA256 de creare a versiunilor. \u00CEncerca\u0163i cu alt algoritm pt. versiuni. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_pt.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=O documento {0} que deve ser substitu\u00EDdo n\u00E3o foi encontrado em {1}. 8 | 1102=N\u00E3o implementado. 9 | 1103=A recolha {0} \u00E9 s\u00F3 de leitura; {1} n\u00E3o permitido. 10 | 1104=Atualiza\u00E7\u00F5es n\u00E3o suportadas na recolha baseada no pacote {0}. 11 | 1105=Filtros e atualiza\u00E7\u00F5es n\u00E3o suportados na recolha baseada no pacote {0}. 12 | 1106=Filtros e proje\u00E7\u00F5es n\u00E3o suportados na recolha baseada no pacote {0}. 13 | 1107=Filtros n\u00E3o suportados na recolha baseada no pacote {0}. 14 | 1108=\u00CDndices n\u00E3o permitidos na recolha baseada no pacote {0}. 15 | 1109=N\u00E3o \u00E9 poss\u00EDvel que a recolha {0} tenha conte\u00FAdo bin\u00E1rio no tipo de coluna {1}. 16 | 1110=O pedido de \u00EDndice tem mais de {0} colunas. 17 | 1111=A recolha {0} n\u00E3o tem indica\u00E7\u00E3o de data/hora da \u00FAltima modifica\u00E7\u00E3o. 18 | 1112=A recolha {0} est\u00E1 configurada de modo a n\u00E3o ser poss\u00EDvel suprimi-la. 19 | 1113=A condi\u00E7\u00E3o de filtragem \u00E9 inv\u00E1lida. 20 | 1114=A recolha {0} utiliza a cria\u00E7\u00E3o de vers\u00F5es {1}; a transmiss\u00E3o em fluxo de escritas n\u00E3o \u00E9 permitida. 21 | 1115=O descritor n\u00E3o corresponde \u00E0 recolha existente. 22 | 1116=N\u00E3o s\u00E3o suportadas atualiza\u00E7\u00F5es ou corre\u00E7\u00F5es incrementais aos documentos. 23 | 1117=Consulta por {1} n\u00E3o implementada na recolha baseada no pacote {0}. 24 | 1118=\u00C9 necess\u00E1rio especificar o nome da recolha. 25 | 1119=A recolha {0} j\u00E1 existe. 26 | 1120=O valor {0} n\u00E3o \u00E9 uma chave v\u00E1lida do tipo {1}. 27 | 1121=Falha na inser\u00E7\u00E3o do documento na recolha {0}. 28 | 1122=Truncamento n\u00E3o suportado; a recolha {0} n\u00E3o \u00E9 baseada na tabela. 29 | 1123=O Java Virtual Machine (JVM) n\u00E3o suporta o algoritmo de cria\u00E7\u00E3o de vers\u00F5es MD5. Mude para outro algoritmo de cria\u00E7\u00E3o de vers\u00F5es. 30 | 1124=O Java Virtual Machine (JVM) n\u00E3o suporta o algoritmo de cria\u00E7\u00E3o de vers\u00F5es SHA256. Mude para outro algoritmo de cria\u00E7\u00E3o de vers\u00F5es. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_es.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=No se ha encontrado en {1} el documento {0} que se debe sustituir. 8 | 1102=No implementado. 9 | 1103=La recopilaci\u00F3n {0} es de solo lectura, {1} no est\u00E1 permitido. 10 | 1104=No est\u00E1n soportadas las actualizaciones en la recopilaci\u00F3n basada en paquetes {0}. 11 | 1105=Los filtros y actualizaciones no est\u00E1n soportados en la recopilaci\u00F3n basada en paquetes {0}. 12 | 1106=Los filtros y proyecciones no est\u00E1n soportados en la recopilaci\u00F3n basada en paquetes {0}. 13 | 1107=Los filtros no est\u00E1n soportados en la recopilaci\u00F3n basada en paquetes {0}. 14 | 1108=Los \u00EDndices no est\u00E1n permitidos en la recopilaci\u00F3n basada en paquetes {0}. 15 | 1109=La recopilaci\u00F3n {0} no puede tener contenido binario en el tipo de columna {1}. 16 | 1110=La solicitud de \u00EDndice tiene m\u00E1s de {0} columnas. 17 | 1111=La recopilaci\u00F3n {0} no tiene ning\u00FAn registro de hora que indique la \u00FAltima modificaci\u00F3n. 18 | 1112=La recopilaci\u00F3n {0} est\u00E1 configurada para que no se pueda borrar. 19 | 1113=Condici\u00F3n de filtro no v\u00E1lida. 20 | 1114=La recopilaci\u00F3n {0} utiliza el control de versiones {1}, las escrituras de flujo no est\u00E1n permitidas. 21 | 1115=El descriptor no coincide con la recopilaci\u00F3n existente. 22 | 1116=No est\u00E1n soportados los parches o actualizaciones incrementales en los documentos. 23 | 1117=La consulta mediante {1} no est\u00E1 implantada en la recopilaci\u00F3n basada en paquetes {0}. 24 | 1118=Se debe especificar el nombre de la recopilaci\u00F3n. 25 | 1119=La recopilaci\u00F3n {0} ya existe. 26 | 1120=El valor {0} no es una clave v\u00E1lida de tipo {1}. 27 | 1121=Fallo al insertar el documento en la recopilaci\u00F3n {0}. 28 | 1122=No est\u00E1 soportado el truncamiento. La recopilaci\u00F3n {0} no est\u00E1 basada en tablas. 29 | 1123=Java Virtual Machine (JVM) no soporta el algoritmo de control de versiones MD5. Cambie a otro algoritmo de control de versiones. 30 | 1124=Java Virtual Machine (JVM) no soporta el algoritmo de control de versiones SHA256. Cambie a otro algoritmo de control de versiones. 31 | 32 | -------------------------------------------------------------------------------- /test/ant/sodatestsetup.sql: -------------------------------------------------------------------------------- 1 | Rem sodatestsetup.sql 2 | Rem 3 | Rem Copyright (c) 2014, 2017, Oracle and/or its affiliates. 4 | Rem All rights reserved. 5 | Rem 6 | Rem NAME 7 | Rem sodatestsetup.sql - sql script to setup SODA tests env 8 | Rem 9 | Rem DESCRIPTION 10 | Rem Create table/view for SODA tests 11 | Rem 12 | Rem NOTES 13 | Rem 14 | Rem 15 | Rem MODIFIED (MM/DD/YY) 16 | Rem Vincent Liu 08/31/14 - Created 17 | Rem 18 | 19 | SET ECHO ON 20 | SET FEEDBACK 1 21 | SET NUMWIDTH 10 22 | SET LINESIZE 80 23 | SET TRIMSPOOL ON 24 | SET TAB OFF 25 | SET PAGESIZE 100 26 | 27 | drop view soda_view; 28 | 29 | drop table soda_table; 30 | 31 | create table soda_table (ID VARCHAR2(255) NOT NULL PRIMARY KEY, CONTENT_TYPE VARCHAR2(255), 32 | CREATED_ON TIMESTAMP(6), LAST_MODIFIED TIMESTAMP(6), VERSION VARCHAR2(255), JSON_DOCUMENT BLOB); 33 | 34 | create view soda_view as select * from soda_table; 35 | 36 | create FUNCTION c2b( c IN CLOB ) RETURN BLOB 37 | as 38 | pos PLS_INTEGER := 1; 39 | buffer RAW( 32767 ); 40 | res BLOB; 41 | lob_len PLS_INTEGER := DBMS_LOB.getLength( c ); 42 | BEGIN 43 | DBMS_LOB.createTemporary( res, TRUE ); 44 | DBMS_LOB.OPEN( res, DBMS_LOB.LOB_ReadWrite ); 45 | LOOP 46 | buffer := UTL_RAW.cast_to_raw( DBMS_LOB.SUBSTR( c, 16000, pos ) ); 47 | IF UTL_RAW.LENGTH( buffer ) > 0 THEN 48 | DBMS_LOB.writeAppend( res, UTL_RAW.LENGTH( buffer ), buffer ); 49 | END IF; 50 | pos := pos + 16000; 51 | EXIT WHEN pos > lob_len; 52 | END LOOP; 53 | RETURN res; -- res is OPEN here 54 | END c2b; 55 | / 56 | 57 | -- create sodatbl and sequence sodatbl_version_seq for testGetVersion() 58 | drop table sodatbl; 59 | drop sequence sodatbl_version_seq; 60 | 61 | create table sodatbl (ID VARCHAR2(255) NOT NULL PRIMARY KEY, CONTENT_TYPE VARCHAR2(255), 62 | CREATED_ON TIMESTAMP(6), LAST_MODIFIED TIMESTAMP(6), VERSION varchar2(255) NOT NULL, JSON_DOCUMENT BLOB); 63 | 64 | create sequence sodatbl_version_seq increment by 1 start with 1 minvalue 1 maxvalue 9999999999999 nocache order; 65 | 66 | create or replace trigger sodatbl_trigger 67 | before insert or update on sodatbl 68 | for each row 69 | begin 70 | select sodatbl_version_seq.nextval into:new.version from sys.dual ; 71 | end; 72 | / 73 | 74 | commit; 75 | 76 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/logging/OracleLog.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | 7 | Controls logging 8 | */ 9 | 10 | /** 11 | * This class is not part of the public API, and is 12 | * subject to change. 13 | * 14 | * Do not rely on it in your application code. 15 | * 16 | * @author Max Orgiyan 17 | */ 18 | 19 | package oracle.json.logging; 20 | 21 | import java.security.AccessController; 22 | import java.security.PrivilegedAction; 23 | 24 | public class OracleLog 25 | { 26 | private static final String TRACE_PROPERTY = "oracle.soda.trace"; 27 | 28 | private static volatile boolean loggingEnabled = false; 29 | 30 | // Call initialize() on class load to read the System properties. 31 | // Put this after static variable initializers. 32 | static 33 | { 34 | initialize(); 35 | } 36 | 37 | static private void initialize() 38 | { 39 | try { 40 | String propStr = getSystemProperty(TRACE_PROPERTY); 41 | if (propStr != null && propStr.equalsIgnoreCase("true")) 42 | loggingEnabled = true; 43 | } 44 | catch (SecurityException e) { 45 | // Nothing to do: couldn't read the property 46 | } 47 | } 48 | 49 | // Must be private. Otherwise anyone can call it 50 | // and read system properties with permissions 51 | // given to SODA. 52 | static private String getSystemProperty(final String str) 53 | { 54 | // This PrivilegedAction mechanism will allow SODA 55 | // to read the system property if it has the appropriate 56 | // permission (without requiring the SODA caller to 57 | // have the permission). 58 | // 59 | // ### Need to make sure this is OK if running inside 60 | // the RDBMS 61 | final String p = AccessController.doPrivileged(new PrivilegedAction() { 62 | public String run() { 63 | return System.getProperty(str, null); 64 | } 65 | }); 66 | 67 | return p; 68 | } 69 | 70 | static public boolean isLoggingEnabled() 71 | { 72 | return loggingEnabled; 73 | } 74 | 75 | static public void enableLogging() { loggingEnabled = true; } 76 | } 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to this repository 2 | 3 | We welcome your contributions! There are multiple ways to contribute. 4 | 5 | ## Opening issues 6 | 7 | For bugs or enhancement requests, please file a GitHub issue unless it's 8 | security related. When filing a bug remember that the better written the bug is, 9 | the more likely it is to be fixed. If you think you've found a security 10 | vulnerability, do not raise a GitHub issue and follow the instructions in our 11 | [security policy](./SECURITY.md). 12 | 13 | ## Contributing code 14 | 15 | We welcome your code contributions. Before submitting code via a pull request, 16 | you will need to have signed the [Oracle Contributor Agreement][OCA] (OCA) and 17 | your commits need to include the following line using the name and e-mail 18 | address you used to sign the OCA: 19 | 20 | ```text 21 | Signed-off-by: Your Name 22 | ``` 23 | 24 | This can be automatically added to pull requests by committing with `--sign-off` 25 | or `-s`, e.g. 26 | 27 | ```text 28 | git commit --signoff 29 | ``` 30 | 31 | Only pull requests from committers that can be verified as having signed the OCA 32 | can be accepted. 33 | 34 | ## Pull request process 35 | 36 | 1. Ensure there is an issue created to track and discuss the fix or enhancement 37 | you intend to submit. 38 | 1. Fork this repository. 39 | 1. Create a branch in your fork to implement the changes. We recommend using 40 | the issue number as part of your branch name, e.g. `1234-fixes`. 41 | 1. Ensure that any documentation is updated with the changes that are required 42 | by your change. 43 | 1. Ensure that any samples are updated if the base image has been changed. 44 | 1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly 45 | what your changes are meant to do and provide simple steps on how to validate. 46 | your changes. Ensure that you reference the issue you created as well. 47 | 1. We will assign the pull request to 2-3 people for review before it is merged. 48 | 49 | ## Code of conduct 50 | 51 | Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd 52 | like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC]. 53 | 54 | [OCA]: https://oca.opensource.oracle.com 55 | [COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/ 56 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SODA - Simple Oracle Document Access 5 | 6 | 7 |

SODA - Simple Oracle Document Access

8 |

9 | SODA is a simple API for working with document collections. The API 10 | is primarily designed for working with JSON documents, although 11 | other types of document content, such as images, audio, and video, 12 | are supported as well. 13 |

14 |

15 | Find, insert, replace, and remove are some of the operations provided on 16 | document collections. 17 |

18 |

19 | The core interfaces are: 20 |

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
 
InterfaceDescription
OracleClientEntry point for working with the API. For the Oracle RDBMS SODA implementation, the entry point is the oracle.soda.rdbms.OracleRDBMSClient class, which implements this interface
OracleDocumentDocument
OracleDatabaseDatabase of document collections. Provides methods for opening of collections
OracleDatabaseAdminProvides DDL and metadata methods, such as collection creation, for the OracleDatabase
OracleCollectionDocument collection. Provides find(), insert(), etc. methods
OracleCollectionAdminProvides DDL and metadata methods, such as index creation, for the OracleCollection
OracleOperationBuilderA builder and executor of read and write operations on the document collection
OracleCursorReturned by OracleOperationBuilder.iterator(). Allows iteration over results of a read operation on the document collection. The next() method returns the next OracleDocument from the result
60 |

Note: future additions to the SODA interfaces are possible

61 | 62 | 63 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_sk.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=Dokument {0}, ktor\u00FD sa m\u00E1 nahradi\u0165, sa nena\u0161iel v {1}. 8 | 1102=Nie je implementovan\u00E9. 9 | 1103=Kolekcia {0} je len na \u010D\u00EDtanie, {1} nie je povolen\u00E9. 10 | 1104=Aktualiz\u00E1cie nie s\u00FA podporovan\u00E9 pre kolekciu zalo\u017Een\u00FA na bal\u00EDku {0}. 11 | 1105=Filtre a aktualiz\u00E1cie nie s\u00FA podporovan\u00E9 pre kolekciu zalo\u017Een\u00FA na bal\u00EDku {0}. 12 | 1106=Filtre a projekcie nie s\u00FA podporovan\u00E9 pre kolekciu zalo\u017Een\u00FA na bal\u00EDku {0}. 13 | 1107=Filtre nie s\u00FA podporovan\u00E9 pre kolekciu zalo\u017Een\u00FA na bal\u00EDku {0}. 14 | 1108=Indexy nie s\u00FA povolen\u00E9 pre kolekciu zalo\u017Een\u00FA na bal\u00EDku {0}. 15 | 1109=Kolekcia {0} nem\u00F4\u017Ee ma\u0165 bin\u00E1rny obsah v type st\u013Apca {1}. 16 | 1110=Po\u017Eiadavka indexu m\u00E1 v\u00E4\u010D\u0161\u00ED po\u010Det st\u013Apcov ako {0}. 17 | 1111=Kolekcia {0} nem\u00E1 \u017Eiadnu \u010Dasov\u00FA zna\u010Dku, ktor\u00E1 by ozna\u010Dovala, kedy bola naposledy modifikovan\u00E1. 18 | 1112=Kolekcia {0} je nakonfigurovan\u00E1 tak, aby ju nebolo mo\u017En\u00E9 zru\u0161i\u0165. 19 | 1113=Neplatn\u00E1 podmienka filtra. 20 | 1114=Kolekcia {0} pou\u017E\u00EDva vytv\u00E1ranie verzi\u00ED {1}, z\u00E1pisy vysielania toku d\u00E1t nie s\u00FA povolen\u00E9. 21 | 1115=Deskriptor nezodpoved\u00E1 existuj\u00FAcej kolekcii. 22 | 1116=Pr\u00EDrastkov\u00E9 aktualiz\u00E1cie alebo opravy dokumentov nie s\u00FA podporovan\u00E9. 23 | 1117=Dopyt pod\u013Ea {1} nie je implementovan\u00FD pre kolekciu zalo\u017Een\u00FA na bal\u00EDku {0}. 24 | 1118=Mus\u00ED by\u0165 zadan\u00FD n\u00E1zov kolekcie. 25 | 1119=Kolekcia {0} u\u017E existuje. 26 | 1120=Hodnota {0} nie je platn\u00FD k\u013E\u00FA\u010D typu {1}. 27 | 1121=Nepodarilo sa vlo\u017Ei\u0165 dokument do kolekcie {0}. 28 | 1122=Skr\u00E1tenie nie je podporovan\u00E9, kolekcia {0} nie je zalo\u017Een\u00E1 na tabu\u013Eke. 29 | 1123=Java Virtual Machine (JVM) nepodporuje algoritmus vytv\u00E1rania verzi\u00ED MD5. Prepnite na in\u00FD algoritmus vytv\u00E1rania verzi\u00ED. 30 | 1124=Java Virtual Machine (JVM) nepodporuje algoritmus vytv\u00E1rania verzi\u00ED SHA256. Prepnite na in\u00FD algoritmus vytv\u00E1rania verzi\u00ED. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_zh_CN.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=\u672A\u5728{1}\u4E2D\u627E\u5230\u8981\u66FF\u6362\u7684\u6587\u6863{0}\u3002 8 | 1102=\u5C1A\u672A\u5B9E\u65BD\u3002 9 | 1103=\u96C6\u5408{0}\u4E3A\u53EA\u8BFB, \u4E0D\u5141\u8BB8{1}\u3002 10 | 1104=\u57FA\u4E8E\u7A0B\u5E8F\u5305\u7684\u96C6\u5408{0}\u4E0D\u652F\u6301\u66F4\u65B0\u3002 11 | 1105=\u57FA\u4E8E\u7A0B\u5E8F\u5305\u7684\u96C6\u5408{0}\u4E0D\u652F\u6301\u8FC7\u6EE4\u5668\u548C\u66F4\u65B0\u3002 12 | 1106=\u57FA\u4E8E\u7A0B\u5E8F\u5305\u7684\u96C6\u5408{0}\u4E0D\u652F\u6301\u8FC7\u6EE4\u5668\u548C\u6295\u5F71\u3002 13 | 1107=\u57FA\u4E8E\u7A0B\u5E8F\u5305\u7684\u96C6\u5408{0}\u4E0D\u652F\u6301\u8FC7\u6EE4\u5668\u3002 14 | 1108=\u57FA\u4E8E\u7A0B\u5E8F\u5305\u7684\u96C6\u5408{0}\u4E0D\u5141\u8BB8\u4F7F\u7528\u7D22\u5F15\u3002 15 | 1109=\u96C6\u5408{0}\u4E0D\u80FD\u5177\u6709\u5217\u7C7B\u578B{1}\u7684\u4E8C\u8FDB\u5236\u5185\u5BB9\u3002 16 | 1110=\u7D22\u5F15\u8BF7\u6C42\u5177\u6709 {0} \u4E2A\u4EE5\u4E0A\u7684\u5217\u3002 17 | 1111=\u96C6\u5408{0}\u4E0D\u5177\u6709\u6307\u793A\u4E0A\u6B21\u4FEE\u6539\u65F6\u95F4\u7684\u65F6\u95F4\u6233\u3002 18 | 1112=\u96C6\u5408{0}\u5DF2\u914D\u7F6E, \u56E0\u6B64\u65E0\u6CD5\u5220\u9664\u3002 19 | 1113=\u8FC7\u6EE4\u6761\u4EF6\u65E0\u6548\u3002 20 | 1114=\u96C6\u5408{0}\u4F7F\u7528{1}\u7248\u672C\u5316, \u4E0D\u5141\u8BB8\u6D41\u5F0F\u5199\u5165\u3002 21 | 1115=\u63CF\u8FF0\u7B26\u4E0E\u73B0\u6709\u96C6\u5408\u4E0D\u5339\u914D\u3002 22 | 1116=\u4E0D\u652F\u6301\u5BF9\u6587\u6863\u6267\u884C\u589E\u91CF\u66F4\u65B0\u6216\u6253\u8865\u4E01\u3002 23 | 1117=\u672A\u5728\u57FA\u4E8E\u7A0B\u5E8F\u5305\u7684\u96C6\u5408{0}\u4E0A\u5B9E\u65BD\u6309{1}\u67E5\u8BE2\u3002 24 | 1118=\u5FC5\u987B\u6307\u5B9A\u96C6\u5408\u540D\u79F0\u3002 25 | 1119=\u96C6\u5408{0}\u5DF2\u5B58\u5728\u3002 26 | 1120=\u503C {0} \u4E0D\u662F\u7C7B\u578B {1} \u7684\u6709\u6548\u5173\u952E\u5B57\u3002 27 | 1121=\u65E0\u6CD5\u5C06\u6587\u6863\u63D2\u5165\u96C6\u5408{0}\u4E2D\u3002 28 | 1122=\u4E0D\u652F\u6301\u622A\u65AD, \u96C6\u5408 {0} \u4E0D\u57FA\u4E8E\u8868\u3002 29 | 1123=Java \u865A\u62DF\u673A (JVM) \u4E0D\u652F\u6301 MD5 \u7248\u672C\u5316\u7B97\u6CD5\u3002\u5207\u6362\u5230\u53E6\u4E00\u4E2A\u7248\u672C\u5316\u7B97\u6CD5\u3002 30 | 1124=Java \u865A\u62DF\u673A (JVM) \u4E0D\u652F\u6301 SHA256 \u7248\u672C\u5316\u7B97\u6CD5\u3002\u5207\u6362\u5230\u53E6\u4E00\u4E2A\u7248\u672C\u5316\u7B97\u6CD5\u3002 31 | 32 | -------------------------------------------------------------------------------- /test/src/oracle/json/tests/soda/test_SodaDependencies.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2020, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | /** 5 | * @author Josh Speigel 6 | */ 7 | package oracle.json.tests.soda; 8 | 9 | import oracle.jdbc.OracleConnection; 10 | import oracle.json.testharness.ConnectionFactory; 11 | import oracle.json.testharness.JsonTestCase; 12 | import oracle.json.testharness.DatabaseTestCase; 13 | import oracle.soda.OracleCollection; 14 | import oracle.soda.OracleDatabase; 15 | import oracle.soda.OracleDocument; 16 | import oracle.soda.OracleDatabaseAdmin; 17 | import oracle.soda.rdbms.OracleRDBMSClient; 18 | import junit.framework.TestCase; 19 | 20 | /** 21 | * Unit tests in oracle.json.tests.soda should be running with out orarestsoda.jar 22 | * in the classpath to avoid unintentional dependencies on that JAR. 23 | */ 24 | public final class test_SodaDependencies extends DatabaseTestCase { 25 | 26 | public void testClasspath() throws Exception { 27 | try { 28 | Class.forName("oracle.json.web.RestRequest"); 29 | fail("Expected exception"); 30 | } catch (ClassNotFoundException e) { 31 | // expected 32 | } 33 | } 34 | 35 | public void testSodaSanity() throws Exception { 36 | OracleConnection con = ConnectionFactory.createConnection(); 37 | OracleRDBMSClient client = new OracleRDBMSClient(); 38 | OracleDatabase database = client.getDatabase(con); 39 | OracleDatabaseAdmin dba = database.admin(); 40 | OracleDocument metaDoc = null; 41 | 42 | if (isJDCSOrATPMode()) { 43 | // ### replace with new builder once it becomes available 44 | metaDoc = database.createDocumentFromString("{\"keyColumn\":{\"name\":\"ID\",\"sqlType\":\"VARCHAR2\",\"maxLength\":255,\"assignmentMethod\":\"UUID\"},\"contentColumn\":{\"name\":\"JSON_DOCUMENT\",\"sqlType\":\"BLOB\"},\"lastModifiedColumn\":{\"name\":\"LAST_MODIFIED\"},\"versionColumn\":{\"name\":\"VERSION\",\"method\":\"UUID\"},\"creationTimeColumn\":{\"name\":\"CREATED_ON\"},\"readOnly\":false}"); 45 | } 46 | else { 47 | metaDoc = client.createMetadataBuilder().build(); 48 | } 49 | 50 | OracleCollection col = dba.createCollection("FOO", metaDoc); 51 | try { 52 | col = database.openCollection("FOO"); 53 | col.insert(client.createMetadataBuilder().build()); 54 | } finally { 55 | col.admin().drop(); 56 | } 57 | con.close(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=\u5728 {1} \u4E2D\u627E\u4E0D\u5230\u8981\u53D6\u4EE3\u7684\u6587\u4EF6 {0}. 8 | 1102=\u672A\u5BE6\u884C. 9 | 1103=\u96C6\u5408 {0} \u662F\u552F\u8B80\u7684, \u4E0D\u5141\u8A31 {1}. 10 | 1104=\u4EE5\u5957\u88DD\u7A0B\u5F0F\u70BA\u57FA\u790E\u7684\u96C6\u5408 {0} \u4E0D\u652F\u63F4\u66F4\u65B0. 11 | 1105=\u4EE5\u5957\u88DD\u7A0B\u5F0F\u70BA\u57FA\u790E\u7684\u96C6\u5408 {0} \u4E0D\u652F\u63F4\u7BE9\u9078\u548C\u66F4\u65B0. 12 | 1106=\u4EE5\u5957\u88DD\u7A0B\u5F0F\u70BA\u57FA\u790E\u7684\u96C6\u5408 {0} \u4E0D\u652F\u63F4\u7BE9\u9078\u548C\u6295\u5C04. 13 | 1107=\u4EE5\u5957\u88DD\u7A0B\u5F0F\u70BA\u57FA\u790E\u7684\u96C6\u5408 {0} \u4E0D\u652F\u63F4\u7BE9\u9078. 14 | 1108=\u4EE5\u5957\u88DD\u7A0B\u5F0F\u70BA\u57FA\u790E\u7684\u96C6\u5408 {0} \u4E0D\u5141\u8A31\u4F7F\u7528\u7D22\u5F15. 15 | 1109=\u96C6\u5408 {0} \u4E0D\u80FD\u5728\u8CC7\u6599\u6B04\u985E\u578B {1} \u4E2D\u6709\u4E8C\u9032\u4F4D\u5167\u5BB9. 16 | 1110=\u7D22\u5F15\u8981\u6C42\u8D85\u904E {0} \u500B\u8CC7\u6599\u6B04. 17 | 1111=\u96C6\u5408 {0} \u6C92\u6709\u6307\u793A\u4E0A\u6B21\u4FEE\u6539\u6642\u9593\u7684\u6642\u6233. 18 | 1112=\u96C6\u5408 {0} \u5DF2\u7D93\u8A2D\u5B9A, \u7121\u6CD5\u5C07\u5B83\u522A\u9664. 19 | 1113=\u7121\u6548\u7684\u7BE9\u9078\u689D\u4EF6. 20 | 1114=\u96C6\u5408 {0} \u4F7F\u7528 {1} \u555F\u52D5\u591A\u7248\u672C\u529F\u80FD, \u4E0D\u5141\u8A31\u4E32\u6D41\u5BEB\u5165. 21 | 1115=\u63CF\u8FF0\u5340\u8207\u73FE\u6709\u7684\u96C6\u5408\u4E0D\u76F8\u7B26. 22 | 1116=\u4E0D\u652F\u63F4\u6587\u4EF6\u7684\u589E\u91CF\u66F4\u65B0\u6216\u4FEE\u6B63. 23 | 1117=\u4EE5\u5957\u88DD\u7A0B\u5F0F\u70BA\u57FA\u790E\u7684\u96C6\u5408 {0} \u672A\u5BE6\u884C\u4F9D {1} \u67E5\u8A62. 24 | 1118=\u5FC5\u9808\u6307\u5B9A\u96C6\u5408\u540D\u7A31. 25 | 1119=\u96C6\u5408 {0} \u5DF2\u7D93\u5B58\u5728. 26 | 1120=\u503C {0} \u4E0D\u662F\u985E\u578B {1} \u7684\u6709\u6548\u7D22\u5F15\u9375. 27 | 1121=\u7121\u6CD5\u5C07\u6587\u4EF6\u63D2\u5165\u96C6\u5408 {0} \u4E2D. 28 | 1122=\u4E0D\u652F\u63F4\u622A\u65B7, \u96C6\u5408 {0} \u4E0D\u662F\u4EE5\u8868\u683C\u70BA\u57FA\u790E. 29 | 1123=Java \u865B\u64EC\u6A5F\u5668 (JVM) \u4E0D\u652F\u63F4 MD5 \u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u6F14\u7B97\u6CD5. \u5207\u63DB\u81F3\u5176\u4ED6\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u6F14\u7B97\u6CD5. 30 | 1124=Java \u865B\u64EC\u6A5F\u5668 (JVM) \u4E0D\u652F\u63F4 SHA256 \u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u6F14\u7B97\u6CD5. \u5207\u63DB\u81F3\u5176\u4ED6\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u6F14\u7B97\u6CD5. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_hu.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=A cser\u00E9lni k\u00EDv\u00E1nt {0} dokumentum nem tal\u00E1lhat\u00F3 ebben: {1}. 8 | 1102=Nincs megval\u00F3s\u00EDtva. 9 | 1103=A(z) {0} gy\u0171jtem\u00E9ny \u00EDr\u00E1sv\u00E9dett, {1} nem megengedett. 10 | 1104=A m\u00F3dos\u00EDt\u00E1sok nem t\u00E1mogatottak csomag alap\u00FA gy\u0171jtem\u00E9nyen: {0}. 11 | 1105=A sz\u0171r\u0151k \u00E9s m\u00F3dos\u00EDt\u00E1sok nem t\u00E1mogatottak csomag alap\u00FA gy\u0171jtem\u00E9nyen: {0}. 12 | 1106=A sz\u0171r\u0151k \u00E9s lek\u00E9pez\u00E9sek nem t\u00E1mogatottak csomag alap\u00FA gy\u0171jtem\u00E9nyen: {0}. 13 | 1107=A sz\u0171r\u0151k nem t\u00E1mogatottak csomag alap\u00FA gy\u0171jtem\u00E9nyen: {0}. 14 | 1108=Indexek nem megengedettek csomag alap\u00FA gy\u0171jtem\u00E9nyen: {0}. 15 | 1109=A(z) {0} gy\u0171jtem\u00E9ny nem rendelkezhet bin\u00E1ris tartalommal {1} oszlopt\u00EDpusban. 16 | 1110=Az indexk\u00E9relem {0} oszlopn\u00E1l t\u00F6bbet tartalmaz. 17 | 1111=A(z) {0} gy\u0171jtem\u00E9ny nem rendelkezik az utols\u00F3 m\u00F3dos\u00EDt\u00E1st jelz\u0151 id\u0151b\u00E9lyeggel. 18 | 1112=A(z) {0} gy\u0171jtem\u00E9ny \u00FAgy van konfigur\u00E1lva, hogy nem dobhat\u00F3 el. 19 | 1113=\u00C9rv\u00E9nytelen sz\u0171r\u00E9si felt\u00E9tel. 20 | 1114=A(z) {0} gy\u0171jtem\u00E9ny {1} verzi\u00F3kezel\u00E9st haszn\u00E1l, folyamatos \u00E1tviteli \u00EDr\u00E1s nem megengedett. 21 | 1115=A le\u00EDr\u00F3 nem egyezik megl\u00E9v\u0151 gy\u0171jtem\u00E9nnyel. 22 | 1116=N\u00F6vekm\u00E9nyes friss\u00EDt\u00E9sek \u00E9s jav\u00EDt\u00E1sok a dokumentumokon nem t\u00E1mogatottak. 23 | 1117=A(z) {1} szerinti lek\u00E9rdez\u00E9s nincs megval\u00F3s\u00EDtva csomag alap\u00FA gy\u0171jtem\u00E9nyen: {0}. 24 | 1118=A gy\u0171jtem\u00E9ny nev\u00E9t meg kell adni. 25 | 1119=Ez a gy\u0171jtem\u00E9ny m\u00E1r l\u00E9tezik: {0}. 26 | 1120=A(z) {0} \u00E9rt\u00E9k nem \u00E9rv\u00E9nyes {1} t\u00EDpus\u00FA kulcs. 27 | 1121=Nem siker\u00FClt dokumentumot besz\u00FArni a gy\u0171jtem\u00E9nybe: {0}. 28 | 1122=A csonkol\u00E1s nem t\u00E1mogatott, a(z) {0} gy\u0171jtem\u00E9ny nem t\u00E1bl\u00E1n alapul\u00F3. 29 | 1123=A Java virtu\u00E1lis sz\u00E1m\u00EDt\u00F3g\u00E9p (JVM) nem teszi t\u00E1mogatja az MD5 verzi\u00F3kezel\u00E9si algoritmust. V\u00E1ltson m\u00E1sik verzi\u00F3kezel\u00E9si algoritmusra. 30 | 1124=A Java virtu\u00E1lis sz\u00E1m\u00EDt\u00F3g\u00E9p (JVM) nem teszi t\u00E1mogatja az SHA256 verzi\u00F3kezel\u00E9si algoritmust. V\u00E1ltson m\u00E1sik verzi\u00F3kezel\u00E9si algoritmusra. 31 | 32 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_da.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Gr\u00E6nsestreng blev ikke fundet under analyse af flerdelt tekst/formulardatatekst. 8 | 1002=Linjeseparator til gr\u00E6nse blev ikke fundet under analyse af flerdelt tekst/formulardatatekst. 9 | 1003=Konvertering af tegns\u00E6t fejlede under analyse af formularargumenter. 10 | 1004=Konvertering af tegns\u00E6t fejlede for foresp\u00F8rgselsstreng. 11 | 1005=Linjeafslutningsstreng for header blev ikke fundet under analyse af flerdelt tekst/formulardatatekst. 12 | 1006=Feltnavn forventedes, men blev ikke fundet under analyse af flerdelt tekst/formulardatatekst. 13 | 1007=Ugyldigt feltnavn i flerdelt tekst/formulardatatekst. 14 | 1008=Afsluttende anf\u00F8rselstegn mangler i felt- eller filnavn i flerdelt br\u00F8dtekst/formulardatabr\u00F8dtekst. 15 | 1009=Linjeseparator, der markerer starten af feltv\u00E6rdien, blev ikke fundet i flerdelt tekst/formulardatatekst. 16 | 1010=Gr\u00E6nsestreng, der markerer afslutningen af feltv\u00E6rdien, blev ikke fundet i flerdelt tekst/formulardatatekst. 17 | 1011=Ugyldig dato-/klokkesl\u00E6tsstreng {0} (formatet er \u00E5\u00E5\u00E5\u00E5-MM-dd''T''TT:mm:ss.SSS). 18 | 1012=Syntaksfejl i foresp\u00F8rgsel. 19 | 1013=Tegnkodningen {0} blev ikke genkendt. 20 | 1014=Den kodede bytesekvens kunne ikke afkodes som {0}. 21 | 1015=POST af medietypen {0} er ikke tilladt. 22 | 1016=Ugyldig servlet-konfiguration: {0}. 23 | 1017=Ukendt konto {0}, det aktuelle skema er {1}. 24 | 1018=NULL eller tom streng er ikke en gyldig dato/tid. 25 | 1019=Dokument har flere instanser af n\u00F8gle. 26 | 1020=Intet inputdokument for udtr\u00E6k/inds\u00E6ttelse af n\u00F8gle. 27 | 1021=Sti til udtr\u00E6k/inds\u00E6ttelse af n\u00F8gle m\u00E5 ikke v\u00E6re tom. 28 | 1022=Dokumentinstans er ikke korrekt lukket. 29 | 1023=Dokumentinstans er tom eller er ikke et JSON-objekt. 30 | 1024=Udtrukket n\u00F8gle var ikke en streng eller et tal. 31 | 1025=Indsat n\u00F8gle matcher ikke eksisterende n\u00F8gle. 32 | 1026=Fandt et dubleret felt for n\u00F8gletrinnet {0}. 33 | 1027=Ikke-implementeret eller ikke tilg\u00E6ngelig formatkonvertering. 34 | 1028=Den udvidede JSON-datatype {0} underst\u00F8ttes ikke. 35 | 1029=Inputdokumentet for en konvertering er beskadiget eller ul\u00E6seligt. 36 | 1030=N\u00F8glen kan ikke udtr\u00E6kkes med en afventende n\u00F8gleerstatning. 37 | 1031=N\u00F8glesti ikke angivet til konvertering. 38 | 1032=Operationen {0} er ikke tilladt p\u00E5 {1}. 39 | 1033=Dokumentoperationen fandt en fejl: {0}. 40 | 1034=Dokumenttypen {0} underst\u00F8ttes ikke. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_no.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Finner ikke grensestrengen ved analysering av datahoveddelen i flere deler/skjemaer. 8 | 1002=Finner ikke skillelinjen for grensen ved analysering av datahoveddelen i flere deler/skjemaer. 9 | 1003=Tegnsettkonverteringen mislyktes ved analysering av skjemaargumenter. 10 | 1004=Tegnsettkonverteringen for sp\u00F8rrestrengen mislyktes. 11 | 1005=Finner ikke linjeavslutteren for toppteksten ved analysering av datahoveddelen i flere deler/skjemaer. 12 | 1006=Forventet, men fant ikke, feltnavn ved analysering av datahoveddelen i flere deler/skjemaer. 13 | 1007=Ugyldig feltnavn i datahoveddelen i flere deler/skjemaer. 14 | 1008=H\u00F8yre anf\u00F8rselstegn mangler i felt- eller filnavn i datahoveddelen i flere deler/skjemaer. 15 | 1009=Finner ikke skillelinjen som markerer starten p\u00E5 en feltverdi, i datahoveddelen i flere deler/skjemaer. 16 | 1010=Finner ikke grensestrengen som markerer slutten p\u00E5 en feltverdi, i datahoveddelen i flere deler/skjemaer. 17 | 1011=Ugyldig streng for dato/klokkeslett, {0} (formatet er \u00E5\u00E5\u00E5\u00E5-mm-dd T TT:mm:ss.SSS). 18 | 1012=Sp\u00F8rringssyntaksfeil. 19 | 1013=Gjenkjenner ikke tegnkodingen {0}. 20 | 1014=Kan ikke dekode den kodede bytesekvensen som {0}. 21 | 1015=Det er ikke tillatt med POST av medietypen {0}. 22 | 1016=Ugyldig servletkonfigurasjon: {0}. 23 | 1017=Kontoen {0} er ukjent. Gjeldende skjema er {1}. 24 | 1018=Nullstreng eller tom streng er ikke gyldig dato/klokkeslett. 25 | 1019=Dokumentet har flere n\u00F8kkelforekomster. 26 | 1020=Finner ikke inndatadokument for uttrekking/innsetting av n\u00F8kkel. 27 | 1021=Banen for uttrekking/innsetting av n\u00F8kkel kan ikke v\u00E6re tom. 28 | 1022=Dokumentforekomsten er ikke riktig lukket. 29 | 1023=Dokumentforekomsten er tom eller ikke et JSON-objekt. 30 | 1024=N\u00F8kkelen som er trukket ut, er ikke en streng eller et tall. 31 | 1025=Den innsatte n\u00F8kkelen samsvarer ikke med den eksisterende n\u00F8kkelen. 32 | 1026=Det ble funnet et duplisert felt for n\u00F8kkeltrinnet {0}. 33 | 1027=Ikke implementert eller ikke tilgjengelig formatkonvertering. 34 | 1028=Den utvidede JSON-datatypen {0} st\u00F8ttes ikke. 35 | 1029=Inndatadokumentet for en konvertering er skadet eller uleselig. 36 | 1030=Kan ikke trekke ut n\u00F8kkelen med en ventende n\u00F8kkelerstatning. 37 | 1031=N\u00F8kkelbane er ikke angitt for konvertering. 38 | 1032=Operasjonen {0} er ikke tillatt for {1}. 39 | 1033=Det har oppst\u00E5tt en feil i dokumentoperasjonen: {0}. 40 | 1034=Dokumenttypen {0} st\u00F8ttes ikke. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/SynchronizedCacheOfDescriptorCaches.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | This a cache of DescriptorCache caches, each 7 | corresponding to an account (i.e. Oracle schema). This cache is 8 | thread-safe, and can be shared across threads. 9 | 10 | Thread safety is achieved by controlling access to the 11 | non-thread-safe LRUCache via synchronized methods of this class. 12 | 13 | */ 14 | 15 | /** 16 | * This class is not part of the public API, and is 17 | * subject to change. 18 | * 19 | * Do not rely on it in your application code. 20 | * 21 | * @author Doug McMahon 22 | * @author Max Orgiyan 23 | */ 24 | 25 | package oracle.soda.rdbms.impl.cache; 26 | 27 | public class SynchronizedCacheOfDescriptorCaches 28 | implements CacheOfDescriptorCaches 29 | { 30 | private final LRUCache cacheOfDescriptorCaches; 31 | 32 | private final int numberOfDescriptors; 33 | 34 | public SynchronizedCacheOfDescriptorCaches(int numberOfEntries, 35 | int numberOfDescriptors) 36 | { 37 | cacheOfDescriptorCaches = 38 | new LRUCache(numberOfEntries); 39 | 40 | this.numberOfDescriptors = numberOfDescriptors; 41 | } 42 | 43 | /** 44 | * Get the collection descriptor cache matching an account name (i.e. an 45 | * Oracle schema). Creates a new collection descriptor cache if necessary. 46 | */ 47 | public synchronized DescriptorCache putIfAbsentAndGet(String accountName) 48 | { 49 | if (cacheOfDescriptorCaches.containsKey(accountName)) 50 | return cacheOfDescriptorCaches.get(accountName); 51 | 52 | DescriptorCache descriptorCache = new SynchronizedDescriptorCache(numberOfDescriptors); 53 | cacheOfDescriptorCaches.put(accountName, descriptorCache); 54 | return descriptorCache; 55 | } 56 | 57 | public synchronized DescriptorCache remove(String accountName) 58 | { 59 | return cacheOfDescriptorCaches.remove(accountName); 60 | } 61 | 62 | public synchronized void clear() 63 | { 64 | // We need to clear the caches one by one instead of clearing the 65 | // cache of caches, otherwise some objects with pointers to the 66 | // individual caches will still be holding the stale information. 67 | for (DescriptorCache dcache : cacheOfDescriptorCaches.values()) 68 | dcache.clear(); 69 | } 70 | 71 | public synchronized void clear(String accountName) 72 | { 73 | DescriptorCache dcache = cacheOfDescriptorCaches.get(accountName); 74 | if (dcache != null) 75 | dcache.clear(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_nl.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Er is geen grensstring gevonden tijdens het ontleden van de body met meerdelige schermgegevens. 8 | 1002=Er is geen lijnscheidingsteken voor de grens gevonden tijdens het ontleden van de body met meerdelige schermgegevens. 9 | 1003=Tekensetconversie is mislukt tijdens het ontleden van schermargumenten. 10 | 1004=Tekensetconversie van de zoekvraagstring is mislukt. 11 | 1005=Er is geen regelscheidingsteken voor de koptekst gevonden tijdens het ontleden van de body met meerdelige schermgegevens. 12 | 1006=Veldnaam is verwacht maar niet gevonden tijdens het ontleden van de body met meerdelige schermgegevens. 13 | 1007=Ongeldige veldnaam in de body met meerdelige schermgegevens. 14 | 1008=Afsluitend aanhalingsteken van het veld of de veldnaam ontbreekt in de body met meerdelige schermgegevens. 15 | 1009=In de body met meerdelige schermgegevens is geen lijnscheidingsteken gevonden dat het begin van de veldwaarde markeert. 16 | 1010=In de body met meerdelige schermgegevens is geen grensstring gevonden die het einde van de veldwaarde markeert. 17 | 1011=Ongeldige datum-/tijdstring {0} (de notatie is jjjj-MM-dd''T''UU:mm:ss.SSS) 18 | 1012=Syntaxisfout in de zoekvraag 19 | 1013=Tekencodering {0} wordt niet herkend. 20 | 1014=Gecodeerde bytereeks kan niet worden gedecodeerd als {0}. 21 | 1015=POST van mediatype {0} is niet toegestaan. 22 | 1016=Ongeldige servletconfiguratie: {0} 23 | 1017=Onbekende account {0}: het huidige schema is {1}. 24 | 1018=NULL-string of lege string is geen geldige datum/tijd. 25 | 1019=Document heeft meerdere instances van sleutel. 26 | 1020=Er is geen invoerdocument voor het ophalen/invoegen van een sleutel. 27 | 1021=Pad voor het ophalen/invoegen van een sleutel mag niet leeg zijn. 28 | 1022=Documentinstance is niet naar behoren afgesloten. 29 | 1023=Documentinstance is leeg of is geen JSON-object. 30 | 1024=Opgehaalde sleutel is geen string of getal. 31 | 1025=Ingevoegde sleutel komt met geen enkele bestaande sleutel overeen. 32 | 1026=Er is een dubbel veld gevonden voor sleutelstap {0}. 33 | 1027=Indelingsconversie is niet ge\u00EFmplementeerd of niet beschikbaar. 34 | 1028=Het uitgebreide JSON-gegevenstype {0} wordt niet ondersteund. 35 | 1029=Het invoerdocument voor een conversie is beschadigd of onleesbaar. 36 | 1030=De sleutel kan niet worden ge\u00EBxtraheerd bij een wachtende sleutelvervanging. 37 | 1031=Er is geen sleutelpad opgegeven voor conversie. 38 | 1032=Bewerking {0} is niet toegestaan in {1}. 39 | 1033=Er is een fout opgetreden bij de documentbewerking: {0}. 40 | 1034=Het documenttype {0} wordt niet ondersteund. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/ConcurrentCacheOfDescriptorCaches.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | This a cache of DescriptorCache caches, each 7 | corresponding to an account (i.e. Oracle schema). This cache is 8 | thread-safe, and can be shared across threads. 9 | 10 | Thread safety is achieved by using a concurrent hash map. There is 11 | no eviction policy, so the hash map will slowly fill with caches 12 | corresponding to each SODA-enabled schema. 13 | 14 | */ 15 | 16 | /** 17 | * This class is not part of the public API, and is 18 | * subject to change. 19 | * 20 | * Do not rely on it in your application code. 21 | * 22 | * @author Doug McMahon 23 | * @author Max Orgiyan 24 | */ 25 | 26 | package oracle.soda.rdbms.impl.cache; 27 | 28 | import java.util.concurrent.ConcurrentHashMap; 29 | 30 | public class ConcurrentCacheOfDescriptorCaches 31 | implements CacheOfDescriptorCaches 32 | { 33 | private final ConcurrentHashMap cacheOfDescriptorCaches = 34 | new ConcurrentHashMap(10); 35 | 36 | private final int numberOfDescriptors; 37 | 38 | public ConcurrentCacheOfDescriptorCaches(int numberOfDescriptors) 39 | { 40 | this.numberOfDescriptors = numberOfDescriptors; 41 | } 42 | 43 | /** 44 | * Get the collection descriptor cache matching an account name (i.e. an 45 | * Oracle schema). Creates a new collection descriptor cache if necessary. 46 | */ 47 | public DescriptorCache putIfAbsentAndGet(String accountName) 48 | { 49 | DescriptorCache oldCache = cacheOfDescriptorCaches.get(accountName); 50 | if (oldCache != null) 51 | return oldCache; 52 | 53 | DescriptorCache newCache = new ConcurrentDescriptorCache(numberOfDescriptors); 54 | oldCache = cacheOfDescriptorCaches.putIfAbsent(accountName, newCache); 55 | 56 | return (oldCache != null) ? oldCache : newCache; 57 | } 58 | 59 | public DescriptorCache remove(String accountName) 60 | { 61 | return cacheOfDescriptorCaches.remove(accountName); 62 | } 63 | 64 | public void clear() 65 | { 66 | // We need to clear the caches one by one instead of clearing the 67 | // cache of caches, otherwise some objects with pointers to the 68 | // individual caches will still be holding the stale information. 69 | for (DescriptorCache dcache : cacheOfDescriptorCaches.values()) 70 | dcache.clear(); 71 | } 72 | 73 | public void clear(String accountName) 74 | { 75 | DescriptorCache dcache = cacheOfDescriptorCaches.get(accountName); 76 | if (dcache != null) 77 | dcache.clear(); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_sv.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Hittade ingen gr\u00E4nsstr\u00E4ng vid tolkning av multipart/form-data-text. 8 | 1002=Hittade ingen radavgr\u00E4nsare f\u00F6r gr\u00E4ns vid tolkning av multipart/form-data-text. 9 | 1003=Kunde inte konvertera teckentabell vid tolkning av formul\u00E4rargument. 10 | 1004=Kunde inte konvertera teckentabell f\u00F6r fr\u00E5gestr\u00E4ng. 11 | 1005=Hittade inget radavslutningstecken f\u00F6r huvud vid tolkning av multipart/form-data-text. 12 | 1006=Ett f\u00E4ltnamn f\u00F6rv\u00E4ntades men hittades inte vid tolkning av multipart/form-data-text. 13 | 1007=Ogiltigt f\u00E4ltnamn i multipart/form-data-text. 14 | 1008=Avslutande citattecken saknas i f\u00E4lt- eller filnamn i multipart/form-data-text. 15 | 1009=Hittade ingen radavgr\u00E4nsare som markerar b\u00F6rjan p\u00E5 f\u00E4ltv\u00E4rde i multipart/form-data-text. 16 | 1010=Hittade ingen gr\u00E4nsstr\u00E4ng som markerar slutet p\u00E5 f\u00E4ltv\u00E4rde i multipart/form-data-text. 17 | 1011=Ogiltig datum-/tidsstr\u00E4ng, {0} (formatet \u00E4r \u00E5\u00E5\u00E5\u00E5-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=Fr\u00E5gesyntaxfel. 19 | 1013=Teckenkodningen {0} \u00E4r ok\u00E4nd. 20 | 1014=Den kodade bytesekvensen kunde inte avkodas som {0}. 21 | 1015=POST av medietypen {0} \u00E4r otill\u00E5tet. 22 | 1016=Ogiltig servletkonfiguration: {0}. 23 | 1017=Ok\u00E4nt konto, {0}. Det aktuella schemat \u00E4r {1}. 24 | 1018=Null eller tom str\u00E4ng \u00E4r inte ett giltigt v\u00E4rde f\u00F6r datum/tid. 25 | 1019=Dokumentet har flera instanser av nyckel. 26 | 1020=Inget indatadokument f\u00F6r nyckelextrahering/-infogning. 27 | 1021=S\u00F6kv\u00E4gen f\u00F6r nyckelextrahering/-infogning m\u00E5ste anges. 28 | 1022=Dokumentinstansen har inte st\u00E4ngts p\u00E5 r\u00E4tt s\u00E4tt. 29 | 1023=Dokumentinstansen \u00E4r tom eller \u00E4r inte ett JSON-objekt. 30 | 1024=Den extraherade nyckeln var inte en str\u00E4ng eller ett tal. 31 | 1025=Den infogade nyckeln matchar inte n\u00E5gon befintlig nyckel. 32 | 1026=Hittade ett dubblettf\u00E4lt f\u00F6r nyckelsteget {0}. 33 | 1027=Inte implementerad eller otillg\u00E4nglig formatkonvertering. 34 | 1028=Den ut\u00F6kade JSON-datatypen {0} st\u00F6ds inte. 35 | 1029=Indatadokumentet f\u00F6r en konvertering \u00E4r skadad eller ol\u00E4slig 36 | 1030=Nyckeln kan inte extraheras med en avvaktande nyckelers\u00E4ttning. 37 | 1031=Ingen nyckels\u00F6kv\u00E4g har angetts f\u00F6r konvertering. 38 | 1032=\u00C5tg\u00E4rden {0} till\u00E5ts inte p\u00E5 {1}. 39 | 1033=Dokument\u00E5tg\u00E4rden p\u00E5tr\u00E4ffade ett fel: {0}. 40 | 1034=Dokumenttypen {0} st\u00F6ds inte. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_it.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Stringa limite non trovata durante l'analisi del corpo dei dati multiparte/form. 8 | 1002=Separatore di riga per limite non trovato durante l'analisi del corpo dei dati multiparte/form. 9 | 1003=Conversione set di caratteri non riuscita durante l'analisi degli argomenti del form. 10 | 1004=Conversione set di caratteri della stringa di query non riuscita. 11 | 1005=Carattere di chiusura riga per limite non trovato durante l'analisi del corpo dei dati multiparte/form. 12 | 1006=Nome del campo previsto ma non trovato durante l'analisi del corpo dei dati multiparte/form. 13 | 1007=Nome del campo non trovato nel corpo dei dati multiparte/form. 14 | 1008=Apice di chiusura mancante dal nome del campo o del file nel corpo dei dati multiparte/form. 15 | 1009=Separatore di riga che contrassegna l'inizio del valore del campo non trovato durante l'analisi del corpo dei dati multiparte/form. 16 | 1010=Stringa limite che contrassegna la fine del valore del campo non trovata durante l'analisi del corpo dei dati multiparte/form. 17 | 1011=Stringa data/ora {0} non valida (il formato \u00E8 aaaa-MM-gg''T''HH:mm:ss.SSS). 18 | 1012=Errore di sintassi nella query. 19 | 1013=Codifica dei caratteri {0} non riconosciuta. 20 | 1014=Impossibile decodificare la sequenza di byte codificata come {0}. 21 | 1015=POST del tipo di supporto {0} non consentito. 22 | 1016=Configurazione servlet non valida: {0}. 23 | 1017=Account {0} sconosciuto. Lo schema corrente \u00E8 {1}. 24 | 1018=Una stringa nulla o vuota non \u00E8 una data/ora valida. 25 | 1019=Il documento contiene pi\u00F9 istanze di chiave. 26 | 1020=Nessun documento di input per l'estrazione o l'inserimento della chiave. 27 | 1021=Il percorso per l'estrazione o l'inserimento della chiave non pu\u00F2 essere vuoto. 28 | 1022=L'istanza del documento non \u00E8 stata chiusa in modo corretto. 29 | 1023=L'istanza del documento \u00E8 vuota o non \u00E8 un oggetto JSON. 30 | 1024=La chiave estratta non \u00E8 una stringa o un numero. 31 | 1025=La chiave inserita non corrisponde a una chiave esistente. 32 | 1026=Trovato un campo duplicato per il passo della chiave {0}. 33 | 1027=Conversione del formato non implementata o non disponibile. 34 | 1028=Il tipo di dati JSON esteso {0} non \u00E8 supportato. 35 | 1029=Il documento di input per una conversione \u00E8 danneggiato o illeggibile. 36 | 1030=Impossibile estrarre la chiave con una sostituzione chiave in sospeso. 37 | 1031=Percorso della chiave non specificato per la conversione. 38 | 1032=Operazione {0} non consentita su {1}. 39 | 1033=L''operazione sul documento ha rilevato un errore: {0}. 40 | 1034=Il tipo di documento {0} non \u00E8 supportato. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/cache/ConcurrentDescriptorCache.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, 2021, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Cache of collection descriptors for a particular account 7 | (i.e. Oracle schema), that can be shared among different 8 | threads. 9 | 10 | Thread safety is achieved by using a concurrent hash map. 11 | Gets and puts are done without synchronization. 12 | 13 | Removals are done synchronously. They should be rare. 14 | The cache is cleared completely during a put if it's gotten 15 | large, a condition that should also be rare. Users should 16 | run a local cache in from of this type of cache to avoid 17 | needing to re-fetch recently accessed descriptors. 18 | 19 | NOTES 20 | 21 | ### This clearing is done in lieu of a real LRU policy. 22 | 23 | */ 24 | 25 | package oracle.soda.rdbms.impl.cache; 26 | 27 | import java.util.concurrent.ConcurrentHashMap; 28 | 29 | import oracle.soda.rdbms.impl.CollectionDescriptor; 30 | 31 | /** 32 | * This class is not part of the public API, and is 33 | * subject to change. 34 | * 35 | * Do not rely on it in your application code. 36 | * 37 | * @author Doug McMahon 38 | * @author Max Orgiyan 39 | */ 40 | 41 | class ConcurrentDescriptorCache implements DescriptorCache 42 | { 43 | private final ConcurrentHashMap cache; 44 | 45 | private final int numberOfEntries; 46 | 47 | public ConcurrentDescriptorCache(int numberOfEntries) 48 | { 49 | this.numberOfEntries = numberOfEntries; 50 | this.cache = new ConcurrentHashMap(numberOfEntries); 51 | } 52 | 53 | public CollectionDescriptor get(String collectionName) 54 | { 55 | return cache.get(collectionName); 56 | } 57 | 58 | public CollectionDescriptor putIfAbsent(CollectionDescriptor desc) 59 | { 60 | // Clear the cache if it's grown too large 61 | // ### We should really have a concurrent LRU cache 62 | if (cache.size() > numberOfEntries) 63 | clear(); 64 | return cache.putIfAbsent(desc.getName(), desc); 65 | } 66 | 67 | public CollectionDescriptor put(CollectionDescriptor desc) 68 | { 69 | // Clear the cache if it's grown too large 70 | // ### We should really have a concurrent LRU cache 71 | if (cache.size() > numberOfEntries) 72 | clear(); 73 | return cache.put(desc.getName(), desc); 74 | } 75 | 76 | public boolean containsDescriptor(String collectionName) 77 | { 78 | return cache.containsKey(collectionName); 79 | } 80 | 81 | public synchronized void remove(String collectionName) 82 | { 83 | cache.remove(collectionName); 84 | } 85 | 86 | public synchronized void clear() 87 | { 88 | cache.clear(); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_fi.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Rajan merkkijonoa ei l\u00F6ytynyt, kun j\u00E4sennettiin moniosaista/n\u00E4ytt\u00F6tietojen runkoa. 8 | 1002=Rajan rivien erotinta ei l\u00F6ytynyt, kun j\u00E4sennettiin moniosaista/n\u00E4ytt\u00F6tietojen runkoa. 9 | 1003=Merkist\u00F6muunnos ep\u00E4onnistui, kun j\u00E4sennettiin n\u00E4yt\u00F6n argumentteja. 10 | 1004=Kyselymerkkijonon merkist\u00F6muunnos ep\u00E4onnistui. 11 | 1005=Otsikon rivien loppumerkki\u00E4 ei l\u00F6ytynyt, kun j\u00E4sennettiin moniosaista/n\u00E4ytt\u00F6tietojen runkoa. 12 | 1006=Odotettiin kent\u00E4n nime\u00E4, mutta sit\u00E4 ei l\u00F6ytynyt, kun j\u00E4sennettiin moniosaista/n\u00E4ytt\u00F6tietojen runkoa. 13 | 1007=Virheellinen kent\u00E4n nimi moniosaisessa/n\u00E4ytt\u00F6tietojen rungossa. 14 | 1008=P\u00E4\u00E4tt\u00E4v\u00E4 lainausmerkki puuttuu kent\u00E4n tai tiedoston nimest\u00E4 moniosaisessa/n\u00E4ytt\u00F6tietojen rungossa. 15 | 1009=Kent\u00E4n alun arvon osoittavaa rivin erotinta ei l\u00F6ytynyt moniosaisesta/n\u00E4ytt\u00F6tietojen rungosta. 16 | 1010=Kent\u00E4n lopun arvon osoittavaa rajan merkkijonoa ei l\u00F6ytynyt moniosaisesta/n\u00E4ytt\u00F6tietojen rungosta. 17 | 1011=Virheellinen p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4n/ajan merkkijono {0} (muoto on vvvv-KK-pp''T''HH:mm:ss.SSS). 18 | 1012=Kyselyn syntaksivirhe. 19 | 1013=Merkkikoodausta {0} ei tunnisteta. 20 | 1014=Koodattua tavusarjaa ei voitu purkaa muotoon {0}. 21 | 1015=Mediatyypin {0} POST ei ole sallittu. 22 | 1016=Virheellinen servlet-kokoonpano: {0}. 23 | 1017=Tuntematon tili {0}, nykyinen kaava on {1}. 24 | 1018=Null- tai tyhj\u00E4 merkkijono ei ole sallittu p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4/aika. 25 | 1019=Asiakirjassa on useita avaimen instansseja. 26 | 1020=Sy\u00F6teasiakirja puuttuu avaimen poimintaa tai lis\u00E4yst\u00E4 varten. 27 | 1021=Avaimen poiminnan tai lis\u00E4yksen polku ei voi olla tyhj\u00E4. 28 | 1022=Asiakirjan instanssia ei ole suljettu oikein. 29 | 1023=Asiakirjan instanssi on tyhj\u00E4, tai se ei ole JSON-objekti. 30 | 1024=Poimittu avain ei ole merkkijono tai luku. 31 | 1025=Lis\u00E4tty avain ei vastaa olemassa olevaa avainta. 32 | 1026=L\u00F6ytyi kaksi samaa kentt\u00E4\u00E4 avainvaiheelle {0}. 33 | 1027=Toteuttamaton tai ei k \u00E4ytett\u00E4viss\u00E4 oleva muodon muunto. 34 | 1028=Laajennettua JSON-tietotyyppi\u00E4 {0} ei tueta. 35 | 1029=Muunnettava sy\u00F6teasiakirja on vioittunut tai sit\u00E4 ei voi lukea. 36 | 1030=Avainta ei voi poimia, kun odotetaan korvaavaa avainta. 37 | 1031=Avaimen polkua ei ole m\u00E4\u00E4ritetty muuntoa varten. 38 | 1032=Toimintoa {0} ei sallita kohteessa {1}. 39 | 1033=Asiakirjan toiminnossa oli virhe: {0}. 40 | 1034=Asiakirjatyyppi\u00E4 {0} ei tueta. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_de.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Beim Parsen von Multipart/Form-Data Body wurde keine Begrenzungszeichenfolge gefunden. 8 | 1002=Beim Parsen von Multipart/Form-Data Body wurde kein Zeilentrennzeichen zur Begrenzung gefunden. 9 | 1003=Zeichensatzkonvertierung war beim Parsen von Form-Argumenten nicht erfolgreich. 10 | 1004=Zeichensatzkonvertierung von Abfragezeichenfolge war nicht erfolgreich. 11 | 1005=Beim Parsen von Multipart/Form-Data Body wurde kein Zeilenabschlusszeichen f\u00FCr Header gefunden. 12 | 1006=Feldname erwartet, jedoch beim Parsen von Multipart/Form-Data Body nicht gefunden. 13 | 1007=Ung\u00FCltiger Feldname in Multipart/Form-Data Body gefunden. 14 | 1008=Schlie\u00DFendes Anf\u00FChrungszeichen fehlt in Feld- oder Dateiname in Multipart/Form-Data Body 15 | 1009=Zeilentrennzeichen, das den Beginn des Feldwertes markiert, wurde in Multipart/Form-Data Body nicht gefunden. 16 | 1010=Begrenzungszeichenfolge, die das Ende des Feldwertes markiert, wurde in Multipart/Form-Data Body nicht gefunden 17 | 1011=Ung\u00FCltige Datum-/Zeitzeichenfolge {0} (Format ist jjjj-MM-tt''T''HH:mm:ss.SSS). 18 | 1012=Fehler bei Abfragesyntax. 19 | 1013=Zeichencodierung {0} nicht erkannt. 20 | 1014=Codierte Bytesequenz konnte nicht als {0} decodiert werden. 21 | 1015=POST von Mediatyp {0} nicht zul\u00E4ssig. 22 | 1016=Ung\u00FCltige Servlet-Konfiguration: {0}. 23 | 1017=Unbekannter Account {0}, aktuelles Schema ist {1}. 24 | 1018=Null- oder leere Zeichenfolge ist kein g\u00FCltiger Datums-/Uhrzeitwert. 25 | 1019=Dokument weist mehrere Schl\u00FCsselinstanzen auf. 26 | 1020=Kein Eingabedokument f\u00FCr Extrahieren/Einf\u00FCgen von Schl\u00FCssel. 27 | 1021=Pfad f\u00FCr Extrahieren/Einf\u00FCgen von Schl\u00FCssel darf nicht leer sein. 28 | 1022=Dokumentinstanz wurde nicht ordnungsgem\u00E4\u00DF geschlossen. 29 | 1023=Dokumentinstanz ist leer oder kein JSON-Objekt. 30 | 1024=Der extrahierte Schl\u00FCssel war keine Zeichenfolge oder Zahl. 31 | 1025=Der eingef\u00FCgte Schl\u00FCssel stimmt nicht mit dem vorhandenen Schl\u00FCssel \u00FCberein. 32 | 1026=Doppeltes Feld f\u00FCr Schl\u00FCsselschritt {0} gefunden. 33 | 1027=Nicht implementierte oder nicht verf\u00FCgbare Formatkonvertierung. 34 | 1028=Der erweiterte JSON-Datentyp {0} wird nicht unterst\u00FCtzt. 35 | 1029=Das Eingabedokument f\u00FCr eine Konvertierung ist besch\u00E4digt oder nicht lesbar. 36 | 1030=Der Schl\u00FCssel kann nicht extrahiert werden, solange ein Schl\u00FCsselaustausch aussteht. 37 | 1031=Schl\u00FCsselpfad nicht f\u00FCr Konvertierung angegeben. 38 | 1032=Vorgang {0} nicht f\u00FCr {1} zul\u00E4ssig. 39 | 1033=Beim Dokumentvorgang ist ein Fehler aufgetreten: {0}. 40 | 1034=Der Dokumenttyp {0} wird nicht unterst\u00FCtzt. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_es.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=No se ha encontrado la cadena de l\u00EDmite al analizar el cuerpo multipart/form-data. 8 | 1002=No se ha encontrado el separador de l\u00EDnea al analizar el cuerpo multipart/form-data. 9 | 1003=Fallo en la conversi\u00F3n del juego de caracteres al analizar los argumentos de formato. 10 | 1004=Fallo en la conversi\u00F3n del juego de caracteres de la cadena de consulta. 11 | 1005=No se ha encontrado la cabecera del terminador de l\u00EDnea al analizar el cuerpo multipart/form-data. 12 | 1006=Se esperaba un nombre de campo pero no se ha encontrado al analizar el cuerpo multipart/form-data. 13 | 1007=Nombre de campo no v\u00E1lido en el cuerpo multipart/form-data. 14 | 1008=Falta la comilla de cierre en el nombre de archivo o campo en el cuerpo multipart/form-data. 15 | 1009=No se ha encontrado el separador de l\u00EDnea que marca el inicio del valor de campo en el cuerpo multipart/form-data. 16 | 1010=No se ha encontrado la cadena de l\u00EDmite que marca el final del valor de campo en el cuerpo multipart/form-data. 17 | 1011=Cadena de fecha/hora no v\u00E1lida {0} (el formato es aaaa-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=Error de sintaxis de consulta. 19 | 1013=No se reconoce la codificaci\u00F3n de caracteres {0}. 20 | 1014=La secuencia de bytes codificada no se ha podido descodificar como {0}. 21 | 1015=No est\u00E1 permitido POST del tipo de medio {0}. 22 | 1016=Configuraci\u00F3n de servlet no v\u00E1lida: {0}. 23 | 1017=Cuenta desconocida {0}, el esquema actual es {1}. 24 | 1018=Una cadena nula o vac\u00EDa no es una fecha/hora v\u00E1lida. 25 | 1019=El documento tiene varias instancias de clave. 26 | 1020=No hay ning\u00FAn documento de entrada para la extracci\u00F3n/inserci\u00F3n de claves. 27 | 1021=La ruta de acceso para la extracci\u00F3n/inserci\u00F3n de claves no puede estar vac\u00EDa. 28 | 1022=No se ha cerrado correctamente la instancia del documento. 29 | 1023=La instancia del documento est\u00E1 vac\u00EDa o no es un objeto JSON. 30 | 1024=La clave extra\u00EDda no era una cadena o un n\u00FAmero. 31 | 1025=La clave introducida no coincide con la clave existente. 32 | 1026=Se ha encontrado un campo duplicado para el paso de la clave {0}. 33 | 1027=Conversi\u00F3n de formato no implantado o no disponible. 34 | 1028=El tipo de dato JSON extendido {0} no est\u00E1 soportado. 35 | 1029=El documento de entrada para una conversi\u00F3n est\u00E1 da\u00F1ado o no se puede leer. 36 | 1030=No se puede extraer la clave con una sustituci\u00F3n de clave pendiente. 37 | 1031=No se ha especificado la ruta de acceso de la clave para la conversi\u00F3n. 38 | 1032=Operaci\u00F3n {0} no permitida en {1}. 39 | 1033=Error en la operaci\u00F3n del documento: {0}. 40 | 1034=El tipo de documento {0} no est\u00E1 soportado. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_fr.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Cha\u00EEne de limite introuvable lors de l'analyse du corps multipart/form-data. 8 | 1002=S\u00E9parateur de ligne pour la limite introuvable lors de l'analyse du corps multipart/form-data. 9 | 1003=Echec de la conversion de jeu de caract\u00E8res lors de l'analyse des arguments de formulaire. 10 | 1004=Echec de la conversion de jeu de caract\u00E8res de la cha\u00EEne de requ\u00EAte. 11 | 1005=Caract\u00E8re de fin de ligne pour l'en-t\u00EAte introuvable lors de l'analyse du corps multipart/form-data. 12 | 1006=Nom de champ attendu mais introuvable lors de l'analyse du corps multipart/form-data. 13 | 1007=Nom de champ non valide dans le corps multipart/form-data. 14 | 1008=Guillemet de fermeture manquant dans le nom de fichier ou de champ dans le corps multipart/form-data. 15 | 1009=S\u00E9parateur de ligne marquant le d\u00E9but de la valeur de champ introuvable dans le corps multipart/form-data. 16 | 1010=Cha\u00EEne de limite marquant la fin de la valeur de champ introuvable dans le corps multipart/form-data. 17 | 1011=Cha\u00EEne de date/d''heure {0} non valide (format : yyyy-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=Erreur de syntaxe de requ\u00EAte. 19 | 1013=Encodage de caract\u00E8res {0} non reconnu. 20 | 1014=Impossible de d\u00E9coder la s\u00E9quence d''octets encod\u00E9e en tant que {0}. 21 | 1015=Op\u00E9ration POST du type de support {0} non autoris\u00E9e. 22 | 1016=Configuration de servlet non valide : {0}. 23 | 1017=Compte inconnu : {0}. Le sch\u00E9ma en cours est {1}. 24 | 1018=Une cha\u00EEne NULL ou vide n'est pas une date/heure valide. 25 | 1019=Le document comporte plusieurs instances de la cl\u00E9. 26 | 1020=Aucun document d'entr\u00E9e pour l'extraction/l'insertion de cl\u00E9. 27 | 1021=Le chemin pour l'extraction/l'insertion de cl\u00E9 ne peut pas \u00EAtre vide. 28 | 1022=L'instance de document n'est pas ferm\u00E9e correctement. 29 | 1023=L'instance de document est vide ou n'est pas un objet JSON. 30 | 1024=La cl\u00E9 extraite n'\u00E9tait pas une cha\u00EEne ou un nombre. 31 | 1025=La cl\u00E9 ins\u00E9r\u00E9e ne correspond pas \u00E0 la cl\u00E9 existante. 32 | 1026=Champ en double trouv\u00E9 pour l''\u00E9tape de cl\u00E9 {0}. 33 | 1027=Conversion de format non impl\u00E9ment\u00E9e ou non disponible. 34 | 1028=Le type de donn\u00E9es JSON \u00E9tendu {0} n''est pas pris en charge. 35 | 1029=Le document d'entr\u00E9e pour une conversion est endommag\u00E9 ou illisible. 36 | 1030=Impossible d'extraire la cl\u00E9 avec un remplacement de cl\u00E9 en attente. 37 | 1031=Chemin de cl\u00E9 non indiqu\u00E9 pour la conversion. 38 | 1032=Op\u00E9ration {0} non autoris\u00E9e sur {1}. 39 | 1033=Une erreur est survenue pendant l''op\u00E9ration du document : {0}. 40 | 1034=Le type de document {0} n''est pas pris en charge. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_ro.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=\u015Eirul Boundary nu a fost g\u0103sit la interpretarea corpului multipart/form-data. 8 | 1002=Separatorul de linii pt. Boundary nu a fost g\u0103sit la interpretarea corpului multipart/form-data. 9 | 1003=Conversia setului de caractere a e\u015Fuat la interpretarea argumentelor formularului. 10 | 1004=Conversia setului de caractere a \u015Firului interog\u0103rii a e\u015Fuat. 11 | 1005=Terminatorul de linii pt. antet nu a fost g\u0103sit la interpretarea corpului multipart/form-data. 12 | 1006=Se a\u015Ftepta numele c\u00E2mpului, dar nu a fost g\u0103sit la interpretarea corpului multipart/form-data. 13 | 1007=Nume nevalid de c\u00E2mp \u00EEn corpul multipart/form-data. 14 | 1008=Lipsesc ghilimelele de \u00EEnchidere din numele c\u00E2mpului sau fi\u015Fierului din corpul multipart/form-data. 15 | 1009=Separatorul de linii ce marcheaz\u0103 \u00EEnceputul valorii c\u00E2mpului nu a fost g\u0103sit \u00EEn corpul multipart/form-data. 16 | 1010=\u015Eirul Boundary ce marcheaz\u0103 sf\u00E2r\u015Fitul valorii c\u00E2mpului nu a fost g\u0103sit \u00EEn corpul multipart/form-data. 17 | 1011=\u015Eir nevalid de tip Dat\u0103/Or\u0103, {0} (formatul este yyyy-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=eroare \u00EEn sintaxa interog\u0103rii. 19 | 1013=Codificarea caracterelor, {0}, nu a fost recunoscut\u0103. 20 | 1014=Secven\u0163a de bytes codificat\u0103 nu a putut fi decodificat\u0103, deoarece {0}. 21 | 1015=Opera\u0163ia POST pt. tipul de media {0} nu este permis\u0103. 22 | 1016=Configura\u0163ie nevalid\u0103 a servletului: {0}. 23 | 1017=Cont necunoscut {0}; schema curent\u0103 este {1}. 24 | 1018=Un \u015Fir nul sau gol nu este o dat\u0103/or\u0103 valid\u0103. 25 | 1019=Documentul are mai multe instan\u0163e ale cheii. 26 | 1020=Niciun document de intrare pt. extragerea/inserarea cheii. 27 | 1021=Calea pt. extragerea/inserarea cheii nu poate fi necompletat\u0103. 28 | 1022=Instan\u0163a documentului nu este \u00EEnchis\u0103 corect. 29 | 1023=Instan\u0163a documentului este goal\u0103 sau nu este un obiect JSON. 30 | 1024=Cheia extras\u0103 nu a fost un \u015Fir sau un num\u0103r. 31 | 1025=Cheia inserat\u0103 nu corespunde cheii existente. 32 | 1026=S-a g\u0103sit un c\u00E2mp duplicat pt. etapa cheii {0} 33 | 1027=Conversie neimplementat\u0103 sau indisponibil\u0103 a formatului. 34 | 1028=Tipul de date JSON extins {0} nu este acceptat. 35 | 1029=Documentul de intrare pt. o conversie este corupt sau nu poate fi citit. 36 | 1030=Cheia nu poate fi extras\u0103 dac\u0103 exist\u0103 o \u00EEnlocuire \u00EEn a\u015Fteptare a cheii. 37 | 1031=Calea cheii nu este specificat\u0103 pentru conversie. 38 | 1032=Opera\u0163ia {0} nu este permis\u0103 pe {1}. 39 | 1033=Opera\u0163ia documentului a \u00EEnt\u00E2lnit o eroare: {0}. 40 | 1034=Tipul documentului {0} nu este acceptat. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_pt.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Cadeia de caracteres limite n\u00E3o encontrada na an\u00E1lise do corpo multipart/form-data. 8 | 1002=Separador de linha para o limite n\u00E3o encontrado na an\u00E1lise do corpo multipart/form-data. 9 | 1003=Falha na convers\u00E3o do conjunto de caracteres na an\u00E1lise dos argumentos da ficha. 10 | 1004=Falha na convers\u00E3o do conjunto de caracteres da cadeia de caracteres de consulta. 11 | 1005=Terminador de linha para o cabe\u00E7alho n\u00E3o encontrado na an\u00E1lise do corpo multipart/form-data. 12 | 1006=Nome do campo esperado mas n\u00E3o encontrado na an\u00E1lise do corpo multipart/form-data. 13 | 1007=Nome do campo inv\u00E1lido no corpo multipart/form-data. 14 | 1008=Falta a aspa de fecho no nome do campo ou ficheiro no corpo multipart/form-data. 15 | 1009=O separador de linha que marca o in\u00EDcio do valor do campo n\u00E3o foi encontrado no corpo multipart/form-data. 16 | 1010=A cadeia de caracteres limite que marca o fim do valor do campo n\u00E3o foi encontrada no corpo multipart/form-data. 17 | 1011=Cadeia de caracteres de data/hora inv\u00E1lida {0} (o formato \u00E9 aaaa-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=Erro de sintaxe da consulta. 19 | 1013=Codifica\u00E7\u00E3o de caracteres {0} n\u00E3o reconhecida. 20 | 1014=N\u00E3o foi poss\u00EDvel descodificar a sequ\u00EAncia de bytes codificada como {0}. 21 | 1015=POST do tipo de suporte {0} n\u00E3o permitido. 22 | 1016=Configura\u00E7\u00E3o do servlet inv\u00E1lida: {0}. 23 | 1017=Conta desconhecida {0}; o schema atual \u00E9 {1}. 24 | 1018=Uma cadeia de caracteres nula ou vazia n\u00E3o \u00E9 uma data/hora v\u00E1lida. 25 | 1019=O documento tem v\u00E1rias inst\u00E2ncias da chave. 26 | 1020=Nenhum documento de entrada de dados para extra\u00E7\u00E3o/inser\u00E7\u00E3o da chave. 27 | 1021=O percurso para extra\u00E7\u00E3o/inser\u00E7\u00E3o da chave n\u00E3o pode estar vazio. 28 | 1022=A inst\u00E2ncia do documento n\u00E3o foi fechada corretamente. 29 | 1023=A inst\u00E2ncia do documento est\u00E1 vazia ou n\u00E3o \u00E9 um objeto de JSON. 30 | 1024=A chave extra\u00EDda n\u00E3o \u00E9 uma cadeia de caracteres ou n\u00FAmero. 31 | 1025=A chave inserida n\u00E3o corresponde \u00E0 chave existente. 32 | 1026=Foi encontrado um duplicado para o passo da chave {0}. 33 | 1027=Convers\u00E3o de formato n\u00E3o implementada ou indispon\u00EDvel. 34 | 1028=O tipo de dados de JSON alargados {0} n\u00E3o \u00E9 suportado. 35 | 1029=O documento de entrada para uma convers\u00E3o est\u00E1 corrompido ou \u00E9 ileg\u00EDvel. 36 | 1030=N\u00E3o \u00E9 poss\u00EDvel extrair a chave com uma substitui\u00E7\u00E3o de chave pendente. 37 | 1031=Percurso da chave n\u00E3o especificado para convers\u00E3o. 38 | 1032=Opera\u00E7\u00E3o {0} n\u00E3o permitida em {1}. 39 | 1033=Ocorreu um erro na opera\u00E7\u00E3o do documento: {0}. 40 | 1034=Tipo de documento {0} n\u00E3o suportado. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=N\u00E3o foi poss\u00EDvel encontrar a string lim\u00EDtrofe ao efetuar parsing do corpo multipart/form-data. 8 | 1002=N\u00E3o foi poss\u00EDvel encontrar o separador de linha ao efetuar parsing do corpo multipart/form-data. 9 | 1003=Houve falha na convers\u00E3o do conjunto de caracteres ao efetuar parsing dos argumentos do form. 10 | 1004=Houve falha na convers\u00E3o do conjunto de caracteres da string de consulta. 11 | 1005=N\u00E3o foi poss\u00EDvel encontrar o separador de linha do cabe\u00E7alho ao efetuar parsing do corpo multipart/form-data. 12 | 1006=N\u00E3o foi poss\u00EDvel encontrar o nome de campo esperado ao efetuar parsing do corpo multipart/form-data. 13 | 1007=Nome de campo inv\u00E1lido no corpo multipart/form-data. 14 | 1008=Faltam as aspas de fechamento no nome do campo ou arquivo no corpo multipart/form-data. 15 | 1009=N\u00E3o foi encontrado no corpo multipart/form-data o separador de linha que marca o in\u00EDcio do valor do campo. 16 | 1010=N\u00E3o foi encontrado no corpo multipart/form-data a string lim\u00EDtrofe que marca o final do valor do campo. 17 | 1011=String {0} de data/hor\u00E1rio inv\u00E1lida (o formato \u00E9 aaaa-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=Erro na sintaxe da consulta. 19 | 1013=Codifica\u00E7\u00E3o de caracteres {0} n\u00E3o reconhecida. 20 | 1014=N\u00E3o foi poss\u00EDvel decodificar como {0} a sequ\u00EAncia de bytes codificada. 21 | 1015=POST do tipo de m\u00EDdia {0} n\u00E3o permitido. 22 | 1016=Configura\u00E7\u00E3o inv\u00E1lida do servlet: {0}. 23 | 1017=Conta {0} desconhecida; o esquema atual \u00E9 {1}. 24 | 1018=String nula ou vazia - n\u00E3o \u00E9 uma data/hora v\u00E1lida. 25 | 1019=O documento tem v\u00E1rias inst\u00E2ncias de chave. 26 | 1020=N\u00E3o h\u00E1 documento de entrada para a extra\u00E7\u00E3o/inser\u00E7\u00E3o da chave. 27 | 1021=O caminho para a extra\u00E7\u00E3o/inser\u00E7\u00E3o da chave n\u00E3o pode ficar vazio. 28 | 1022=A inst\u00E2ncia do documento n\u00E3o foi fechada corretamente. 29 | 1023=A inst\u00E2ncia do documento est\u00E1 vazio ou n\u00E3o \u00E9 um objeto JSON. 30 | 1024=A chave extra\u00EDda n\u00E3o era uma string ou n\u00FAmero. 31 | 1025=A chave inserida n\u00E3o corresponde \u00E0 chave existente. 32 | 1026=Foi encontrado um campo duplicado para a etapa principal {0}. 33 | 1027=Convers\u00E3o de formato n\u00E3o implementada ou indispon\u00EDvel. 34 | 1028=N\u00E3o h\u00E1 suporte para o tipo de dados JSON estendido {0}. 35 | 1029=O documento de entrada para uma convers\u00E3o est\u00E1 danificado ou ileg\u00EDvel. 36 | 1030=N\u00E3o \u00E9 poss\u00EDvel extrair a chave com uma substitui\u00E7\u00E3o de chave pendente. 37 | 1031=Caminho de chave n\u00E3o especificado para a convers\u00E3o. 38 | 1032=Opera\u00E7\u00E3o {0} n\u00E3o permitida em {1}. 39 | 1033=A opera\u00E7\u00E3o de documento encontrou um erro: {0}. 40 | 1034=N\u00E3o h\u00E1 suporte para o tipo de documento {0}. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/Predicate.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | QBE Predicate class 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Rahul Manohar Kadwe 16 | * @author Doug McMahon 17 | * @author Max Orgiyan 18 | */ 19 | 20 | package oracle.json.parser; 21 | 22 | public class Predicate 23 | { 24 | 25 | final JsonQueryPath path; 26 | final String value; 27 | final String returnType; 28 | final String literalFuncParam; 29 | final boolean sortByMinMax; 30 | 31 | final String errorClause; 32 | 33 | public JsonQueryPath getQueryPath() 34 | { 35 | return path; 36 | } 37 | 38 | public String[] getPathSteps() 39 | { 40 | return path.getSteps(); 41 | } 42 | 43 | public String getPath() 44 | { 45 | return path.toString(); 46 | } 47 | 48 | public String getValue() 49 | { 50 | return value; 51 | } 52 | 53 | public String getLiteralFuncParam() 54 | { 55 | return literalFuncParam; 56 | } 57 | 58 | /* Return string is suitable for a SQL/JSON returning clause */ 59 | public String getReturnType() 60 | { 61 | return returnType; 62 | } 63 | 64 | /* Return string is suitable for a SQL/JSON error clause */ 65 | public String getErrorClause() 66 | { 67 | return errorClause; 68 | } 69 | 70 | public boolean getSortByMinMaxParam() { 71 | return sortByMinMax; 72 | } 73 | 74 | Predicate() 75 | { 76 | this(null); 77 | } 78 | 79 | Predicate(JsonQueryPath path) 80 | { 81 | this(path, null); 82 | } 83 | 84 | Predicate(JsonQueryPath path, String value, String literalFuncParam) 85 | { 86 | this(path, value, null, null, false, literalFuncParam); 87 | } 88 | 89 | Predicate(JsonQueryPath path, String value) 90 | { 91 | this(path, value, null, null, false, null); 92 | } 93 | 94 | /** 95 | * The value string is either: 96 | * "1" or "-1" for asc/desc flag in order by predicates, or 97 | * a modifier such as "double", "upper", "type", etc. 98 | * The return type is one of: 99 | * "number", "date", "timestamp", "varchar2", or "varchar2(___)" 100 | * The error parameter is one of the error clause 101 | * constants defined above. 102 | */ 103 | 104 | Predicate(JsonQueryPath path, String value, String returnType, String errorClause, boolean sortByMinMax) 105 | { 106 | this(path, value, returnType, errorClause, sortByMinMax, null); 107 | } 108 | 109 | Predicate(JsonQueryPath path, String value, String returnType, String errorClause, 110 | boolean sortByMinMax, String literalFuncParam) 111 | { 112 | this.path = path; 113 | this.value = value; 114 | this.returnType = returnType; 115 | this.errorClause = errorClause; 116 | this.sortByMinMax = sortByMinMax; 117 | this.literalFuncParam = literalFuncParam; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/OrderBySpecification.java: -------------------------------------------------------------------------------- 1 | package oracle.json.parser; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Map.Entry; 5 | 6 | import jakarta.json.JsonObject; 7 | import jakarta.json.JsonString; 8 | import jakarta.json.JsonValue; 9 | import jakarta.json.JsonNumber; 10 | import jakarta.json.JsonValue.ValueType; 11 | 12 | /** 13 | * Describes the $orderby entry of a filter expression. 14 | * 15 | * Note, this state and functionality was previously in FilterLoader. It has 16 | * been moved here so that it can be used without going through a 17 | * parse/serialization of the filter expression. 18 | */ 19 | public class OrderBySpecification 20 | { 21 | 22 | private ArrayList orderKeys = null; 23 | private ArrayList orderVals = null; 24 | 25 | public OrderBySpecification(JsonObject value) 26 | { 27 | JsonValue orderby = value.get(FilterLoader.ORDERBY); 28 | if (orderby == null || 29 | orderby.getValueType() != ValueType.OBJECT) { 30 | return; 31 | } 32 | // This is intended to be the same logic that FilterLoader 33 | // does in a streaming fashion. 34 | for (Entry entry : 35 | orderby.asJsonObject().entrySet()) { 36 | String key = entry.getKey(); 37 | JsonValue child = entry.getValue(); 38 | switch (child.getValueType()) { 39 | case ARRAY: 40 | case OBJECT: 41 | case FALSE: 42 | case TRUE: 43 | case NULL: 44 | appendOrderBy(key, null); // signals a "bad" key 45 | break; 46 | case NUMBER: 47 | appendOrderBy(key, 48 | ((JsonNumber)child).bigDecimalValue().toString()); 49 | break; 50 | case STRING: 51 | appendOrderBy(key, ((JsonString)child).getString()); 52 | break; 53 | default: 54 | throw new IllegalStateException(); // infeasible 55 | } 56 | } 57 | } 58 | 59 | public OrderBySpecification() { 60 | 61 | } 62 | 63 | int getOrderCount() 64 | { 65 | if ((orderKeys == null) || (orderVals == null)) return(0); 66 | return(orderKeys.size()); 67 | } 68 | 69 | /** 70 | * Get the Nth order key path. 71 | * Returns null if the position is out of bounds 72 | */ 73 | String getOrderPath(int pos) 74 | { 75 | if (pos < 0) return(null); 76 | if (orderKeys == null) return(null); 77 | if (pos >= orderKeys.size()) return(null); 78 | return(orderKeys.get(pos)); 79 | } 80 | 81 | /** 82 | * Get the Nth order key direction (1 or -1) 83 | * Returns null if the value is "bad" (true/false/null) 84 | */ 85 | String getOrderDirection(int pos) 86 | { 87 | if (pos < 0) return(null); 88 | if (orderVals == null) return(null); 89 | if (pos >= orderVals.size()) return(null); 90 | return(orderVals.get(pos)); 91 | } 92 | 93 | void appendOrderBy(String key, String val) 94 | { 95 | if (orderKeys == null) orderKeys = new ArrayList(); 96 | if (orderVals == null) orderVals = new ArrayList(); 97 | 98 | orderKeys.add(key); 99 | orderVals.add(val); 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/OracleClient.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2018, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | package oracle.soda; 5 | 6 | import java.sql.Connection; 7 | 8 | /** 9 | * Entry point for SODA (Simple Oracle Document Access). Provides 10 | * a way to get an {@link OracleDatabase} object. 11 | *

12 | * An implementation must provide a public class implementing this 13 | * interface, that the user application is able to instantiate. For 14 | * example, for the Oracle RDBMS implementation of SODA, this 15 | * class is {@link oracle.soda.rdbms.OracleRDBMSClient}. 16 | * Then, a SODA application would obtain an instance of OracleClient 17 | * as follows: 18 | *

19 | *
20 |  * OracleClient cl = new OracleRDBMSClient();
21 |  * 
22 | */ 23 | public interface OracleClient 24 | { 25 | /** 26 | * Gets the document collections database. 27 | *

28 | * The same JDBC connection should not be used to back more than 29 | * one OracleDatabase 30 | * 31 | * @param connection JDBC connection. Some SODA implementations 32 | * (e.g. non-JDBC based) can accept 33 | * null as a valid parameter. 34 | * @return document collections database 35 | * @throws OracleException if there's an error getting the database 36 | */ 37 | OracleDatabase getDatabase(Connection connection) 38 | throws OracleException; 39 | 40 | /** 41 | * Gets the document collections database. This method serves 42 | * the same purpose as {@link #getDatabase(Connection)}, except 43 | * it also provides the avoidTxnManagement 44 | * flag. If this flag is set to true SODA will report 45 | * an error for any operation that requires 46 | * transaction management. This is useful when running 47 | * distributed transactions, to ensure that SODA's local 48 | * transaction management does not interfere with global 49 | * transaction decisions. Note: unless you're performing 50 | * distributed transactions, you should not use this 51 | * method. Instead, use {@link #getDatabase(Connection)}. 52 | *

53 | * 54 | * The same JDBC connection should not be used to back more than 55 | * one OracleDatabase 56 | * 57 | * @param connection JDBC connection. Some SODA implementations 58 | * (e.g. non-JDBC based) can accept 59 | * null as a valid parameter. 60 | * @param avoidTxnManagement flag specifying whether to avoid transaction 61 | * management. If set to true, 62 | * an error will be thrown if a SODA operation 63 | * requires transaction management. If set to 64 | * false, it has no effect. 65 | * @return document collections database 66 | * @throws OracleException if there's an error getting the database 67 | */ 68 | OracleDatabase getDatabase(Connection connection, boolean avoidTxnManagement) 69 | throws OracleException; 70 | } 71 | -------------------------------------------------------------------------------- /test/src/oracle/json/tests/soda/test_TimestampToString.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* $Header: xdk/test/txjjson/src/oracle/json/tests/soda/test_TimestampToString.java /st_xdk_soda1/1 2020/01/29 12:44:01 jspiegel Exp $ */ 4 | 5 | /* Copyright (c) 2019, 2020, Oracle and/or its affiliates. 6 | All rights reserved.*/ 7 | package oracle.json.tests.soda; 8 | 9 | import java.sql.ResultSet; 10 | import java.sql.SQLException; 11 | import java.sql.Statement; 12 | import java.time.LocalDateTime; 13 | 14 | import oracle.json.testharness.SodaTestCase; 15 | import oracle.soda.rdbms.impl.OracleDatabaseImpl; 16 | 17 | /** 18 | * Tests conversion between SQL timestamp and string 19 | * used for last modified and creation time properties 20 | */ 21 | public class test_TimestampToString extends SodaTestCase { 22 | 23 | private static int C = 10000; 24 | 25 | public void testYears() { 26 | timestampTest("01-Jan-1970 00:00:00.000000", "interval '1' year ", 7000); 27 | } 28 | 29 | public void testMonths() { 30 | timestampTest("01-Jan-1970 00:00:00.000000", "interval '1' month ", 7000); 31 | } 32 | 33 | public void testDays() { 34 | timestampTest("01-Jan-1970 00:00:00.000000", "interval '1' day ", C); 35 | } 36 | 37 | public void testMinutes() { 38 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '1' minute ", C); 39 | } 40 | 41 | public void testSeconds() { 42 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '1' second ", C); 43 | } 44 | 45 | public void testMilliseconds() { 46 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0.1' second ", C); 47 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0.01' second ", C); 48 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0.001' second ", C); 49 | } 50 | 51 | public void testMicroseconds() { 52 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0.0001' second ", C); 53 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0.00001' second ", C); 54 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0.000001' second ", C); 55 | } 56 | 57 | public void testNanoseconds() { 58 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0 00:00:00.0000001' day to second(9)", C); 59 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0 00:00:00.00000001' day to second(9)", C); 60 | timestampTest("01-Jan-2000 00:00:00.000000", "interval '0 00:00:00.000000001' day to second(9)", C); 61 | } 62 | 63 | private void timestampTest(String start, String interval, int count) { 64 | try { 65 | Statement stmt = this.conn.createStatement(); 66 | ResultSet rs = stmt.executeQuery("select ts, to_char(ts, 'YYYY-MM-DD\"T\"HH24:MI:SS.FF\"Z\"') from " 67 | + "(select TO_TIMESTAMP ('" + start + "', 'DD-Mon-YYYY HH24:MI:SS.FF') + (" + interval 68 | + " * level) ts from dual connect by level <= " + count + ")"); 69 | while (rs.next()) { 70 | LocalDateTime ldt = rs.getObject(1, LocalDateTime.class); 71 | String str = rs.getObject(2, String.class); 72 | String str2 = OracleDatabaseImpl.localDateTimeToString(ldt); 73 | assertEquals(str, str2); 74 | } 75 | stmt.close(); 76 | } catch (SQLException e) { 77 | throw new RuntimeException(e); 78 | } 79 | } 80 | 81 | } -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_pl.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Podczas sk\u0142adniowej analizy tre\u015Bci \u017C\u0105dania multipart/form-data nie znaleziono napisu granicznego. 8 | 1002=Podczas sk\u0142adniowej analizy tre\u015Bci \u017C\u0105dania multipart/form-data nie znaleziono granicznego separatora linii. 9 | 1003=Niepowodzenie konwersji zestawu znak\u00F3w podczas analizy sk\u0142adniowej argument\u00F3w formularza. 10 | 1004=Niepowodzenie konwersji zestawu znak\u00F3w napisu zapytania. 11 | 1005=Podczas sk\u0142adniowej analizy tre\u015Bci \u017C\u0105dania multipart/form-data nie znaleziono zako\u0144czenia linii dla nag\u0142\u00F3wka. 12 | 1006=Podczas sk\u0142adniowej analizy tre\u015Bci \u017C\u0105dania multipart/form-data oczekiwano nazwy pola, lecz jej nie znaleziono. 13 | 1007=Niepoprawna nazwa pola w tre\u015Bci \u017C\u0105dania multipart/form-data. 14 | 1008=W tre\u015Bci \u017C\u0105dania multipart/form-data brakuje zamykaj\u0105cego znaku cudzys\u0142owu dla nazwy pola lub nazwy pliku. 15 | 1009=W tre\u015Bci \u017C\u0105dania multipart/form-data nie znaleziono separatora linii sygnalizuj\u0105cego pocz\u0105tek warto\u015Bci pola. 16 | 1010=W tre\u015Bci \u017C\u0105dania multipart/form-data nie znaleziono napisu granicznego sygnalizuj\u0105cego koniec warto\u015Bci pola. 17 | 1011=Niepoprawny napis "{0}" daty/godziny (format ma posta\u0107: yyyy-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=B\u0142\u0105d sk\u0142adni zapytania. 19 | 1013=Nieznane kodowanie znak\u00F3w "{0}". 20 | 1014=Zakodowanej sekwencji bajt\u00F3w nie mo\u017Cna by\u0142o zdekodowa\u0107 jako "{0}". 21 | 1015=Przesy\u0142anie typu "media" {0} przy u\u017Cyciu metody POST jest niedozwolone. 22 | 1016=Niepoprawna konfiguracja serwleta: {0}. 23 | 1017=Nieznane konto {0}; bie\u017C\u0105cy schemat: {1}. 24 | 1018=Napis pusty lub maj\u0105cy warto\u015B\u0107 Null nie jest poprawn\u0105 dat\u0105/godzin\u0105. 25 | 1019=Dokument ma wi\u0119cej ni\u017C jedn\u0105 instancj\u0119 klucza. 26 | 1020=Brak dokumentu wej\u015Bciowego dla operacji ekstrakcji/wstawiania klucza. 27 | 1021=\u015Acie\u017Cka dla operacji ekstrakcji/wstawiania klucza nie mo\u017Ce by\u0107 pusta. 28 | 1022=Instancja dokumentu nie zosta\u0142a poprawnie zamkni\u0119ta. 29 | 1023=Instancja dokumentu jest pusta lub nie jest obiektem JSON. 30 | 1024=Wyekstrahowany klucz nie by\u0142 warto\u015Bci\u0105 napisow\u0105 ani liczbow\u0105. 31 | 1025=Wstawiany klucz nie odpowiada istniej\u0105cemu. 32 | 1026=Wykryto zduplikowane pole dla etapu klucza: {0}. 33 | 1027=Niezaimplementowana lub niedost\u0119pna konwersja formatu. 34 | 1028=Rozszerzony typ danych JSON "{0}" nie jest obs\u0142ugiwany. 35 | 1029=Dokument wej\u015Bciowy, kt\u00F3ry ma zosta\u0107 poddany konwersji, jest uszkodzony lub nie mo\u017Cna go odczyta\u0107. 36 | 1030=Nie mo\u017Cna wyekstrahowa\u0107 klucza, dla kt\u00F3rego jest zakolejkowana operacja zast\u0105pienia klucza. 37 | 1031=Dla konwersji nie okre\u015Blono \u015Bcie\u017Cki klucza. 38 | 1032=Operacja "{0}" jest niedozwolona w odniesieniu do "{1}". 39 | 1033=Podczas operacji zwi\u0105zanej z dokumentem wyst\u0105pi\u0142 b\u0142\u0105d: {0}. 40 | 1034=Typ dokumentu "{0}" nie jest obs\u0142ugiwany. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_sk.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Po\u010Das syntaktickej anal\u00FDzy tela d\u00E1t typu multipart/form-data sa nena\u0161iel re\u0165azec ohrani\u010Denia. 8 | 1002=Po\u010Das syntaktickej anal\u00FDzy tela d\u00E1t typu multipart/form-data sa nena\u0161iel odde\u013Eova\u010D riadkov pre ohrani\u010Denie. 9 | 1003=Po\u010Das syntaktickej anal\u00FDzy argumentov formul\u00E1ra zlyhala konverzia znakovej mno\u017Einy. 10 | 1004=Zlyhala konverzia znakovej mno\u017Einy re\u0165azca dopytu. 11 | 1005=Po\u010Das syntaktickej anal\u00FDzy tela d\u00E1t typu multipart/form-data sa nena\u0161iel koncov\u00FD znak riadka pre hlavi\u010Dku. 12 | 1006=Po\u010Das syntaktickej anal\u00FDzy tela d\u00E1t typu multipart/form-data sa o\u010Dak\u00E1val n\u00E1zov po\u013Ea, ale nena\u0161iel sa. 13 | 1007=Neplatn\u00FD n\u00E1zov po\u013Ea v tele d\u00E1t typu multipart/form-data. 14 | 1008=V tele d\u00E1t typu multipart/form-data ch\u00FDba koncov\u00E1 \u00FAvodzovka v n\u00E1zve po\u013Ea alebo s\u00FAboru. 15 | 1009=V tele d\u00E1t typu multipart/form-data sa nena\u0161iel odde\u013Eova\u010D riadkov, ktor\u00FD ozna\u010Duje za\u010Diatok hodnoty po\u013Ea. 16 | 1010=V tele d\u00E1t typu multipart/form-data sa nena\u0161iel re\u0165azec ohrani\u010Denia, ktor\u00FD ozna\u010Duje koniec hodnoty po\u013Ea. 17 | 1011=Neplatn\u00FD re\u0165azec d\u00E1tumu/\u010Dasu {0} (form\u00E1t je rrrr-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=Syntaktick\u00E1 chyba dopytu. 19 | 1013=K\u00F3dovanie znakov {0} nebolo rozpoznan\u00E9. 20 | 1014=Zak\u00F3dovan\u00FA sekvenciu bajtov nebolo mo\u017En\u00E9 dek\u00F3dova\u0165 ako {0}. 21 | 1015=Po\u017Eiadavka POST pre typ m\u00E9dia {0} nie je povolen\u00E1. 22 | 1016=Neplatn\u00E1 konfigur\u00E1cia servletu: {0}. 23 | 1017=Nezn\u00E1me konto {0}, aktu\u00E1lna sch\u00E9ma je {1}. 24 | 1018=Re\u0165azec, ktor\u00FD je null alebo pr\u00E1zdny, nie je platn\u00FD d\u00E1tum/\u010Das. 25 | 1019=Dokument m\u00E1 viacer\u00E9 in\u0161tancie k\u013E\u00FA\u010Da. 26 | 1020=\u017Diadny vstupn\u00FD dokument na extrakciu/vlo\u017Eenie k\u013E\u00FA\u010Da. 27 | 1021=Cesta pre extrakciu/vlo\u017Eenie k\u013E\u00FA\u010Da nem\u00F4\u017Ee by\u0165 pr\u00E1zdna. 28 | 1022=In\u0161tancia dokumentu nie je riadne zatvoren\u00E1. 29 | 1023=In\u0161tancia dokumentu je pr\u00E1zdna alebo nepredstavuje objekt JSON. 30 | 1024=Extrahovan\u00FD k\u013E\u00FA\u010D nebol re\u0165azec ani \u010D\u00EDslo. 31 | 1025=Vlo\u017Een\u00FD k\u013E\u00FA\u010D sa nezhoduje s existuj\u00FAcim k\u013E\u00FA\u010Dom. 32 | 1026=Na\u0161lo sa duplicitn\u00E9 pole pre krok k\u013E\u00FA\u010Da {0}. 33 | 1027=Neimplementovan\u00E1 alebo nedostupn\u00E1 konverzia form\u00E1tu. 34 | 1028=Roz\u0161\u00EDren\u00FD d\u00E1tov\u00FD typ JSON {0} nie je podporovan\u00FD. 35 | 1029=Vstupn\u00FD dokument pre konverziu je po\u0161koden\u00FD alebo ne\u010Ditate\u013En\u00FD. 36 | 1030=Nie je mo\u017En\u00E9 extrahova\u0165 k\u013E\u00FA\u010D \u010Dakaj\u00FAci na nahradenie. 37 | 1031=Pre konverziu nebola zadan\u00E1 cesta k\u013E\u00FA\u010Da. 38 | 1032=Oper\u00E1cia {0} nie je povolen\u00E1 pre {1}. 39 | 1033=Pri oper\u00E1cii dokumentu sa vyskytla chyba: {0}. 40 | 1034=Typ dokumentu {0} nie je podporovan\u00FD. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/META-INF/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, 2024, Oracle and/or its affiliates. 2 | 3 | This software is dual-licensed to you under the MIT License (MIT) and the Universal Permissive License (UPL). 4 | See below for license terms. You may choose either license, or both. 5 | 6 | MIT License 7 | 8 | Copyright (c) 2015, 2024, Oracle and/or its affiliates. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 11 | software and associated documentation files (the "Software"), to deal in the Software 12 | without restriction, including without limitation the rights to use, copy, modify, 13 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies 18 | or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 21 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 22 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 25 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | The Universal Permissive License (UPL), Version 1.0 28 | 29 | Subject to the condition set forth below, permission is hereby granted to any 30 | person obtaining a copy of this software, associated documentation and/or data 31 | (collectively the "Software"), free of charge and under any and all copyright 32 | rights in the Software, and any and all patent rights owned or freely 33 | licensable by each licensor hereunder covering either (i) the unmodified 34 | Software as contributed to or provided by such licensor, or (ii) the Larger 35 | Works (as defined below), to deal in both 36 | 37 | (a) the Software, and 38 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if 39 | one is included with the Software (each a "Larger Work" to which the Software 40 | is contributed by such licensors), 41 | 42 | without restriction, including without limitation the rights to copy, create 43 | derivative works of, display, perform, and distribute the Software and make, 44 | use, sell, offer for sale, import, export, have made, and have sold the 45 | Software and the Larger Work(s), and to sublicense the foregoing rights on 46 | either these or other terms. 47 | 48 | This license is subject to the following condition: 49 | The above copyright notice and either this complete permission notice or at 50 | a minimum a reference to the UPL must be included in all copies or 51 | substantial portions of the Software. 52 | 53 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 54 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 55 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 56 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 57 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 58 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 59 | SOFTWARE. 60 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_zh_TW.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=\u5256\u6790 multipart/form-data \u4E3B\u9AD4\u6642\u627E\u4E0D\u5230\u754C\u9650\u5B57\u4E32. 8 | 1002=\u5256\u6790 multipart/form-data \u4E3B\u9AD4\u6642\u627E\u4E0D\u5230\u754C\u9650\u7684\u884C\u5340\u9694\u7B26\u865F. 9 | 1003=\u5256\u6790\u8868\u55AE\u5F15\u6578\u6642\u5B57\u5143\u96C6\u8F49\u63DB\u5931\u6557. 10 | 1004=\u67E5\u8A62\u5B57\u4E32\u7684\u5B57\u5143\u96C6\u8F49\u63DB\u5931\u6557. 11 | 1005=\u5256\u6790 multipart/form-data \u4E3B\u9AD4\u6642\u627E\u4E0D\u5230\u6A19\u982D\u7684\u884C\u7D42\u6B62\u5B57\u5143. 12 | 1006=\u5256\u6790 multipart/form-data \u4E3B\u9AD4\u6642\u627E\u4E0D\u5230\u9810\u671F\u61C9\u6709\u7684\u6B04\u4F4D\u540D\u7A31. 13 | 1007=multipart/form-data \u4E3B\u9AD4\u4E2D\u6709\u7121\u6548\u7684\u6B04\u4F4D\u540D\u7A31. 14 | 1008=multipart/form-data \u4E3B\u9AD4\u4E2D\u7684\u6B04\u4F4D\u6216\u6A94\u6848\u540D\u7A31\u907A\u6F0F\u7D50\u675F\u5F15\u865F. 15 | 1009=multipart/form-data \u4E3B\u9AD4\u4E2D\u627E\u4E0D\u5230\u6A19\u793A\u8D77\u59CB\u6B04\u4F4D\u503C\u7684\u884C\u5340\u9694\u7B26\u865F. 16 | 1010=multipart/form-data \u4E3B\u9AD4\u4E2D\u627E\u4E0D\u5230\u6A19\u793A\u7D50\u675F\u6B04\u4F4D\u503C\u7684\u754C\u9650\u5B57\u4E32. 17 | 1011=\u7121\u6548\u7684\u65E5\u671F/\u6642\u9593\u5B57\u4E32 {0} (\u683C\u5F0F\u70BA yyyy-MM-dd''T''HH:mm:ss.SSS). 18 | 1012=\u67E5\u8A62\u8A9E\u6CD5\u932F\u8AA4. 19 | 1013=\u7121\u6CD5\u8FA8\u8B58\u5B57\u5143\u7DE8\u78BC {0}. 20 | 1014=\u7121\u6CD5\u5C07\u7DE8\u78BC\u7684\u4F4D\u5143\u7D44\u5E8F\u5217\u89E3\u78BC\u70BA {0}. 21 | 1015=\u4E0D\u5141\u8A31\u5A92\u9AD4\u985E\u578B {0} \u7684 POST. 22 | 1016=\u7121\u6548\u7684 Servlet \u7D44\u614B: {0}. 23 | 1017=\u4E0D\u660E\u7684\u5E33\u6236 {0}, \u76EE\u524D\u7684\u7DB1\u8981\u70BA {1}. 24 | 1018=\u7A7A\u503C\u6216\u7A7A\u767D\u5B57\u4E32\u4E0D\u662F\u6709\u6548\u7684\u65E5\u671F/\u6642\u9593. 25 | 1019=\u6587\u4EF6\u6709\u591A\u500B\u7D22\u5F15\u9375\u4F8B\u9805. 26 | 1020=\u6C92\u6709\u7D22\u5F15\u9375\u64F7\u53D6/\u63D2\u5165\u7684\u8F38\u5165\u6587\u4EF6. 27 | 1021=\u7D22\u5F15\u9375\u64F7\u53D6/\u63D2\u5165\u8DEF\u5F91\u4E0D\u53EF\u7A7A\u767D. 28 | 1022=\u6587\u4EF6\u57F7\u884C\u8655\u7406\u672A\u6B63\u78BA\u95DC\u9589. 29 | 1023=\u6587\u4EF6\u57F7\u884C\u8655\u7406\u7A7A\u767D, \u6216\u4E0D\u662F\u4E00\u500B JSON \u7269\u4EF6. 30 | 1024=\u64F7\u53D6\u7684\u7D22\u5F15\u9375\u4E0D\u662F\u5B57\u4E32\u6216\u6578\u5B57. 31 | 1025=\u63D2\u5165\u7684\u7D22\u5F15\u9375\u8207\u73FE\u6709\u7D22\u5F15\u9375\u4E0D\u540C. 32 | 1026=\u767C\u73FE\u7D22\u5F15\u9375\u6B65\u9A5F {0} \u6709\u91CD\u8907\u7684\u6B04\u4F4D. 33 | 1027=\u683C\u5F0F\u8F49\u63DB\u672A\u5BE6\u884C\u6216\u7121\u6CD5\u4F7F\u7528. 34 | 1028=\u4E0D\u652F\u63F4\u5EF6\u4F38\u7684 JSON \u8CC7\u6599\u985E\u578B {0}. 35 | 1029=\u8981\u9032\u884C\u8F49\u63DB\u7684\u8F38\u5165\u6587\u4EF6\u640D\u6BC0\u6216\u7121\u6CD5\u8B80\u53D6. 36 | 1030=\u7D22\u5F15\u9375\u53D6\u4EE3\u64F1\u7F6E\u4E2D, \u56E0\u6B64\u7121\u6CD5\u64F7\u53D6\u7D22\u5F15\u9375. 37 | 1031=\u672A\u6307\u5B9A\u8F49\u63DB\u7684\u7D22\u5F15\u9375\u8DEF\u5F91. 38 | 1032=\u4E0D\u80FD\u5C0D {1} \u9032\u884C {0} \u4F5C\u696D. 39 | 1033=\u6587\u4EF6\u4F5C\u696D\u767C\u751F\u932F\u8AA4: {0}. 40 | 1034=\u4E0D\u652F\u63F4\u6587\u4EF6\u985E\u578B {0}. 41 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved. 2 | 3 | This software is dual-licensed to you under the MIT License (MIT) and the Universal Permissive License (UPL). 4 | See below for license terms. You may choose either license, or both. 5 | 6 | MIT License 7 | 8 | Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 11 | software and associated documentation files (the "Software"), to deal in the Software 12 | without restriction, including without limitation the rights to use, copy, modify, 13 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies 18 | or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 21 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 22 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 25 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | The Universal Permissive License (UPL), Version 1.0 28 | 29 | Subject to the condition set forth below, permission is hereby granted to any 30 | person obtaining a copy of this software, associated documentation and/or data 31 | (collectively the "Software"), free of charge and under any and all copyright 32 | rights in the Software, and any and all patent rights owned or freely 33 | licensable by each licensor hereunder covering either (i) the unmodified 34 | Software as contributed to or provided by such licensor, or (ii) the Larger 35 | Works (as defined below), to deal in both 36 | 37 | (a) the Software, and 38 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if 39 | one is included with the Software (each a "Larger Work" to which the Software 40 | is contributed by such licensors), 41 | 42 | without restriction, including without limitation the rights to copy, create 43 | derivative works of, display, perform, and distribute the Software and make, 44 | use, sell, offer for sale, import, export, have made, and have sold the 45 | Software and the Larger Work(s), and to sublicense the foregoing rights on 46 | either these or other terms. 47 | 48 | This license is subject to the following condition: 49 | The above copyright notice and either this complete permission notice or at 50 | a minimum a reference to the UPL must be included in all copies or 51 | substantial portions of the Software. 52 | 53 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 54 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 55 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 56 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 57 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 58 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 59 | SOFTWARE. 60 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_tr.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesi ayr\u0131\u015Ft\u0131r\u0131l\u0131rken s\u0131n\u0131r dizesi bulunamad\u0131. 8 | 1002=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesi ayr\u0131\u015Ft\u0131r\u0131l\u0131rken s\u0131n\u0131r i\u00E7in sat\u0131r ay\u0131r\u0131c\u0131 bulunamad\u0131. 9 | 1003=Form ba\u011F\u0131ms\u0131z de\u011Fi\u015Fkenleri ayr\u0131\u015Ft\u0131r\u0131l\u0131rken karakter k\u00FCmesi d\u00F6n\u00FC\u015Ft\u00FCrme ba\u015Far\u0131s\u0131z oldu. 10 | 1004=Sorgu dizesi karakter k\u00FCmesi d\u00F6n\u00FC\u015Ft\u00FCrmesi ba\u015Far\u0131s\u0131z oldu. 11 | 1005=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesi ayr\u0131\u015Ft\u0131r\u0131l\u0131rken ba\u015Fl\u0131k i\u00E7in sat\u0131r sonland\u0131r\u0131c\u0131s\u0131 bulunamad\u0131. 12 | 1006=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesi ayr\u0131\u015Ft\u0131r\u0131l\u0131rken beklenen alan ad\u0131 bulunamad\u0131. 13 | 1007=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesinde ge\u00E7ersiz alan ad\u0131. 14 | 1008=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesinde alan veya dosya ad\u0131nda kapan\u0131\u015F \u00E7ift t\u0131rnak i\u015Fareti eksik. 15 | 1009=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesinde alan ba\u015Flang\u0131\u00E7 de\u011Ferini i\u015Faretleyen sat\u0131r ay\u0131r\u0131c\u0131s\u0131 bulunamad\u0131. 16 | 1010=\u00C7ok par\u00E7al\u0131/form verileri g\u00F6vdesinde alan biti\u015F de\u011Ferini i\u015Faretleyen s\u0131n\u0131r dizesi bulunamad\u0131. 17 | 1011=Ge\u00E7ersiz tarih/saat dizesi {0} (format yyyy-AA-gg''S''SS:dd:ss.SSS). 18 | 1012=Sorgu s\u00F6zdizimi hatas\u0131. 19 | 1013=Karakter kodlama {0} tan\u0131nm\u0131yor. 20 | 1014=Kodlanm\u0131\u015F bayt s\u0131ras\u0131 kodu {0} olarak \u00E7\u00F6z\u00FClemez. 21 | 1015={0} ortam t\u00FCr\u00FC POST''una izin verilmez. 22 | 1016=Ge\u00E7ersiz servlet konfig\u00FCrasyonu: {0}. 23 | 1017=Bilinmeyen hesap {0}, ge\u00E7erli \u015Fema: {1}. 24 | 1018=Null veya bo\u015F dize ge\u00E7erli bir tarih/saat de\u011Fil. 25 | 1019=Dok\u00FCmanda anahtara ait birden fazla an var. 26 | 1020=Anahtar \u00E7\u0131karma/ekleme i\u00E7in hi\u00E7 giri\u015F dok\u00FCman\u0131 yok. 27 | 1021=Anahtar \u00E7\u0131karma/ekleme veri yolu bo\u015F olamaz. 28 | 1022=Dok\u00FCman an\u0131 d\u00FCzg\u00FCn kapat\u0131lmam\u0131\u015F. 29 | 1023=Dok\u00FCman an\u0131 bo\u015F veya JSON nesnesi de\u011Fil. 30 | 1024=\u00C7\u0131kar\u0131lan anahtar bir dize veya say\u0131 de\u011Fil. 31 | 1025=Eklenen anahtar mevcut anahtar ile e\u015Fle\u015Fmiyor. 32 | 1026={0} anahtar ad\u0131m\u0131 i\u00E7in tekrarlanan alan bulundu. 33 | 1027=Uygulanmam\u0131\u015F veya kullan\u0131lamayan format d\u00F6n\u00FC\u015F\u00FCm\u00FC. 34 | 1028=Geni\u015Fletilen JSON {0} veri tipi desteklenmiyor. 35 | 1029=Bir d\u00F6n\u00FC\u015F\u00FCm\u00FCn giri\u015F dosyas\u0131 hatal\u0131 ve okunam\u0131yor. 36 | 1030=Bekleyen bir anahtar de\u011Fi\u015Fimi varken anahtar ay\u0131klanamaz. 37 | 1031=D\u00F6n\u00FC\u015F\u00FCm i\u00E7in anahtar yolu belirtilmedi. 38 | 1032={1} \u00FCzerinde {0} i\u015Flemine izin verilmiyor. 39 | 1033=Dok\u00FCman i\u015Flemi bir hatayla kar\u015F\u0131la\u015Ft\u0131: {0}. 40 | 1034={0} dok\u00FCman tipi desteklenmiyor. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_hu.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=Nem tal\u00E1lhat\u00F3 hat\u00E1rol\u00F3 karakterl\u00E1nc a multipart/form-data t\u00F6rzs elemz\u00E9sekor. 8 | 1002=Nem tal\u00E1lhat\u00F3 sorelv\u00E1laszt\u00F3 a hat\u00E1rhoz a multipart/form-data t\u00F6rzs elemz\u00E9sekor. 9 | 1003=Karakterk\u00E9szlet konvert\u00E1l\u00E1sa sikertelen a formalap argumentumainak elemz\u00E9sekor. 10 | 1004=Karakterk\u00E9szlet konvert\u00E1l\u00E1sa sikertelen a lek\u00E9rdez\u00E9s karakterl\u00E1nc\u00E1n\u00E1l. 11 | 1005=Nem tal\u00E1lhat\u00F3 sorz\u00E1r\u00F3 a fejl\u00E9chez a multipart/form-data t\u00F6rzs elemz\u00E9sekor. 12 | 1006=A v\u00E1rt mez\u0151n\u00E9v nem tal\u00E1lhat\u00F3 a multipart/form-data t\u00F6rzs elemz\u00E9sekor. 13 | 1007=\u00C9rv\u00E9nytelen mez\u0151n\u00E9v a multipart/form-data t\u00F6rzsben. 14 | 1008=Hi\u00E1nyzik a z\u00E1r\u00F3 id\u00E9z\u0151jel a mez\u0151n\u00E9vb\u0151l vagy a f\u00E1jln\u00E9vb\u0151l a multipart/form-data t\u00F6rzsben. 15 | 1009=Nem tal\u00E1lhat\u00F3 a mez\u0151\u00E9rt\u00E9k kezdet\u00E9t jelz\u0151 sorelv\u00E1laszt\u00F3 a multipart/form-data t\u00F6rzsben. 16 | 1010=Nem tal\u00E1lhat\u00F3 a mez\u0151\u00E9rt\u00E9k v\u00E9g\u00E9t jelz\u0151 hat\u00E1rol\u00F3 karakterl\u00E1nc a multipart/form-data t\u00F6rzsben. 17 | 1011=\u00C9rv\u00E9nytelen d\u00E1tum/id\u0151 karakterl\u00E1nc: {0} (a form\u00E1tum: \u00E9\u00E9\u00E9\u00E9-HH-nn''T''\u00D3\u00D3:pp:mm.MMM). 18 | 1012=Lek\u00E9rdez\u00E9s szintaktikai hib\u00E1ja. 19 | 1013=Ismeretlen {0} karakterk\u00F3dol\u00E1s. 20 | 1014=A k\u00F3dolt b\u00E1jtszekvencia nem dek\u00F3dolhat\u00F3 mint {0}. 21 | 1015=POST nem megengedett a(z) {0} m\u00E9diat\u00EDpusn\u00E1l. 22 | 1016=\u00C9rv\u00E9nytelen szervletkonfigur\u00E1ci\u00F3: {0}. 23 | 1017=Ismeretlen {0} fi\u00F3k, az aktu\u00E1lis s\u00E9ma {1}. 24 | 1018=A null \u00E9rt\u00E9k vagy az \u00FCres karakterl\u00E1nc nem \u00E9rv\u00E9nyes d\u00E1tum/id\u0151. 25 | 1019=A dokumentum t\u00F6bb kulcsp\u00E9ld\u00E1nnyal rendelkezik. 26 | 1020=Nincs bemeneti dokumentum a kulcs kinyer\u00E9s\u00E9hez/besz\u00FAr\u00E1s\u00E1hoz. 27 | 1021=A kulcs kinyer\u00E9s\u00E9nek/besz\u00FAr\u00E1s\u00E1nak el\u00E9r\u00E9si \u00FAtja nem lehet \u00FCres. 28 | 1022=A dokumentump\u00E9ld\u00E1ny nincs megfelel\u0151en bez\u00E1rva. 29 | 1023=A dokumentump\u00E9ld\u00E1ny \u00FCres vagy nem JSON-objektum. 30 | 1024=A kinyert kulcs nem karakterl\u00E1nc vagy sz\u00E1m volt. 31 | 1025=A besz\u00FArt kulcs nem egyezik meg a megl\u00E9v\u0151 kulccsal. 32 | 1026=A kulcs {0}. l\u00E9p\u00E9s\u00E9n\u00E9l ism\u00E9tl\u0151d\u0151 mez\u0151 tal\u00E1lhat\u00F3. 33 | 1027=Nem implement\u00E1lt vagy nem el\u00E9rhet\u0151 a form\u00E1tum-\u00E1talak\u00EDt\u00E1s. 34 | 1028=A b\u0151v\u00EDtett {0} JSON adatt\u00EDpus nem t\u00E1mogatott. 35 | 1029=Az \u00E1talak\u00EDt\u00E1s bemenetek\u00E9nt haszn\u00E1lt dokumentum s\u00E9r\u00FClt vagy olvashatatlan. 36 | 1030=A kulcsot f\u00FCgg\u0151 kulcshelyettes\u00EDt\u0151vel nem lehet kinyerni. 37 | 1031=A kulcs el\u00E9r\u00E9si \u00FAtja nincs megadva az \u00E1talak\u00EDt\u00E1shoz. 38 | 1032={1} eset\u00E9n a(z) {0} m\u0171velet nem megengedett. 39 | 1033=A dokumentumi m\u0171velet sor\u00E1n hiba t\u00F6rt\u00E9nt: {0}. 40 | 1034=A(z) {0} dokumentumt\u00EDpus nem t\u00E1mogatott. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_cs.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=P\u0159i anal\u00FDze z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data nebyl nalezen \u0159et\u011Bzec ohrani\u010Den\u00ED. 8 | 1002=P\u0159i anal\u00FDze z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data nebyl pro ohrani\u010Den\u00ED nalezen odd\u011Blova\u010D \u0159\u00E1dk\u016F. 9 | 1003=P\u0159i anal\u00FDze argument\u016F formul\u00E1\u0159e selhala konverze znakov\u00E9 sady. 10 | 1004=Pro \u0159et\u011Bzec dotazu selhala konverze znakov\u00E9 sady. 11 | 1005=P\u0159i anal\u00FDze z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data nebyl pro z\u00E1hlav\u00ED nalezen ukon\u010Dovac\u00ED znak. 12 | 1006=P\u0159i anal\u00FDze z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data byl o\u010Dek\u00E1v\u00E1n n\u00E1zev pole, ale nebyl nalezen. 13 | 1007=Neplatn\u00FD n\u00E1zev pole v z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data. 14 | 1008=V n\u00E1zvu pole nebo souboru v z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data chyb\u00ED uzav\u00EDrac\u00ED uvozovka. 15 | 1009=V z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data nebyl nalezen odd\u011Blova\u010D \u0159\u00E1dk\u016F ozna\u010Duj\u00EDc\u00ED za\u010D\u00E1tek hodnoty pole. 16 | 1010=V z\u00E1kladn\u00ED \u010D\u00E1sti multipart/form-data nebyl nalezen \u0159et\u011Bzec ohrani\u010Den\u00ED ozna\u010Duj\u00EDc\u00ED konec hodnoty pole. 17 | 1011=Neplatn\u00FD \u0159et\u011Bzec data/\u010Dasu {0} (form\u00E1t je rrrr-MM-dd''\u010C''HH:mm:ss.SSS). 18 | 1012=Syntaktick\u00E1 chyba dotazu. 19 | 1013=K\u00F3dov\u00E1n\u00ED znak\u016F {0} nebylo rozezn\u00E1no. 20 | 1014=K\u00F3dovanou bajtovou sekvenci nebylo mo\u017En\u00E9 dek\u00F3dovat jako {0}. 21 | 1015=ODESL\u00C1N\u00CD typu m\u00E9dia {0} nen\u00ED povoleno. 22 | 1016=Neplatn\u00E1 konfigurace servletu: {0}. 23 | 1017=Nezn\u00E1m\u00FD \u00FA\u010Det {0}, aktu\u00E1ln\u00ED sch\u00E9ma je {1}. 24 | 1018=Hodnota Null \u010Di pr\u00E1zdn\u00FD \u0159et\u011Bzec nejsou platn\u00FDmi hodnotami data/\u010Dasu. 25 | 1019=Dokument obsahuje v\u00EDce instanc\u00ED kl\u00ED\u010De. 26 | 1020=Pro extrakci nebo vlo\u017Een\u00ED kl\u00ED\u010De neexistuje \u017E\u00E1dn\u00FD vstupn\u00ED dokument. 27 | 1021=Cesta ke kl\u00ED\u010Di extrakce nebo vlo\u017Een\u00ED nesm\u00ED b\u00FDt pr\u00E1zdn\u00E1. 28 | 1022=Instance dokumentu nen\u00ED spr\u00E1vn\u011B uzav\u0159ena. 29 | 1023=Instance dokumentu je pr\u00E1zdn\u00E1, nebo se nejedn\u00E1 o objekt JSON. 30 | 1024=Extrahovan\u00FD kl\u00ED\u010D nen\u00ED \u0159et\u011Bzec nebo \u010D\u00EDslo. 31 | 1025=Vlo\u017Een\u00FD kl\u00ED\u010D se neshoduje s existuj\u00EDc\u00EDm kl\u00ED\u010Dem. 32 | 1026=Bylo nalezeno duplicitn\u00ED pole pro krok kl\u00ED\u010De {0}. 33 | 1027=P\u0159evod form\u00E1tu nen\u00ED implementov\u00E1n nebo je nedostupn\u00FD. 34 | 1028=Roz\u0161\u00ED\u0159en\u00FD typ dat JSON {0} nen\u00ED podporov\u00E1n. 35 | 1029=Vstupn\u00ED dokument pro p\u0159evod je po\u0161kozen\u00FD nebo ne\u010Diteln\u00FD. 36 | 1030=Kl\u00ED\u010D nelze extrahovat pomoc\u00ED \u010Dekaj\u00EDc\u00ED n\u00E1hrady kl\u00ED\u010De. 37 | 1031=Nen\u00ED zad\u00E1na cesta ke kl\u00ED\u010Di pro p\u0159evod. 38 | 1032=Operace {0} nen\u00ED na {1} povolena. 39 | 1033=P\u0159i operaci dokumentu do\u0161lo k chyb\u011B: {0}. 40 | 1034=Typ dokumentu {0} nen\u00ED podporov\u00E1n. 41 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/OracleBatchException.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2015, Oracle and/or its affiliates. 2 | All rights reserved.*/ 3 | 4 | package oracle.soda; 5 | 6 | /** 7 | * Represents an exception thrown during a batch 8 | * write operation. 9 | * 10 | * @see OracleCollection#insert(Iterator) 11 | * @see OracleCollection#insertAndGet(Iterator) 12 | */ 13 | public class OracleBatchException extends OracleException 14 | { 15 | private static final long serialVersionUID = 1L; 16 | 17 | private int processedCount; 18 | 19 | /** 20 | * Constructs an OracleBatchException object with a given message. 21 | * 22 | * @param message the description of the error. 23 | * null 24 | * if message string is non-existent 25 | */ 26 | public OracleBatchException(String message) 27 | { 28 | super(message); 29 | } 30 | 31 | /** 32 | * Constructs an OracleBatchException object with a given message. 33 | * 34 | * @param message the description of the error. 35 | * null 36 | * if message string is non-existent 37 | * @param processedCount number of operations processed 38 | * before the error occurred 39 | */ 40 | public OracleBatchException(String message, int processedCount) 41 | { 42 | super(message); 43 | this.processedCount = processedCount; 44 | } 45 | 46 | /** 47 | * Constructs an OracleBatchException with a given message 48 | * and an error code. 49 | * 50 | * @param message the description of the error. null indicates 51 | * that the message string is non-existant 52 | * @param errorCode the error code 53 | * @param processedCount number of operations processed 54 | * before the error occurred 55 | */ 56 | public OracleBatchException(String message, int errorCode, int processedCount) 57 | { 58 | this(message, errorCode); 59 | this.processedCount = processedCount; 60 | } 61 | 62 | /** 63 | * Constructs an OracleBatchException object with a given cause. 64 | * 65 | * @param cause the cause of the error. null if 66 | * non-existent 67 | */ 68 | public OracleBatchException(Throwable cause) 69 | { 70 | super(cause); 71 | } 72 | 73 | /** 74 | * Constructs an OracleBatchException object with a given cause. 75 | * 76 | * @param cause the cause of the error. null if 77 | * non-existent 78 | * @param processedCount number of operations processed 79 | * before the error occurred 80 | */ 81 | public OracleBatchException(Throwable cause, int processedCount) 82 | { 83 | super(cause); 84 | this.processedCount = processedCount; 85 | } 86 | 87 | /** 88 | * Number of operations processed before the error occurred. 89 | * 90 | * @return number of operations processed 91 | * before the error occurred 92 | */ 93 | public int getProcessedCount() 94 | { 95 | return processedCount; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/rdbms/Messages_ko.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in SODA API exceptions 6 | 7 | 1101=\uBC14\uAFC0 {0} \uBB38\uC11C\uB97C {1}\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. 8 | 1102=\uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. 9 | 1103={0} \uBAA8\uC74C\uC740 \uC77D\uAE30 \uC804\uC6A9\uC774\uBA70 {1}\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 10 | 1104=\uD328\uD0A4\uC9C0 \uAE30\uBC18 \uBAA8\uC74C {0}\uC5D0\uC11C \uC5C5\uB370\uC774\uD2B8\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 11 | 1105=\uD328\uD0A4\uC9C0 \uAE30\uBC18 \uBAA8\uC74C {0}\uC5D0\uC11C \uD544\uD130 \uBC0F \uC5C5\uB370\uC774\uD2B8\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 12 | 1106=\uD328\uD0A4\uC9C0 \uAE30\uBC18 \uBAA8\uC74C {0}\uC5D0\uC11C \uD544\uD130 \uBC0F \uD504\uB85C\uC81D\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 13 | 1107=\uD328\uD0A4\uC9C0 \uAE30\uBC18 \uBAA8\uC74C {0}\uC5D0\uC11C \uD544\uD130\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 14 | 1108=\uD328\uD0A4\uC9C0 \uAE30\uBC18 \uBAA8\uC74C {0}\uC5D0\uC11C \uC778\uB371\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 15 | 1109={0} \uBAA8\uC74C\uC5D0 \uC5F4 \uC720\uD615 {1}\uC758 \uBC14\uC774\uB108\uB9AC \uB0B4\uC6A9\uC774 \uC788\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. 16 | 1110=\uC778\uB371\uC2A4 \uC694\uCCAD\uC5D0 {0}\uAC1C\uAC00 \uB118\uB294 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4. 17 | 1111={0} \uBAA8\uC74C\uC5D0 \uB9C8\uC9C0\uB9C9\uC73C\uB85C \uC218\uC815\uB41C \uC2DC\uAC04\uC744 \uB098\uD0C0\uB0B4\uB294 \uC2DC\uAC04 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. 18 | 1112={0} \uBAA8\uC74C\uC774 \uAD6C\uC131\uB418\uC5B4 \uC0AD\uC81C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. 19 | 1113=\uBD80\uC801\uD569\uD55C \uD544\uD130 \uC870\uAC74\uC785\uB2C8\uB2E4. 20 | 1114={0} \uBAA8\uC74C\uC740 {1} \uBC84\uC804 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uBA70 \uC2A4\uD2B8\uB9BC \uC4F0\uAE30\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 21 | 1115=\uAE30\uC220\uC790\uAC00 \uAE30\uC874 \uBAA8\uC74C\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 22 | 1116=\uBB38\uC11C\uC5D0 \uB300\uD55C \uC99D\uBD84 \uC5C5\uB370\uC774\uD2B8 \uB610\uB294 \uD328\uCE58\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 23 | 1117=\uD328\uD0A4\uC9C0 \uAE30\uBC18 \uBAA8\uC74C {0}\uC5D0\uC11C \uAD6C\uD604\uB418\uC9C0 \uC54A\uC740 {1}\uBCC4 \uC9C8\uC758\uC785\uB2C8\uB2E4. 24 | 1118=\uBAA8\uC74C \uC774\uB984\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. 25 | 1119={0} \uBAA8\uC74C\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4. 26 | 1120={0} \uAC12\uC740 {1} \uC720\uD615\uC758 \uBD80\uC801\uD569\uD55C \uD0A4 \uC785\uB2C8\uB2E4. 27 | 1121={0} \uBAA8\uC74C\uC5D0 \uBB38\uC11C \uC0BD\uC785\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. 28 | 1122=\uC790\uB974\uAE30\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC73C\uBA70 {0} \uBAA8\uC74C\uC740 \uD14C\uC774\uBE14 \uAE30\uBC18\uC774 \uC544\uB2D9\uB2C8\uB2E4. 29 | 1123=JVM(Java Virtual Machine)\uC5D0\uC11C\uB294 MD5 \uBC84\uC804 \uC9C0\uC815 \uC54C\uACE0\uB9AC\uC998\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uBC84\uC804 \uC9C0\uC815 \uC54C\uACE0\uB9AC\uC998\uC73C\uB85C \uC804\uD658\uD558\uC2ED\uC2DC\uC624. 30 | 1124=JVM(Java Virtual Machine)\uC5D0\uC11C\uB294 SHA256 \uBC84\uC804 \uC9C0\uC815 \uC54C\uACE0\uB9AC\uC998\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uBC84\uC804 \uC9C0\uC815 \uC54C\uACE0\uB9AC\uC998\uC73C\uB85C \uC804\uD658\uD558\uC2ED\uC2DC\uC624. 31 | 32 | -------------------------------------------------------------------------------- /test/src/oracle/json/testharness/ConnectionFactory.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /** 5 | * DESCRIPTION 6 | * ConnectionFactory 7 | */ 8 | 9 | /** 10 | * @author Josh Spiegel 11 | */ 12 | 13 | package oracle.json.testharness; 14 | 15 | import java.sql.DriverManager; 16 | import java.sql.SQLException; 17 | 18 | import oracle.jdbc.OracleConnection; 19 | import oracle.jdbc.pool.OracleDataSource; 20 | 21 | /** 22 | * The tests depend on a database. The connection information 23 | * for the database is specified when the tests are run: 24 | * 25 | * -Ddatasource=file.properties 26 | * 27 | * The format of the property file is as follows: 28 | * 29 | * UserName=... 30 | * Password=... 31 | * Server=... 32 | * Port=... 33 | * DBName=... 34 | * 35 | * DBName is the SID. 36 | * 37 | * Note, this is the same format used by XQJ DB testing. 38 | * See xdk/test/tkxq/src/xdk_xqjdb.tsc 39 | */ 40 | public final class ConnectionFactory { 41 | 42 | public static final String USER_NAME = System.getProperty("UserName"); 43 | public static final String PASSWORD = System.getProperty("Password"); 44 | public static final String SERVER = System.getProperty("Server"); 45 | public static final String PORT = System.getProperty("Port"); 46 | public static final String ServiceName = System.getProperty("DBName"); 47 | public static final String WALLET = System.getProperty("Wallet", ""); 48 | public static final String WALLET_PASSWORD = System.getProperty("WalletPassword", ""); 49 | 50 | public static OracleConnection createConnection() throws SQLException { 51 | return createConnection(USER_NAME, PASSWORD); 52 | } 53 | 54 | public static OracleConnection createConnection(String user, String pass) throws SQLException { 55 | if ("".contentEquals(WALLET)) 56 | return (OracleConnection) DriverManager.getConnection(connectionString(user, pass)); 57 | else 58 | return createWalletConnection(user, pass); 59 | } 60 | 61 | private static OracleConnection createWalletConnection(String user, String pass) throws SQLException { 62 | OracleDataSource ds = new OracleDataSource(); 63 | ds.setURL("jdbc:oracle:thin:@" + ServiceName); 64 | ds.setUser(USER_NAME); 65 | ds.setPassword(PASSWORD); 66 | return (OracleConnection) ds.getConnection(); 67 | } 68 | 69 | private static String connectionString(String user, String pass) { 70 | StringBuilder builder = new StringBuilder(); 71 | builder.append("jdbc:oracle:thin:"); 72 | // Currently dataguide and context index doesn't support MTS mode, and we'll probably not support it in any near future. 73 | // We need to make sure our soda tests run in DEDICATED mode. 74 | builder.append(user).append("/"); 75 | builder.append(pass).append("@"); 76 | builder.append("(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=").append(SERVER); 77 | builder.append(")(PORT=").append(PORT); 78 | builder.append("))(CONNECT_DATA=(SERVICE_NAME=").append(ServiceName); 79 | builder.append(")(SERVER=DEDICATED)))"); 80 | return builder.toString(); 81 | } 82 | 83 | static { 84 | if (!"".equals(WALLET)) { 85 | System.setProperty("oracle.net.ssl_server_dn_match","true"); 86 | System.setProperty("oracle.net.tns_admin", WALLET); 87 | System.setProperty("javax.net.ssl.trustStore", WALLET + "/truststore.jks"); 88 | System.setProperty("javax.net.ssl.trustStorePassword", WALLET_PASSWORD); 89 | System.setProperty("javax.net.ssl.keyStore", WALLET + "/keystore.jks"); 90 | System.setProperty("javax.net.ssl.keyStorePassword", WALLET_PASSWORD); 91 | } 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/common/Message.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | 7 | Provides access to externalized strings. 8 | 9 | Example usage: 10 | 11 | throw new MyException(Message.MY_MESSAGE.get(p1, p2)); 12 | 13 | Where p1 and p2 are parameters specific to MY_MESSAGE 14 | */ 15 | 16 | /** 17 | * This class is not part of the public API, and is 18 | * subject to change. 19 | * 20 | * Do not rely on it in your application code. 21 | * 22 | * @author Josh Spiegel 23 | */ 24 | 25 | package oracle.json.common; 26 | 27 | import java.text.MessageFormat; 28 | import java.util.ResourceBundle; 29 | import java.util.MissingResourceException; 30 | 31 | public class Message 32 | { 33 | public static final Message EX_ILLEGAL_DATE_TIME = create(1011); 34 | public static final Message EX_UNKNOWN_ENCODING = create(1013); 35 | public static final Message EX_BAD_HEX_VALUES = create(1014); 36 | public static final Message EX_UNSUPPORTED_MEDIA = create(1015); 37 | public static final Message EX_INVALID_CONFIG = create(1016); 38 | public static final Message EX_UNKNOWN_ACCOUNT = create(1017); 39 | public static final Message EX_DUPLICATE_KEY = create(1019); 40 | public static final Message EX_NO_INPUT_DOCUMENT = create(1020); 41 | public static final Message EX_KEY_PATH_EMPTY = create(1021); 42 | public static final Message EX_DOCUMENT_NOT_CLOSED = create(1022); 43 | public static final Message EX_DOCUMENT_NOT_OBJECT = create(1023); 44 | public static final Message EX_KEY_MUST_BE_STRING = create(1024); 45 | public static final Message EX_KEY_MISMATCH = create(1025); 46 | public static final Message EX_KEY_DUPLICATE_STEP = create(1026); 47 | public static final Message EX_UNIMPLEMENTED_FORMAT = create(1027); 48 | public static final Message EX_UNSUPPORTED_DATA_TYPE = create(1028); 49 | public static final Message EX_REKEY_PENDING = create(1030); 50 | public static final Message EX_KEY_PATH_NOT_SET = create(1031); 51 | public static final Message EX_OPER_NOT_ALLOWED = create(1032); 52 | public static final Message EX_JSON_OPERATION_FAILED = create(1033); 53 | public static final Message EX_UNSUPPORTED_DOC_TYPE = create(1034); 54 | 55 | /** 56 | * Load the ResourceBundle using the default Locale. 57 | * 58 | * @see xdk/src/java/json/resources/oracle/json/common/Messages.properties 59 | */ 60 | private static final ResourceBundle MESSAGES = 61 | ResourceBundle.getBundle(Message.class.getPackage().getName() + 62 | ".Messages"); 63 | 64 | private int key; 65 | 66 | protected Message(int key) 67 | { 68 | this.key = key; 69 | } 70 | 71 | public int getKey() 72 | { 73 | return key; 74 | } 75 | 76 | public String get(Object... params) 77 | { 78 | return MessageFormat.format(getMessageTemplate(), params); 79 | } 80 | 81 | private static Message create(int i) 82 | { 83 | return new Message(i); 84 | } 85 | 86 | protected String getMessageTemplate() 87 | { 88 | String keyString = String.valueOf(this.getKey()); 89 | String prefix = getPrefix(); 90 | try 91 | { 92 | return(getBundle().getString(keyString)); 93 | } 94 | catch (MissingResourceException e) 95 | { 96 | return(prefix+"-"+keyString); 97 | } 98 | } 99 | 100 | protected ResourceBundle getBundle() 101 | { 102 | return(MESSAGES); 103 | } 104 | 105 | protected String getPrefix() 106 | { 107 | return("JSON"); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/common/SharedServices.java: -------------------------------------------------------------------------------- 1 | /** 2 | * SharedServices.java 3 | * 4 | * Copyright (c) 2013, 2024, Oracle and/or its affiliates. 5 | * 6 | * This class is designed to be used as a singleton that holds other 7 | * singletons. A single instance of this class is typically bound in 8 | * the servlet configuration context, ensuring that all requests and 9 | * background threads share the same service objects. 10 | * 11 | * The service objects are all stateful singletons that need to offer 12 | * thread-safe capabilities. Examples include the following: 13 | * 14 | * - Database connection pool 15 | * Includes DataSource for connections 16 | * - Storage service 17 | * Stateful global cache of metadata 18 | * 19 | * Typically, shared services will take a request context that provides 20 | * transient objects such as a database connection/transaction. They 21 | * must assume multi-threaded access; any internal members need to ensure 22 | * thread-safe access. 23 | */ 24 | 25 | package oracle.json.common; 26 | 27 | import java.util.logging.Logger; 28 | 29 | import oracle.json.common.ConnectionPool; 30 | import oracle.json.common.JsonFactoryProvider; 31 | import oracle.soda.rdbms.impl.cache.CacheOfDescriptorCaches; 32 | import oracle.soda.rdbms.impl.cache.ConcurrentCacheOfDescriptorCaches; 33 | 34 | public class SharedServices 35 | { 36 | private static final Logger log = 37 | Logger.getLogger(SharedServices.class.getName()); 38 | 39 | private final Configuration conf; 40 | private final ConnectionPool connPool; 41 | private final CacheOfDescriptorCaches cacheOfDescriptorCaches; 42 | private final JsonFactoryProvider jProvider; 43 | 44 | /** 45 | * Other objects whose creation might fail are set in the initialize 46 | * method. 47 | */ 48 | public SharedServices(Configuration conf, boolean withPool) 49 | { 50 | this.conf = conf; 51 | jProvider = new JsonFactoryProvider(); 52 | 53 | // ### The following specifies caches with up to 100 descriptors each. 54 | // ### Should these parameters be configurable? 55 | cacheOfDescriptorCaches = new ConcurrentCacheOfDescriptorCaches(100); 56 | 57 | connPool = (withPool) ? createConnectionPool(conf) : null; 58 | } 59 | 60 | public SharedServices(Configuration conf) 61 | { 62 | this(conf, false); 63 | } 64 | 65 | /** 66 | * Return a shared provider (which is the provider of last resort) 67 | */ 68 | public JsonFactoryProvider getJsonFactoryProvider() 69 | { 70 | return jProvider; 71 | } 72 | 73 | /** 74 | * Return a shared (thread-safe) connection pool. 75 | */ 76 | public ConnectionPool getConnectionPool() 77 | { 78 | return(connPool); 79 | } 80 | 81 | /** 82 | * Return a shared (thread-safe) metadata cache. 83 | */ 84 | public CacheOfDescriptorCaches getCacheOfDescriptorCaches() 85 | { 86 | return(cacheOfDescriptorCaches); 87 | } 88 | 89 | public Configuration getConfiguration() 90 | { 91 | return(conf); 92 | } 93 | 94 | public synchronized void destroy() 95 | { 96 | // Destroy the connection pool, if any 97 | if (connPool != null) 98 | { 99 | log.fine("Closing connection pool"); 100 | connPool.shutdown(); 101 | } 102 | } 103 | 104 | private ConnectionPool createConnectionPool(Configuration conf) 105 | { 106 | ConnectionPool pool; 107 | 108 | if (conf.poolSize > 0) 109 | pool = new ConnectionPool(conf.dbUri, conf.dbUser, conf.dbPasswrd, 110 | conf.poolSize); 111 | else 112 | pool = new ConnectionPool(conf.dbUri, conf.dbUser, conf.dbPasswrd); 113 | 114 | return (pool); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/soda/rdbms/impl/Operation.java: -------------------------------------------------------------------------------- 1 | /* $Header: xdk/src/java/json/src/oracle/soda/rdbms/impl/Operation.java /st_xdk_soda1/1 2020/01/29 12:44:01 jspiegel Exp $ */ 2 | 3 | /* Copyright (c) 2014, 2020, Oracle and/or its affiliates. 4 | All rights reserved.*/ 5 | 6 | /* 7 | DESCRIPTION 8 | 9 | Holds the PreparedStatement and the ResultSet representing 10 | a SODA operation. 11 | */ 12 | 13 | /** 14 | * This class is not part of the public API, and is 15 | * subject to change. 16 | * 17 | * Do not rely on it in your application code. 18 | * 19 | * @author Max Orgiyan 20 | * @author Doug McMahon 21 | */ 22 | 23 | package oracle.soda.rdbms.impl; 24 | 25 | import oracle.soda.OracleCollection; 26 | 27 | import java.sql.Statement; 28 | import java.sql.PreparedStatement; 29 | import java.sql.CallableStatement; 30 | 31 | class Operation 32 | { 33 | private final CallableStatement plsql_stmt; 34 | private final PreparedStatement stmt; 35 | 36 | private final boolean headerOnly; 37 | 38 | // Whether the operation involves filter() 39 | private final boolean filterSpecBased; 40 | 41 | // Whether the operation involved key() 42 | private final boolean singleKeyBased; 43 | 44 | // The collection on which this operation is performed 45 | private final OracleCollection collection; 46 | 47 | // SQL text, for subsequent error reporting 48 | private final String sqlText; 49 | 50 | private final int returnParameterIndex; 51 | 52 | Operation(PreparedStatement stmt, 53 | String sqlText, 54 | boolean headerOnly, 55 | boolean filterSpecBased, 56 | boolean singleKeyBased, 57 | int returnParameterIndex, 58 | OracleCollection collection) 59 | { 60 | this.stmt = stmt; 61 | this.sqlText = sqlText; 62 | this.headerOnly = headerOnly; 63 | this.filterSpecBased = filterSpecBased; 64 | this.singleKeyBased = singleKeyBased; 65 | this.returnParameterIndex = returnParameterIndex; 66 | this.collection = collection; 67 | this.plsql_stmt = ((stmt instanceof CallableStatement) ? 68 | (CallableStatement)stmt : null); 69 | } 70 | 71 | Operation(PreparedStatement stmt, 72 | String sqlText, 73 | boolean headerOnly, 74 | boolean filterSpecBased, 75 | boolean singleKeyBased, 76 | OracleCollection collection) 77 | { 78 | this(stmt, sqlText, headerOnly, filterSpecBased, singleKeyBased, 79 | -1, collection); 80 | } 81 | 82 | Operation(CallableStatement stmt, 83 | String sqlText, 84 | boolean filterSpecBased, 85 | boolean singleKeyBased, 86 | int returnParameterIndex, 87 | OracleCollection collection) 88 | { 89 | this(stmt, sqlText, false, filterSpecBased, singleKeyBased, 90 | returnParameterIndex, collection); 91 | } 92 | 93 | PreparedStatement getPreparedStatement() 94 | { 95 | return stmt; 96 | } 97 | 98 | CallableStatement getCallableStatement() 99 | { 100 | return plsql_stmt; 101 | } 102 | 103 | Statement getStatement() 104 | { 105 | return stmt; 106 | } 107 | 108 | boolean headerOnly() 109 | { 110 | return headerOnly; 111 | } 112 | 113 | boolean isFilterSpecBased() 114 | { 115 | return filterSpecBased; 116 | } 117 | 118 | boolean isSingleKeyBased() 119 | { 120 | return singleKeyBased; 121 | } 122 | 123 | int getReturnParameterIndex() 124 | { 125 | return returnParameterIndex; 126 | } 127 | 128 | OracleCollection getCollection() 129 | { 130 | return collection; 131 | } 132 | 133 | String getSqlText() 134 | { 135 | return sqlText; 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /orajsoda/src/main/resources/oracle/json/common/Messages_zh_CN.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | 5 | # Messages used in common/util exceptions 6 | 7 | 1001=\u5728\u5BF9\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u672A\u627E\u5230\u8FB9\u754C\u5B57\u7B26\u4E32\u3002 8 | 1002=\u5728\u5BF9\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u672A\u627E\u5230\u8FB9\u754C\u7684\u884C\u5206\u9694\u7B26\u3002 9 | 1003=\u5728\u5BF9\u8868\u5355\u53C2\u6570\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6, \u5B57\u7B26\u96C6\u8F6C\u6362\u5931\u8D25\u3002 10 | 1004=\u67E5\u8BE2\u5B57\u7B26\u4E32\u7684\u5B57\u7B26\u96C6\u8F6C\u6362\u5931\u8D25\u3002 11 | 1005=\u5728\u5BF9\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u672A\u627E\u5230\u6807\u5934\u7684\u884C\u7EC8\u6B62\u7B26\u3002 12 | 1006=\u5728\u5BF9\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u672A\u627E\u5230\u9884\u671F\u7684\u5B57\u6BB5\u540D\u3002 13 | 1007=\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u4E2D\u7684\u5B57\u6BB5\u540D\u65E0\u6548\u3002 14 | 1008=\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u4E2D\u7684\u5B57\u6BB5\u6216\u6587\u4EF6\u540D\u7F3A\u5C11\u53F3\u5F15\u53F7\u3002 15 | 1009=\u5728\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u4E2D\u672A\u627E\u5230\u6807\u8BB0\u5B57\u6BB5\u503C\u5F00\u59CB\u7684\u884C\u5206\u9694\u7B26\u3002 16 | 1010=\u5728\u591A\u90E8\u5206/\u8868\u5355\u6570\u636E\u4E3B\u4F53\u4E2D\u672A\u627E\u5230\u6807\u8BB0\u5B57\u6BB5\u503C\u7ED3\u675F\u7684\u8FB9\u754C\u5B57\u7B26\u4E32\u3002 17 | 1011=\u65E0\u6548\u7684\u65E5\u671F/\u65F6\u95F4\u5B57\u7B26\u4E32 {0} (\u683C\u5F0F\u4E3A yyyy-MM-dd''T''HH:mm:ss.SSS)\u3002 18 | 1012=\u67E5\u8BE2\u8BED\u6CD5\u9519\u8BEF\u3002 19 | 1013=\u65E0\u6CD5\u8BC6\u522B\u5B57\u7B26\u7F16\u7801 {0}\u3002 20 | 1014=\u7F16\u7801\u7684\u5B57\u8282\u5E8F\u5217\u65E0\u6CD5\u89E3\u7801\u4E3A{0}\u3002 21 | 1015=\u4E0D\u5141\u8BB8\u4F7F\u7528\u5A92\u4F53\u7C7B\u578B{0}\u7684 POST\u3002 22 | 1016=\u65E0\u6548\u7684 servlet \u914D\u7F6E: {0}\u3002 23 | 1017=\u672A\u77E5\u5E10\u6237 {0}, \u5F53\u524D\u65B9\u6848\u4E3A {1}\u3002 24 | 1018=\u7A7A\u503C\u6216\u7A7A\u5B57\u7B26\u4E32\u4E0D\u662F\u6709\u6548\u7684\u65E5\u671F/\u65F6\u95F4\u3002 25 | 1019=\u6587\u6863\u5177\u6709\u591A\u4E2A\u5173\u952E\u5B57\u5B9E\u4F8B\u3002 26 | 1020=\u5BF9\u4E8E\u5173\u952E\u5B57\u63D0\u53D6/\u63D2\u5165, \u6CA1\u6709\u8F93\u5165\u6587\u6863\u3002 27 | 1021=\u5173\u952E\u5B57\u63D0\u53D6/\u63D2\u5165\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A\u3002 28 | 1022=\u6587\u6863\u5B9E\u4F8B\u672A\u6B63\u786E\u5173\u95ED\u3002 29 | 1023=\u6587\u6863\u5B9E\u4F8B\u4E3A\u7A7A\u6216\u8005\u4E0D\u662F JSON \u5BF9\u8C61\u3002 30 | 1024=\u63D0\u53D6\u7684\u5173\u952E\u5B57\u4E0D\u662F\u5B57\u7B26\u4E32\u6216\u6570\u5B57\u3002 31 | 1025=\u63D2\u5165\u7684\u5173\u952E\u5B57\u4E0E\u73B0\u6709\u5173\u952E\u5B57\u4E0D\u5339\u914D\u3002 32 | 1026=\u5BF9\u4E8E\u5173\u952E\u5B57\u6B65\u9AA4 {0} \u53D1\u73B0\u91CD\u590D\u7684\u5B57\u6BB5\u3002 33 | 1027=\u683C\u5F0F\u8F6C\u6362\u672A\u5B9E\u65BD\u6216\u4E0D\u53EF\u7528\u3002 34 | 1028=\u4E0D\u652F\u6301\u6269\u5C55\u7684 JSON \u6570\u636E\u7C7B\u578B {0}\u3002 35 | 1029=\u8F6C\u6362\u7684\u8F93\u5165\u6587\u6863\u5DF2\u635F\u574F\u6216\u4E0D\u53EF\u8BFB\u3002 36 | 1030=\u65E0\u6CD5\u5728\u67D0\u4E2A\u5173\u952E\u5B57\u6B63\u5728\u7B49\u5F85\u66FF\u6362\u7684\u60C5\u51B5\u4E0B\u63D0\u53D6\u8BE5\u5173\u952E\u5B57\u3002 37 | 1031=\u6CA1\u6709\u6307\u5B9A\u8981\u8F6C\u6362\u7684\u5173\u952E\u5B57\u8DEF\u5F84\u3002 38 | 1032=\u4E0D\u5141\u8BB8\u5BF9 {1} \u8FDB\u884C\u64CD\u4F5C {0}\u3002 39 | 1033=\u6587\u6863\u64CD\u4F5C\u9047\u5230\u4E86\u9519\u8BEF\uFF1A{0}\u3002 40 | 1034=\u4E0D\u652F\u6301\u6587\u6863\u7C7B\u578B {0}\u3002 41 | -------------------------------------------------------------------------------- /test/json.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 72 | 73 | 74 | 75 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/ValueTypePair.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | QBE Value-type pair class to track fieldvalue and datatypes 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Rahul Manohar Kadwe 16 | */ 17 | 18 | package oracle.json.parser; 19 | 20 | import java.math.BigDecimal; 21 | 22 | import jakarta.json.JsonBuilderFactory; 23 | import jakarta.json.JsonValue; 24 | import jakarta.json.JsonValue.ValueType; 25 | import oracle.json.util.ComponentTime; 26 | 27 | public class ValueTypePair 28 | { 29 | /** Static singleton is ok since just using for constructing primitives */ 30 | private static JsonBuilderFactory FACTORY; 31 | 32 | JsonValue value; 33 | 34 | private boolean dateFlag = false; 35 | private boolean timestampFlag = false; 36 | 37 | ValueTypePair(JsonValue value) 38 | { 39 | this.value = value; 40 | } 41 | 42 | ValueTypePair(String value) { 43 | this(FACTORY.createArrayBuilder().add(value).build().get(0)); 44 | } 45 | 46 | public ValueTypePair(BigDecimal dec) { 47 | this(FACTORY.createArrayBuilder().add(dec).build().get(0)); 48 | } 49 | 50 | public JsonValue getValue() { 51 | return value; 52 | } 53 | 54 | void setValue(JsonValue value) { 55 | this.value = value; 56 | } 57 | 58 | public boolean isTimestamp() { 59 | return(timestampFlag); 60 | } 61 | 62 | public boolean isDate() { 63 | return(dateFlag); 64 | } 65 | 66 | public boolean isNumber() { 67 | return value.getValueType() == ValueType.NUMBER; 68 | } 69 | 70 | public boolean isBoolean() { 71 | return value.getValueType() == ValueType.TRUE || 72 | value.getValueType() == ValueType.FALSE; 73 | 74 | } 75 | 76 | public boolean isString() { 77 | return value.getValueType() == ValueType.STRING; 78 | } 79 | 80 | public boolean isObject() { 81 | return value.getValueType() == ValueType.OBJECT; 82 | } 83 | 84 | public boolean isArray() { 85 | return value.getValueType() == ValueType.ARRAY; 86 | } 87 | 88 | public BigDecimal getNumberValue() { 89 | return isNumber() ? ((jakarta.json.JsonNumber)value).bigDecimalValue() : null; 90 | } 91 | 92 | public String getStringValue() { 93 | return isString() ? ((jakarta.json.JsonString)value).getString() : null; 94 | } 95 | 96 | public boolean getBooleanValue() { 97 | return JsonValue.TRUE == value; 98 | } 99 | 100 | static ValueTypePair makeTemporal(ValueTypePair bval, boolean isTimestamp) 101 | { 102 | if (bval.isNumber()) 103 | { 104 | BigDecimal dval = bval.getNumberValue(); 105 | // 106 | // ### This conversion assumes we want to treat numeric "dates" 107 | // ### as tick counts (milliseconds since 1970). 108 | // ### This is inconsistent with Oracle SQL's treatment of 109 | // ### them (as floating-point Julian days). For now we will 110 | // ### use this approach because Java has facilities for 111 | // ### that. 112 | // 113 | String tsval = ComponentTime.millisToString(dval.longValue()); 114 | if (!isTimestamp) 115 | { 116 | int zloc = tsval.indexOf('Z'); 117 | if (zloc > 0) tsval = tsval.substring(0, zloc); 118 | } 119 | 120 | bval = new ValueTypePair(tsval); 121 | } 122 | // Assumes if it's a TYPE_STRING it's in an acceptable format 123 | 124 | if (isTimestamp) 125 | bval.timestampFlag = true; 126 | else 127 | bval.dateFlag = true; 128 | 129 | return(bval); 130 | } 131 | 132 | static { 133 | FACTORY = jakarta.json.Json.createBuilderFactory(null); 134 | } 135 | 136 | 137 | } 138 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/SpatialClause.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2022, Oracle and/or its affiliates.*/ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | QBE Spatial clause 7 | 8 | PRIVATE CLASSES 9 | 10 | NOTES 11 | Simple carrier of information needed to generate an SDO spatial clause: 12 | - Operation (SDO_INSIDE, SDO_ANYINTERACT, SDO_WITHIN_DISTANCE) 13 | - Not flag (should use != 'TRUE') 14 | - Path within row source (e.g. "$.address.location") 15 | - String version of the GeoJson reference 16 | - String with optional distance+units 17 | 18 | MODIFIED (MM/DD/YY) 19 | dmcmahon 06/04/15 - Creation 20 | */ 21 | 22 | /** 23 | * SpatialClause.java 24 | * 25 | * Copyright (c) 2014, 2022, Oracle and/or its affiliates. 26 | * 27 | * @author Doug McMahon 28 | */ 29 | 30 | package oracle.json.parser; 31 | 32 | public class SpatialClause 33 | { 34 | static final String GEOMETRY_FIELD_NAME = "$geometry"; 35 | static final String DISTANCE_FIELD_NAME = "$distance"; 36 | static final String EXCLUDE_FIELD_NAME = "$excludeDistance"; 37 | static final String UNIT_FIELD_NAME = "$unit"; 38 | static final String SCALAR_REQ = "$scalarRequired"; 39 | static final String LAX = "$lax"; 40 | static final String NEAR = "$near"; 41 | 42 | static final String SPATIAL_DEFAULT_UNIT = "mile"; 43 | static final String SPATIAL_DEFAULT_TOLERANCE = "0.05"; // meters 44 | 45 | private final JsonQueryPath spatialPath; 46 | private final String spatialOperator; 47 | private final String spatialReference; 48 | private final String spatialDistance; 49 | private final boolean notFlag; 50 | private final String errorClause; 51 | 52 | SpatialClause(String oper, boolean notFlag, JsonQueryPath path, 53 | String geom, String distance, String errorClause) 54 | { 55 | this.spatialOperator = oper; 56 | this.spatialPath = path; 57 | this.spatialReference = geom; 58 | this.spatialDistance = distance; 59 | this.notFlag = notFlag; 60 | this.errorClause = errorClause; 61 | } 62 | 63 | public JsonQueryPath getPath() 64 | { 65 | return(spatialPath); 66 | } 67 | 68 | public String getOperator() 69 | { 70 | return(spatialOperator); 71 | } 72 | 73 | public String getReference() 74 | { 75 | return(spatialReference); 76 | } 77 | 78 | public String getDistance() 79 | { 80 | return(spatialDistance); 81 | } 82 | 83 | public String getErrorClause() 84 | { 85 | return(errorClause); 86 | } 87 | 88 | public boolean isNot() 89 | { 90 | return(notFlag); 91 | } 92 | 93 | static String buildDistance(String dist, String excludeDist, String unit) 94 | throws QueryException 95 | { 96 | if (dist == null) 97 | QueryException.throwSyntaxException(QueryMessage.EX_SYNTAX_ERROR); 98 | 99 | if (unit == null) 100 | unit = SpatialClause.SPATIAL_DEFAULT_UNIT; 101 | 102 | // ### Should we append tolerance in meters? 103 | if (excludeDist != null) 104 | return("distance="+dist+" unit="+unit+" exclude_distance="+excludeDist); 105 | 106 | return("distance="+dist+" unit="+unit); 107 | } 108 | 109 | static String buildDistance(String dist, String unit) 110 | throws QueryException 111 | { 112 | return SpatialClause.buildDistance(dist, null, unit); 113 | } 114 | 115 | static String sdoOperatorFor(String op) 116 | throws QueryException 117 | { 118 | if (op.equals("$near")) return "SDO_WITHIN_DISTANCE"; 119 | else if (op.equals("$within")) return "SDO_INSIDE"; 120 | else if (op.equals("$intersects")) return "SDO_ANYINTERACT"; 121 | 122 | QueryException.throwSyntaxException(QueryMessage.EX_NOT_AN_OPERATOR, op); 123 | 124 | return null; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/util/LimitedInputStream.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Input stream that enforces a byte limit. Useful for request content 7 | bodies where the underlying socket may remain open across requests, 8 | but a specific request carries a header such as Content-Length. 9 | */ 10 | 11 | /** 12 | * This class is not part of the public API, and is 13 | * subject to change. 14 | * 15 | * Do not rely on it in your application code. 16 | * 17 | * @author Doug McMahon 18 | */ 19 | 20 | package oracle.json.util; 21 | 22 | import java.io.IOException; 23 | import java.io.FilterInputStream; 24 | import java.io.ByteArrayInputStream; 25 | import java.io.InputStream; 26 | 27 | public class LimitedInputStream 28 | extends FilterInputStream 29 | { 30 | private static final byte[] EMPTY_CONTENT = new byte[0]; 31 | 32 | private final long limit; 33 | private long total = 0; 34 | private long markPos = -1; 35 | 36 | private byte[] single = new byte[1]; 37 | 38 | protected boolean closed = false; 39 | 40 | public LimitedInputStream(InputStream in, long limit) 41 | { 42 | super(in); 43 | this.limit = limit; 44 | } 45 | 46 | public LimitedInputStream(InputStream in, int limit) 47 | { 48 | this(in, (long)limit); 49 | } 50 | 51 | public LimitedInputStream() 52 | { 53 | this(new ByteArrayInputStream(EMPTY_CONTENT), 0); 54 | } 55 | 56 | public long availableLong() 57 | { 58 | return(limit - total); 59 | } 60 | 61 | @Override 62 | public boolean markSupported() 63 | { 64 | return(super.markSupported()); 65 | } 66 | 67 | @Override 68 | public void mark(int readLimit) 69 | { 70 | super.mark(readLimit); 71 | markPos = total; 72 | } 73 | 74 | @Override 75 | public void reset() 76 | throws IOException 77 | { 78 | super.reset(); 79 | if (markPos >= 0L) 80 | total = markPos; 81 | } 82 | 83 | @Override 84 | public int available() 85 | { 86 | long sz = availableLong(); 87 | if (sz > (long)Integer.MAX_VALUE) 88 | return Integer.MAX_VALUE; 89 | return((int)sz); 90 | } 91 | 92 | @Override 93 | public long skip(long n) 94 | throws IOException 95 | { 96 | long nbytes = availableLong(); 97 | if (nbytes > n) nbytes = n; 98 | nbytes = super.skip(nbytes); 99 | if (nbytes > 0L) 100 | total += nbytes; 101 | return(nbytes); 102 | } 103 | 104 | @Override 105 | public int read() 106 | throws IOException 107 | { 108 | int n = read(single); 109 | if (n == 1) 110 | return((int)(single[0] & 0xFF)); 111 | return(n); 112 | } 113 | 114 | @Override 115 | public int read(byte[] b) 116 | throws IOException 117 | { 118 | return(read(b, 0, b.length)); 119 | } 120 | 121 | /** 122 | * Override this method to time all read I/O operations 123 | */ 124 | protected int timedRead(byte[] b, int off, int len) 125 | throws IOException 126 | { 127 | return(in.read(b, off, len)); 128 | } 129 | 130 | @Override 131 | public int read(byte[] b, int off, int len) 132 | throws IOException 133 | { 134 | int n = -1; 135 | 136 | if (len == 0) 137 | n = 0; 138 | else 139 | { 140 | int nbytes = available(); 141 | if (nbytes > len) 142 | nbytes = len; 143 | if (nbytes > 0) 144 | { 145 | n = timedRead(b, off, nbytes); 146 | if (n > 0) 147 | total += n; 148 | else if (n < 0) 149 | total = limit; // Stream is exhausted 150 | } 151 | } 152 | 153 | return(n); 154 | } 155 | 156 | @Override 157 | public void close() 158 | throws IOException 159 | { 160 | // Ensure that embedded object is closed only once 161 | if (!closed) 162 | { 163 | closed = true; 164 | super.close(); 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /orajsoda/src/main/java/oracle/json/parser/IndexColumn.java: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. */ 2 | /* All rights reserved.*/ 3 | 4 | /* 5 | DESCRIPTION 6 | Define class that holds the structure of an index specification. 7 | */ 8 | 9 | /** 10 | * This class is not part of the public API, and is 11 | * subject to change. 12 | * 13 | * Do not rely on it in your application code. 14 | * 15 | * @author Doug McMahon 16 | */ 17 | 18 | package oracle.json.parser; 19 | 20 | import java.util.List; 21 | 22 | public class IndexColumn extends JsonPath 23 | { 24 | public static final int SQLTYPE_NONE = 0; 25 | public static final int SQLTYPE_CHAR = 1; 26 | public static final int SQLTYPE_NUMBER = 2; 27 | public static final int SQLTYPE_DATE = 3; 28 | public static final int SQLTYPE_TIMESTAMP = 4; 29 | public static final int SQLTYPE_ANY_SCALAR = 5; 30 | 31 | public static final int KEY_NAME = 1; 32 | public static final int KEY_UNIQUE = 2; 33 | public static final int KEY_COLUMNS = 3; 34 | 35 | public static final int MAX_CHAR_COLUMNS = 16; 36 | 37 | public static final String ASC_ORDER = "ASC"; 38 | public static final String DESC_ORDER = "DESC"; 39 | private int sqlType = SQLTYPE_NONE; 40 | private int maxLength = 0; 41 | private String order = ASC_ORDER; 42 | 43 | 44 | public IndexColumn() 45 | { 46 | super((String)null); 47 | } 48 | 49 | public IndexColumn(String idxName, boolean u, String step) 50 | { 51 | super(step); 52 | } 53 | 54 | public IndexColumn(String idxName, boolean u, String[] steps) 55 | { 56 | super(steps); 57 | } 58 | 59 | public IndexColumn(String idxName, boolean u, List steps) 60 | { 61 | super(steps); 62 | } 63 | 64 | public int getSqlType() 65 | { 66 | return this.sqlType; 67 | } 68 | 69 | public int getMaxLength() 70 | { 71 | return this.maxLength; 72 | } 73 | 74 | public String getOrder() 75 | { 76 | return this.order; 77 | } 78 | 79 | public String getSqlTypeNameDefault() 80 | { 81 | return "VARCHAR2"; 82 | } 83 | 84 | public String getSqlTypeName() 85 | { 86 | switch (sqlType) 87 | { 88 | case SQLTYPE_CHAR: return("VARCHAR2"); 89 | case SQLTYPE_NUMBER: return("NUMBER"); 90 | case SQLTYPE_DATE: return("DATE"); 91 | case SQLTYPE_TIMESTAMP: return("TIMESTAMP"); 92 | case SQLTYPE_ANY_SCALAR: return("ANY_SCALAR"); 93 | default: 94 | break; 95 | } 96 | return(null); 97 | } 98 | 99 | public void setSqlType(int sql_type) 100 | { 101 | this.sqlType = sql_type; 102 | } 103 | 104 | public void setMaxLength(int len) 105 | { 106 | this.maxLength = len; 107 | } 108 | 109 | public void setOrder(String order) 110 | { 111 | if ((order != null) && 112 | ( order.equalsIgnoreCase("DESC") || order.equalsIgnoreCase("-1"))) 113 | this.order = DESC_ORDER; 114 | else 115 | this.order = ASC_ORDER; 116 | } 117 | 118 | public int setSqlType(String str) 119 | { 120 | int sqlType = SQLTYPE_NONE; 121 | if (str != null) 122 | { 123 | if (str.equalsIgnoreCase("NUMBER")) 124 | sqlType = SQLTYPE_NUMBER; 125 | else if (str.equalsIgnoreCase("DATE")) 126 | sqlType = SQLTYPE_DATE; 127 | else if ((str.equalsIgnoreCase("TIMESTAMP"))) 128 | sqlType = SQLTYPE_TIMESTAMP; 129 | else if ((str.equalsIgnoreCase("STRING")) || 130 | (str.equalsIgnoreCase("VARCHAR")) || 131 | (str.equalsIgnoreCase("VARCHAR2")) ) 132 | sqlType = SQLTYPE_CHAR; 133 | else if (str.equalsIgnoreCase("ANY_SCALAR")) 134 | sqlType = SQLTYPE_ANY_SCALAR; 135 | } 136 | // Set the SQL type only if a valid type was detected 137 | if (sqlType != SQLTYPE_NONE) 138 | this.sqlType = sqlType; 139 | // Return the detected type, which may be unknown 140 | return(sqlType); 141 | } 142 | 143 | public void setPath(String[] path) 144 | { 145 | this.steps = path; 146 | } 147 | 148 | } 149 | --------------------------------------------------------------------------------