/** * Constructor with validator. * * @param validator Name of this attribute. */ public MultiAttributeType(AttributeType validator) { super(validator.getName(), List.class, false,1,1,null); this.validator = validator; }
/** * Find the position of an AttributeType which matches the given String. * @param attName the name to look for * @return -1 if not found, zero-based index otherwise */ public int find(String attName) { int i=0; while(i<children.length && !attName.equals(children[i].getName()))i++; return i == children.length?-1:i; }
/** * Find the position of an AttributeType which matches the given String. * @param attName the name to look for * @return -1 if not found, zero-based index otherwise */ public int find(String attName) { int i=0; while(i<children.length && !attName.equals(children[i].getName()))i++; return i == children.length?-1:i; }
private int getIndexOf( List attributes, String name ){ int index = 0; for( Iterator i=attributes.iterator(); i.hasNext(); index++){ AttributeType type = (AttributeType) i.next(); if( name.equals( type.getName() )) return index; } return -1; }
/** * Returns the qname with prefix as <code>null</code>, and local part the name of the * feature attribute. */ public QName getName() { return new QName( null, featureType.getAttributeType( index ).getName() ); }
public static GISAttributeInterface createAttributeFrom(final AttributeType _type) { final GISAttributeInterface known = GISAttributeConstants.getConstantAttribute(_type.getName()); if (known != null && known.getDataClass().equals(_type.getType())) { return known; } return createAttributeFrom(_type.getName(), _type.getType()); }
public MinVisitor(String attrName, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attrName).getName()); }
public MaxVisitor(int attributeTypeIndex, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attributeTypeIndex).getName()); }
public MinVisitor(int attributeTypeIndex, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attributeTypeIndex).getName()); }
public UniqueVisitor(int attributeTypeIndex, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attributeTypeIndex).getName()); }
public UniqueVisitor(String attrName, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attrName).getName()); }
public String[] getPropertyNames(Object object) { Feature feature = (Feature) object; FeatureType featureType = feature.getFeatureType(); //set is ok because jxpath ignores order String[] propertyNames = new String[ featureType.getAttributeCount() ]; for ( int i = 0; i < propertyNames.length; i++ ) { propertyNames[ i ] = featureType.getAttributeType( i ).getName(); } return propertyNames; }
public MaxVisitor(String attrName, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attrName).getName()); }
public MedianVisitor(int attributeTypeIndex, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attributeTypeIndex).getName()); }
public MedianVisitor(String attrName, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); expr = factory.property(type.getAttributeType(attrName).getName()); }
/** * Returns the qname with prefix as <code>null</code>, and local part the name of the * feature attribute. */ public QName getName() { return index != -1 ? new QName( null, feature.getFeatureType().getAttributeType( index ).getName() ) : new QName( null, "fid" ); }
public SumVisitor(int attributeTypeIndex, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeType attributeType = type.getAttributeType(attributeTypeIndex); expr = factory.property(attributeType.getName()); createStrategy(attributeType.getType()); }
protected DefaultAttributeType(AttributeType copy) { this.name = copy.getName(); this.type = copy.getType(); this.nillable = copy.isNillable(); this.min = copy.getMinOccurs(); this.max = copy.getMaxOccurs(); this.defaultValue = copy.createDefaultValue(); }
public SumVisitor(String attrName, FeatureType type) throws IllegalFilterException { FilterFactory factory = CommonFactoryFinder.getFilterFactory(null); AttributeType attributeType = type.getAttributeType(attrName); expr = factory.property(attributeType.getName()); createStrategy(attributeType.getType()); }