/** Returns an empty resource identifier. */ protected final XMLResourceIdentifier resourceId() { /***/ fResourceId.clear(); return fResourceId; /*** // NOTE: Unfortunately, the Xerces DOM parser classes expect a // non-null resource identifier object to be passed to // startGeneralEntity. -Ac return null; /***/ } // resourceId():XMLResourceIdentifier
/** Returns a hash code for this object. */ public int hashCode() { int code = super.hashCode(); if (fEntityName != null) { code += fEntityName.hashCode(); } return code; } // hashCode():int
/** Sets the values of the resource identifier. */ public void setValues(String publicId, String literalSystemId, String baseSystemId, String expandedSystemId) { setValues(publicId, literalSystemId, baseSystemId, expandedSystemId, null); } // setValues(String,String,String,String)
if (fEntityHandler != null) { String encoding = null; fResourceIdentifier.clear(); fEntityAugs.removeAllItems(); fEntityAugs.putItem(Constants.ENTITY_SKIPPED, Boolean.TRUE); (parameter && !fExternalParameterEntities)) { if (fEntityHandler != null) { fResourceIdentifier.clear(); final String encoding = null; ExternalEntity externalEntity = (ExternalEntity)entity; String extBaseSysId = (externalEntity.entityLocation != null ? externalEntity.entityLocation.getBaseSystemId() : null); String expandedSystemId = expandSystemId(extLitSysId, extBaseSysId, false); fResourceIdentifier.setValues( (externalEntity.entityLocation != null ? externalEntity.entityLocation.getPublicId() : null), extLitSysId, extBaseSysId, expandedSystemId); XMLErrorReporter.SEVERITY_FATAL_ERROR); if (fEntityHandler != null) { fResourceIdentifier.clear(); final String encoding = null; if (external) { String extBaseSysId = (externalEntity.entityLocation != null ? externalEntity.entityLocation.getBaseSystemId() : null); String expandedSystemId = expandSystemId(extLitSysId, extBaseSysId, false); fResourceIdentifier.setValues( (externalEntity.entityLocation != null ? externalEntity.entityLocation.getPublicId() : null), extLitSysId, extBaseSysId, expandedSystemId);
public XIncludeHandler() { fDepth = 0; fSawFallback[fDepth] = false; fSawInclude[fDepth] = false; fState[fDepth] = STATE_NORMAL_PROCESSING; fNotations = new ArrayList(); fUnparsedEntities = new ArrayList(); fBaseURIScope = new IntStack(); fBaseURI = new Stack(); fLiteralSystemID = new Stack(); fExpandedSystemID = new Stack(); fCurrentBaseURI = new XMLResourceIdentifierImpl(); fLanguageScope = new IntStack(); fLanguageStack = new Stack(); fCurrentLanguage = null; }
new XMLResourceIdentifierImpl(publicId, literalSystemId, baseSystemId, expandedSystemId), stream, reader, fTempByteBuffer, encoding, literal, false, isExternal); fCurrentEntity.setEncodingExternallySpecified(encodingExternallySpecified); fEntityScanner.setCurrentEntity(fCurrentEntity); fResourceIdentifier.setValues(publicId, literalSystemId, baseSystemId, expandedSystemId); return encoding;
desc.setNamespace((String)nsiter.next()); Grammar oldGrammar = pool.removeGrammar(desc); if(oldGrammar != null) description.setNamespace(targetNamespace); pool.removeGrammar(description); desc.setNamespace((String)nsiter.next()); pool.removeGrammar(desc);
new XMLResourceIdentifierImpl( not.publicId, not.systemId,
/** * <p>Clears the values.</p> */ public void clear() { super.clear(); fEntityName = null; } // clear()
new XMLResourceIdentifierImpl( ent.publicId, ent.systemId,
/** * Constructs a resource identifier. * * @param publicId The public identifier. * @param literalSystemId The literal system identifier. * @param baseSystemId The base system identifier. * @param expandedSystemId The expanded system identifier. */ public XMLResourceIdentifierImpl(String publicId, String literalSystemId, String baseSystemId, String expandedSystemId) { setValues(publicId, literalSystemId, baseSystemId, expandedSystemId, null); } // <init>(String,String,String,String)
private void init() { fEntityScanner = null; // initialize vars fEntityDepth = 0; fReportEntity = true; fResourceIdentifier.clear(); }
@Override public void resolve(Identifier id, Input input) throws IOException, ResolverException { if(fResolver != null) { String expanded = id.getUriReference(); //Compute the expanded system ID try { expanded = new URL(new URL(id.getBase()), id.getUriReference()).toString(); } catch (Exception e) { } XMLResourceIdentifier identifier = new XMLResourceIdentifierImpl( null, id.getUriReference(), id.getBase(), expanded); XMLInputSource resolved = fResolver.resolveEntity(identifier); if(resolved != null) { input.setUri(resolved.getSystemId()); input.setByteStream(resolved.getByteStream()); input.setCharacterStream(resolved.getCharacterStream()); input.setEncoding(resolved.getEncoding()); } else { //Just set the URI //input.setUri(expanded); } } } /**
/** * Constructs a resource identifier. * * @param publicId The public identifier. * @param literalSystemId The literal system identifier. * @param baseSystemId The base system identifier. * @param expandedSystemId The expanded system identifier. * @param namespace The namespace. */ public XMLResourceIdentifierImpl(String publicId, String literalSystemId, String baseSystemId, String expandedSystemId, String namespace) { setValues(publicId, literalSystemId, baseSystemId, expandedSystemId, namespace); } // <init>(String,String,String,String,String)
/** * Returns an empty resource identifier. */ protected final XMLResourceIdentifier resourceId() { /***/ fResourceId.clear(); return fResourceId; /*** * // NOTE: Unfortunately, the Xerces DOM parser classes expect a // non-null resource * identifier object to be passed to // startGeneralEntity. -Ac return null; / ***/ } // resourceId():XMLResourceIdentifier
public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) { if(fEntityResolver==null) return null; try { XMLInputSource is = fEntityResolver.resolveEntity( new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null)); if(is==null) return null; LSInput di = new DOMInputImpl(); di.setBaseURI(is.getBaseSystemId()); di.setByteStream(is.getByteStream()); di.setCharacterStream(is.getCharacterStream()); di.setEncoding(is.getEncoding()); di.setPublicId(is.getPublicId()); di.setSystemId(is.getSystemId()); return di; } catch( IOException e ) { // erors thrown by the callback is not supposed to be // reported to users. throw new XNIException(e); } } });
fResourceIdentifier.setValues(publicId, systemId, baseSystemId, XMLEntityManager.expandSystemId(systemId, baseSystemId, false)); fDTDHandler.notationDecl(name, fResourceIdentifier, null);
/** * resets all the fields */ public void reset(){ super.clear(); fContextType = CONTEXT_INITIALIZE; fLocationHints = null ; fTriggeringComponent = null ; fEnclosedElementName = null ; fAttributes = null ; }
try { XMLResourceIdentifier resourceIdentifier = new XMLResourceIdentifierImpl( null, href,
fResourceIdentifier.setValues(publicId, systemId, baseSystemId, XMLEntityManager.expandSystemId(systemId, baseSystemId, false)); if (notation != null) { fDTDHandler.unparsedEntityDecl(name, fResourceIdentifier,