Examples of EntityReference


Examples of org.qi4j.api.entity.EntityReference

    public EntityReference get( int i )
    {
        try
        {
            return new EntityReference( references.getString( i ) );
        }
        catch( JSONException e )
        {
            throw new EntityStoreException( e );
        }
View Full Code Here

Examples of org.qi4j.api.entity.EntityReference

            public EntityReference next()
            {
                try
                {
                    EntityReference ref = new EntityReference( references.getString( idx ) );
                    idx++;
                    return ref;
                }
                catch( JSONException e )
                {
View Full Code Here

Examples of org.sakaiproject.entitybus.EntityReference

            } else {
                if (ref.getId() == null) {
                    // attempt to get the id if it was not provided
                    String entityId = getEntityId(entity);
                    if (entityId != null) {
                        ref = new EntityReference(ref.getPrefix(), entityId);
                    }
                }
                Object entityObject = entity;
                if (ActionReturn.class.isAssignableFrom(resultClass)) {
                    ActionReturn ar = (ActionReturn) entity;
View Full Code Here

Examples of org.w3c.dom.EntityReference

          currentElement = (Element) currentElement.getParentNode();
          isInLeaf = false;
        }
        break;
      case ParserInstruction.AddEntity:
        EntityReference entity = resultDocument.createEntityReference(domArgument);
        // a bugfix for a c++ problem in the mozilla parser:
        if (!Character.isDigit(domArgument.charAt(0)))
          entity.appendChild(resultDocument.createTextNode("&" + domArgument + ";"));
        else
          entity.appendChild(resultDocument.createTextNode(""));
        currentElement.appendChild(entity);
        break;
      case ParserInstruction.AddComment:
        Comment comment = resultDocument.createComment(domArgument);
        currentElement.appendChild(comment);
View Full Code Here

Examples of org.w3c.dom.EntityReference

      }
    }
    break;
    case Node.ENTITY_REFERENCE_NODE :
    {
      EntityReference eref = (EntityReference) node;

      if (m_contentHandler instanceof LexicalHandler)
      {
        ((LexicalHandler) this.m_contentHandler).startEntity(
          eref.getNodeName());
      }
      else
      {

        // warning("Can not output entity to a pure SAX ContentHandler");
View Full Code Here

Examples of org.w3c.dom.EntityReference

      break;
    case Node.CDATA_SECTION_NODE :
      break;
    case Node.ENTITY_REFERENCE_NODE :
    {
      EntityReference eref = (EntityReference) node;

      if (m_contentHandler instanceof LexicalHandler)
      {
        LexicalHandler lh = ((LexicalHandler) this.m_contentHandler);

        lh.endEntity(eref.getNodeName());
      }
    }
    break;
    default :
    }
View Full Code Here

Examples of org.w3c.dom.EntityReference

        // Ignore entity refs while parsing DTD
  if (expandEntityRefs || inDTD) {
      return;
        }

        EntityReference  e = document.createEntityReference(name);
  elementStack[topOfStack++].appendChild(e);
  elementStack[topOfStack] = (ParentNode)e;
    }
View Full Code Here

Examples of org.w3c.dom.EntityReference

         */
        public void skippedEntity(String name) throws SAXException {

            checkClosed();

            EntityReference entityReference =
                getDocument().createEntityReference(name);

            getCurrentNode().appendChild(entityReference);
        }
View Full Code Here

Examples of org.w3c.dom.EntityReference

    protected void serializeEntityReference(
        EntityReference node,
        boolean bStart)
        throws SAXException {
        if (bStart) {
            EntityReference eref = node;
            // entities=true
            if ((fFeatures & ENTITIES) != 0) {
               
                // perform well-formedness and other checking only if
                // entities = true

                // well-formed=true
                if ((fFeatures & WELLFORMED) != 0) {
                    isEntityReferneceWellFormed(node);
                }

                // check "unbound-prefix-in-entity-reference" [fatal]
                // Raised if the configuration parameter "namespaces" is set to true
                if ((fFeatures & NAMESPACES) != 0) {
                    checkUnboundPrefixInEntRef(node);
                }

                // The filter should not apply in this case, since the
                // EntityReference is not being expanded.
                // should we pass entity reference nodes to the filter???
            }
           
            if (fLexicalHandler != null) {

                // startEntity outputs only Text but not Element, Attr, Comment
                // and PI child nodes.  It does so by setting the m_inEntityRef
                // in ToStream and using this to decide if a node is to be
                // serialized or not.
                fLexicalHandler.startEntity(eref.getNodeName());
            }

        } else {
            EntityReference eref = node;
            // entities=true or false,
            if (fLexicalHandler != null) {
                fLexicalHandler.endEntity(eref.getNodeName());
            }
        }
    }
View Full Code Here

Examples of org.w3c.dom.EntityReference

      }
    }
    break;
    case Node.ENTITY_REFERENCE_NODE :
    {
      EntityReference eref = (EntityReference) node;

      if (m_contentHandler instanceof LexicalHandler)
      {
        ((LexicalHandler) this.m_contentHandler).startEntity(
          eref.getNodeName());
      }
      else
      {

        // warning("Can not output entity to a pure SAX ContentHandler");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.