gpt4 book ai didi

org.apache.abdera.model.Workspace类的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 08:07:05 26 4
gpt4 key购买 nike

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

Workspace介绍

[英]An Atom Publishing Protocol Introspection Document workspace element.

Per APP Draft-08

The "app:workspace" element contains information elements about the 
collections of resources available for editing.  The app:workspace 
element MUST contain one or more app:collection elements. 
appWorkspace = 
element app:workspace { 
appCommonAttributes, 
( atomTitle 
& appCollection 
& extensionElement* ) 
}

[中]Atom发布协议自省文档工作区元素。
根据APP草稿-08

The "app:workspace" element contains information elements about the 
collections of resources available for editing.  The app:workspace 
element MUST contain one or more app:collection elements. 
appWorkspace = 
element app:workspace { 
appCommonAttributes, 
( atomTitle 
& appCollection 
& extensionElement* ) 
}

代码示例

代码示例来源:origin: org.apache.abdera/abdera-server

public Workspace asWorkspaceElement(RequestContext request) {
    Workspace workspace = request.getAbdera().getFactory().newWorkspace();
    workspace.setTitle(title);
    for (CollectionInfo collection : this.collections)
      workspace.addCollection(collection.asCollectionElement(request));
    return workspace;
  }
}

代码示例来源:origin: org.apache.abdera/abdera-parser

public Collection getCollection(String workspace, String collection) {
  Collection col = null;
  Workspace w = getWorkspace(workspace);
  if (w != null) {
    col = w.getCollection(collection);
  }
  return col;
}

代码示例来源:origin: org.apache.abdera/abdera-parser

public Collection getCollectionThatAccepts(String... types) {
  Collection collection = null;
  for (Workspace workspace : getWorkspaces()) {
    collection = workspace.getCollectionThatAccepts(types);
    if (collection != null)
      break;
  }
  return collection;
}

代码示例来源:origin: org.xcmis/xcmis-restatom

ws.setTitle(info.getRepositoryName());
RepositoryInfoTypeElement repoInfoElement = ws.addExtension(AtomCMIS.REPOSITORY_INFO);
repoInfoElement.addSimpleExtension(AtomCMIS.REPOSITORY_ID, info.getRepositoryId());
repoInfoElement.addSimpleExtension(AtomCMIS.REPOSITORY_NAME, info.getRepositoryName());
  String collectionType = cmisCollectionInfo.getCollectionType();
  if (AtomCMIS.COLLECTION_TYPE_ROOT.equals(collectionType))
   ws.addCollection(((CmisCollectionInfo)collectionInfo).asCollectionElement(request, repoPath, info
     .getRootFolderId()));
  else
   ws.addCollection(((CmisCollectionInfo)collectionInfo).asCollectionElement(request, repoPath));

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-atom-runtime

workspace.setTitle(title);
} else {
  workspace.setTitle("workspace");
workspace.setBaseUri( new IRI( workspaceURL ));
Collection collection = workspace.addCollection("collection", href );
Feed feed = getFeed( request );
if ( feed != null ) {
  collection.addCategories().setFixed(false);
workspace.addCollection(collection);
service.addWorkspace(workspace);

代码示例来源:origin: org.apache.abdera/abdera-parser

public Workspace addWorkspace(String title) {
  complete();
  FOMFactory fomfactory = (FOMFactory)factory;
  Workspace workspace = fomfactory.newWorkspace(this);
  workspace.setTitle(title);
  return workspace;
}

代码示例来源:origin: org.fuzzydb.atom/org.fuzzydb.abdera.util

private Document<Service> init_service_doc(Abdera abdera) {
  Factory factory = abdera.getFactory();
  Service service = factory.newService();
  Workspace workspace = service.addWorkspace("Simple");
  try {
    Collection collection = workspace.addCollection("Simple", "atom/feed");
    collection.setAccept("entry");
    collection.addCategories().setFixed(false);
  } catch (Exception e) {
    e.printStackTrace();
  } // FIXME: Document this exception
  return service.getDocument();
}

代码示例来源:origin: org.apache.abdera/abdera-extensions-json

jstream.writeField("xml:base", element.getResolvedBaseUri());
Workspace workspace = (Workspace)element;
writeElement("title", workspace.getTitleElement(), jstream);
writeList("collections", workspace.getCollections(), jstream);
writeExtensions((ExtensibleElement)element, jstream);
jstream.endObject();

代码示例来源:origin: org.apache.abdera/abdera-parser

public List<Collection> getCollectionsThatAccept(MimeType... types) {
  List<Collection> collections = new ArrayList<Collection>();
  for (Workspace workspace : getWorkspaces()) {
    List<Collection> colls = workspace.getCollectionsThatAccept(types);
    collections.addAll(colls);
  }
  return collections;
}

代码示例来源:origin: org.xcmis/xcmis-restatom

.append("renditionFilter={renditionFilter}").toString());
objectById.setType(AtomCMIS.URITEMPLATE_OBJECTBYID);
UriTemplateTypeElement objectByIdElement = ws.addExtension(AtomCMIS.URITEMPLATE);
objectByIdElement.build(objectById);
  .append("renditionFilter={renditionFilter}").toString());
objectByPath.setType(AtomCMIS.URITEMPLATE_OBJECTBYPATH);
UriTemplateTypeElement folderByPathElement = ws.addExtension(AtomCMIS.URITEMPLATE);
folderByPathElement.build(objectByPath);
  .append("includeRelationships={includeRelationships}").toString());
query.setType(AtomCMIS.URITEMPLATE_QUERY);
UriTemplateTypeElement queryElement = ws.addExtension(AtomCMIS.URITEMPLATE);
queryElement.build(query);
typeById.setTemplate(repoPath + "/typebyid/{id}");
typeById.setType(AtomCMIS.URITEMPLATE_TYPEBYID);
UriTemplateTypeElement typeByIdElement = ws.addExtension(AtomCMIS.URITEMPLATE);
typeByIdElement.build(typeById);
  .append("maxItems={maxItems}").toString());
changes.setType(AtomCMIS.URITEMPLATE_CHANGES);
UriTemplateTypeElement changesElement = ws.addExtension(AtomCMIS.URITEMPLATE);
changesElement.build(changes);

代码示例来源:origin: org.xcmis/xcmis-restatom

ws.setTitle(repoInfo.getRepositoryName());
RepositoryInfoTypeElement repoInfoElement = ws.addExtension(AtomCMIS.REPOSITORY_INFO);
repoInfoElement.build(repoInfo);
  String collectionType = cmisCollectionInfo.getCollectionType();
  if (AtomCMIS.COLLECTION_TYPE_ROOT.equals(collectionType))
   ws.addCollection(((CmisCollectionInfo)collectionInfo).asCollectionElement(request, repoPath, repoInfo
     .getRootFolderId()));
  else
   ws.addCollection(((CmisCollectionInfo)collectionInfo).asCollectionElement(request, repoPath));

代码示例来源:origin: org.apache.abdera/abdera-parser

public List<Collection> getCollectionsThatAccept(String... types) {
  List<Collection> collections = new ArrayList<Collection>();
  for (Workspace workspace : getWorkspaces()) {
    List<Collection> colls = workspace.getCollectionsThatAccept(types);
    collections.addAll(colls);
  }
  return collections;
}

代码示例来源:origin: org.apache.abdera/abdera-server

public Workspace asWorkspaceElement(RequestContext request) {
    Workspace workspace = request.getAbdera().getFactory().newWorkspace();
    workspace.setTitle(getTitle(null));
    for (CollectionInfo collection : getCollections(request))
      workspace.addCollection(collection.asCollectionElement(request));
    return workspace;
  }
}

代码示例来源:origin: org.apache.abdera/abdera-parser

public Collection getCollectionThatAccepts(MimeType... types) {
  Collection collection = null;
  for (Workspace workspace : getWorkspaces()) {
    collection = workspace.getCollectionThatAccepts(types);
    if (collection != null)
      break;
  }
  return collection;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com