Examples of XmlQName


Examples of org.apache.xmlbeans.XmlQName

        if (type.isQNameEnumeration())
        {
            for (int i = 0; i < type.getEnumerationQNames().size(); i++)
            {
                QName value = (QName) type.getEnumerationQNames().get(i);
                XmlQName xqname = XmlQName.Factory.newValue(value);

                org.apache.xmlbeans.impl.xb.xsdschema.NoFixedFacet enumSElem = restriction.addNewEnumeration();
                XmlCursor xc  = enumSElem.newCursor();

                String newPrefix = xc.prefixForNamespace(value.getNamespaceURI());
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

        CorrelatablePropertiesType correlatableProperties = (CorrelatablePropertiesType)correlatablePropertiesPropElem;
        assertEquals( "Incorrect dialect", MuwsConstants.PBM_DIALECT, correlatableProperties.getDialect() );
        XmlObject[] matchElems = XmlBeanUtils.getChildElements( correlatableProperties, new QName( MuwsConstants.NSURI_PBM, "Match", MuwsConstants.NSPREFIX_PBM ) );
        assertEquals( "muws-p1-xs:CorrelatableProperties element does not contain exactly one pbm:Match element.", 1, matchElems.length );
        assertTrue( matchElems[0] instanceof XmlQName );
        XmlQName match = (XmlQName) matchElems[0];
        assertEquals( WeatherstationPropertyQNames.FCCID, match.getQNameValue() );

        // get weather station resource #2
        EndpointReferenceDocument weatherStation2EprDoc = getEndpointReference( new URL( WEATHER_STATION_2_EPR_URL ) );
        ResourceStub resource2 = new ResourceStub(new XmlBeansEndpointReference( weatherStation2EprDoc.getEndpointReference()) ); //resource2
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

        if (type.isQNameEnumeration())
        {
            for (int i = 0; i < type.getEnumerationQNames().size(); i++)
            {
                QName value = (QName) type.getEnumerationQNames().get(i);
                XmlQName xqname = XmlQName.Factory.newValue(value);

                org.apache.xmlbeans.impl.xb.xsdschema.NoFixedFacet enumSElem = restriction.addNewEnumeration();
                XmlCursor xc  = enumSElem.newCursor();

                String newPrefix = xc.prefixForNamespace(value.getNamespaceURI());
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

        CorrelatablePropertiesType correlatableProperties = (CorrelatablePropertiesType)correlatablePropertiesPropElem;
        assertEquals( "Incorrect dialect", MuwsConstants.PBM_DIALECT, correlatableProperties.getDialect() );
        XmlObject[] matchElems = XmlBeanUtils.getChildElements( correlatableProperties, new QName( MuwsConstants.NSURI_PBM, "Match", MuwsConstants.NSPREFIX_PBM ) );
        assertEquals( "muws-p1-xs:CorrelatableProperties element does not contain exactly one pbm:Match element.", 1, matchElems.length );
        assertTrue( matchElems[0] instanceof XmlQName );
        XmlQName match = (XmlQName) matchElems[0];
        assertEquals( WeatherstationPropertyQNames.FCCID, match.getQNameValue() );

        // get weather station resource #2
        EndpointReferenceDocument weatherStation2EprDoc = getEndpointReference( new URL( WEATHER_STATION_2_EPR_URL ) );
        ResourceStub resource2 = new ResourceStub(new XmlBeansEndpointReference( weatherStation2EprDoc.getEndpointReference()) ); //resource2
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

        XmlCursor sourceCursor = sourceDocument.newCursor();

        sourceCursor.toFirstChild();

        XmlQName sourceQName = (XmlQName) sourceCursor.getObject();

        XmlObject targetDocument =
            stl.parse(
                "<any " + ns + " xsi:type='xs:QName'>" +
                    "</any>", null, null );

        XmlCursor targetCursor = targetDocument.newCursor();

        targetCursor.toFirstChild();

        XmlQName targetQName = (XmlQName) targetCursor.getObject();

        targetQName.set( sourceQName );

        Assert.assertTrue(
            targetQName.qNameValue().getNamespaceURI().equals( "xxx.com" ) );

        //
        // Test the set_text function on XmlQNameImpl
        //
       
        targetDocument =
            stl.parse(
                "<any " + ns + " xsi:type='xs:QName' xmlns:xxx='xxx.com'>" +
                    "</any>", null, null );

        targetCursor = targetDocument.newCursor();

        targetCursor.toFirstChild();

        targetQName = (XmlQName) targetCursor.getObject();

        try
        {
            targetQName.set( "zzz:abc" );
           
            Assert.assertTrue( false ); // Must fail
        }
        catch ( Throwable t )
        {
        }
       
        targetQName.set( "xxx:abc" );
       
        Assert.assertTrue(
            targetQName.qNameValue().getNamespaceURI().equals( "xxx.com" ) );
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

        if (type.isQNameEnumeration())
        {
            for (int i = 0; i < type.getEnumerationQNames().size(); i++)
            {
                QName value = (QName) type.getEnumerationQNames().get(i);
                XmlQName xqname = XmlQName.Factory.newValue(value);

                org.apache.xmlbeans.impl.xb.xsdschema.NoFixedFacet enumSElem = restriction.addNewEnumeration();
                XmlCursor xc  = enumSElem.newCursor();

                String newPrefix = xc.prefixForNamespace(value.getNamespaceURI());
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

        XmlCursor sourceCursor = sourceDocument.newCursor();

        sourceCursor.toFirstChild();

        XmlQName sourceQName = (XmlQName) sourceCursor.getObject();

        XmlObject targetDocument =
            stl.parse(
                "<any " + ns + " xsi:type='xs:QName'>" +
                    "</any>", null, null );

        XmlCursor targetCursor = targetDocument.newCursor();

        targetCursor.toFirstChild();

        XmlQName targetQName = (XmlQName) targetCursor.getObject();

        targetQName.set( sourceQName );

        Assert.assertTrue(
            targetQName.qNameValue().getNamespaceURI().equals( "xxx.com" ) );

        //
        // Test the set_text function on XmlQNameImpl
        //
       
        targetDocument =
            stl.parse(
                "<any " + ns + " xsi:type='xs:QName' xmlns:xxx='xxx.com'>" +
                    "</any>", null, null );

        targetCursor = targetDocument.newCursor();

        targetCursor.toFirstChild();

        targetQName = (XmlQName) targetCursor.getObject();

        try
        {
            targetQName.set( "zzz:abc" );
           
            Assert.assertTrue( false ); // Must fail
        }
        catch ( Throwable t )
        {
        }
       
        targetQName.set( "xxx:abc" );
       
        Assert.assertTrue(
            targetQName.qNameValue().getNamespaceURI().equals( "xxx.com" ) );
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

  cid.getServiceDataManager();
      ServiceDataElementFactory sdeFactory =
  ServiceDataElementFactory.getDefault();
     
      // an SDE for the name of the Component
      XmlQName serviceQName = XmlQName.Factory.newInstance();
      serviceQName.setQNameValue(new QName("http://www.extreme.indiana.edu/xcat/ccacore/componentID",
             instanceName));
      ServiceDataElement serviceNameSDE =
  sdeFactory.newServiceDataElement(new QName(OGSI.OGSI_NS,
               "instanceName"),
           serviceQName);
View Full Code Here

Examples of org.apache.xmlbeans.XmlQName

  cid.getServiceDataManager();
      ServiceDataElementFactory sdeFactory =
  ServiceDataElementFactory.getDefault();
     
      // an SDE for the name of the Component
      XmlQName serviceQName = XmlQName.Factory.newInstance();
      serviceQName.setQNameValue(new QName("http://www.extreme.indiana.edu/xcat/ccacore/componentID",
             instanceName));
      ServiceDataElement serviceNameSDE =
  sdeFactory.newServiceDataElement(new QName(OGSI.OGSI_NS,
               "instanceName"),
           serviceQName);
View Full Code Here

Examples of org.camunda.bpm.model.xml.impl.util.XmlQName

      document.appendChild(newDocumentElement);
    }
  }

  public DomElement createElement(String namespaceUri, String localName) {
    XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
    Element element = document.createElementNS(xmlQName.getNamespaceUri(), xmlQName.getPrefixedName());
    return new DomElementImpl(element);
  }
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.