Package org.openquark.cal.services

Examples of org.openquark.cal.services.WorkspaceResource


        if (workspaceDeclarationManager != null) {
            ResourceStore resourceStore = workspaceDeclarationManager.getResourceStore();
           
           
            for (Iterator<WorkspaceResource> it = resourceStore.getResourceIterator(); it.hasNext(); ) {
                final WorkspaceResource decl = it.next();
                cwsNames.add(decl.getIdentifier().getFeatureName().getName());
            }
        }
       
        Collections.sort(cwsNames);
       
View Full Code Here


       
        if (workspaceDeclarationManager != null) {
            ResourceStore resourceStore = workspaceDeclarationManager.getResourceStore();
           
            for (Iterator<WorkspaceResource> it = resourceStore.getResourceIterator(); it.hasNext(); ) {
                final WorkspaceResource decl = it.next();
               
                if (workspaceName.equals(decl.getIdentifier().getFeatureName().getName())) {
                    newStreamProvider = new WorkspaceDeclaration.StreamProvider() {
                       
                        public String getName() {
                            return decl.getIdentifier().getFeatureName().getName();
                        }
                       
                        public String getLocation() {
                            return workspaceLocation;
                        }
                       
                        public InputStream getInputStream(VaultRegistry vaultRegistry, Status status) {
                            return decl.getInputStream(status);
                        }
                       
                        public String getDebugInfo(VaultRegistry vaultRegistry) {
                            return decl.getDebugInfo();
                        }

                        @Override
                        public String toString() {
                            return getName();
View Full Code Here

               
                // Loop over all metadata resources for the module in the workspace and get their corresponding metadata file.
                for (Iterator<WorkspaceResource> it = ((MetadataStore)metadataManager.getResourceStore()).getResourceIterator(moduleName); it.hasNext(); ) {
                    boolean metadataUpdated = false;
                   
                    WorkspaceResource metadataResource = it.next();
                    if (statusListener != null) {
                        statusListener.willUseResource(metadataResource);
                    }
                   
                    ResourceName oldMetadataResourceName = metadataResource.getIdentifier().getResourceName();
                    Locale metadataLocale = LocalizedResourceName.localeOf(oldMetadataResourceName);
                   
                    // We want to keep a copy of the old metadata without any changes made to it so we can restore it later if an error occurs.
                    CALFeatureMetadata oldMetadata = metadataManager.getMetadata((CALFeatureName)oldMetadataResourceName.getFeatureName(), metadataLocale);
                   
View Full Code Here

        if (workspaceDeclarationManager != null) {
            ResourceStore resourceStore = workspaceDeclarationManager.getResourceStore();
            Iterator<WorkspaceResource> it = resourceStore.getResourceIterator();
           
            while (it.hasNext()) {
                final WorkspaceResource decl = it.next();
                providers.add(new ResourceBasedWorkspaceDeclarationStreamProvider(decl, workspaceLocation));
            }
        }
       
        Collections.sort(providers, new Comparator<Object>() {
View Full Code Here

                ModuleNameResolver moduleNameResolver = workspaceManager.getModuleTypeInfo(moduleName).getModuleNameResolver();
                GemDesignManager designManager = (GemDesignManager)workspace.getResourceManager(moduleName, WorkspaceResource.GEM_DESIGN_RESOURCE_TYPE);
               
                // loop through the resources for this module
                for (Iterator<WorkspaceResource> it = ((GemDesignStore)designManager.getResourceStore()).getResourceIterator(moduleName); it.hasNext(); ) {
                    WorkspaceResource designResource = it.next();
                   
                    GemDesign gemDesign = GemDesign.loadGemDesign(designResource, new Status("Load Design Status"));
                   
                    Document designDoc = gemDesign.getDesignDocument();
                    Document oldDesignDoc = (Document)designDoc.cloneNode(true);
View Full Code Here

                    ResourceManager metadataResourceManager = getWorkspace().getResourceManager(moduleName, WorkspaceResource.METADATA_RESOURCE_TYPE);
                   
                    MetadataStore metadataStore = (MetadataStore)metadataResourceManager.getResourceStore();
                    if (metadataStore.isWriteable()) {
                        for (Iterator<WorkspaceResource> it = metadataStore.getResourceIterator(moduleName); it.hasNext(); ) {
                            WorkspaceResource metadataResource = it.next();
                            ResourceIdentifier identifier = metadataResource.getIdentifier();
                            CALFeatureName featureName = (CALFeatureName)identifier.getFeatureName();
                            Locale locale = LocalizedResourceName.localeOf(identifier.getResourceName());
                            if (getWorkspace().getMetaModule(featureName.toModuleName()) != null) {
                                CALFeatureMetadata metadata = getWorkspace().getMetadata(featureName, locale);
                                if (!getWorkspace().saveMetadata(metadata)) {
View Full Code Here

TOP

Related Classes of org.openquark.cal.services.WorkspaceResource

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.