0N/A/*
553N/A * reserved comment block
0N/A * DO NOT REMOVE OR ALTER!
0N/A */
0N/A/*
0N/A * Copyright 2001, 2002,2004 The Apache Software Foundation.
0N/A *
0N/A * Licensed under the Apache License, Version 2.0 (the "License");
0N/A * you may not use this file except in compliance with the License.
0N/A * You may obtain a copy of the License at
0N/A *
0N/A * http://www.apache.org/licenses/LICENSE-2.0
0N/A *
0N/A * Unless required by applicable law or agreed to in writing, software
0N/A * distributed under the License is distributed on an "AS IS" BASIS,
0N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0N/A * See the License for the specific language governing permissions and
0N/A * limitations under the License.
553N/A */
553N/A
553N/Apackage com.sun.org.apache.xerces.internal.impl.xs.identity;
0N/A
0N/Aimport com.sun.org.apache.xerces.internal.xs.XSIDCDefinition;
0N/A
0N/A/**
0N/A * Schema key reference identity constraint.
0N/A *
0N/A * @xerces.internal
0N/A *
0N/A * @author Andy Clark, IBM
0N/A */
0N/Apublic class KeyRef
0N/A extends IdentityConstraint {
0N/A
0N/A //
0N/A // Data
0N/A //
0N/A
0N/A /** The key (or unique) being referred to. */
0N/A protected UniqueOrKey fKey;
0N/A
0N/A //
0N/A // Constructors
0N/A //
/** Constructs a keyref with the specified name. */
public KeyRef(String namespace, String identityConstraintName,
String elemName, UniqueOrKey key) {
super(namespace, identityConstraintName, elemName);
fKey = key;
type = IC_KEYREF;
} // <init>(String,String,String)
//
// Public methods
//
/** Returns the key being referred to. */
public UniqueOrKey getKey() {
return fKey;
} // getKey(): int
/**
* {referenced key} Required if {identity-constraint category} is keyref,
* forbidden otherwise. An identity-constraint definition with
* {identity-constraint category} equal to key or unique.
*/
public XSIDCDefinition getRefKey() {
return fKey;
}
} // class KeyRef