This seems relevant to the current AX discussion.

 -----Original Message-----
From:   Mark Wahl [mailto:[EMAIL PROTECTED]
Sent:   Saturday, April 07, 2007 02:34 PM Pacific Standard Time
To:     ID Schemas
Subject:        [Idschemas] FYI Schemat Consumer


Today we (Informed Control Inc.) packaged up the source code for
Schemat Consumer, a small, open source, proof of concept library
for attribute type metadata parsing.

The Schemat Consumer provides applications in an identity metasystem
with a simple Java API for retrieving the metadata of URI-named attribute
types.  (It is intended for applications which are not already RDF-aware,
and just need to get additional details on unrecognized identity attributes.)

SchematConsumer sc = SchematConsumer.getInstance();
// ...
IAttributeTypeMetadataClasses iatmc =
  sc.findAttributeTypeMetadataFromSubjectUri(new URI(attribute_type));
CommonAttributeTypeMetadata c = new CommonAttributeTypeMetadata(iatmc);

The CommonAttributeTypeMetadata implements get-methods for a subset of
the metadata elements defined by W3C, Dublin Core, Higgins and OpenID AX:

String label = c.getLabel(); // get display label for the attribute type
String comment = c.getComment(); // get display comment for the attribute type
List seealso = c.getSeeAlsoUriStringsList(); // get URIs of 'see also'
boolean isequiv = c.isEquivalentToUri(another_attribute_type); // test are two 
attribute types equivalent?
List acq_uris = c.getAcquisitionUriStringsList(); // get URIs where to acquire 
values of this attribute
List auth_uris = c.getAuthorityUriStringsList(); // get URIs of authorities for 
this attribute
String example = c.getValueExampleString(); // get String example value of this 
attribute
HigginsValuePropertyDatatype v = c.getHigginsValuePropertyDatatype();
if (v != null) {
String pattern = v.getPatternString();  // get regular expression of value 
syntax
}

Future versions are anticipated to implement the full set of Identity Schemas
metadata in http://idschemas.idcommons.net/moin.cgi/MetaData

Applications can also request an XHTML fragment describing the attribute, or an
entire schema collection of attributes.

Schemat Consumer wraps the Jakarta HTTP core client library and the HP Labs 
Jena ARP2
RDF parser. Currently it implements the http and file URI schemes to
retrieve the RDF/XML encoding of metadata, and has a cache of metadata to avoid
frequent retrievals and to support offline operations.

More info at
http://www.ldap.com/1/spec/schema/ont.shtml
http://www.ldap.com/1/commentary/wahl/20070407_01.shtml

Mark Wahl
Informed Control Inc.

_______________________________________________
Idschemas mailing list
[EMAIL PROTECTED]
http://mail.idcommons.net/cgi-bin/mailman/listinfo/idschemas
_______________________________________________
specs mailing list
specs@openid.net
http://openid.net/mailman/listinfo/specs

Reply via email to