-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code refactoring and cleanup for 1.0.0 release (#204)
* Migrated modules: - Relocated metaschema-model-common to metaschema-core in folder core. - Relocated metaschema-model to metaschema-core in folder core. - Moved metaschema submodule to core. - Relocated the "metaschema-java-binding" and "metaschema-java-codegen" modules to the databind module. - Moved metaschema-schema-generator to schemagen. * Cleaned up reports. * Ensured generated resources are included for site generation. * Cleaned up some unneeded generics in the implementation. * Added many Javadoc comments. * Relocated unit tests to match new package structure. * Added a new mock model builder (MockedModelTestSupport) to facilitate creation of unit tests around using a mocked Metaschema model. * Setup JPMS module-info for the core module. * Some Maven dependency cleanup, including removing unused dependencies. - Removed dependency on JAXB. * Removed aggregate javadoc. * Eliminated a significant number of compile, PMD, CPD duplications, and Spotbugs warnings. * Cleaned up some unused/unneeded classes and methods. * Improved some logging messages. * Use treeless Git clones on GHA builds * Updating to latest oss-maven release. * Core changes: - Added `true()` and `false()` metapath function. - Refactored error handling for step-related Metapath expressions to ensure the provided context node item is non-null and a document. This also lays ground work for null node contexts in Metapath expressions that do not require a focused node. - Refactored code to remove the IRequiredValue* interfaces. - Migrated node item classes to a new package. - Refactored INodeItem handling to implement the following correct behaviors: - IDocumentNodeItem instances will never have a value (i.e. getValue == null) - Root metapaths (i.e. `/`) must be executed against an IDocumentNodeItem or an error should be raised. - Refactored node item implementation to provide better interface segregation and to limit class responsibility. - Refactored Metapath focus to allow for Metapath evaluations against no focus, as well as cases where the focus is not a node item. - Improved memory footprint for Axis expressions, which now use static objects for evaluation. Refactored the Step and ParentItem ASTs to use the new Axis support. - Added support for function namespaces. - Removed collapsible per usnistgov/metaschema#354. - Moved property info factory to static method on IModelPropertyInfo. - Adjusted IDataTypeHandler creation to avoid extra method callbacks. - Reduced unnecessary overridden methods. - Removed the need for specific root assembly model interfaces and classes. - Renamed IMetaschema to IModule to be more consistent with terminology. Deleted unused submodule. - For index constraints, enhanced index key miss error reporting to include the key data that missed. - Added new String initializer for IAnyAtomicItem. * Databind changes: - Refactored JSON reader and writer to use common instance logic. The collection of instances are now lazy generated and cached, improving read and write performance for commonly accessed Metaschema-based JSON objects. - Refactored XML parsing, extracting XML parsing logic into the XmlParser class. This resulted in a cleaner set of bound definition/property classes. Also optimized deserialization to return the Object value directly, instead of first creating an unneeded node item. - Refactored JSON parsing, extracting JSON parsing logic into the MetaschemaJsonParser class. This resulted in a cleaner set of bound definition/property classes that no contain no parsing code. - Renamed XmlParser to MetaschemaXmlReader, MetaschemaJsonParser to MetaschemaJsonReader, and MetaschemaXmlGenerator to MetaschemaXmlWriter. - Cleaned up some collapse unit testing files. - Implemented XML problem handler for parsing. Further code cleanup and refactoring of XML parsing code. - Implemented the JSON problem handler. Resolved #131. - Refactored JSON parser tests. - Refactored input stream handling. Input streams should now be properly closed. - Adjusted problem handlers to use interface defaults and a common implementation of default handling for missing instances. - Refactored binding context to allow for dynamic class generation, compilation, and loading. Removed DynamicBindingContext.java, which is no longer needed. - Adjusted YAML parser configuration to set a higher default codepoint limit. - Refactored code generation, moving code generation methods into a dedicated class. - Refactored code generation production classes to simplify and reduce the number of classes. * Schema generation changes: - Refactored XML and JSON generation by moving generation code into format specific classes (i.e. MetaschemaJsonWriter, MetaschemaXmlWriter). - Improved XML schema generation testing. * Metaschema Maven plugin changes: - Adjusted generate sources mojo default phase to a more reasonable value (generate-sources).
- Loading branch information
1 parent
151d97b
commit 2e91fac
Showing
973 changed files
with
25,219 additions
and
22,800 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
[submodule "metaschema"] | ||
path = metaschema-model/metaschema | ||
url = https://github.com/usnistgov/metaschema | ||
branch = master | ||
[submodule "core/core/metaschema"] | ||
path = core/metaschema | ||
url = https://github.com/usnistgov/metaschema.git | ||
branch = main | ||
[submodule "core/qt3tests"] | ||
path = core/qt3tests | ||
url = https://github.com/w3c/qt3tests.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule metaschema
added at
e54d01
Oops, something went wrong.