Package org.oasisOpen.docs.wsrf.x2004.x10.wsrfWSResourceMetadataDescriptor10Draft01

Examples of org.oasisOpen.docs.wsrf.x2004.x10.wsrfWSResourceMetadataDescriptor10Draft01.SpecializesAttribute


        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addResource(resource, "json""format=json",  mashup, "application/json");
        addResource(resource, "xml",   "format=xml",   mashup, "application/xml");
        addResource(resource, "jsonp", "format=jsonp", mashup, "application/javascript");
       
View Full Code Here


        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addMethod(resource.addNewMethod(), "json", mashup, "application/json");
       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
    }
View Full Code Here

       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
    }
   
    private static void addResource(Resource resource, String format, String path, Mashup mashup, String mediaType) {
        Resource resource3 = resource.addNewResource();
        resource3.setPath(path);
        addMethod(resource3.addNewMethod(), format, mashup, mediaType);
    }
View Full Code Here

     * Converts the <code>Application</code> XMLBean into a <code>UnitActionPackage</code> object.
     * @param application  the <code>Application</code> XMLBean to convert.
     * @return the converted <code>UnitActionPackage</code> object.
     */
    public static UnitActionPackage convertWADLtoUnitActionPackage(final Application application) {
        Resources resources = application.getResources();
        String baseURL = resources.getBase();
        if (!baseURL.endsWith("/")) {
            baseURL += "/";
        }
        List<Resource> resourceList = resources.getResourceList();

        List<UnitAction> unitActionList = new ArrayList<UnitAction>();
        for (Resource resource : resourceList) {
            unitActionList.addAll(convertResourceToUnitAction(resource));
        }
View Full Code Here

    public static String generateWADLForMashupRESTService(String myCocktailPath, int mashupId) throws DAOException, IOException {
        Mashup mashup = getMashup(mashupId);
       
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addResource(resource, "json""format=json",  mashup, "application/json");
        addResource(resource, "xml",   "format=xml",   mashup, "application/xml");
        addResource(resource, "jsonp", "format=jsonp", mashup, "application/javascript");
View Full Code Here

    public static String generateWADLForMashupRESTServiceJSON(String myCocktailPath, int mashupId) throws DAOException, IOException {
        Mashup mashup = getMashup(mashupId);
       
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addMethod(resource.addNewMethod(), "json", mashup, "application/json");
       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
View Full Code Here

        ExecuteMethod executeMethod = new ExecuteMethod();
        executeMethod.setParameters(parameters);
        executeMethod.setUrl(path);
        executeMethod.setHttpMethod(methodName);

        Response response = method.getResponse();
        if (response != null) {
            Representation representation = response.getRepresentation();
            if (representation != null) {
                String mediaType = representation.getMediaType();
                executeMethod.setResponseType(mediaType);
            }
        }
View Full Code Here

        parentCursor.toPrevSibling();
        XmlObject childXBean = parentCursor.getObject();
        parentCursor.dispose();
        //BaseFaultDocument baseFaultDocument = BaseFaultDocument.Factory.newInstance( );
        //BaseFaultType baseFaultType = baseFaultDocument.addNewBaseFault();
        BaseFaultType baseFaultType = BaseFaultType.Factory.newInstance( );
        baseFaultType.setTimestamp( Calendar.getInstance( ) );
        childXBean.set( baseFaultType );
        System.out.println( "AFTER:\n" + oldValue.xmlText( new XmlOptions().setSaveOuter() ) );

        ResourcePropertyValueChangeNotificationDocument resourcePropertyValueChangeNotificationDocument1 = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType1 = resourcePropertyValueChangeNotificationDocument.addNewResourcePropertyValueChangeNotification();
View Full Code Here

      m_propSet = new XmlBeansResourcePropertySet( propsDoc, propSetMetaData );

      // wsrlw:ScheduledResourceTermination props
      ResourceProperty    prop        =
         m_propSet.get( ScheduledResourceTerminationPortType.PROP_QNAME_CURRENT_TIME );
      CurrentTimeDocument currTimeDoc = CurrentTimeDocument.Factory.newInstance(  );
      currTimeDoc.setCurrentTime( getCurrentTime(  ) );
      prop.setCallback( new CurrentTimeCallback(  ) );
      prop.add( currTimeDoc );
      prop = m_propSet.get( ScheduledResourceTerminationPortType.PROP_QNAME_TERMINATION_TIME );
      TerminationTimeDocument termTimeDoc = TerminationTimeDocument.Factory.newInstance(  );
      termTimeDoc.setTerminationTime( getTerminationTime(  ) );
View Full Code Here

        childElems = XmlBeanUtils.getChildElements( fooElem, new QName( "foo" ) );
        //assertEquals( 0, childElems.length );  // a bug in XmlBeans causes this assertion to fail

        resourcePropertyValueChangeNotificationType = ResourcePropertyValueChangeNotificationType.Factory.newInstance();
        oldValue = resourcePropertyValueChangeNotificationType.addNewOldValue();
        CurrentTimeDocument currentTimeDocument = CurrentTimeDocument.Factory.newInstance();
        currentTimeDocument.setCurrentTime( Calendar.getInstance( ) );
        XmlObject newXBean = XmlBeanUtils.copyXmlBean( currentTimeDocument.xgetCurrentTime() );
        XmlBeanUtils.addChildElement( oldValue, newXBean );
        childElems = XmlBeanUtils.getChildElements( oldValue, new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime" ) );
        assertEquals( 1, childElems.length );
        XmlObject currentTimeElem = childElems[0];
        childElems = XmlBeanUtils.getChildElements( currentTimeElem, new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime" ) );
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsrf.x2004.x10.wsrfWSResourceMetadataDescriptor10Draft01.SpecializesAttribute

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.