Java 8 Notation - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Notation class.

This code example shows how to use the following methods:getNodeName, getPublicId, getSystemId
    public void leave(DocumentFragment docfrag) {
	// do nothing 
    } 
 
    public boolean enter(Notation notation) {
	String name = notation.getNodeName();
	String pid = notation.getPublicId();
	String sid = notation.getSystemId();
	buffer_.append("<!NOTATION ");
	buffer_.append(name);
	if (pid != null) {
	    buffer_.append(" PUBLIC \"");
	    buffer_.append(pid);
	    buffer_.append("\"");
	    if (sid != null) {
		buffer_.append(" \"");
		buffer_.append(UXML.escapeSystemQuot(sid));
		buffer_.append("\"");
	    } 
	} else if (sid != null) {
5
CodeRank
This code example shows how to use the following methods:getBaseURI
    public void testBaseUriNotInheritedForNotations() { 
        if (png == null) {
            return; 
        } 
        document.setDocumentURI("http://d1/d2");
        assertNull(png.getBaseURI());
    } 
 
    public void testBaseUriNotInheritedForDoctypes() { 
        document.setDocumentURI("http://d1/d2");
        assertNull(doctype.getBaseURI());
    } 
 
    public void testBaseUriNotInheritedForAttributes() { 
        document.setDocumentURI("http://d1/d2");
        assertNull(itemXmlns.getBaseURI());
        assertNull(itemXmlnsA.getBaseURI());
        assertNull(standard.getBaseURI());
        assertNull(vitaminsXmlnsA.getBaseURI());
    } 
2
CodeRank
This code example shows how to use the following methods:getBaseURI
    public void testBaseUriNotInheritedForNotations() { 
        if (png == null) {
            return; 
        } 
        document.setDocumentURI("http://d1/d2");
        assertNull(png.getBaseURI());
    } 
 
    public void testBaseUriNotInheritedForDoctypes() { 
        document.setDocumentURI("http://d1/d2");
        assertNull(doctype.getBaseURI());
    } 
 
    public void testBaseUriNotInheritedForAttributes() { 
        document.setDocumentURI("http://d1/d2");
        assertNull(itemXmlns.getBaseURI());
        assertNull(itemXmlnsA.getBaseURI());
        assertNull(standard.getBaseURI());
        assertNull(vitaminsXmlnsA.getBaseURI());
    } 
2
CodeRank
This code example shows how to use the following methods:getBaseURI
    public void testBaseUriNotInheritedForNotations() { 
        if (png == null) {
            return; 
        } 
        document.setDocumentURI("http://d1/d2");
        assertNull(png.getBaseURI());
    } 
 
    public void testBaseUriNotInheritedForDoctypes() { 
        document.setDocumentURI("http://d1/d2");
        assertNull(doctype.getBaseURI());
    } 
 
    public void testBaseUriNotInheritedForAttributes() { 
        document.setDocumentURI("http://d1/d2");
        assertNull(itemXmlns.getBaseURI());
        assertNull(itemXmlnsA.getBaseURI());
        assertNull(standard.getBaseURI());
        assertNull(vitaminsXmlnsA.getBaseURI());
    } 
3
CodeRank
This code example shows how to use the following methods:getNodeName, getPublicId, getSystemId
  } 
 
  /* Display the contents of a NOTATION_NODE */ 
  private static void dumpNotationNode(Notation node, String indent) {
    System.out.println(indent + "NOTATION");
    System.out.print(indent + "  " + node.getNodeName() + "=");
    if (node.getPublicId() != null)
      System.out.println(node.getPublicId());
    else 
      System.out.println(node.getSystemId());
  } 
 
  /* Display the contents of a PROCESSING_INSTRUCTION_NODE */ 
  private static void dumpProcessingInstructionNode(ProcessingInstruction node,
      String indent) {
    System.out.println(indent + "PI: target=" + node.getTarget());
    System.out.println(indent + "  " + node.getData());
  } 
 
  /* Display the contents of a TEXT_NODE */ 
4
CodeRank
This code example shows how to use the following methods:getPublicId
        super( base, doc );
        base_ = base;
    } 
 
    public String getPublicId() {
        return base_.getPublicId();
    } 
 
    public String getSystemId() {
        return base_.getSystemId();
    } 
} 
4
CodeRank
This code example shows how to use the following methods:getPublicId, getSystemId
        // no-op 
    } 
 
    public boolean enter(Notation notation) {
        String name = notation.getNodeName();
        String pubId = notation.getPublicId();
        String sysId = notation.getSystemId();
        buffer.append("<!NOTATION ");
        buffer.append(name);
        if (pubId != null) {
            buffer.append(" PUBLIC \"");
            buffer.append(pubId);
            buffer.append("\"");
            if (sysId != null) {
                buffer.append(" \"");
                buffer.append(sysId);
                buffer.append("\"");
            } 
        } else if (sysId != null) {
            buffer.append(" SYSTEM \"");
3
CodeRank
See Code Examples for Java 8 Notation Methods: