📄 workspace.java
字号:
package com.jeffhanson.atompub.introspect;
import java.util.ArrayList;
import java.util.Iterator;
import org.w3c.dom.Node;
import com.jeffhanson.atompub.DOMUtils;
public class Workspace
{
private Node node = null;
private ArrayList<com.jeffhanson.atompub.introspect.CollectionNode> collections =
new ArrayList<com.jeffhanson.atompub.introspect.CollectionNode>();
private String title = "";
public Workspace(Node node)
{
this.node = node;
Node titleNode = DOMUtils.getChildNode(node, "atom:title");
if (titleNode == null)
{
titleNode = DOMUtils.getChildNode(node, "title");
}
if (titleNode != null)
{
title = titleNode.getTextContent();
}
Iterator<Node> childNodes = DOMUtils.getChildNodes(node,
"collection");
while (childNodes.hasNext())
{
collections.add(new com.jeffhanson.atompub.introspect.CollectionNode(childNodes.next()));
}
}
public Iterator<com.jeffhanson.atompub.introspect.CollectionNode> getCollections()
{
return collections.iterator();
}
public Node getNode()
{
return node;
}
public String getTitle()
{
return title;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -