Package thredds.catalog2

Examples of thredds.catalog2.ThreddsMetadata$Documentation


            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.DOCUMENTATION: {
            Documentation documentation = (Documentation) theEObject;
            T result = caseDocumentation(documentation);
            if (result == null)
                result = caseBaseElement(documentation);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here


 
  public static void setDocumentation(BaseElement baseElement,String documentationText){
    List<Documentation> documentations=baseElement.getDocumentation();
    if(documentations==null){
      documentations=new ArrayList<Documentation>();
      Documentation documentation=Bpmn2Factory.eINSTANCE.createDocumentation();
      documentation.setText(documentationText);
      documentations.add(documentation);
      return;
    }
    if(documentations.size()==0){
      Documentation documentation=Bpmn2Factory.eINSTANCE.createDocumentation();
      documentation.setText(documentationText);
      documentations.add(documentation);
      return;
    }
    else{
      documentations.get(0).setText(documentationText);
View Full Code Here

        }
        return properties;
    }

    private Documentation createDocumentation(String text) {
        Documentation doc = Bpmn2Factory.eINSTANCE.createDocumentation();
        doc.setText(text);
        return doc;
    }
View Full Code Here

      StringBuilder stringBuilder = new StringBuilder( "Invalid access: ").append( issues.toString() );
      fail( stringBuilder.toString() );
    }

    // Build
    Access access = null;
    try
    { access = accessImpl.build(); }
    catch ( BuilderException e )
    { fail( "Build failed: " + e.getMessage() ); }
View Full Code Here

    accessImpl.setServiceBuilder( serviceBuilder );
    accessImpl.setUrlPath( urlPath );
    accessImpl.setDataSize( dataSize );
    accessImpl.setDataFormat( formatType );

    Access access;
    try
    { access = accessImpl.build(); }
    catch( BuilderException e )
    { fail( "Build failed: " + e.getMessage() ); return; }

    assertTrue( access.getService().getName().equals( serviceName ) );
    assertTrue( access.getUrlPath().equals( urlPath ) );
    assertTrue( access.getDataSize() == dataSize );
    assertTrue( access.getDataFormat().equals( formatType ) );
  }
View Full Code Here

    accessImpl.setServiceBuilder( serviceBuilder );
    accessImpl.setUrlPath( urlPath );
    accessImpl.setDataSize( dataSize );
    accessImpl.setDataFormat( formatType );

    Access access;
    try
    { access = accessImpl.build(); }
    catch( BuilderException e )
    { fail( "Build failed: " + e.getMessage() ); return; }
View Full Code Here

    assertEquals( wmsService, services.get( 2 ) );

    // Test that Service methods succeed after build.
    List<Property> propList = s.getProperties();
    assertEquals( 2, propList.size() );
    Property prop1 = propList.get( 0 );
    Property prop2 = propList.get( 1 );

    assertEquals( "propName1", prop1.getName() );
    assertEquals( "propName2", prop2.getName() );

    assertEquals( "propValue1", prop1.getValue() );
    assertEquals( "propValue2", prop2.getValue() );
  }
View Full Code Here

    assertFalse( "New property container has property [name].",
                 pc.containsPropertyName( "name" ));
    assertTrue( "New property container list of properties not empty.",
                pc.getProperties().isEmpty());
    Property prop = pc.getPropertyByName( "name" );
    if ( prop != null )
      fail( "New property container holds unexpected property [name]/["+prop.getValue()+"].");
    assertTrue( "New property container list of property names not empty.",
                pc.getPropertyNames().isEmpty());
    String value = pc.getPropertyValue( "name" );
    if ( value != null )
      fail( "New property container holds unexpected property value [name]/["+value+"].");
View Full Code Here

  public void testNormal()
  {
    String name = "a name";
    String value = "a value";
    Property p = null;
    try
    { p = new PropertyImpl( name, value ); }
    catch ( IllegalArgumentException e )
    { fail( "Unexpected IllegalArgumentException: " + e.getMessage() ); }
    catch ( Exception e )
    { fail( "Unexpected Non-IllegalArgumentException: " + e.getMessage()); }

    assertTrue( "Property name [" + p.getName() + "] not as expected [" + name + "].",
                p.getName().equals( name));
    assertTrue( "Property value [" + p.getValue() + "] not as expected [" + value + "].",
                p.getValue().equals( value));
  }
View Full Code Here

    BuilderIssues issues = this.allService.getIssues();
    assertTrue( issues.toString(), issues.isValid());
    assertTrue( issues.toString(), issues.isEmpty());

    // Build
    Service s = this.allService.build();

    assertNotNull( s);
    assertTrue( this.allService.isBuilt() );

    assertEquals( allName, s.getName() );
    assertEquals( allType, s.getType() );
    assertEquals( allBaseUri, s.getBaseUri() );

    assertEquals( odapService, s.getServiceByName( odapName ) );
    assertEquals( wcsService, s.getServiceByName( wcsName ) );
    assertEquals( wmsService, s.getServiceByName( wmsName ) );

    assertEquals( odapService, s.findServiceByNameGlobally( odapName ) );
    assertEquals( wcsService, s.findServiceByNameGlobally( wcsName ) );
    assertEquals( wmsService, s.findServiceByNameGlobally( wmsName ) );

    List<Service> services = s.getServices();
    assertFalse( services.isEmpty() );
    assertEquals( 3, services.size() );

    assertEquals( odapService, services.get( 0 ) );
    assertEquals( wcsService, services.get( 1 ) );
    assertEquals( wmsService, services.get( 2 ) );

    // Test that Service methods succeed after build.
    List<Property> propList = s.getProperties();
    assertEquals( 2, propList.size() );
    Property prop1 = propList.get( 0 );
    Property prop2 = propList.get( 1 );

    assertEquals( "propName1", prop1.getName() );
View Full Code Here

TOP

Related Classes of thredds.catalog2.ThreddsMetadata$Documentation

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.