Examples of ICatalogEntry


Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    }

    public String getColumnText(Object object, int columnIndex) {
      String result = null;
      if (object instanceof ICatalogEntry) {
        ICatalogEntry catalogEntry = (ICatalogEntry) object;
        result = columnIndex == 0 ? catalogEntry.getKey() : catalogEntry.getURI();
        result = URIHelper.removePlatformResourceProtocol(result);
      }
      return result != null ? result : ""; //$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    }

    public void update() {
      String thePublicId = null;
      String theSystemId = null;
      ICatalogEntry xmlCatalogEntry = generator.getXMLCatalogEntry();

      if (xmlCatalogEntry != null) {
        if (xmlCatalogEntry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) {
          thePublicId = xmlCatalogEntry.getKey();
          theSystemId = xmlCatalogEntry.getAttributeValue(ICatalogEntry.ATTR_WEB_URL);
          if (theSystemId == null) {
            theSystemId = generator.getGrammarURI().startsWith("http:") ? generator.getGrammarURI() : URIHelper.getLastSegment(generator.getGrammarURI()); //$NON-NLS-1$
          }
        }
        else {
          theSystemId = xmlCatalogEntry.getKey();
        }
      }
      else {
        theSystemId = getDefaultSystemId();
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    }
    return result;
  }

  public ICatalogEntry getXMLCatalogEntry() {
    ICatalogEntry result = null;
    if (radioButton[1].getSelection()) {
      result = selectXMLCatalogIdPanel.getXMLCatalogEntry();
    }
    return result;
  }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

        continue;
      }
      ICatalogElement catalogElement = catalog.createCatalogElement(type);
      if (catalogElement instanceof ICatalogEntry)
      {
        ICatalogEntry entry = (ICatalogEntry) catalogElement;
        entry.setKey(key);
    String resolvedPath = resolvePath(entryURI);
    entry.setURI(resolvedPath);
        String id = childElement.getAttribute(OASISCatalogConstants.ATTR_ID); // optional
        if (id != null && !id.equals("")) //$NON-NLS-1$
        {
          entry.setId(id);
        }
      }
      // process any other attributes
      for (int j = 0; j < childElement.getAttributeNames().length; j++)
      {
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    if (buttonId == IDialogConstants.OK_ID) {
      ISelection selection = panel.getTableViewer().getSelection();
      Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;

      if (selectedObject instanceof ICatalogEntry) {
        ICatalogEntry mappingInfo = (ICatalogEntry) selectedObject;
        publicId = mappingInfo.getKey();
        systemId = computeDefaultSystemId(mappingInfo);
      }
    }
    super.buttonPressed(buttonId);
  }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

  }

  protected void addCatalogMapToList(ICatalog catalog, List list) {
    ICatalogEntry[] entries = catalog.getCatalogEntries();
    for (int i = 0; i < entries.length; i++) {
      ICatalogEntry entry = entries[i];
      if ((entry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) && entry.getURI().endsWith(".xsd")) { //$NON-NLS-1$
        if (!isAlreadyDeclared(entry.getKey())) {
          NamespaceInfo namespaceInfo = new NamespaceInfo(entry.getKey(), "xx", null); //$NON-NLS-1$
          list.add(namespaceInfo);
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

        boolean isSystem = false;
        if (typeName != null)
        {
          isSystem = (typeName.compareToIgnoreCase("SYSTEM") == 0); //$NON-NLS-1$
        }
        ICatalogEntry catalogEntry = new CatalogEntry(isSystem ? ICatalogEntry.ENTRY_TYPE_SYSTEM : ICatalogEntry.ENTRY_TYPE_PUBLIC);
        catalogEntry.setKey(attributes.getValue("", CompatabilityConstants.ATT_ID)); //$NON-NLS-1$
        String entryUri = attributes.getValue("", CompatabilityConstants.ATT_URI); //$NON-NLS-1$
       
        // For relative URIs, try to resolve them using the corresponding base URI.
        catalogEntry.setURI(resolveRelative(entryUri));

        String webURL = attributes.getValue("", CompatabilityConstants.ATT_WEB_URL); //$NON-NLS-1$
        if (webURL != null)
        {
          catalogEntry.setAttributeValue(
              ICatalogEntry.ATTR_WEB_URL, webURL);
        }
    catalog.addCatalogElement(catalogEntry);
    return;
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

  {
    ICatalogEntry[] catalogEntries = catalog.getCatalogEntries();
 
    for (int i = 0; i < catalogEntries.length; i++)
    {
      ICatalogEntry entry = catalogEntries[i];
      String key = entry.getKey();
      String uri = entry.getURI();
      Element childElement = null;
  
      switch (entry.getEntryType())
      {
        case ICatalogEntry.ENTRY_TYPE_PUBLIC :
          childElement = parent.getOwnerDocument().createElement(OASISCatalogConstants.TAG_PUBLIC);
          if (childElement != null)
          {
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    XMLCatalogTableViewer theTableViewer = new XMLCatalogTableViewer(parent, headings) {

      protected void addXMLCatalogEntries(List list, ICatalogEntry[] entries) {
        for (int i = 0; i < entries.length; i++) {
          ICatalogEntry entry = entries[i];
          if (catalogEntryType == 0) {
            list.add(entry);
          }
          else if (catalogEntryType == entry.getEntryType()) {
            list.add(entry);
          }
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    return theTableViewer;
  }


  public String getId() {
    ICatalogEntry entry = getXMLCatalogEntry();
    return entry != null ? entry.getKey() : null;
  }
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.