|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 2 (11.1.2.2.0) E17486-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
public abstract class MetadataRegistry
Nested Class Summary | |
---|---|
static interface |
MetadataRegistry.PathVisitor Deprecated. see PathVisitor2 |
static interface |
MetadataRegistry.PathVisitor2 Pass an instance of this interface to the visitRegistryPaths method. |
Field Summary | |
---|---|
static java.lang.String |
ADFMXML_SIG |
static int |
ADFMXML_SIG_LEN |
static java.lang.String |
BC4JCONFIGNS |
static java.lang.String |
BC4JNS |
static java.lang.String |
CPXREGISTRY |
static java.lang.String |
DCXREGISTRY |
static java.lang.String |
JPXREGISTRY |
static java.lang.String |
PATH_ATTR |
static java.lang.String |
WILDARD |
static java.lang.String |
XCFGREGISTRY |
static java.lang.String |
XMLNS_METAINF |
static java.lang.String |
XMLNS_SCHEMA |
Constructor Summary | |
---|---|
MetadataRegistry() |
Method Summary | |
---|---|
abstract 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. |
abstract 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. |
abstract org.w3c.dom.Document |
getDomDocument(java.net.URL url) Parse and return the DOM document located at the URL. |
abstract 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). |
abstract 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). |
abstract 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. |
abstract java.net.URL[] |
listFiles(java.net.URL url) |
static MetadataRegistry |
newInstance() |
abstract void |
saveDocumentTo(org.w3c.dom.Document doc, java.net.URL saveTo) Causes the document passed in to be saved to the URL passed in. |
abstract java.net.URL |
setBaseURL(java.net.URL newBaseURL) |
abstract void |
setPreserveWhitespace(java.lang.Boolean preserve) Sets the whitespace preservation to use when parsing documents. |
abstract void |
setValidationMode(java.lang.Integer mode) Sets the validation mode to use when parsing documents. |
abstract 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 |
abstract 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. |
abstract 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. |
abstract 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. |
abstract 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WILDARD
public static final java.lang.String CPXREGISTRY
public static final java.lang.String DCXREGISTRY
public static final java.lang.String JPXREGISTRY
public static final java.lang.String XCFGREGISTRY
public static final java.lang.String ADFMXML_SIG
public static final int ADFMXML_SIG_LEN
public static final java.lang.String XMLNS_METAINF
public static final java.lang.String XMLNS_SCHEMA
public static final java.lang.String PATH_ATTR
public static final java.lang.String BC4JNS
public static final java.lang.String BC4JCONFIGNS
Constructor Detail |
---|
public MetadataRegistry()
Method Detail |
---|
public abstract java.net.URL setBaseURL(java.net.URL newBaseURL)
newBaseURL
- the baseUrl the DOMParser will use to getDomDocument.public abstract void setValidationMode(java.lang.Integer mode)
mode
- must be a valid mode from DOMParser. If this method isn't called then the parser method won't be called.public abstract void setPreserveWhitespace(java.lang.Boolean preserve)
preserve
- the value to use when calling setPreserveWhitespace.public abstract 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
loader
-regNS
-regName
-visitor
-java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.net.MalformedURLException
MetadataRegistry.PathVisitor2
public abstract 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
loader
-regNSs
- array of namespace, length must match regNames lengthregNames
- array of registry names, length must match regNSs lengthvisitor
-java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.net.MalformedURLException
MetadataRegistry.PathVisitor2
public abstract 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
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 abstract 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
xmlUrl
-elemNS
-elemName
-attrName
-java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public abstract 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
xmlURL
-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 abstract 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
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 abstract 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
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 abstract 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
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 abstract 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
relativePaths
-elementXref
-adfmXmlUrl
-java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public abstract boolean updateRegistryElement(java.lang.String relativePath, java.lang.String elementNS, java.lang.String elementName, org.w3c.dom.Document doc)
relativePath
- The path attribute value to insert, or ignoreelementNS
- The namespace of the elementNameelementName
- The registry namedoc
- The metadata documentpublic abstract org.w3c.dom.Document getDomDocument(java.net.URL url) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
url
- the document locationjavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public abstract void saveDocumentTo(org.w3c.dom.Document doc, java.net.URL saveTo) throws javax.xml.transform.TransformerConfigurationException, javax.xml.transform.TransformerException, java.io.IOException
doc
- The document desired to savedsaveTo
- Where to save the document tojavax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
java.io.IOException
public abstract java.net.URL[] listFiles(java.net.URL url)
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.public static MetadataRegistry newInstance()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 2 (11.1.2.2.0) E17486-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |