|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1) E10686-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.adf.share.common.rc.util.MetadataRegistry
oracle.adf.share.common.rc.util.impl.MetadataRegistryImpl
public class MetadataRegistryImpl
| Nested Class Summary | |
|---|---|
protected static class |
MetadataRegistryImpl.Context |
static class |
MetadataRegistryImpl.DTDSkippingResolver |
protected static class |
MetadataRegistryImpl.IterateNodeListAttributes |
| Nested classes/interfaces inherited from class oracle.adf.share.common.rc.util.MetadataRegistry |
|---|
MetadataRegistry.PathVisitor, MetadataRegistry.PathVisitor2 |
| Field Summary | |
|---|---|
protected static JarDocumentCache |
docCache |
protected static java.util.logging.Logger |
logger |
| Fields inherited from class oracle.adf.share.common.rc.util.MetadataRegistry |
|---|
ADFMXML_SIG, ADFMXML_SIG_LEN, BC4JCONFIGNS, BC4JNS, CPXREGISTRY, DCXREGISTRY, JPXREGISTRY, PATH_ATTR, XCFGREGISTRY, XMLNS_METAINF, XMLNS_SCHEMA |
| Constructor Summary | |
|---|---|
MetadataRegistryImpl() |
|
| Method Summary | |
|---|---|
java.util.Iterator<java.lang.String> |
getAttributeIterator(java.net.URL xmlUrl, java.lang.String elemNS, java.lang.String elemName, java.lang.String attrName)Return an iterator with the values of the attribute, for the element, within the XML document at the location specified in the xmlUrl. |
java.util.Collection<java.util.Map<java.lang.String,java.lang.Object>> |
getAttributeMaps(java.net.URL xmlURL, java.lang.String elemNS, java.lang.String elemName)Return a collection of attribute maps for the items matching the element, within the XML document at the location specified in the xmlUrl. |
protected void |
getDocumentForWriting(MetadataRegistryImpl.Context ctx) |
org.w3c.dom.Document |
getDomDocument(java.net.URL url)Parse and return the DOM document located at the URL. |
protected java.io.OutputStream |
getOutputStream(MetadataRegistryImpl.Context ctx) |
java.util.Iterator<java.lang.String> |
getRegistryPaths(java.net.URL adfmXmlUrl, java.lang.String registryNS, java.lang.String registryName)Takes a URL of an adfm.xml file and returns an iterator to all the RegistryType paths contained within it (as relative paths). |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getSubtreeList(java.net.URL xmlUrl, java.lang.String elemNS, java.lang.String elemName, java.lang.String nvpChildName)This is used to simplify data extraction from the jbo dt files, the prime example being the JboProject file, see jbo_03_01.dtd. |
java.net.URL[] |
listFiles(java.net.URL url) |
protected org.w3c.dom.Document |
newDomDocument(java.net.URL url) |
protected java.io.InputStream |
openStream(java.net.URL url) |
JarDocumentCache.Stats |
resetCacheStats(int capacity) |
void |
saveDocumentTo(org.w3c.dom.Document doc, java.net.URL saveTo)Causes the document passed in to be saved to the URL passed in. |
protected void |
saveDomDocument(MetadataRegistryImpl.Context ctx) |
java.net.URL |
setBaseURL(java.net.URL newBaseURL) |
void |
setPreserveWhitespace(java.lang.Boolean preserve)Sets the whitespace preservation to use when parsing documents. |
void |
setValidationMode(java.lang.Integer mode)Sets the validation mode to use when parsing documents. |
boolean |
updateElementsInMetadataRegistry(java.util.Collection<java.lang.String> relativePaths, java.util.Map<java.lang.String,java.lang.String> elementXref, java.net.URL adfmXmlUrl)See updateElementsInMetadataRegistryEx |
boolean |
updateElementsInMetadataRegistryEx(java.util.Collection<java.lang.String> relativePaths, java.util.Collection<java.lang.String> removalPaths, java.util.Map<java.lang.String,java.lang.String> elementXref, java.net.URL adfmXmlUrl, int[] remaining)Process all elements in the list of relativePaths referring to elementXref to get the elementNames corresponding to the extensions encountered. |
boolean |
updateRegistryElement(java.lang.String relativePath, java.lang.String elementNS, java.lang.String elementName, org.w3c.dom.Document doc)Update a single path attribute in the metadata registry passed as the doc param, and the elementName and elementNS are the specifics of the item to make the change on. |
void |
visitRegistryPaths(java.lang.ClassLoader loader, java.lang.String regNS, java.lang.String regName, MetadataRegistry.PathVisitor visitor)Within the list of metadata registries (META-INF/adfm.xml) in the class loader, find all registries within each matching the namespace and element name. |
| Methods inherited from class oracle.adf.share.common.rc.util.MetadataRegistry |
|---|
newInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
protected static JarDocumentCache docCache
| Constructor Detail |
|---|
public MetadataRegistryImpl()
| Method Detail |
|---|
public JarDocumentCache.Stats resetCacheStats(int capacity)
public void visitRegistryPaths(java.lang.ClassLoader loader,
java.lang.String regNS,
java.lang.String regName,
MetadataRegistry.PathVisitor visitor)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
java.net.MalformedURLException
MetadataRegistryvisitRegistryPaths in class MetadataRegistryjava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationExceptionjava.net.MalformedURLExceptionMetadataRegistry.PathVisitor2
public java.util.Iterator<java.lang.String> getAttributeIterator(java.net.URL xmlUrl,
java.lang.String elemNS,
java.lang.String elemName,
java.lang.String attrName)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
MetadataRegistrygetAttributeIterator in class MetadataRegistryjava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
public java.util.Collection<java.util.Map<java.lang.String,java.lang.Object>> getAttributeMaps(java.net.URL xmlURL,
java.lang.String elemNS,
java.lang.String elemName)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
MetadataRegistrygetAttributeMaps in class MetadataRegistryelemNS - default is BC4JCONFIGNS, the bc4j/configuration (xcfg files)elemName - (Most likely something like, AppModuleConfig)java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
public java.util.Iterator<java.lang.String> getRegistryPaths(java.net.URL adfmXmlUrl,
java.lang.String registryNS,
java.lang.String registryName)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
MetadataRegistrygetRegistryPaths in class MetadataRegistryadfmXmlUrl - the full URL of a single adfm.xml.registryNS - is the schema type namespace to request. If null then the document namespace is assumed. The wildcard "*" is accepted.registryName - is the schema type local name to request. The wildcard "*" is accepted.java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getSubtreeList(java.net.URL xmlUrl,
java.lang.String elemNS,
java.lang.String elemName,
java.lang.String nvpChildName)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
MetadataRegistrygetSubtreeList in class MetadataRegistryxmlUrl - the location of the metadata fileelemNS - XML namespace (null defaults to bc4j URI)elemName - name of element (could be 0-n). Ex: "Containee"nvpChildName - name of direct child of elemName containing "Name", "Value" attribute pairs. Ex: "DesignTime"javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
public boolean updateElementsInMetadataRegistry(java.util.Collection<java.lang.String> relativePaths,
java.util.Map<java.lang.String,java.lang.String> elementXref,
java.net.URL adfmXmlUrl)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
MetadataRegistryupdateElementsInMetadataRegistry in class MetadataRegistryjava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationExceptionjavax.xml.transform.TransformerConfigurationExceptionjavax.xml.transform.TransformerException
public boolean updateElementsInMetadataRegistryEx(java.util.Collection<java.lang.String> relativePaths,
java.util.Collection<java.lang.String> removalPaths,
java.util.Map<java.lang.String,java.lang.String> elementXref,
java.net.URL adfmXmlUrl,
int[] remaining)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
MetadataRegistryupdateElementsInMetadataRegistryEx in class MetadataRegistryrelativePaths - The paths to ensure added in the metadata directoryremovalPaths - The paths to remove from the metadata directory. The assumption is that only one type will be responsible for a path at any given time. So it can be removed without reference to the type.elementXref - The extension to elementName cross reference for constituent files of the metadata registry, null assumes adfm entries.adfmXmlUrl - The output file to update if neededremaining - pass a non-null and the [0] element will contain how many remain in the doc when method completes (from a wildcard)java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationExceptionjavax.xml.transform.TransformerConfigurationExceptionjavax.xml.transform.TransformerException
public boolean updateRegistryElement(java.lang.String relativePath,
java.lang.String elementNS,
java.lang.String elementName,
org.w3c.dom.Document doc)
MetadataRegistryupdateRegistryElement in class MetadataRegistryrelativePath - The path attribute value to insert, or ignoreelementNS - The namespace of the elementNameelementName - The registry namedoc - The metadata documentpublic java.net.URL setBaseURL(java.net.URL newBaseURL)
setBaseURL in class MetadataRegistrynewBaseURL - the baseUrl the DOMParser will use to getDomDocument.public void setValidationMode(java.lang.Integer mode)
MetadataRegistrysetValidationMode in class MetadataRegistrymode - must be a valid mode from DOMParser. If this method isn't called then the parser method won't be called.public void setPreserveWhitespace(java.lang.Boolean preserve)
MetadataRegistrysetPreserveWhitespace in class MetadataRegistrypreserve - the value to use when calling setPreserveWhitespace.
protected java.io.InputStream openStream(java.net.URL url)
throws java.io.IOException
java.io.IOException
public org.w3c.dom.Document getDomDocument(java.net.URL url)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
MetadataRegistrygetDomDocument in class MetadataRegistryurl - the document locationjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
protected org.w3c.dom.Document newDomDocument(java.net.URL url)
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
public void saveDocumentTo(org.w3c.dom.Document doc,
java.net.URL saveTo)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException,
java.io.IOException
MetadataRegistrysaveDocumentTo in class MetadataRegistrydoc - The document desired to savedsaveTo - Where to save the document tojavax.xml.transform.TransformerConfigurationExceptionjavax.xml.transform.TransformerExceptionjava.io.IOException
protected void saveDomDocument(MetadataRegistryImpl.Context ctx)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException,
java.io.IOException
javax.xml.transform.TransformerConfigurationExceptionjavax.xml.transform.TransformerExceptionjava.io.IOException
protected java.io.OutputStream getOutputStream(MetadataRegistryImpl.Context ctx)
throws java.io.IOException
java.io.IOException
protected void getDocumentForWriting(MetadataRegistryImpl.Context ctx)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationExceptionpublic java.net.URL[] listFiles(java.net.URL url)
listFiles in class MetadataRegistryurl - The directory, jar, etc to use to get the return values. Note: implementations exist for file: and jar: unless you use the javatools-nodeps.jar in your classpath (default within ide).null if the URL does not represent a directory or if an I/O error occurs.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1) E10686-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||