com.sun.org.apache.xerces.internal.util.URI Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.util.URI.
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: AnyURIDV.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #2
Source File: NotationImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #3
Source File: NotationImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #4
Source File: AnyURIDV.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #5
Source File: AnyURIDV.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #6
Source File: AnyURIDV.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #7
Source File: NotationImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #8
Source File: AnyURIDV.java From JDKSourceCode1.8 with MIT License | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #9
Source File: NotationImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #10
Source File: AnyURIDV.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #11
Source File: NotationImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #12
Source File: NotationImpl.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #13
Source File: AnyURIDV.java From Bytecoder with Apache License 2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #14
Source File: NotationImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #15
Source File: AnyURIDV.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #16
Source File: NotationImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #17
Source File: AnyURIDV.java From hottub with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #18
Source File: AnyURIDV.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #19
Source File: NotationImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #20
Source File: AnyURIDV.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; }
Example #21
Source File: NotationImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #22
Source File: NotationImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #23
Source File: CoreDocumentImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (fDocumentURI != null && fDocumentURI.length() != 0 ) {// attribute value is always empty string try { return new URI(fDocumentURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return fDocumentURI; }
Example #24
Source File: ValidatorHandlerImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** Resolves a system identifier against a base URI. */ private String resolveSystemId(String systemId, String baseURI) { try { return XMLEntityManager.expandSystemId(systemId, baseURI, false); } // In the event that resolution failed against the // base URI, just return the system id as is. There's not // much else we can do. catch (URI.MalformedURIException ex) { return systemId; } }
Example #25
Source File: ValidatorHandlerImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** Resolves a system identifier against a base URI. */ private String resolveSystemId(String systemId, String baseURI) { try { return XMLEntityManager.expandSystemId(systemId, baseURI, false); } // In the event that resolution failed against the // base URI, just return the system id as is. There's not // much else we can do. catch (URI.MalformedURIException ex) { return systemId; } }
Example #26
Source File: ValidatorHandlerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** Resolves a system identifier against a base URI. */ private String resolveSystemId(String systemId, String baseURI) { try { return XMLEntityManager.expandSystemId(systemId, baseURI, false); } // In the event that resolution failed against the // base URI, just return the system id as is. There's not // much else we can do. catch (URI.MalformedURIException ex) { return systemId; } }
Example #27
Source File: EntityReferenceImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI == null) { DocumentType doctype; NamedNodeMap entities; EntityImpl entDef; if (null != (doctype = getOwnerDocument().getDoctype()) && null != (entities = doctype.getEntities())) { entDef = (EntityImpl)entities.getNamedItem(getNodeName()); if (entDef !=null) { return entDef.getBaseURI(); } } } else if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }
Example #28
Source File: ValidatorHandlerImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** Resolves a system identifier against a base URI. */ private String resolveSystemId(String systemId, String baseURI) { try { return XMLEntityManager.expandSystemId(systemId, baseURI, false); } // In the event that resolution failed against the // base URI, just return the system id as is. There's not // much else we can do. catch (URI.MalformedURIException ex) { return systemId; } }
Example #29
Source File: CoreDocumentImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (fDocumentURI != null && fDocumentURI.length() != 0 ) {// attribute value is always empty string try { return new URI(fDocumentURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return fDocumentURI; }
Example #30
Source File: EntityReferenceImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns the absolute base URI of this node or null if the implementation * wasn't able to obtain an absolute URI. Note: If the URI is malformed, a * null is returned. * * @return The absolute base URI of this node or null. * @since DOM Level 3 */ public String getBaseURI() { if (needsSyncData()) { synchronizeData(); } if (baseURI == null) { DocumentType doctype; NamedNodeMap entities; EntityImpl entDef; if (null != (doctype = getOwnerDocument().getDoctype()) && null != (entities = doctype.getEntities())) { entDef = (EntityImpl)entities.getNamedItem(getNodeName()); if (entDef !=null) { return entDef.getBaseURI(); } } } else if (baseURI != null && baseURI.length() != 0 ) {// attribute value is always empty string try { return new URI(baseURI).toString(); } catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e){ // REVISIT: what should happen in this case? return null; } } return baseURI; }