/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Schema identity constraint field.
*
* @xerces.internal
*
* @author Andy Clark, IBM
* @version $Id: Field.java,v 1.6 2010-11-01 04:39:57 joehw Exp $
*/
public class Field {
//
// Data
//
/** Field XPath. */
/** Identity constraint. */
//
// Constructors
//
/** Constructs a field. */
} // <init>(Field.XPath,IdentityConstraint)
//
// Public methods
//
/** Returns the field XPath. */
return fXPath;
} // getXPath():com.sun.org.apache.xerces.internal.impl.v1.schema.identity.XPath
/** Returns the identity constraint. */
return fIdentityConstraint;
} // getIdentityConstraint():IdentityConstraint
// factory method
/** Creates a field matcher. */
} // createMatcher(ValueStore):XPathMatcher
//
// Object methods
//
/** Returns a string representation of this object. */
} // toString():String
//
// Classes
//
/**
* Field XPath.
*
* @author Andy Clark, IBM
*/
public static class XPath
//
// Constructors
//
/** Constructs a field XPath expression. */
// NOTE: We have to prefix the field XPath with "./" in
// order to handle selectors such as "@attr" that
// select the attribute because the fields could be
// relative to the selector element. -Ac
// Unless xpath starts with a descendant node -Achille Fokoue
// ... or a / or a . - NG
// verify that only one attribute is selected per branch
throw new XPathException("c-fields-xpaths");
}
}
}
} // <init>(String,SymbolTable,NamespacesContext)
} // class XPath
/**
* Field matcher.
*
* @author Andy Clark, IBM
*/
protected class Matcher
extends XPathMatcher {
//
// Data
//
/** Field activator. */
/** Value store for data values. */
//
// Constructors
//
/** Constructs a field matcher. */
super(xpath);
} // <init>(Field.XPath,ValueStore)
//
// XPathHandler methods
//
/**
* This method is called when the XPath handler matches the
* XPath expression.
*/
protected void matched(Object actualValue, short valueType, ShortList itemValueType, boolean isNil) {
new Object[]{fIdentityConstraint.getElementName(), fIdentityConstraint.getIdentityConstraintName()});
}
fStore.addValue(Field.this, actualValue, convertToPrimitiveKind(valueType), convertToPrimitiveKind(itemValueType));
// once we've stored the value for this field, we set the mayMatch
// member to false so that, in the same scope, we don't match any more
// values (and throw an error instead).
} // matched(String)
/** Primitive datatypes. */
return valueType;
}
/** Types derived from string. */
return XSConstants.STRING_DT;
}
/** Types derived from decimal. */
return XSConstants.DECIMAL_DT;
}
/** Other types. */
return valueType;
}
if (itemValueType != null) {
int i;
for (i = 0; i < length; ++i) {
break;
}
}
if (i != length) {
for (int j = 0; j < i; ++j) {
}
for(; i < length; ++i) {
}
}
}
return itemValueType;
}
protected void handleContent(XSTypeDefinition type, boolean nillable, Object actualValue, short valueType, ShortList itemValueType) {
// the content must be simpleType content
}
} // handleContent(XSElementDecl, String)
} // class Matcher
} // class Field