Skip to content

Commit

Permalink
Fix native code path structure
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed Dec 21, 2023
1 parent ce72f33 commit e7a9b64
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 35 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.utils.ModuleUtils"
'class: "io.ballerina.stdlib.data.xmldata.utils.ModuleUtils"
} external;
6 changes: 3 additions & 3 deletions ballerina/xml_api.bal
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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`
public isolated function fromXmlWithType(xml v, Options options = {}, typedesc<record {}> t = <>)
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xml.Native"} external;
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.xml.Native"} external;

# Converts XML string, byte[] or byte-stream to record type with projection
#
Expand All @@ -81,7 +81,7 @@ public isolated function fromXmlWithType(xml v, Options options = {}, typedesc<r
# + 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`
public isolated function fromXmlStringWithType(string|byte[]|stream<byte[], error?> s, Options options = {}, typedesc<record {}> t = <>)
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xml.Native"} external;
returns t|Error = @java:Method {'class: "io.ballerina.stdlib.data.xmldata.xml.Native"} external;


# Converts a `Map` or `Record` representation to its XML representation.
Expand Down Expand Up @@ -120,7 +120,7 @@ isolated function convertMapXml(map<xml>|map<xml[]> mapValue) returns xml {
}

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

# Provides configurations for converting JSON to XML.
#
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;
package io.ballerina.stdlib.data.xmldata;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
Expand All @@ -28,8 +28,8 @@
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.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.utils.DiagnosticLog;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.xmldata.utils.DiagnosticLog;

import java.util.Comparator;
import java.util.List;
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.utils;
package io.ballerina.stdlib.data.xmldata.utils;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.creators.TypeCreator;
Expand All @@ -25,7 +25,7 @@
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.xml.QualifiedName;
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,7 +16,7 @@
* under the License.
*/

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

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
Expand All @@ -36,8 +36,8 @@
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.FromString;
import io.ballerina.stdlib.data.xml.QualifiedName;
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.utils;
package io.ballerina.stdlib.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.utils;
package io.ballerina.stdlib.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.utils;
package io.ballerina.stdlib.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,7 +16,7 @@
* under the License.
*/

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

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.async.Callback;
Expand All @@ -28,8 +28,8 @@
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.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.utils.DiagnosticLog;
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 @@ -16,7 +16,7 @@
* under the License.
*/

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

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.Future;
Expand All @@ -30,8 +30,8 @@
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.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.utils.DiagnosticLog;
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.xml;
package io.ballerina.stdlib.data.xmldata.xml;

/**
* Represents a qualified name.
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.xml;
package io.ballerina.stdlib.data.xmldata.xml;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
Expand All @@ -34,11 +34,11 @@
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.FromString;
import io.ballerina.stdlib.data.utils.Constants;
import io.ballerina.stdlib.data.utils.DataUtils;
import io.ballerina.stdlib.data.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.utils.DiagnosticLog;
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,7 +16,7 @@
* under the License.
*/

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

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
Expand All @@ -37,11 +37,11 @@
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.utils.Constants;
import io.ballerina.stdlib.data.utils.DataUtils;
import io.ballerina.stdlib.data.utils.DataUtils.XmlAnalyzerData;
import io.ballerina.stdlib.data.utils.DiagnosticErrorCode;
import io.ballerina.stdlib.data.utils.DiagnosticLog;
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.xml;
exports io.ballerina.stdlib.data.xmldata.xml;
}

0 comments on commit e7a9b64

Please sign in to comment.