Package net.java.dev.wadl.x2009.x02

Examples of net.java.dev.wadl.x2009.x02.ApplicationDocument


  @Override
  protected void postProcessing( XmlObject obj, InterfaceDefinitionPart part )
  {
    if( part.getType().equals( Constants.WADL11_NS ) )
    {
      ApplicationDocument document = ( ApplicationDocument )obj;
      for( Resources resources : document.getApplication().getResourcesList() )
      {
        for( Resource resource : resources.getResourceList() )
        {
          for( Method method : resource.getMethodList() )
          {
View Full Code Here


public class WadlTestCase extends TestCase
{
  public void testWadl() throws Exception
  {
    ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
    Application application = applicationDocument.addNewApplication();
  }
View Full Code Here

public class WadlTest {

    @Test
    public void testWadl() throws Exception {
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        assertNotNull(application);
    }
View Full Code Here

    }

    @Override
    protected void postProcessing(XmlObject obj, InterfaceDefinitionPart part) {
        if (part.getType().equals(Constants.WADL11_NS)) {
            ApplicationDocument document = (ApplicationDocument) obj;
            for (Resources resources : document.getApplication().getResourcesList()) {
                for (Resource resource : resources.getResourceList()) {
                    for (Method method : resource.getMethodList()) {
                        if (method.getRequest() != null) {
                            fixRepresentations(method.getRequest().getRepresentationList());
                        }
View Full Code Here

            } else if (!element.getLocalName().equals("application")
                    || !element.getNamespaceURI().equals(Constants.WADL11_NS)) {
                throw new Exception("Document is not a WADL application with " + Constants.WADL11_NS + " namespace");
            }
            content = PropertyExpansionRemover.removeExpansions(content);
            ApplicationDocument applicationDocument = ApplicationDocument.Factory.parse(content);
            application = applicationDocument.getApplication();

            resourcesList = application.getResourcesList();

            service.setName(getFirstTitle(application.getDocList(), service.getName()));
View Full Code Here

                return m;
            }
        }

        try {
            ApplicationDocument applicationDocument = loadReferencedWadl(href);
            if (applicationDocument != null) {
                int ix = href.lastIndexOf('#');
                if (ix > 0) {
                    href = href.substring(ix + 1);
                }
View Full Code Here

        try {
            Application app = application;

            if (!href.startsWith("#")) {
                ApplicationDocument applicationDocument = loadReferencedWadl(href);
                app = applicationDocument.getApplication();
            }

            if (app != null) {
                int ix = href.lastIndexOf('#');
                if (ix >= 0) {
View Full Code Here

        try {
            Application app = application;

            if (!href.startsWith("#")) {
                ApplicationDocument applicationDocument = loadReferencedWadl(href);
                app = applicationDocument.getApplication();
            }

            if (app != null) {
                int ix = href.lastIndexOf('#');
                if (ix >= 0) {
View Full Code Here

                return resourceType;
            }
        }

        try {
            ApplicationDocument applicationDocument = loadReferencedWadl(id);
            if (applicationDocument != null) {
                int ix = id.lastIndexOf('#');
                if (ix > 0) {
                    id = id.substring(ix + 1);
                }

                for (ResourceTypeDocument.ResourceType resourceType : applicationDocument.getApplication()
                        .getResourceTypeList()) {
                    if (resourceType.getId().equals(id)) {
                        return resourceType;
                    }
                }
View Full Code Here

    private ApplicationDocument loadReferencedWadl(String id) throws URISyntaxException, XmlException, IOException {
        int ix = id.indexOf('#');
        if (ix != -1) {
            id = id.substring(0, ix);
        }
        ApplicationDocument applicationDocument = refCache.get(id);

        if (applicationDocument == null) {
            URI uri = new URI(id);
            applicationDocument = ApplicationDocument.Factory.parse(uri.toURL());
            refCache.put(id, applicationDocument);
View Full Code Here

TOP

Related Classes of net.java.dev.wadl.x2009.x02.ApplicationDocument

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.