Examples of MetadataDescriptor


Examples of oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescriptor

     *
     * Be careful while changing order of processing.
     */
    protected MetadataDescriptor processEmbeddableClass() {
        final Class embeddableClass = getReferenceClass();
        MetadataDescriptor embeddableDescriptor = null;

        try {
            embeddableDescriptor = m_project.getDescriptor(embeddableClass);
        } catch (Exception exception) {
            // expected as we do lazy processing of embeddables.
        }

        if (embeddableDescriptor == null) {
            // The embeddable class is not yet processed, so process it now.
            embeddableDescriptor = new MetadataDescriptor(embeddableClass);
            // adding to projects sets up appropriate persistence-unit-defaults
            m_project.addDescriptor(embeddableDescriptor);
            embeddableDescriptor.setIgnoreAnnotations(isMetadataComplete(embeddableDescriptor));
            AccessType accessType = determineAccessTypeOfEmbedded(embeddableDescriptor);
            embeddableDescriptor.setUsesPropertyAccess(accessType == PROPERTY ? true : false);
            ClassAccessor embeddableAccessor = buildAccessor(embeddableDescriptor);
            embeddableAccessor.process();
            embeddableAccessor.setIsProcessed();
        } else {
            // We have already processed this embeddable class. let's validate
            // that it is not used in entities with conflicting access type.
            // Conflicting access-type is not allowed when there is no metadata
            // in the embeddable class.
            if (!isMetadataPresent(embeddableDescriptor)) {
                boolean embeddableUsesPropertyAccess = embeddableDescriptor.usesPropertyAccess();
                boolean entityUsesPropertyAccess = m_descriptor.usesPropertyAccess();

                if (embeddableUsesPropertyAccess != entityUsesPropertyAccess) {
                    m_validator.throwConflictingAccessTypeInEmbeddable(embeddableClass);
                }
View Full Code Here

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

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

    {
        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

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

    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

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

        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

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

        }
    }
   
    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

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

   
    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

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

               
        //
        // 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

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

        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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.