-
Notifications
You must be signed in to change notification settings - Fork 17
XDI2 parsers
peacekeeper edited this page Feb 26, 2013
·
11 revisions
Most of the functionality of the xdi2-core component requires an XRI parser to validate XDI statements and addresses, and to decompose them into their parts. A number of different parsers are available to do this job.
- xdi2.core.xri3.parser.XDI3ParserRegistry: A registry that holds the currently used XRI parser.
- xdi2.core.xri3.parser.apg.XDI3ParserAPG: An XRI parser based on the recursive-descent APG parser generator.
- xdi2.core.xri3.parser.aparse.XDI3ParserAParse: An XRI parser based on the aParse parser generator.
- xdi2.core.xri3.parser.manual.XDI3ParserManual: An XRI parser implemented manually in pure Java.
XDI2 can be programmatically configured to use a certain parser:
XDI3ParserRegistry.getInstance().setParser(new XDI3ParserManual());
This can also be accomplished in the applicationContext.xml configuration file of the xdi2-server component. (See Configuration files for a description of this and other files):
<bean class="xdi2.core.xri3.parser.XDI3ParserRegistry" factory-method="getInstance">
<property name="parser">
<bean class="xdi2.core.xri3.parser.apg.XDI3ParserAPG" />
</property>
</bean>
- XdiAbnf on the OASIS XDI TC wiki
This work is licensed under a Creative Commons Attribution 4.0 International License.