|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.6.0) E10686-07 |
||||||||
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[] registryNSs,
java.lang.String[] registryNames)
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.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(org.w3c.dom.Document xmldocument,
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[] regNSs,
java.lang.String[] regNames,
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. |
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
MetadataRegistry
visitRegistryPaths
in class MetadataRegistry
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.net.MalformedURLException
MetadataRegistry.PathVisitor2
public void visitRegistryPaths(java.lang.ClassLoader loader, java.lang.String[] regNSs, java.lang.String[] regNames, MetadataRegistry.PathVisitor visitor) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, java.net.MalformedURLException
MetadataRegistry
visitRegistryPaths
in class MetadataRegistry
regNSs
- array of namespace, length must match regNames lengthregNames
- array of registry names, length must match regNSs length
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.net.MalformedURLException
MetadataRegistry.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
MetadataRegistry
getAttributeIterator
in class MetadataRegistry
java.io.IOException
org.xml.sax.SAXException
javax.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
MetadataRegistry
getAttributeMaps
in class MetadataRegistry
elemNS
- default is BC4JCONFIGNS, the bc4j/configuration (xcfg files)elemName
- (Most likely something like, AppModuleConfig)
java.io.IOException
org.xml.sax.SAXException
javax.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
MetadataRegistry
getRegistryPaths
in class MetadataRegistry
adfmXmlUrl
- 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.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public java.util.Iterator<java.lang.String> getRegistryPaths(java.net.URL adfmXmlUrl, java.lang.String[] registryNSs, java.lang.String[] registryNames) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
MetadataRegistry
getRegistryPaths
in class MetadataRegistry
adfmXmlUrl
- the full URL of a single adfm.xml.
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getSubtreeList(org.w3c.dom.Document xmldocument, 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
MetadataRegistry
getSubtreeList
in class MetadataRegistry
xmldocument
- pre-loaded document to avoid loadingxmlUrl
- 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.ParserConfigurationException
org.xml.sax.SAXException
java.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
MetadataRegistry
updateElementsInMetadataRegistry
in class MetadataRegistry
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerConfigurationException
javax.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
MetadataRegistry
updateElementsInMetadataRegistryEx
in class MetadataRegistry
relativePaths
- 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.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public boolean updateRegistryElement(java.lang.String relativePath, java.lang.String elementNS, java.lang.String elementName, org.w3c.dom.Document doc)
MetadataRegistry
updateRegistryElement
in class MetadataRegistry
relativePath
- The path attribute value to insert, or ignoreelementNS
- The namespace of the elementNameelementName
- The registry namedoc
- The metadata document
public java.net.URL setBaseURL(java.net.URL newBaseURL)
setBaseURL
in class MetadataRegistry
newBaseURL
- the baseUrl the DOMParser will use to getDomDocument.
public void setValidationMode(java.lang.Integer mode)
MetadataRegistry
setValidationMode
in class MetadataRegistry
mode
- 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)
MetadataRegistry
setPreserveWhitespace
in class MetadataRegistry
preserve
- 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
MetadataRegistry
getDomDocument
in class MetadataRegistry
url
- the document location
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.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
MetadataRegistry
saveDocumentTo
in class MetadataRegistry
doc
- The document desired to savedsaveTo
- Where to save the document to
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
java.io.IOException
protected void saveDomDocument(MetadataRegistryImpl.Context ctx) throws javax.xml.transform.TransformerConfigurationException, javax.xml.transform.TransformerException, java.io.IOException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
java.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.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public java.net.URL[] listFiles(java.net.URL url)
listFiles
in class MetadataRegistry
url
- 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.6.0) E10686-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |