Java Code Examples for com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription#equals()
The following examples show how to use
com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SoftReferenceGrammarPool.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 2
Source File: SoftReferenceGrammarPool.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 3
Source File: SoftReferenceGrammarPool.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 4
Source File: SoftReferenceGrammarPool.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 5
Source File: SoftReferenceGrammarPool.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 6
Source File: SoftReferenceGrammarPool.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 7
Source File: SoftReferenceGrammarPool.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 8
Source File: SoftReferenceGrammarPool.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 9
Source File: SoftReferenceGrammarPool.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 10
Source File: SoftReferenceGrammarPool.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 11
Source File: SoftReferenceGrammarPool.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { if (desc1 instanceof XMLSchemaDescription) { if (!(desc2 instanceof XMLSchemaDescription)) { return false; } final XMLSchemaDescription sd1 = (XMLSchemaDescription) desc1; final XMLSchemaDescription sd2 = (XMLSchemaDescription) desc2; final String targetNamespace = sd1.getTargetNamespace(); if (targetNamespace != null) { if (!targetNamespace.equals(sd2.getTargetNamespace())) { return false; } } else if (sd2.getTargetNamespace() != null) { return false; } // The JAXP 1.3 spec says that the implementation can assume that // if two schema location hints are the same they always resolve // to the same document. In the default grammar pool implementation // we only look at the target namespaces. Here we also compare // location hints. final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; } } else if (sd2.getExpandedSystemId() != null) { return false; } return true; } return desc1.equals(desc2); }
Example 12
Source File: XMLGrammarPoolImpl.java From JDKSourceCode1.8 with MIT License | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 13
Source File: XMLGrammarPoolImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 14
Source File: XMLGrammarPoolImpl.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 15
Source File: XMLGrammarPoolImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 16
Source File: XMLGrammarPoolImpl.java From Bytecoder with Apache License 2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 17
Source File: XMLGrammarPoolImpl.java From openjdk-8 with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 18
Source File: XMLGrammarPoolImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 19
Source File: XMLGrammarPoolImpl.java From hottub with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }
Example 20
Source File: XMLGrammarPoolImpl.java From openjdk-8-source with GNU General Public License v2.0 | 2 votes |
/** * This method checks whether two grammars are the same. Currently, we compare * the root element names for DTD grammars and the target namespaces for Schema grammars. * The application can override this behaviour and add its own logic. * * @param desc1 The grammar description * @param desc2 The grammar description of the grammar to be compared to * @return True if the grammars are equal, otherwise false */ public boolean equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2) { return desc1.equals(desc2); }