ft.setName(getFirstChildValue(child)); } else if (childName.equalsIgnoreCase("Title")) { ft.getDescription().setTitle(parseInternationalString(child)); } else if (childName.equalsIgnoreCase("Abstract")) { ft.getDescription().setAbstract(parseInternationalString(child)); } else if (childName.equalsIgnoreCase("FeatureTypeName")) { ft.setFeatureTypeName(getFirstChildValue(child));
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { FeatureTypeStyle fts = (FeatureTypeStyle) super.parse(instance, node, value); if (node.hasChild("Description")) { Description d = (Description) node.getChildValue("Description"); fts.getDescription().setTitle(d.getTitle()); fts.getDescription().setAbstract(d.getAbstract()); } return fts; } }
public FeatureTypeStyleBuilder reset(FeatureTypeStyle fts) { if (fts == null) { return unset(); } this.name = fts.getName(); this.description.reset(fts.getDescription()); this.definedFor.reset(fts.getFeatureInstanceIDs()); this.featureTypeNames.clear(); if (fts.featureTypeNames() != null) { this.featureTypeNames.addAll(fts.featureTypeNames()); } this.rules.clear(); if (fts.rules() != null) { for (Rule rule : fts.rules()) { this.rules.add(new RuleBuilder(this).reset(rule)); } } this.options.clear(); this.options.putAll(fts.getOptions()); this.transformation = fts.getTransformation(); this.unset = false; return this; }
public void visit(FeatureTypeStyle fts) { start("FeatureTypeStyle"); if ((fts.getName() != null) && (fts.getName().length() > 0)) { element("Name", fts.getName()); } if (fts.getDescription() != null && fts.getDescription().getTitle() != null) element("Title", fts.getDescription().getTitle()); if (fts.getDescription() != null && fts.getDescription().getAbstract() != null) element("Abstract", fts.getDescription().getAbstract()); if ((fts.featureTypeNames() != null) && (fts.featureTypeNames().size() > 0)) { element("FeatureTypeName", fts.featureTypeNames().iterator().next().toString()); } if (fts.getTransformation() != null) { element("Transformation", fts.getTransformation()); } String[] sti = fts.getSemanticTypeIdentifiers(); if (sti.length != 1 || !sti[0].equals(SemanticType.ANY.toString())) { for (int i = 0; i < sti.length; i++) { element("SemanticTypeIdentifier", sti[i]); } } Rule[] rules = fts.getRules(); for (int i = 0; i < rules.length; i++) { rules[i].accept(this); } encodeVendorOptions(fts.getOptions()); end("FeatureTypeStyle"); }
.getDescription() .setTitle((InternationalString) node.getChildValue("Title")); .getDescription() .setAbstract((InternationalString) node.getChildValue("Abstract"));
@Override public void handle(YamlObject<?> obj, YamlParseContext context) { YamlSeq seq = obj.seq(); for (YamlObject<?> o : seq) { YamlMap fs = o.map(); FeatureTypeStyle featureStyle = factory.style.createFeatureTypeStyle(); style.featureTypeStyles().add(featureStyle); featureStyle.setName(fs.str("name")); if (fs.has("title")) { featureStyle.getDescription().setTitle(fs.str("title")); } if (fs.has("abstract")) { featureStyle.getDescription().setAbstract(fs.str("abstract")); } featureStyle.getOptions().putAll(Util.vendorOptions(fs)); context.push(fs, "transform", new TransformHandler(featureStyle, factory)); context.push(fs, "rules", new RuleParser(featureStyle, factory)); } } }
/** * Populate standard data. * * @param featureTypeStyle the feature type style */ protected void populateStandardData(FeatureTypeStyle featureTypeStyle) { StandardData standardData = new StandardData(); if (featureTypeStyle != null) { standardData.name = featureTypeStyle.getName(); standardData.description = featureTypeStyle.getDescription(); } populateStandardData(standardData); }
ft.setName(getFirstChildValue(child)); } else if (childName.equalsIgnoreCase("Title")) { ft.getDescription().setTitle(parseInternationalString(child)); } else if (childName.equalsIgnoreCase("Abstract")) { ft.getDescription().setAbstract(parseInternationalString(child)); } else if (childName.equalsIgnoreCase("FeatureTypeName")) { ft.setFeatureTypeName(getFirstChildValue(child));
if (fts.getDescription() != null && fts.getDescription().getTitle() != null) element("Title", fts.getDescription().getTitle()); if (fts.getDescription() != null && fts.getDescription().getAbstract() != null) element("Abstract", fts.getDescription().getAbstract());
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { FeatureTypeStyle fts = (FeatureTypeStyle) super.parse(instance, node, value); if (node.hasChild("Description")) { Description d = (Description) node.getChildValue("Description"); fts.getDescription().setTitle(d.getTitle()); fts.getDescription().setAbstract(d.getAbstract()); } //TODO: version if (node.hasChild("version")) { } return fts; }
featureTypeStyle.getDescription().setTitle( (InternationalString) node.getChildValue("Title")); featureTypeStyle.getDescription().setAbstract( (InternationalString) node.getChildValue("Abstract"));
@Override public void handle(YamlObject<?> obj, YamlParseContext context) { YamlSeq seq = obj.seq(); for (YamlObject<?> o : seq) { YamlMap fs = o.map(); FeatureTypeStyle featureStyle = factory.style.createFeatureTypeStyle(); style.featureTypeStyles().add(featureStyle); featureStyle.setName(fs.str("name")); if (fs.has("title")) { featureStyle.getDescription().setTitle(fs.str("title")); } if (fs.has("abstract")) { featureStyle.getDescription().setAbstract(fs.str("abstract")); } featureStyle.getOptions().putAll(Util.vendorOptions(fs)); context.push(fs, "transform", new TransformHandler(featureStyle, factory)); context.push(fs, "rules", new RuleParser(featureStyle, factory)); } } }