本文整理汇总了Java中com.trollworks.toolkit.io.xml.XMLReader.getMarker方法的典型用法代码示例。如果您正苦于以下问题:Java XMLReader.getMarker方法的具体用法?Java XMLReader.getMarker怎么用?Java XMLReader.getMarker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.trollworks.toolkit.io.xml.XMLReader
的用法示例。
在下文中一共展示了XMLReader.getMarker方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Loads a cost reduction.
*
* @param reader The XML reader to use.
*/
protected void load(XMLReader reader) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (TAG_ATTRIBUTE.equals(name)) {
setAttribute(Enums.extract(reader.readText(), TYPES, BonusAttributeType.ST));
} else if (TAG_PERCENTAGE.equals(name)) {
setPercentage(reader.readInteger(0));
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例2: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Modifier.TAG_MODIFIER.equals(name)) {
model.addRow(new Modifier(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例3: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Skill.TAG_SKILL.equals(name) || Skill.TAG_SKILL_CONTAINER.equals(name)) {
model.addRow(new Skill(this, reader, state), true);
} else if (Technique.TAG_TECHNIQUE.equals(name)) {
model.addRow(new Technique(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例4: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Advantage.TAG_ADVANTAGE.equals(name) || Advantage.TAG_ADVANTAGE_CONTAINER.equals(name)) {
model.addRow(new Advantage(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例5: load
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/** @param reader The XML reader to use. */
protected final void load(XMLReader reader) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
loadSelf(reader);
}
} while (reader.withinMarker(marker));
}
示例6: loadList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
@Override
protected void loadList(XMLReader reader, LoadState state) throws IOException {
OutlineModel model = getModel();
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Equipment.TAG_EQUIPMENT.equals(name) || Equipment.TAG_EQUIPMENT_CONTAINER.equals(name)) {
model.addRow(new Equipment(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例7: loadAdvantageList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadAdvantageList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Advantage.TAG_ADVANTAGE.equals(name) || Advantage.TAG_ADVANTAGE_CONTAINER.equals(name)) {
mAdvantages.addRow(new Advantage(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例8: load
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
void load(XMLReader reader) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String tag = reader.getName();
if (!loadTag(reader, tag)) {
reader.skipTag(tag);
}
}
} while (reader.withinMarker(marker));
}
示例9: OldWeapon
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Creates a new {@link OldWeapon}.
*
* @param reader The XML reader to load from.
*/
public OldWeapon(XMLReader reader) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (TAG_DAMAGE.equals(name)) {
mDamage = extract(reader);
} else if (TAG_STRENGTH.equals(name)) {
mStrength = extract(reader);
} else if (TAG_ACCURACY.equals(name)) {
mAccuracy = extract(reader);
} else if (TAG_RANGE.equals(name)) {
mRange = extract(reader);
} else if (TAG_RATE_OF_FIRE.equals(name)) {
mRateOfFire = extract(reader);
} else if (TAG_SHOTS.equals(name)) {
mShots = extract(reader);
} else if (TAG_BULK.equals(name)) {
mBulk = extract(reader);
} else if (TAG_RECOIL.equals(name)) {
mRecoil = extract(reader);
} else if (TAG_REACH.equals(name)) {
mReach = extract(reader);
} else if (TAG_PARRY.equals(name)) {
mParry = extract(reader);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例10: loadEquipmentList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadEquipmentList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Equipment.TAG_EQUIPMENT.equals(name) || Equipment.TAG_EQUIPMENT_CONTAINER.equals(name)) {
mEquipment.addRow(new Equipment(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例11: loadSpellList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadSpellList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Spell.TAG_SPELL.equals(name) || Spell.TAG_SPELL_CONTAINER.equals(name)) {
mSpells.addRow(new Spell(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例12: loadEquipmentList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadEquipmentList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
state.mDefaultCarried = state.mDataFileVersion != 0 ? true : reader.isAttributeSet(ATTRIBUTE_CARRIED);
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Equipment.TAG_EQUIPMENT.equals(name) || Equipment.TAG_EQUIPMENT_CONTAINER.equals(name)) {
mEquipment.addRow(new Equipment(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例13: loadNoteList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
private void loadNoteList(XMLReader reader, LoadState state) throws IOException {
String marker = reader.getMarker();
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (Note.TAG_NOTE.equals(name) || Note.TAG_NOTE_CONTAINER.equals(name)) {
mNotes.addRow(new Note(this, reader, state), true);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例14: PrereqList
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Loads a prerequisite list.
*
* @param parent The owning prerequisite list, if any.
* @param reader The XML reader to load from.
*/
public PrereqList(PrereqList parent, XMLReader reader) throws IOException {
this(parent, true);
String marker = reader.getMarker();
mAll = reader.isAttributeSet(ATTRIBUTE_ALL);
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (TAG_WHEN_TL.equals(name)) {
mWhenTLCriteria.load(reader);
} else if (TAG_ROOT.equals(name)) {
mPrereqs.add(new PrereqList(this, reader));
} else if (AdvantagePrereq.TAG_ROOT.equals(name)) {
mPrereqs.add(new AdvantagePrereq(this, reader));
} else if (AttributePrereq.TAG_ROOT.equals(name)) {
mPrereqs.add(new AttributePrereq(this, reader));
} else if (ContainedWeightPrereq.TAG_ROOT.equals(name)) {
mPrereqs.add(new ContainedWeightPrereq(this, reader));
} else if (SkillPrereq.TAG_ROOT.equals(name)) {
mPrereqs.add(new SkillPrereq(this, reader));
} else if (SpellPrereq.TAG_ROOT.equals(name)) {
mPrereqs.add(new SpellPrereq(this, reader));
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}
示例15: SpellPrereq
import com.trollworks.toolkit.io.xml.XMLReader; //导入方法依赖的package包/类
/**
* Loads a prerequisite.
*
* @param parent The owning prerequisite list, if any.
* @param reader The XML reader to load from.
*/
public SpellPrereq(PrereqList parent, XMLReader reader) throws IOException {
this(parent);
String marker = reader.getMarker();
loadHasAttribute(reader);
do {
if (reader.next() == XMLNodeType.START_TAG) {
String name = reader.getName();
if (TAG_NAME.equals(name)) {
setType(TAG_NAME);
mStringCriteria.load(reader);
} else if (TAG_ANY.equals(name)) {
setType(TAG_ANY);
mQuantityCriteria.load(reader);
} else if (TAG_COLLEGE.equals(name)) {
setType(TAG_COLLEGE);
mStringCriteria.load(reader);
} else if (TAG_COLLEGE_COUNT.equals(name)) {
setType(TAG_COLLEGE_COUNT);
mQuantityCriteria.load(reader);
} else if (TAG_QUANTITY.equals(name)) {
mQuantityCriteria.load(reader);
} else {
reader.skipTag(name);
}
}
} while (reader.withinMarker(marker));
}