Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.jdeveloper.xml.schema.dependency
Class NamedReference

java.lang.Object
  extended by oracle.bali.xml.model.dependency.BaseDeclRef
      extended by oracle.bali.xml.model.dependency.Reference
          extended by oracle.bali.xml.model.dependency.ReferenceBase
              extended by oracle.bali.xml.model.dependency.XmlReference
                  extended by oracle.bali.xml.gui.jdev.dependency.XmlIndexReference
                      extended by oracle.jdeveloper.xml.schema.dependency.NamedReference
Direct Known Subclasses:
AttributeGroupReference, AttributeReference, ElementReference, GroupReference, TypeReference

public abstract class NamedReference
extends oracle.bali.xml.gui.jdev.dependency.XmlIndexReference

Base class for XML Schema references. A QName is used to identify the declaration being referenced.


Field Summary
protected static javax.xml.namespace.QName NOT_FOUND
          QName for references that cannot be resolved.
protected  javax.xml.namespace.QName qname
          The QName being referenced.
protected static java.net.URL SCHEMA_FOR_SCHEMA
          The schema for schema URL.
 
Constructor Summary
NamedReference(oracle.bali.xml.model.XmlContext xmlContext, org.w3c.dom.Node node, int start, int end)
           
 
Method Summary
 oracle.bali.xml.model.dependency.Declaration findDeclaration(oracle.bali.xml.model.dependency.DependencyContext context)
           
protected  java.lang.String getDefaultNamespace(org.w3c.dom.Node node)
          Get the default namespace for a DOM node.
protected  NamedDeclaration getNamedDeclaration(oracle.bali.xml.model.dependency.DependencyContext context, java.lang.String key, javax.xml.namespace.QName qname)
          Get the declaration corresponding to a QName, or null the declaration does not exist.
protected  NamedDeclaration getNamedDeclaration(java.net.URL url, oracle.bali.xml.model.dependency.DependencyContext context, java.lang.String key, javax.xml.namespace.QName qname)
          Get the declaration corresponding to a QName from a specific URL, or null the declaration does not exist in that URL.
protected  NamedDeclaration getNamedDeclaration(oracle.bali.xml.model.XmlContext xmlContext, oracle.bali.xml.model.dependency.DependencyContext context, java.lang.String key, javax.xml.namespace.QName qname)
          Get the declaration corresponding to a QName from a specific XML context, or null the declaration does not exist in that context.
protected  java.util.Map<java.lang.String,java.lang.String> getPrefixMap(org.w3c.dom.Node node)
          Get the mapping from prefixes to namespaces.
 javax.xml.namespace.QName getQName()
          Get the QName for the declaration being referenced.
protected  javax.xml.namespace.QName getQName(org.w3c.dom.Node node)
          Get the QName being referenced by a DOM node, or null if there is not one.
protected abstract  java.lang.String getReferenceKey()
          Get the reference key used to look up this reference.
protected  java.util.Collection<SchemaReference> getSchemaReferences(oracle.bali.xml.model.dependency.DependencyContext context)
          Get the set of schemas referenced by the document containing this reference.
protected  java.util.Collection<SchemaReference> getSchemaReferences(oracle.bali.xml.model.dependency.DependencyContext context, oracle.bali.xml.model.XmlContext xmlContext)
           
protected  java.lang.String getValue(org.w3c.dom.Node node)
          Get the text value of the DOM node.
 boolean isReferenceFor(oracle.bali.xml.model.dependency.DependencyContext context, oracle.bali.xml.model.dependency.Declaration declaration)
           
protected  java.lang.String resolvePrefix(org.w3c.dom.Node node, java.lang.String prefix)
          Resolve a prefix to a namespace, in the context of the given DOM node.
protected  oracle.bali.xml.model.dependency.CommandResult updateReferenceImpl(oracle.bali.xml.model.dependency.DependencyContext context, oracle.bali.xml.model.dependency.ValueInfo value)
           
 
Methods inherited from class oracle.bali.xml.model.dependency.XmlReference
getDomRange, getEndIndex, getFileURL, getNode, getStartIndex, getValue, getXmlContext, gotoSelfImpl, supportsGotoSelf, supportsUpdateReference, updateValue, validateDeclaration
 
Methods inherited from class oracle.bali.xml.model.dependency.ReferenceBase
performCommand, supportsCommand
 
Methods inherited from class oracle.bali.xml.model.dependency.BaseDeclRef
getDisplayNameImpl, getMetadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_FOUND

protected static final javax.xml.namespace.QName NOT_FOUND
QName for references that cannot be resolved.


SCHEMA_FOR_SCHEMA

protected static final java.net.URL SCHEMA_FOR_SCHEMA
The schema for schema URL.


qname

protected javax.xml.namespace.QName qname
The QName being referenced.

Constructor Detail

NamedReference

public NamedReference(oracle.bali.xml.model.XmlContext xmlContext,
                      org.w3c.dom.Node node,
                      int start,
                      int end)
Method Detail

getQName

public javax.xml.namespace.QName getQName()
Get the QName for the declaration being referenced.

Returns:
the QName

getReferenceKey

protected abstract java.lang.String getReferenceKey()
Get the reference key used to look up this reference.

Returns:
the reference key

isReferenceFor

public boolean isReferenceFor(oracle.bali.xml.model.dependency.DependencyContext context,
                              oracle.bali.xml.model.dependency.Declaration declaration)
Specified by:
isReferenceFor in class oracle.bali.xml.gui.jdev.dependency.XmlIndexReference

getSchemaReferences

@Nullable
protected java.util.Collection<SchemaReference> getSchemaReferences(oracle.bali.xml.model.dependency.DependencyContext context)
Get the set of schemas referenced by the document containing this reference. These schemas will be searched for declarations.

Parameters:
context - the dependency context
Returns:
the schema references

getSchemaReferences

@Nullable
protected java.util.Collection<SchemaReference> getSchemaReferences(oracle.bali.xml.model.dependency.DependencyContext context,
                                                                             oracle.bali.xml.model.XmlContext xmlContext)

findDeclaration

public oracle.bali.xml.model.dependency.Declaration findDeclaration(oracle.bali.xml.model.dependency.DependencyContext context)
Specified by:
findDeclaration in class oracle.bali.xml.model.dependency.Reference

updateReferenceImpl

protected oracle.bali.xml.model.dependency.CommandResult updateReferenceImpl(oracle.bali.xml.model.dependency.DependencyContext context,
                                                                             oracle.bali.xml.model.dependency.ValueInfo value)
Overrides:
updateReferenceImpl in class oracle.bali.xml.model.dependency.XmlReference

getQName

protected javax.xml.namespace.QName getQName(org.w3c.dom.Node node)
Get the QName being referenced by a DOM node, or null if there is not one.

Parameters:
node - the DOM node
Returns:
the QName being referenced by the DOM node, or null if there is not one

getDefaultNamespace

protected java.lang.String getDefaultNamespace(org.w3c.dom.Node node)
Get the default namespace for a DOM node.

Parameters:
node - the DOM node
Returns:
the default namespace

resolvePrefix

protected java.lang.String resolvePrefix(org.w3c.dom.Node node,
                                         java.lang.String prefix)
Resolve a prefix to a namespace, in the context of the given DOM node.

Parameters:
node - the DOM node
prefix - the prefix
Returns:
the namespace corresponding to the prefix

getPrefixMap

protected java.util.Map<java.lang.String,java.lang.String> getPrefixMap(org.w3c.dom.Node node)
Get the mapping from prefixes to namespaces.

Parameters:
node - the DOM node
Returns:
the mapping from prefixes to namespaces

getValue

protected final java.lang.String getValue(org.w3c.dom.Node node)
Get the text value of the DOM node.

Parameters:
node - the DOM node
Returns:
the text value

getNamedDeclaration

protected NamedDeclaration getNamedDeclaration(oracle.bali.xml.model.dependency.DependencyContext context,
                                               java.lang.String key,
                                               javax.xml.namespace.QName qname)
Get the declaration corresponding to a QName, or null the declaration does not exist.

Parameters:
context - the dependency context
key - the reference key
qname - the QName
Returns:
the declaration, or null the declaration does not exist

getNamedDeclaration

protected NamedDeclaration getNamedDeclaration(java.net.URL url,
                                               oracle.bali.xml.model.dependency.DependencyContext context,
                                               java.lang.String key,
                                               javax.xml.namespace.QName qname)
Get the declaration corresponding to a QName from a specific URL, or null the declaration does not exist in that URL.

Parameters:
url - the URL of the document to search
context - the dependency context
key - the reference key
qname - the QName
Returns:
the declaration, or null the declaration does not exist

getNamedDeclaration

protected NamedDeclaration getNamedDeclaration(oracle.bali.xml.model.XmlContext xmlContext,
                                               oracle.bali.xml.model.dependency.DependencyContext context,
                                               java.lang.String key,
                                               javax.xml.namespace.QName qname)
Get the declaration corresponding to a QName from a specific XML context, or null the declaration does not exist in that context.

Parameters:
xmlContext - the XML context
context - the dependency context
key - the reference key
qname - the QName
Returns:
the declaration, or null the declaration does not exist

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

Copyright © 1997, 2009, Oracle. All rights reserved.