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 SchemaReference

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.bali.xml.gui.jdev.dependency.ExternalIdReference
                          extended by oracle.bali.xml.gui.jdev.dependency.url.UrlReference
                              extended by oracle.jdeveloper.xml.schema.dependency.SchemaReference
All Implemented Interfaces:
oracle.bali.xml.model.traversal.TraversalHandler

public class SchemaReference
extends oracle.bali.xml.gui.jdev.dependency.url.UrlReference
implements oracle.bali.xml.model.traversal.TraversalHandler

Base class for references to XML Schema documents.


Field Summary
 
Fields inherited from class oracle.bali.xml.gui.jdev.dependency.url.UrlReference
URL_REF_KEY
 
Constructor Summary
SchemaReference(oracle.bali.xml.model.XmlContext xmlContext, org.w3c.dom.Node node, int start, int end, java.net.URL url, java.lang.String namespace)
           
SchemaReference(oracle.bali.xml.model.XmlContext xmlContext, org.w3c.dom.Node node, int start, int end, java.net.URL url, java.lang.String namespace, boolean isTransitive)
           
 
Method Summary
 oracle.bali.xml.model.dependency.Declaration findDeclaration(oracle.bali.xml.model.dependency.DependencyContext context)
           
 java.lang.String getDeclarationId()
           
protected  java.lang.String getDisplayNameImpl(oracle.bali.xml.model.dependency.DependencyContext context)
           
 java.net.URL getSchemaLocation()
          Get the location of the schema document being refrenced, or null if the schema is not found.
static java.util.Collection<SchemaReference> getSchemaReferences(oracle.bali.xml.model.traversal.TraversalData data)
           
 java.lang.String getTargetNamespace()
          Get the target namespace of the schema document, or null if not known.
protected  java.lang.String getValueFromId(oracle.bali.xml.model.dependency.DependencyContext context, java.lang.String id)
           
 void handleEndNode(oracle.bali.xml.model.XmlModel model, org.w3c.dom.Node node, oracle.bali.xml.model.traversal.MutableTraversalData data)
           
 void handleStartNode(oracle.bali.xml.model.XmlModel model, org.w3c.dom.Node node, oracle.bali.xml.model.traversal.MutableTraversalData data)
           
 boolean isImportReference()
           
 boolean isLocal()
          Determine whether the referenced schema is local.
 boolean isTransitive()
          Whether this schema reference is transitive.
 boolean isValid(oracle.bali.xml.model.dependency.DependencyContext context)
          This method checks if this referred schema is valid or not.
 void setIsImportReference(boolean isImportReference)
           
 oracle.bali.xml.model.dependency.ValidationResult validateDeclaration(oracle.bali.xml.model.dependency.DependencyContext context, oracle.bali.xml.model.dependency.Declaration declaration)
          This method validates a schema reference.
 oracle.bali.xml.model.dependency.ValidationResult validateDeclarationImpl(oracle.bali.xml.model.dependency.DependencyContext context, oracle.bali.xml.model.dependency.Declaration declaration)
           
 
Methods inherited from class oracle.bali.xml.gui.jdev.dependency.url.UrlReference
getReferenceURL
 
Methods inherited from class oracle.bali.xml.gui.jdev.dependency.ExternalIdReference
getEndOffset, getProject, getStartOffset, getURL, getWorkspace, isReferenceFor, supportsUpdateReference, updateReferenceImpl
 
Methods inherited from class oracle.bali.xml.model.dependency.XmlReference
getDomRange, getEndIndex, getFileURL, getNode, getStartIndex, getValue, getXmlContext, gotoSelfImpl, supportsGotoSelf, updateValue
 
Methods inherited from class oracle.bali.xml.model.dependency.ReferenceBase
performCommand, supportsCommand
 
Methods inherited from class oracle.bali.xml.model.dependency.BaseDeclRef
getMetadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaReference

public SchemaReference(oracle.bali.xml.model.XmlContext xmlContext,
                       org.w3c.dom.Node node,
                       int start,
                       int end,
                       java.net.URL url,
                       java.lang.String namespace)

SchemaReference

public SchemaReference(oracle.bali.xml.model.XmlContext xmlContext,
                       org.w3c.dom.Node node,
                       int start,
                       int end,
                       java.net.URL url,
                       java.lang.String namespace,
                       boolean isTransitive)
Method Detail

getSchemaReferences

public static java.util.Collection<SchemaReference> getSchemaReferences(oracle.bali.xml.model.traversal.TraversalData data)

isTransitive

public boolean isTransitive()
Whether this schema reference is transitive. That is, whether a reference from A to B and from B to C implies a reference from A to C.

Returns:
true if the reference is transitive, false otherwise

getSchemaLocation

@Nullable
public final java.net.URL getSchemaLocation()
Get the location of the schema document being refrenced, or null if the schema is not found.

Returns:
the location of the schema document

getTargetNamespace

@Nullable
public java.lang.String getTargetNamespace()
Get the target namespace of the schema document, or null if not known.

Returns:
the target namespace

isLocal

public boolean isLocal()
Determine whether the referenced schema is local.

Returns:
true if the schema is local, false otherwise

getDeclarationId

public java.lang.String getDeclarationId()
Overrides:
getDeclarationId in class oracle.bali.xml.gui.jdev.dependency.url.UrlReference

getValueFromId

protected java.lang.String getValueFromId(oracle.bali.xml.model.dependency.DependencyContext context,
                                          java.lang.String id)
Overrides:
getValueFromId in class oracle.bali.xml.gui.jdev.dependency.url.UrlReference

getDisplayNameImpl

protected java.lang.String getDisplayNameImpl(oracle.bali.xml.model.dependency.DependencyContext context)
Overrides:
getDisplayNameImpl in class oracle.bali.xml.gui.jdev.dependency.url.UrlReference

findDeclaration

public oracle.bali.xml.model.dependency.Declaration findDeclaration(oracle.bali.xml.model.dependency.DependencyContext context)
Overrides:
findDeclaration in class oracle.bali.xml.gui.jdev.dependency.url.UrlReference

validateDeclaration

public oracle.bali.xml.model.dependency.ValidationResult validateDeclaration(oracle.bali.xml.model.dependency.DependencyContext context,
                                                                             oracle.bali.xml.model.dependency.Declaration declaration)
This method validates a schema reference. It checks if the schema refers to a remote location or not. Also checks if the namespaces are correctly defined or not.

Overrides:
validateDeclaration in class oracle.bali.xml.gui.jdev.dependency.url.UrlReference
Parameters:
context - Current dependency context
declaration - Declaration to validate
Returns:
ValidationResult.OK if the reference is valid, actual error otherwise

handleStartNode

public void handleStartNode(oracle.bali.xml.model.XmlModel model,
                            org.w3c.dom.Node node,
                            oracle.bali.xml.model.traversal.MutableTraversalData data)
Specified by:
handleStartNode in interface oracle.bali.xml.model.traversal.TraversalHandler

handleEndNode

public void handleEndNode(oracle.bali.xml.model.XmlModel model,
                          org.w3c.dom.Node node,
                          oracle.bali.xml.model.traversal.MutableTraversalData data)
Specified by:
handleEndNode in interface oracle.bali.xml.model.traversal.TraversalHandler

setIsImportReference

public void setIsImportReference(boolean isImportReference)

isImportReference

public boolean isImportReference()

isValid

public boolean isValid(oracle.bali.xml.model.dependency.DependencyContext context)
This method checks if this referred schema is valid or not.

Parameters:
context - Current dependency context
Returns:
true if the schema is valid, false otherwise

validateDeclarationImpl

public oracle.bali.xml.model.dependency.ValidationResult validateDeclarationImpl(oracle.bali.xml.model.dependency.DependencyContext context,
                                                                                 oracle.bali.xml.model.dependency.Declaration declaration)

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.