|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uk.org.ogsadai.dataresource.MetaDataExtractor
|
+--uk.org.ogsadai.dataresource.SimpleXMLDBMetaDataExtractor
This is a helper class that will assist in the extraction of collection schema from an XMLDB data resource, using an XMLDB collection provider, and the return of this schema in a DOM object.
| Field Summary | |
static java.lang.String |
COLLECTION
Database Schema Element and Attribute Names |
static java.lang.String |
COLLECTION_ATTR_NAME
|
static java.lang.String |
COLLECTIONS
|
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private XMLDBCollectionProvider |
mCollectionProvider
|
static java.lang.String |
RESOURCE
|
static java.lang.String |
RESOURCE_ATTR_ID
|
static java.lang.String |
RESOURCE_ATTR_TYPE
|
static java.lang.String |
RESOURCES
|
static java.lang.String |
SERVICE
|
static java.lang.String |
SERVICE_ATTR_NAME
|
static java.lang.String |
SERVICE_ATTR_VERSION
|
static java.lang.String |
SERVICES
|
| Fields inherited from class uk.org.ogsadai.dataresource.MetaDataExtractor |
mSecurityContext |
| Constructor Summary | |
SimpleXMLDBMetaDataExtractor()
|
|
| Method Summary | |
private void |
addCollections(org.xmldb.api.base.Collection collection,
org.w3c.dom.Element elt,
org.w3c.dom.Document schema)
Add to the schema document information on a given collection, recursing on child collections if any. |
private void |
addResources(org.xmldb.api.base.Collection collection,
org.w3c.dom.Element collectionElt,
org.w3c.dom.Document schema)
Add to the schema document information on the resources associated with a given collection. |
private void |
addServices(org.xmldb.api.base.Collection collection,
org.w3c.dom.Element collectionElt,
org.w3c.dom.Document schema)
Add to the schema document information on the services associated with a given collection. |
private java.lang.Object |
getCollectionSchema(java.lang.String collectionURI,
org.xmldb.api.base.Collection collection,
javax.xml.namespace.QName name)
Extracts XMLDB database meta data and places this in a DOM object. |
protected java.lang.Object |
getMetaData(SecurityContext securityContext,
javax.xml.namespace.QName name)
Gets the meta data using the given security context to access the data resource. |
void |
setCollectionProvider(XMLDBCollectionProvider collectionProvider)
Sets the collection provider need to allow the meta data extractor to access the XMLDB collection. |
| Methods inherited from class uk.org.ogsadai.dataresource.MetaDataExtractor |
getValue, setSecurityContext, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
public static final java.lang.String COLLECTION
public static final java.lang.String COLLECTION_ATTR_NAME
public static final java.lang.String COLLECTIONS
public static final java.lang.String SERVICES
public static final java.lang.String SERVICE
public static final java.lang.String SERVICE_ATTR_NAME
public static final java.lang.String SERVICE_ATTR_VERSION
public static final java.lang.String RESOURCES
public static final java.lang.String RESOURCE
public static final java.lang.String RESOURCE_ATTR_ID
public static final java.lang.String RESOURCE_ATTR_TYPE
private XMLDBCollectionProvider mCollectionProvider
| Constructor Detail |
public SimpleXMLDBMetaDataExtractor()
| Method Detail |
public void setCollectionProvider(XMLDBCollectionProvider collectionProvider)
XMLDBMetaDataExtractor
setCollectionProvider in interface XMLDBMetaDataExtractorcollectionProvider - The XMLDB collection provider.
protected java.lang.Object getMetaData(SecurityContext securityContext,
javax.xml.namespace.QName name)
throws MetaDataAuthorizationException,
MetaDataExtractionException
MetaDataExtractor
getMetaData in class MetaDataExtractorsecurityContext - User details used to access the data resource.name - Name of meta data property being sought.
MetaDataExtractionException - if some problem occurs when
extracting the meta data.
MetaDataAuthorizationException - if the user is not
authorized to access the data resource meta data.
private java.lang.Object getCollectionSchema(java.lang.String collectionURI,
org.xmldb.api.base.Collection collection,
javax.xml.namespace.QName name)
throws XMLDBCollectionUseException,
ExternalModuleException
collectionURI - URI of base collection.collection - An object configured to query some database.name - Qualified name determining the meta-data to be returned.
Element).
XMLDBCollectionUseException - if any
problems arise in extracting database information.
ExternalModuleException - if a Xerces problem occurs
when creating a new DOM document.
private void addServices(org.xmldb.api.base.Collection collection,
org.w3c.dom.Element collectionElt,
org.w3c.dom.Document schema)
throws org.xmldb.api.base.XMLDBException
collection - XMLDB collection.collectionElt - DOM element to which information is to be added.schema - Schema document DOM object to which collectionElt
belongs.
org.xmldb.api.base.XMLDBException - if any problems arise in
extracting database information.
private void addResources(org.xmldb.api.base.Collection collection,
org.w3c.dom.Element collectionElt,
org.w3c.dom.Document schema)
throws org.xmldb.api.base.XMLDBException
collection - XMLDB collection.collectionElt - DOM element to which information is to be added.schema - Schema document DOM object to which collectionElt
belongs.
org.xmldb.api.base.XMLDBException - if any problems arise in
extracting database information.
private void addCollections(org.xmldb.api.base.Collection collection,
org.w3c.dom.Element elt,
org.w3c.dom.Document schema)
throws org.xmldb.api.base.XMLDBException
collection - XMLDB collection.elt - DOM element to which information is to be added.schema - Schema document DOM object to which elt
belongs.
org.xmldb.api.base.XMLDBException - if any problems arise in
extracting database information.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||