yangxk1 commented on code in PR #713:
URL: https://github.com/apache/incubator-graphar/pull/713#discussion_r2176315483


##########
maven-projects/info/src/main/java/org/apache/graphar/info/VersionParser.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class VersionParser {
+    public static VersionInfo getVersion(String versionStr) {
+        try {
+
+            int parsedVersion = parserVersionImpl(versionStr);
+
+            List<String> parsedTypes = parseUserDefineTypesImpl(versionStr);
+
+            return new VersionInfo(parsedVersion, parsedTypes);
+        } catch (RuntimeException e) {
+
+            throw new RuntimeException(
+                    "Invalid version string: '" + versionStr + "'. Details: " 
+ e.getMessage(), e);
+        }
+    }
+
+    public int parserVersionImpl(String versionStr) {

Review Comment:
   No need to add "Impl" if it's not an interface implementation.



##########
maven-projects/info/src/main/java/org/apache/graphar/info/PropertyGroup.java:
##########
@@ -221,6 +222,24 @@ boolean isPrimaryKey(String propertyName) {
         return properties.get(propertyName).isPrimary();
     }
 
+    Map<String, Property> getPropertiesByDataType(DataType type) {

Review Comment:
   These methods can be deleted to keep the PR focused on a single 
functionality.



##########
maven-projects/info/src/main/java/org/apache/graphar/info/VersionInfo.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class VersionInfo {
+    int Object parsedVersion;

Review Comment:
   Please check the syntax.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to