Methods
checkPropertyName(className) → {boolean}
クラスと同名のプロパティがあるかチェック
Parameters:
Name | Type | Description |
---|---|---|
className |
String | クラス名 |
Returns:
チェック結果(true:同名のプロパティがある/false:ない)
- Type
- boolean
createNode(nodeName, attributes, textContent) → {Node}
要素名、属性、内容よりXMLの要素を作成する
Parameters:
Name | Type | Description |
---|---|---|
nodeName |
String | 要素名 |
attributes |
Array.<Object> | 属性のArray [{'name': '属性名'}, {'value': '値'}] |
textContent |
String | 要素の内容(テキストのみ) |
Returns:
javascript Nodeオブジェクト
- Type
- Node
findClass(classes, identifier) → {Object}
語彙のクラスの配列から識別子検索する
Parameters:
Name | Type | Description |
---|---|---|
classes |
Array.<Object> | 検索対象クラス配列 |
identifier |
String | クラス識別子 |
Returns:
クラス
- Type
- Object
findMetadata(metadata, name, lang) → {string}
メタデータをメタデータ名と言語コードで検索する
Parameters:
Name | Type | Default | Description |
---|---|---|---|
metadata |
Array.<Object> | 検索対象メタデータ | |
name |
String | メタデータ名 | |
lang |
String | ja | 言語 |
Returns:
検索したメタデータの値
- Type
- string
findPrefix(vocabularyMetadata, prefixName) → {string}
語彙のメタデータより指定されたprefixの情報を取得する
Parameters:
Name | Type | Description |
---|---|---|
vocabularyMetadata |
Array.<Object> | 語彙メタデータ |
prefixName |
String | 検索する名前空間名 |
Returns:
検索したprefix
- Type
- string
findRestriction(restriction, type) → {Object}
型制約のArrayから目的の制約を抽出
Parameters:
Name | Type | Description |
---|---|---|
restriction |
Array.<Object> | 検索対象型制約Array |
type |
String | 制限値の種別 |
Returns:
検索した型制約
- Type
- Object
generateImiXsd(vocabulary, bc) → {string}
XMLスキーマを生成する
Parameters:
Name | Type | Description |
---|---|---|
vocabulary |
Object | スキーマ生成用に調整した語彙のオブジェクト |
bc |
boolean | 後方互換の要素を出力するかどうか |
Returns:
語彙のXMLスキーマ(整形済みテキスト)
- Type
- string
getCreatorGroups(metadata) → {Array.<Object>}
語彙のメタデータからCreatorのグループを抽出
Parameters:
Name | Type | Description |
---|---|---|
metadata |
Array.<Object> | 語彙のメタデータArray |
Returns:
分類されたCreatorのArray
- Type
- Array.<Object>
getMaxOccur(restriction) → {string}
値制約より上限値を抽出
Parameters:
Name | Type | Description |
---|---|---|
restriction |
Object | 値制約 |
Returns:
上限値
- Type
- string
getMinOccur(restriction) → {string}
値制約より下限値を抽出
Parameters:
Name | Type | Description |
---|---|---|
restriction |
Object | 値制約 |
Returns:
下限値
- Type
- string
Xsd(imivText, bc, externalVocabulary)
Constructor
Parameters:
Name | Type | Description |
---|---|---|
imivText |
string | 語彙定義テキスト |
bc |
boolean | 後方互換の要素を読み込むかどうか |
externalVocabulary |
vocabulary | IMI 語彙記法から参照される語彙を定義する Vocabulary Extension のインスタンス(optional) |