@Override public XQItemType createDocumentSchemaElementType(XQItemType elementType) throws XQException { checkState(ex_connection_closed); return new BagriXQItemType(XQBASETYPE_ANYTYPE, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, elementType.getNodeName(), elementType.getTypeName(), elementType.isElementNillable(), elementType.getSchemaURI()); }
@Override public void write(ObjectDataOutput out, XQItemType type) throws IOException { try { int kind = type.getItemKind(); out.writeInt(kind); if (isBaseTypeSupported(kind)) { out.writeInt(type.getBaseType()); //out.writeObject(type.getTypeName()); writeQName(out, type.getTypeName()); } if (isNodeNameSupported(kind)) { // || isPINameSupported(kind)) { //out.writeObject(type.getNodeName()); // can be issues with wildcards writeQName(out, type.getNodeName()); } if (type.getSchemaURI() == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeUTF(type.getSchemaURI().toString()); } out.writeBoolean(type.isElementNillable()); } catch (XQException ex) { throw new IOException(ex); } }
if (other.getSchemaURI() != null) { return false; if (!schemaURI.equals(other.getSchemaURI())) { return false;
@Override public void setContextItemStaticType(XQItemType contextItemType) throws XQException { if (contextItemType == null) { this.type = null; } else { QName typeName = null; if (XQUtils.isBaseTypeSupported(contextItemType.getItemKind())) { typeName = contextItemType.getTypeName(); } else { // ??? } QName nodeName = null; if (XQUtils.isNodeNameSupported(contextItemType.getItemKind())) { nodeName = contextItemType.getNodeName(); } this.type = new BagriXQItemType(contextItemType.getBaseType(), contextItemType.getItemKind(), nodeName, typeName, contextItemType.isElementNillable(), contextItemType.getSchemaURI()); } }