public void startPrefixMapping(String prefix, String uri) throws SAXException { getUnmarshalNamespaceResolver().push(prefix, uri); }
public void endPrefixMapping(String prefix) throws SAXException { getUnmarshalNamespaceResolver().pop(prefix); }
public UnmarshalRecord getChildUnmarshalRecord(TreeObjectBuilder treeObjectBuilder) { if(childRecordPool.isEmpty()) { UnmarshalRecord childRecord = (UnmarshalRecord) treeObjectBuilder.createRecord(session); childRecord.setUnmarshaller(unmarshaller); childRecord.session = this.session; childRecord.xmlReader = this.xmlReader; childRecord.setFragmentBuilder(fragmentBuilder); childRecord.setUnmarshalNamespaceResolver(this.getUnmarshalNamespaceResolver()); childRecord.childRecordPool = this.childRecordPool; return childRecord; } else { return childRecordPool.remove(childRecordPool.size() - 1).initialize(treeObjectBuilder); } }
public void initializeNamespaceMaps() { //When the transformation record is created, initialize the namespace resolver //to contain the namespaces from the current state of the owning record. //Start at the root and work down. UnmarshalNamespaceResolver unmarshalNamespaceResolver = owningRecord.getUnmarshalNamespaceResolver(); for(String prefix : unmarshalNamespaceResolver.getPrefixes()) { resolver.put(prefix, unmarshalNamespaceResolver.getNamespaceURI(prefix)); } } }
public String resolveNamespacePrefix(String prefix) { String namespaceURI = getUnmarshalNamespaceResolver().getNamespaceURI(prefix); if(null == namespaceURI && null != getParentRecord()) { namespaceURI = getParentRecord().resolveNamespacePrefix(prefix); } return namespaceURI; }
public String resolveNamespaceUri(String uri) { String prefix = getUnmarshalNamespaceResolver().getPrefix(uri); if (null == prefix) { if (null != getParentRecord()) { prefix = getParentRecord().resolveNamespaceUri(uri); } } return prefix; }
public void setUnmarshalRecord(UnmarshalRecord unmarshalRecord) { parentRecord = unmarshalRecord; aHelperContext = (HelperContext)unmarshalRecord.getUnmarshaller().getProperty(SDOConstants.SDO_HELPER_CONTEXT); if (parentRecord.getParentRecord() == null) { rootProcessed = false; } else { rootProcessed = true; if (parentRecord.getParentRecord().getCurrentObject() instanceof DataObject) { currentDataObjects.push(parentRecord.getParentRecord().getCurrentObject()); depth++; } } unmarshalNamespaceResolver = parentRecord.getUnmarshalNamespaceResolver(); }
public void setUnmarshalRecord(UnmarshalRecord unmarshalRecord) { parentRecord = unmarshalRecord; aHelperContext = (HelperContext)unmarshalRecord.getUnmarshaller().getProperty(SDOConstants.SDO_HELPER_CONTEXT); if (parentRecord.getParentRecord() == null) { rootProcessed = false; } else { rootProcessed = true; if (parentRecord.getParentRecord().getCurrentObject() instanceof DataObject) { currentDataObjects.push(parentRecord.getParentRecord().getCurrentObject()); depth++; } } unmarshalNamespaceResolver = parentRecord.getUnmarshalNamespaceResolver(); }
public UnmappedContentHandlerWrapper(UnmarshalRecord parentRecord, UnmappedContentHandler unmappedContentHandler) { super(null); this.depth = 0; this.unmappedContentHandler = unmappedContentHandler; setParentRecord(parentRecord); setUnmarshaller(parentRecord.getUnmarshaller()); setXMLReader(parentRecord.getXMLReader()); setUnmarshalNamespaceResolver(parentRecord.getUnmarshalNamespaceResolver()); unmappedContentHandler.setUnmarshalRecord(this); }