Package org.eclipse.wst.xml.core.internal.contentmodel

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMDocument


    for (Iterator iter = trackers.iterator(); iter.hasNext();) {
      TaglibTracker tracker = (TaglibTracker) iter.next();
      if (uri.equals(tracker.getURI())) {
        return tracker.getPrefix();
      }
            CMDocument cmdoc = tracker.getDocument();
            if (cmdoc instanceof TLDDocument
                && uri.equals(((TLDDocument) cmdoc).getUri())) {
              return tracker.getPrefix();
            }
    }
View Full Code Here


    }
    List trackers = m.getTaglibTrackers();
    for (Iterator iter = trackers.iterator(); iter.hasNext();) {
      TaglibTracker tracker = (TaglibTracker) iter.next();
      if (prefix.equals(tracker.getPrefix())) {
        CMDocument cmdoc = tracker.getDocument();
        if (cmdoc instanceof TLDDocument) {
          return ((TLDDocument) cmdoc).getUri();
        }
                break; // fall out and return null
      }
View Full Code Here

  }   
             

  public CMDocument getCMDocument(String publicId)
  {                                          
    CMDocument result = null;
    String resolvedURI = lookupResolvedURI(publicId);
    if (resolvedURI != null)
    {                     
      result = cmDocumentCache.getCMDocument(resolvedURI);
    }
View Full Code Here

  /* (non-Javadoc)
* @see org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager#getCMDocument(java.lang.String, java.lang.String, java.lang.String)
*/
public CMDocument getCMDocument(String publicId, String systemId, String type)
  {               
    CMDocument cmDocument = null;                          
    String resolvedURI = null;

    if (getPropertyEnabled(PROPERTY_AUTO_LOAD))
    {
      // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=136399
View Full Code Here

  }


  protected CMDocument loadCMDocument(final String publicId, final String resolvedURI, final String type, boolean async)
  {                                                     
    CMDocument result = null;
                        
    //System.out.println("about to build CMDocument(" + publicId + ", " + unresolvedURI + " = " + resolvedURI + ")");
    if (async)
    {    
      cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
View Full Code Here

  {                                    
    cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
    boolean documentCacheable = false;
    if(globalCMDocumentCacheEnabled) {
      GlobalCacheQueryResponse response = GlobalCMDocumentCache.getInstance().getCMDocument(resolvedURI);
      CMDocument cachedCMDocument = response.getCachedCMDocument();
      documentCacheable = response.isDocumentCacheable();
      if(cachedCMDocument != null) {
        cmDocumentCache.putCMDocument(resolvedURI, cachedCMDocument);
        return cachedCMDocument;
      }
    }

    CMDocument result = null;        
    if (resolvedURI != null && resolvedURI.length() > 0)
    {
      // TODO... pass the TYPE thru to the CMDocumentBuilder
      result = ContentModelManager.getInstance().createCMDocument(resolvedURI, type);
    }
View Full Code Here

        return DISPLAY_NAME;
    }

    private static String getUri(final TLDElementDeclaration element)
    {
        final CMDocument owner = element.getOwnerDocument();

        if (owner instanceof TLDDocument)
        {
            return ((TLDDocument) owner).getUri();
        }
View Full Code Here

              result = true;
            }
            else if (anyElementURI.equals("##other")) //$NON-NLS-1$
            {    
              result = true;   
              CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument");   //$NON-NLS-1$
              if (cmDocument != null)
              {
                String excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
                if (excludedURI != null)
                {
                  String specifiedURI = getURIForContentSpecification(string);
                  if (specifiedURI != null && excludedURI.equals(specifiedURI))
                  {
                    result = false;
                  }
                }
              }
            }
            else if (anyElementURI.equals("##targetNamespace")) //$NON-NLS-1$
            {
              result = true;
              CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument");   //$NON-NLS-1$
              if (cmDocument != null)
              {    
                String targetNamespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
                String specifiedURI = getURIForContentSpecification(string);
                if (specifiedURI != null && !targetNamespaceURI.equals(specifiedURI))
                {
                  result = false;
                }
View Full Code Here

  public boolean isXSIType(CMAttributeDeclaration ad)
  {        
    boolean result = false;
    if (ad.getNodeName().equals("type"))  //$NON-NLS-1$
    {
      CMDocument cmDocument = (CMDocument)ad.getProperty("CMDocument"); //$NON-NLS-1$
      if (cmDocument != null)
      {
        String namespaceName = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
        if (namespaceName != null && namespaceName.equals("http://www.w3.org/2001/XMLSchema-instance")) //$NON-NLS-1$
        {          
          result = true;
        }
      }
View Full Code Here

    provider.setValidating(false);
    provider.setBaseReference(jarFileName);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setJarFileName(jarFileName);
    provider.setFileName(contentFileName);
    CMDocument document = loadDocument("jar:file://" + jarFileName + "!" + contentFileName, provider.getRootElement()); //$NON-NLS-1$ //$NON-NLS-2$
    // TODO: Add the tags declared in META-INF/tags, see JSP 2.0 section
    // 8.4.1
    return document;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.CMDocument

Copyright © 2018 www.massapicom. 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.