Package org.apache.muse.ws.resource.metadata

Examples of org.apache.muse.ws.resource.metadata.MetadataDescriptor


       
        //
        // get the metadata for the metric
        //
        ResourcePropertyCollection props = _resource.getPropertyCollection();
        MetadataDescriptor metadata = props.getMetadata();

        if (!metadata.isReadOnlyExternal(name))
        {
            Object[] filler = { name };
            throw new RuntimeException(_MESSAGES.get("NotReadOnly", filler));
        }
       
        String change = metadata.getExtendedMetadata(name, MuwsConstants.CHANGE_TYPE_QNAME);
        String gathering = metadata.getExtendedMetadata(name, MuwsConstants.GATHERING_QNAME);
        String time = metadata.getExtendedMetadata(name, MuwsConstants.TIME_SCOPE_QNAME);
       
        //
        // required values (will throw if values are invalid)
        //
        _changeType = getChangeType(change);
        _gatheringTime = getGatheringTime(gathering);
        _timeScope = getTimeScope(time);

        //
        // optional values
        //
       
        _intervalString = metadata.getExtendedMetadata(name, MuwsConstants.CALC_INTERVAL_QNAME);

        if (_intervalString != null)
            _interval = XsdUtils.getDuration(_intervalString);
       
        _group = metadata.getExtendedMetadata(name, MuwsConstants.METRIC_GROUP_QNAME);
       
        //
        // sanity check: if it's an Interval, it needs... an interval!
        //
        if (isInterval() && getIntervalString() == null)
View Full Code Here


   
    createConfigIni(_targetDirectory, OsgiProjectizerConstants.CONFIG_FILE_RESOURCE, OsgiProjectizerConstants.CONFIG_FILE);
   
    for(int i=0; i < _capabilitiesList.length; i++) {
      Map capabilities = _capabilitiesList[i];
      MetadataDescriptor rmd = _metadatas[i];
     
      createRMDFile(rmd, _wsdls[i], wsdldir);
      Document wsdl = _wsdls[i];
      createDescriptor(_descriptor, wsdl, descriptorFile, capabilities, Axis2ProjectizerConstants.WSDL_RELATIVE_PATH, i);
      createWSDLFile(wsdl, wsdldir);     
View Full Code Here

   * @param env
   * @param wsdlDocument
   * @return A metadata descriptor or null if one could not be found.
   */
  public static MetadataDescriptor getMetadataDescriptor(String wsdlPath, Environment env, Document wsdlDocument) {
    MetadataDescriptor metadata = null;
   
    Element portType = WsdlUtils.getFirstPortType(wsdlDocument);
    if(portType != null) {
      QName descQname = WsrmdConstants.DESCRIPTOR_ATTR_QNAME;
      String descName = portType.getAttributeNS(descQname.getNamespaceURI(), descQname.getLocalPart());
View Full Code Here

    ServicesDescriptorHelper servicesHelper = new ServicesDescriptorHelper();
   
    for(int i=0; i < _capabilitiesList.length; i++) {
      Map capabilities = _capabilitiesList[i];
      Document wsdl = _wsdls[i];
      MetadataDescriptor rmd = _metadatas[i];
     
      createDescriptor(
          _descriptor,
          wsdl,
          descriptorFile,
View Full Code Here

    JavaProperty javaProperty = new JavaProperty();
   
    javaProperty.setQName(property);
    javaProperty.setJavaType(inspector.getPropertyType(property));   
       
    MetadataDescriptor metadata = inspector.getMetadata();
   
    //
    // Need to check to see if the metadata document
    // has the given property. This isn't always true since metadata
    // is optional
    //
    if(!metadata.hasProperty(property)) {
      metadata = OpenMetadataDescriptor.getInstance();
    }
   
    javaProperty.setMetadata(metadata);
   
View Full Code Here

    {
        super.initialize();
       
        WsResource resource = getWsResource();
        ResourcePropertyCollection props = resource.getPropertyCollection();
        MetadataDescriptor metadata = props.getMetadata();
       
        //
        // load all of the metric data from the RMD
        //
        Iterator i = metadata.getPropertyNames().iterator();
       
        while (i.hasNext())
        {
            QName qname = (QName)i.next();
            String capability = metadata.getExtendedMetadata(qname, MuwsConstants.CAPABILITY_QNAME);
           
            //
            // a property is a metric IF it defines a Capability element in
            // its RMD definition with the Metrics capability URI
            //
View Full Code Here

    File routerEntriesDir = new File(webContentDir,MiniProjectizerConstants.ROUTER_ENTRIES_DIR);
       
    for(int i=0; i < _capabilitiesList.length; i++) {
      Map capabilities = _capabilitiesList[i];
      Document wsdl = _wsdls[i];
      MetadataDescriptor rmd = _metadatas[i];
     
      createDescriptor(_descriptor, wsdl, descriptorFile, capabilities, MiniProjectizerConstants.WSDL_RELATIVE_PATH, i);           
      createWSDLFile(wsdl, wsdldir)
      createRMDFile(rmd, wsdl, wsdldir);
      createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), capabilities);
View Full Code Here

    createConfigIni(_targetDirectory, OsgiProjectizerConstants.CONFIG_FILE_RESOURCE, OsgiProjectizerConstants.CONFIG_FILE);
   
    for(int i=0; i < _capabilitiesList.length; i++) {
      Map capabilities = _capabilitiesList[i];
      Document wsdl = _wsdls[i];
      MetadataDescriptor rmd = _metadatas[i];
     
      createRMDFile(rmd, wsdl, wsdldir);
      createDescriptor(_descriptor, wsdl, descriptorFile, capabilities, Axis2ProjectizerConstants.WSDL_RELATIVE_PATH, i);
      createWSDLFile(wsdl, wsdldir);     
      createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), capabilities);
View Full Code Here

        }
    }
   
    protected void addPermissions(QName qname)
    {
        MetadataDescriptor metadata = getMetadata();
       
        //
        // make sure read-only properties aren't modified from the
        // outside (can still be mutable inside)
        //
        boolean readOnly = metadata.isReadOnlyExternal(qname);
        PropertyChangeApprover security = new ExternalChangeApprover(qname, readOnly);
        security.setSecurityToken(getSecurityToken());
        addChangeApprover(security);
       
        //
        // if we can't update, we're either appendable (insert only)
        // or constant (read only). we need an enforcer!
        //
        if (!metadata.canUpdate(qname))
        {
            PropertyChangeApprover approver = null;
           
            //
            // insert only
            //
            if (metadata.canInsert(qname))
                approver = new InsertOnlyApprover(qname);
           
            //
            // read only
            //
View Full Code Here

   
    protected void deleteMutableProperties()
        throws BaseFault
    {
        Iterator i = getPropertyNames().iterator();
        MetadataDescriptor metadata = getMetadata();
       
        while (i.hasNext())
        {
            QName propName = (QName)i.next();
           
            if (metadata.canDelete(propName) && !metadata.isReadOnlyExternal(propName))
            {
                //
                // check if there are any instances to delete
                //
                Element[] instances = getResourceProperty(propName);
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.resource.metadata.MetadataDescriptor

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.