org.wso2.carbon.registry.core.Resource.getDescription()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中org.wso2.carbon.registry.core.Resource.getDescription方法的一些代码示例,展示了Resource.getDescription的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resource.getDescription方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Resource
类名称:Resource
方法名:getDescription

Resource.getDescription介绍

暂无

代码示例

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.mashup.javascript.hostobjects.registry

public String jsGet_description() {
  return this.resource.getDescription();
}

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

String description = metadata.getDescription();
if (description == null) {
  Element documentationElement = originalDefinition.getDocumentationElement();

代码示例来源:origin: org.wso2.greg/org.wso2.carbon.governance.samples.shutterbug

sbImage.setDescription(resource.getDescription());
sbUser.addImage(sbImage);

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

String description = metadata.getDescription();
if (description == null) {
  Element documentationElement = originalDefinition.getDocumentationElement();

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.indexing

"collection" : "resource");
resourceData.setAuthorUserName(child.getAuthorUserName());
resourceData.setDescription(child.getDescription());
resourceData.setAverageRating(registry.getAverageRating(child.getPath()));
Calendar createdDateTime = Calendar.getInstance();

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

public static void updateTextContent(String path, String contentText, Registry registry)
      throws Exception {

    try {
      Resource resource = registry.get(path);
      String mediaType = resource.getMediaType();
      if (resource.getProperty(RegistryConstants.REGISTRY_LINK) != null &&
          (CommonConstants.WSDL_MEDIA_TYPE.equals(mediaType) ||
              CommonConstants.SCHEMA_MEDIA_TYPE.equals(mediaType))) {
        String description = resource.getDescription();
        Properties properties = (Properties) resource.getProperties().clone();
        resource = registry.newResource();
        resource.setMediaType(mediaType);
        resource.setDescription(description);
        resource.setProperties(properties);
      }
      resource.setContent(RegistryUtils.encodeString(contentText));
      registry.put(path, resource);
      resource.discard();

    } catch (RegistryException e) {

      String msg = "Could not update the content of the resource " +
          path + ". Caused by: " + ((e.getCause() instanceof SQLException) ?
          "" : e.getMessage());
      log.error(msg, e);
      throw new RegistryException(msg, e);
    }
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

wsdlResource.setDescription(metadata.getDescription());

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

xsdResource.setDescription(metaResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.indexing

"collection" : "resource");
resourceData.setAuthorUserName(child.getAuthorUserName());
resourceData.setDescription(child.getDescription());
resourceData.setAverageRating(registry.getAverageRating(child.getPath()));
Calendar createdDateTime = Calendar.getInstance();

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

private NodeType getNodetype() throws RepositoryException {
    NodeType ntType = null;
    if (resource.getDescription() != null) {
      ntType = registrySession.getWorkspace().getNodeTypeManager().
          getNodeType(resource.getDescription());
    } else {
      try {
        String parPath = "";

//                if(resource.getParentPath().equals(registrySession.getWorkspaceRootPath())) { // Map registry root node path to "/"
//                    parPath = "/";
//                } else {
        parPath = resource.getParentPath();
//                }
        String ntName = registrySession.getUserRegistry().get(parPath).getDescription();
        ntType = registrySession.getWorkspace().getNodeTypeManager().
            getNodeType(ntName);
      } catch (RegistryException e) {
        log.error("Error occurred while getting node type");
      }
    }
    return ntType;
  }

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.indexing

: "resource");
resourceData.setAuthorUserName(child.getAuthorUserName());
resourceData.setDescription(child.getDescription());
resourceData.setAverageRating(registry
    .getAverageRating(child.getPath()));

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

wsdlResource.setDescription(metaDataResource.getDescription());

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.ws.client

public static WSResource transformResourceToWSResource(Resource resource, DataHandler dataHandler) {
  WSResource wsResource = new WSResource();
  wsResource.setContentFile(dataHandler);
  wsResource.setAuthorUserName(resource.getAuthorUserName());
  if (resource.getCreatedTime() != null) wsResource.setCreatedTime(resource.getCreatedTime().getTime());
  //         wsResource.setDbBasedContentID(resource)
  wsResource.setDescription(resource.getDescription());
  wsResource.setId(resource.getId());
  if (resource.getLastModified() != null) wsResource.setLastModified(resource.getLastModified().getTime());
  wsResource.setLastUpdaterUserName(resource.getLastUpdaterUserName());
  //         wsResource.setMatchingSnapshotID(resource.get)
  wsResource.setMediaType(resource.getMediaType());
  //         wsResource.setName(resource.)
  wsResource.setParentPath(resource.getParentPath());
  wsResource.setPath(resource.getPath());
  //         wsResource.setPathID();
  wsResource.setPermanentPath(resource.getPermanentPath());
  if (!resource.getProperties().isEmpty()) wsResource.setProperties(getPropertiesForWSResource(resource.getProperties()));
  wsResource.setState(resource.getState());
  wsResource.setUUID(resource.getUUID());
  //         resource.get
  return wsResource;
}

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.api

String description = oldResource.getDescription();
if(description != null) {
  resource.setDescription(description);

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

CommonConstants.COLLECTION : CommonConstants.RESOURCE);
resourceData.setAuthorUserName(child.getAuthorUserName());
resourceData.setDescription(child.getDescription());
resourceData.setAverageRating(registry.getAverageRating(child.getPath()));
Calendar createDateTime = Calendar.getInstance();

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.indexing

"collection" : "resource");
resourceData.setAuthorUserName(child.getAuthorUserName());
resourceData.setDescription(child.getDescription());
resourceData.setAverageRating(registry.getAverageRating(child.getPath()));
Calendar createdDateTime = Calendar.getInstance();

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.resource

bean.setDescription(resource.getDescription());
bean.setLastUpdater(resource.getLastUpdaterUserName());
bean.setMediaType(resource.getMediaType());

相关文章