|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectjp.crestmuse.cmx.filewrappers.NodeInterface
public abstract class NodeInterface
The abstract class NodeInterface is the common superclass of classes that provide interfaces for accessing XML nodes.
抽象クラスNodeInterfaceは, XMLドキュメント内のノードに アクセスするためのインターフェースを提供するクラスの共通基底クラスです.
典型的な使いかたとしては, ファイルラッパ(CMXFileWrapperのサブクラス)内に, 対応するXMLフォーマットの仕様に合わせて, 各要素へのアクセスをサポートする クラスをこのクラスのサブクラスとして, またファイルラッパの内部クラスとして 定義します. たとえば, MusicXMLWrapperクラスにはNoteというクラスがあり, これがMusicXMLフォーマットのnote要素へのアクセスをサポートします. NoteクラスはMusicXMLWrapperの内部クラスで, NodeInterfaceクラスの サブクラスとなっています.
| コンストラクタの概要 | |
|---|---|
protected |
NodeInterface(org.w3c.dom.Node node)
Constructs an node interface for the specified node. |
| メソッドの概要 | |
|---|---|
java.lang.String |
getAttribute(java.lang.String key)
|
double |
getAttributeDouble(java.lang.String key)
|
int |
getAttributeInt(java.lang.String key)
|
protected org.w3c.dom.Node |
getChildByTagName(java.lang.String tagname)
Returns the child node with the specified tag name. |
protected org.w3c.dom.NodeList |
getChildNodes()
Returns all the child nodes すべての子ノードを返します. |
java.lang.String |
getChildText(java.lang.String tagname)
Returns the text that a child with the specified tag name has. |
double |
getChildTextDouble(java.lang.String tagname)
Returns the text that a child with the specified tag name has as a real number. |
int |
getChildTextInt(java.lang.String tagname)
Returns the text that a child with the specified tag name has as an integer. |
protected org.w3c.dom.Node |
getFirstChild()
|
protected org.w3c.dom.Node |
getLastChild()
|
java.lang.String |
getNodeName()
Returns the name of the node wrapped by this object. |
protected abstract java.lang.String |
getSupportedNodeName()
Returns the node name supported by the class. |
boolean |
hasAttribute(java.lang.String key)
|
boolean |
hasChild(java.lang.String tagname)
Checks whether the node wrapped by this object has a child with the specified name. |
org.w3c.dom.Node |
node()
Returns the node wrapped by this object. |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
protected NodeInterface(org.w3c.dom.Node node)
Constructs an node interface for the specified node. When the specified node is not supported, UnsupportedNodeException is thrown.
指定されたノードに対するノードインターフェースを生成します. 指定されたノードがサポートされていない場合, UnsupportedNodeExceptionがスローされます.
UnsupportedNodeException - when the specified node is not supported.| メソッドの詳細 |
|---|
public org.w3c.dom.Node node()
Returns the node wrapped by this object.
このオブジェクトがラップするノードを返します. 現在のところこのメソッドはpublicとなっていますが, publicにすべきかは 議論のあるところで, 今後変更される場合があります.
protected abstract java.lang.String getSupportedNodeName()
Returns the node name supported by the class. Please override this method in a subclass.
このオブジェクトがサポートするノード名を返します. このメソッドはサブクラスでオーバーライドしてください.
public final java.lang.String getNodeName()
Returns the name of the node wrapped by this object.
このオブジェクトがラップしているノード名を返します.
public final boolean hasChild(java.lang.String tagname)
Checks whether the node wrapped by this object has a child with the specified name.
このオブジェクトがラップしているノードが指定された名前の子を持つかどうか 調べます.
public final java.lang.String getChildText(java.lang.String tagname)
Returns the text that a child with the specified tag name has.
指定されたタグ名の子が持つテキストを返します.
public final int getChildTextInt(java.lang.String tagname)
Returns the text that a child with the specified tag name has as an integer.
指定されたタグ名の子が持つテキストを整数値として返します.
public final double getChildTextDouble(java.lang.String tagname)
Returns the text that a child with the specified tag name has as a real number.
指定されたタグ名の子が持つテキストを実数値として返します.
public boolean hasAttribute(java.lang.String key)
public java.lang.String getAttribute(java.lang.String key)
public int getAttributeInt(java.lang.String key)
public double getAttributeDouble(java.lang.String key)
protected final org.w3c.dom.NodeList getChildNodes()
Returns all the child nodes
すべての子ノードを返します.
protected final org.w3c.dom.Node getFirstChild()
protected final org.w3c.dom.Node getLastChild()
protected final org.w3c.dom.Node getChildByTagName(java.lang.String tagname)
Returns the child node with the specified tag name.
指定されたタグ名の子ノードを返します.
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||