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


    {
        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

    public Element[] getMetadata(String dialect)
    {
        if (dialect != null && dialect.equals(WsrmdConstants.NAMESPACE_URI))
        {
            WsResource resource = (WsResource)getResource();
            MetadataDescriptor rmd = resource.getPropertyCollection().getMetadata();
            return new Element[]{ rmd.toXML() };
        }
       
        return super.getMetadata(dialect);
    }
View Full Code Here

        Document wsdl = WsdlUtils.createWSDL(getEnvironment(), getWsdlPath(), true);
       
        ResourcePropertiesSchema schema = createPropertiesSchema(wsdl);
        _properties.setSchema(schema);
       
        MetadataDescriptor metadata = createMetadataDescriptor(wsdl);
        _properties.setMetadata(metadata);
       
        //
        // use parent to initialize capabilities now that WSRP model is in place
        //
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

               
        //
        // read all of the wsnt:TopicExpression values from the RMD doc
        // and make sure we create Topic objects for them
        //
        MetadataDescriptor rmd = props.getMetadata();
       
        if (rmd.hasProperty(WsnConstants.TOPIC_EXPRESSION_QNAME))
        {
            Collection[] values = new Collection[2];
            values[0] = rmd.getInitialValues(WsnConstants.TOPIC_EXPRESSION_QNAME);
            values[1] = rmd.getStaticValues(WsnConstants.TOPIC_EXPRESSION_QNAME);
           
            for (int n = 0; n < values.length; ++n)
            {
                i = values[n].iterator();
               
View Full Code Here

        Document wsdl = WsdlUtils.createWSDL(getEnvironment(), getWsdlPath(), true);
       
        ResourcePropertiesSchema schema = createPropertiesSchema(wsdl);
        _properties.setSchema(schema);
       
        MetadataDescriptor metadata = createMetadataDescriptor(wsdl);
        _properties.setMetadata(metadata);
       
        //
        // use parent to initialize capabilities now that WSRP model is in place
        //
View Full Code Here

    public Element[] getMetadata(String dialect)
    {
        if (dialect != null && dialect.equals(WsrmdConstants.NAMESPACE_URI))
        {
            WsResource resource = (WsResource)getResource();
            MetadataDescriptor rmd = resource.getPropertyCollection().getMetadata();
            return new Element[]{ rmd.toXML() };
        }
       
        return super.getMetadata(dialect);
    }
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

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.