Skip to content

Commit

Permalink
Rename stdlib to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed Mar 22, 2024
1 parent deabecd commit f0655c2
Show file tree
Hide file tree
Showing 27 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion ballerina/init.bal
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ isolated function init() {
}

isolated function setModule() = @java:Method {
'class: "io.ballerina.stdlib.data.xmldata.utils.ModuleUtils"
'class: "io.ballerina.lib.data.xmldata.utils.ModuleUtils"
} external;
10 changes: 5 additions & 5 deletions ballerina/xml_api.bal
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public type Error distinct error;
# + t - Target type to be used for filtering in the projection
# + return - On success, returns the given target type value, else returns an `xmldata:Error` value
public isolated function parseAsType(xml v, SourceOptions options = {}, typedesc<record {}> t = <>)
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.xml.Native"} external;
returns t|Error = @java:Method {'class: "io.ballerina.lib.data.xmldata.xml.Native"} external;

# Converts XML string to record type with projection.
#
Expand All @@ -93,7 +93,7 @@ public isolated function parseAsType(xml v, SourceOptions options = {}, typedesc
# + t - Target type to be used for filtering in the projection
# + return - On success, returns the given target type value, else returns an `xmldata:Error` value
public isolated function parseString(string s, SourceOptions options = {}, typedesc<record {}> t = <>)
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.xml.Native"} external;
returns t|Error = @java:Method {'class: "io.ballerina.lib.data.xmldata.xml.Native"} external;

# Converts XML byte[] to record type with projection.
#
Expand All @@ -102,7 +102,7 @@ public isolated function parseString(string s, SourceOptions options = {}, typed
# + t - Target type to be used for filtering in the projection
# + return - On success, returns the given target type value, else returns an `xmldata:Error` value
public isolated function parseBytes(byte[] s, SourceOptions options = {}, typedesc<record {}> t = <>)
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.xml.Native"} external;
returns t|Error = @java:Method {'class: "io.ballerina.lib.data.xmldata.xml.Native"} external;

# Converts XML byte-block-stream to record type with projection.
#
Expand All @@ -111,7 +111,7 @@ public isolated function parseBytes(byte[] s, SourceOptions options = {}, typede
# + t - Target type to be used for filtering in the projection
# + return - On success, returns the given target type value, else returns an `xmldata:Error` value
public isolated function parseStream(stream<byte[], error?> s, SourceOptions options = {}, typedesc<record {}> t = <>)
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.xml.Native"} external;
returns t|Error = @java:Method {'class: "io.ballerina.lib.data.xmldata.xml.Native"} external;

# Converts a `Map` or `Record` representation to its XML representation.
# Additionally, when converting from a record, the `xmldata:Namespace`, `xmldata:Name`, and `xmldata:Attribute`
Expand Down Expand Up @@ -152,7 +152,7 @@ isolated function convertMapXml(map<xml>|map<xml[]> mapValue) returns xml {
}

isolated function getModifiedRecord(map<anydata> mapValue, string textFieldName, typedesc<(map<anydata>|json)> inputType)
returns json|record{}|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.utils.DataUtils"} external;
returns json|record{}|Error = @java:Method {'class: "io.ballerina.lib.data.xmldata.utils.DataUtils"} external;

# Provides configurations for converting JSON to XML.
#
Expand Down
2 changes: 1 addition & 1 deletion build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ distribution = "2201.8.6"
export = ["data.xmldata"]

[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
groupId = "io.ballerina.lib"
artifactId = "data-native"
version = "@toml.version@"
path = "../native/build/libs/[email protected]@.jar"
2 changes: 1 addition & 1 deletion build-config/resources/CompilerPlugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[plugin]
id = "constraint-compiler-plugin"
class = "io.ballerina.stdlib.data.xmldata.compiler.XmldataCompilerPlugin"
class = "io.ballerina.lib.data.xmldata.compiler.XmldataCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/[email protected]@.jar"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

import io.ballerina.projects.DiagnosticResult;
import io.ballerina.tools.diagnostics.Diagnostic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

import io.ballerina.projects.Package;
import io.ballerina.projects.ProjectEnvironmentBuilder;
Expand Down
2 changes: 1 addition & 1 deletion compiler-plugin-test/src/test/resources/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<suite name="BallerinaConstraintCompilerPluginTests">
<test name="UnitTests">
<classes>
<class name="io.ballerina.stdlib.data.xmldata.compiler.CompilerPluginTest"/>
<class name="io.ballerina.lib.data.xmldata.compiler.CompilerPluginTest"/>
</classes>
</test>
</suite>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

/**
* Constants for XmlData's compiler plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

import io.ballerina.compiler.syntax.tree.SyntaxKind;
import io.ballerina.projects.plugins.CodeAnalysisContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

import io.ballerina.projects.plugins.CompilerPlugin;
import io.ballerina.projects.plugins.CompilerPluginContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

import io.ballerina.tools.diagnostics.DiagnosticSeverity;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler;
package io.ballerina.lib.data.xmldata.compiler;

import io.ballerina.compiler.api.SemanticModel;
import io.ballerina.compiler.api.symbols.AnnotationAttachmentSymbol;
Expand Down Expand Up @@ -45,10 +45,10 @@
import io.ballerina.compiler.syntax.tree.SyntaxKind;
import io.ballerina.compiler.syntax.tree.TypeDefinitionNode;
import io.ballerina.compiler.syntax.tree.VariableDeclarationNode;
import io.ballerina.lib.data.xmldata.compiler.objects.QualifiedName;
import io.ballerina.projects.Document;
import io.ballerina.projects.plugins.AnalysisTask;
import io.ballerina.projects.plugins.SyntaxNodeAnalysisContext;
import io.ballerina.stdlib.data.xmldata.compiler.objects.QualifiedName;
import io.ballerina.tools.diagnostics.Diagnostic;
import io.ballerina.tools.diagnostics.DiagnosticFactory;
import io.ballerina.tools.diagnostics.DiagnosticInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.compiler.objects;
package io.ballerina.lib.data.xmldata.compiler.objects;

public class QualifiedName {
private final String localPart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata;
package io.ballerina.lib.data.xmldata;

import io.ballerina.lib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
Expand All @@ -30,8 +32,6 @@
import io.ballerina.runtime.api.values.BError;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.runtime.api.values.BTypedesc;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;

import java.util.ArrayList;
import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.io;
package io.ballerina.lib.data.xmldata.io;

import io.ballerina.lib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.async.Callback;
import io.ballerina.runtime.api.async.StrandMetadata;
Expand All @@ -28,8 +30,6 @@
import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BObject;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.ballerina.stdlib.data.xmldata.io;
package io.ballerina.lib.data.xmldata.io;

import io.ballerina.lib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.lib.data.xmldata.xml.XmlParser;
import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Future;
import io.ballerina.runtime.api.types.MethodType;
Expand All @@ -26,9 +29,6 @@
import io.ballerina.runtime.api.values.BObject;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.runtime.api.values.BTypedesc;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.stdlib.data.xmldata.xml.XmlParser;

import java.io.InputStreamReader;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.ballerina.stdlib.data.xmldata.io;
package io.ballerina.lib.data.xmldata.io;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.SynchronousQueue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.utils;
package io.ballerina.lib.data.xmldata.utils;

import io.ballerina.lib.data.xmldata.xml.QualifiedName;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.types.ArrayType;
import io.ballerina.runtime.api.types.MapType;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.runtime.api.values.BXmlItem;
import io.ballerina.stdlib.data.xmldata.xml.QualifiedName;

/**
* Constants used in Ballerina XmlData library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.utils;
package io.ballerina.lib.data.xmldata.utils;

import io.ballerina.lib.data.xmldata.FromString;
import io.ballerina.lib.data.xmldata.xml.QualifiedName;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
Expand All @@ -36,8 +38,6 @@
import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.runtime.api.values.BTypedesc;
import io.ballerina.stdlib.data.xmldata.FromString;
import io.ballerina.stdlib.data.xmldata.xml.QualifiedName;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.utils;
package io.ballerina.lib.data.xmldata.utils;

/**
* Represents a diagnostic error code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.utils;
package io.ballerina.lib.data.xmldata.utils;

import io.ballerina.runtime.api.creators.ErrorCreator;
import io.ballerina.runtime.api.utils.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.utils;
package io.ballerina.lib.data.xmldata.utils;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Module;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.xml;
package io.ballerina.lib.data.xmldata.xml;

import io.ballerina.lib.data.xmldata.io.DataReaderTask;
import io.ballerina.lib.data.xmldata.io.DataReaderThreadPool;
import io.ballerina.lib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Future;
import io.ballerina.runtime.api.values.BArray;
Expand All @@ -27,10 +31,6 @@
import io.ballerina.runtime.api.values.BString;
import io.ballerina.runtime.api.values.BTypedesc;
import io.ballerina.runtime.api.values.BXml;
import io.ballerina.stdlib.data.xmldata.io.DataReaderTask;
import io.ballerina.stdlib.data.xmldata.io.DataReaderThreadPool;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;

import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.xml;
package io.ballerina.lib.data.xmldata.xml;

/**
* Represents a qualified name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.xml;
package io.ballerina.lib.data.xmldata.xml;

import io.ballerina.lib.data.xmldata.FromString;
import io.ballerina.lib.data.xmldata.utils.Constants;
import io.ballerina.lib.data.xmldata.utils.DataUtils;
import io.ballerina.lib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
Expand All @@ -34,11 +39,6 @@
import io.ballerina.runtime.api.values.BError;
import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.stdlib.data.xmldata.FromString;
import io.ballerina.stdlib.data.xmldata.utils.Constants;
import io.ballerina.stdlib.data.xmldata.utils.DataUtils;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;

import java.io.Reader;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
* under the License.
*/

package io.ballerina.stdlib.data.xmldata.xml;
package io.ballerina.lib.data.xmldata.xml;

import io.ballerina.lib.data.xmldata.utils.Constants;
import io.ballerina.lib.data.xmldata.utils.DataUtils;
import io.ballerina.lib.data.xmldata.utils.DataUtils.XmlAnalyzerData;
import io.ballerina.lib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.lib.data.xmldata.utils.DiagnosticLog;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
Expand All @@ -37,11 +42,6 @@
import io.ballerina.runtime.api.values.BXml;
import io.ballerina.runtime.api.values.BXmlItem;
import io.ballerina.runtime.api.values.BXmlSequence;
import io.ballerina.stdlib.data.xmldata.utils.Constants;
import io.ballerina.stdlib.data.xmldata.utils.DataUtils;
import io.ballerina.stdlib.data.xmldata.utils.DataUtils.XmlAnalyzerData;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
2 changes: 1 addition & 1 deletion native/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
requires java.xml;
requires junit;
requires org.apache.commons.lang3;
exports io.ballerina.stdlib.data.xmldata.xml;
exports io.ballerina.lib.data.xmldata.xml;
}

0 comments on commit f0655c2

Please sign in to comment.