@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 XQItemType createDocumentElementType(XQItemType elementType) throws XQException { checkState(ex_connection_closed); if (elementType == null) { throw new XQException("provided elementType is null"); } if (elementType.getItemKind() != XQITEMKIND_ELEMENT) { throw new XQException("provided elementType has wrong kind: " + elementType); } return new BagriXQItemType(elementType.getBaseType(), XQITEMKIND_DOCUMENT_ELEMENT, elementType.getNodeName(), elementType.getTypeName(), false, null); }
if (other.getNodeName() != null) { return false; if (!nodeName.equals(other.getNodeName())) { return false;
@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); } }
@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()); } }