Examples of NCName


Examples of org.apache.woden.types.NCName

     * @return an ElementPointerPart representing the parsed schemaData.
     * @throws IllegalArgumentException if the schemeData has invalid scheme syntax.
     */
    public static ElementPointerPart parseFromString(final String schemeData) throws InvalidXPointerException {
        List childSequence = null;
        NCName elementID = null;
        int startChar;
        int endChar;
       
        //Find an NCName if it exists?
        startChar = schemeData.indexOf("/");
        // -1 Only an NCName. 0 No NCName. > 1 An NCName.
       
        switch (startChar) {
            case -1: //Only an NCName.
                try {
                    elementID = new NCName(schemeData);
                }
                catch (IllegalArgumentException e) {
                    throw new InvalidXPointerException("Invalid NCName in the XPointer", schemeData);
                }
                return new ElementPointerPart(elementID);
            case 0: //No NCName.
                break;
            default: //An NCName.
                try {
                    elementID = new NCName(schemeData.substring(0, startChar));
                } catch (IllegalArgumentException e) {
                    throw new InvalidXPointerException("Invalid NCName in the XPointer", schemeData, 0, startChar);
                }
                break;
        }
View Full Code Here

Examples of org.apache.woden.types.NCName

     * @see org.apache.woden.wsdl20.WSDLComponent#getFragmentIdentifier()
     */
    public FragmentIdentifier getFragmentIdentifier() {
        //Find parent component and get needed properties.
        Binding bindingComp = (Binding)getParent();
        NCName binding = new NCName(bindingComp.getName().getLocalPart());
       
        //Return a new FragmentIdentifier.
        return new FragmentIdentifier(new BindingOperationPart (binding , fRef));
    }
View Full Code Here

Examples of org.apache.woden.types.NCName

     */
    public FragmentIdentifier getFragmentIdentifier() {
        InterfaceOperation interfaceOperationComp = (InterfaceOperation)getParent();
        Interface interfaceComp = (Interface)interfaceOperationComp.getParent();
       
        NCName interfaceName = new NCName(interfaceComp.getName().getLocalPart());
        NCName interfaceOperation = new NCName(interfaceOperationComp.getName().getLocalPart());
       
        return new FragmentIdentifier(new InterfaceMessageReferencePart(interfaceName, interfaceOperation, fMessageLabel));
    }
View Full Code Here

Examples of org.apache.woden.types.NCName

     * @see org.apache.woden.wsdl20.WSDLComponent#getFragmentIdentifier()
     */
    public FragmentIdentifier getFragmentIdentifier() {
        Interface interfaceComp = (Interface)getParent();
       
        NCName interfaceName = new NCName(interfaceComp.getName().getLocalPart());
       
        return new FragmentIdentifier(new InterfaceFaultPart(interfaceName, fName));
    }
View Full Code Here

Examples of org.apache.woden.types.NCName

     * @param namespace The namespace to get the prefix for.
     * @return a NCName of the prefix for the namespace.
     */
    public NCName getXmlNamespacePrefix(String namespace) {
        //Lookup prefix
        NCName prefix = (NCName)xpointer.getNamespaceBinding(namespace);
        if (prefix == null) {
            //The namespace does not have a prefix yet so lets add one.
            //Find next available nsXXX prefix
            int i = 1;
            do {
                prefix = new NCName("ns" + i);
                i++;
            } while (xpointer.hasPrefixBinding(prefix));
           
            //Add prefix pointer part.
            xpointer.addPointerPart(new XmlnsPointerPart(prefix, namespace));
View Full Code Here

Examples of org.apache.woden.types.NCName

     * @param qname the QName used to lookup the namespace and copy.
     * @return a QName with the new prefix, but same namespace and localpart.
     */
    public QName prefixQNameNamespace(QName qname) {
        //Get prefix for the fault QName in the XPointer.
        NCName prefix = getXmlNamespacePrefix(qname);
        return new QName(qname.getNamespaceURI(), qname.getLocalPart(), prefix.toString());
    }
View Full Code Here

Examples of org.apache.woden.types.NCName

     */
    public BindingPart(Binding binding) {
        if (binding == null) {
            throw new IllegalArgumentException();
        }
        this.binding = new NCName(binding.getName().getLocalPart());
    }
View Full Code Here

Examples of org.apache.woden.types.NCName

  {
  List messageLabels = new ArrayList();
  int numMessageReferences = messageReferences.length;
  for(int i = 0; i < numMessageReferences; i++)
  {
    NCName messageLabel = messageReferences[i].getMessageLabel();
      if(messageLabel == null)
          continue;
    if(messageLabels.contains(messageLabel))
    {
    errorReporter.reportError(new ErrorLocatorImpl(), "InterfaceMessageReference-1029", new Object[]{messageLabel}, ErrorReporter.SEVERITY_ERROR);
View Full Code Here

Examples of org.apache.woden.types.NCName

 
  int numFaultReferences = faultReferences.length;
  for(int i = 0; i < numFaultReferences; i++)
  {
    InterfaceFault fault = faultReferences[i].getInterfaceFault();
    NCName messageLabel = faultReferences[i].getMessageLabel();
      if(fault == null || messageLabel == null)
      continue;
    List messageLabels = (List)identifiers.get(fault);
    if(messageLabels != null && messageLabels.contains(messageLabel))
    {
View Full Code Here

Examples of org.apache.woden.types.NCName

      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac3.setName(new NCName("name1"));
         
      Interface[] interfaces = new Interface[]{interfac, interfac2, interfac3};
   
    if(val.testAssertionInterface1010(interfaces, reporter))
    {
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.