286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 2001,2002,2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A
286N/Apackage com.sun.org.apache.xerces.internal.impl.xs.identity;
286N/A
286N/A
286N/A/**
286N/A * Interface for a field activator. The field activator is responsible
286N/A * for activating fields within a specific scope; the caller merely
286N/A * requests the fields to be activated.
286N/A *
286N/A * @xerces.internal
286N/A *
286N/A * @author Andy Clark, IBM
286N/A *
286N/A */
286N/Apublic interface FieldActivator {
286N/A
286N/A //
286N/A // FieldActivator methods
286N/A //
286N/A
286N/A /**
286N/A * Start the value scope for the specified identity constraint. This
286N/A * method is called when the selector matches in order to initialize
286N/A * the value store.
286N/A *
286N/A * @param identityConstraint The identity constraint.
286N/A * @param initialDepth the depth at which the selector began matching
286N/A */
286N/A public void startValueScopeFor(IdentityConstraint identityConstraint,
286N/A int initialDepth);
286N/A
286N/A /**
286N/A * Request to activate the specified field. This method returns the
286N/A * matcher for the field.
286N/A * It's also important for the implementor to ensure that it marks whether a Field
286N/A * is permitted to match a value--that is, to call the setMayMatch(Field, Boolean) method.
286N/A *
286N/A * @param field The field to activate.
286N/A * @param initialDepth the 0-indexed depth in the instance document at which the Selector began to match.
286N/A */
286N/A public XPathMatcher activateField(Field field, int initialDepth);
286N/A
286N/A /**
286N/A * Sets whether the given field is permitted to match a value.
286N/A * This should be used to catch instance documents that try
286N/A * and match a field several times in the same scope.
286N/A *
286N/A * @param field The field that may be permitted to be matched.
286N/A * @param state Boolean indiciating whether the field may be matched.
286N/A */
286N/A public void setMayMatch(Field field, Boolean state);
286N/A
286N/A /**
286N/A * Returns whether the given field is permitted to match a value.
286N/A *
286N/A * @param field The field that may be permitted to be matched.
286N/A * @return Boolean indicating whether the field may be matched.
286N/A */
286N/A public Boolean mayMatch(Field field);
286N/A
286N/A /**
286N/A * Ends the value scope for the specified identity constraint.
286N/A *
286N/A * @param identityConstraint The identity constraint.
286N/A * @param initialDepth the 0-indexed depth where the Selector began to match.
286N/A */
286N/A public void endValueScopeFor(IdentityConstraint identityConstraint, int initialDepth);
286N/A
286N/A} // interface FieldActivator