public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; this.propertiesOwn.putAll(properties); // remove operators from terms for(Entry<String,Term<?>> entry: terms.entrySet()) { entry.getValue().setOperator(null); valuesOwn.put(entry.getKey(), entry.getValue()); } return this; }
public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; this.propertiesOwn.putAll(properties); // remove operators from terms and set the sources for(Entry<String,Term<?>> entry: terms.entrySet()) { entry.getValue().setOperator(null); valuesOwn.put(entry.getKey(), entry.getValue()); sourcesOwn.put(entry.getKey(), d); } return this; }
public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; for(String key: properties.keySet()) { Quadruple q = map.get(key); if(q==null) q = new Quadruple(); q.curProp = properties.get(key); q.curValue = terms.get(key); // remove operator if(q.curValue!=null) q.curValue = q.curValue.setOperator(null); map.put(key, q); } return this; }
public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; for(String key: properties.keySet()) { Quadruple q = map.get(key); if(q==null) q = new Quadruple(); q.curProp = properties.get(key); q.curValue = terms.get(key); q.curSource = d; // remove operator if((q.curValue!=null) && (q.curValue.getOperator() != null)) { q.curValue = q.curValue.shallowClone().setOperator(null); } map.put(key, q); } return this; }
return super.parseDeclaration(d, properties, values); return super.parseDeclaration(d, properties, values);