public class GmlInstanceCollection extends Object implements InstanceCollection
Modifier and Type | Class and Description |
---|---|
class |
GmlInstanceCollection.InstanceIterator
Iterates over
Instance s in an XML/GML stream |
UNKNOWN_SIZE
Constructor and Description |
---|
GmlInstanceCollection(LocatableInputSupplier<? extends InputStream> source,
TypeIndex sourceSchema,
boolean restrictToFeatures,
boolean ignoreRoot,
boolean strict,
CRSProvider crsProvider)
Create an XMl/GML instance collection based on the given source.
|
Modifier and Type | Method and Description |
---|---|
Instance |
getInstance(InstanceReference reference)
Get the instance referenced by the given reference.
|
InstanceReference |
getReference(Instance instance)
Get a reference to an instance that can be used to retrieve the given
instance using
InstanceResolver.getInstance(InstanceReference) . |
boolean |
hasSize()
States if the collection has a known size.
|
boolean |
isEmpty()
States if the collection has no instances.
|
GmlInstanceCollection.InstanceIterator |
iterator()
Get an iterator over all instances contained in the collection.
|
InstanceCollection |
select(Filter filter)
Select the instances in the collection, matching the given filter.
|
int |
size()
Get the collection size if known.
|
public GmlInstanceCollection(LocatableInputSupplier<? extends InputStream> source, TypeIndex sourceSchema, boolean restrictToFeatures, boolean ignoreRoot, boolean strict, CRSProvider crsProvider)
source
- the sourcesourceSchema
- the source schemarestrictToFeatures
- if only instances that are GML features shall
be loadedignoreRoot
- if the root element should be ignored for creating
instances even if it is recognized as an allowed instance typestrict
- if associating elements with properties should be done
strictly according to the schema, otherwise a fall-back is
used trying to populate values also on invalid property pathscrsProvider
- CRS provider in case no CRS is specified, may be
null
public boolean hasSize()
InstanceCollection
hasSize
in interface InstanceCollection
InstanceCollection.hasSize()
public int size()
InstanceCollection
size
in interface InstanceCollection
InstanceCollection.UNKNOWN_SIZE
InstanceCollection.size()
public GmlInstanceCollection.InstanceIterator iterator()
InstanceCollection
ResourceIterator.close()
).iterator
in interface InstanceCollection
Iterable.iterator()
public boolean isEmpty()
InstanceCollection
InstanceCollection.hasSize()
returns false.isEmpty
in interface InstanceCollection
InstanceCollection.isEmpty()
public InstanceCollection select(Filter filter)
InstanceCollection
select
in interface InstanceCollection
filter
- the instance filterInstanceCollection.select(Filter)
public InstanceReference getReference(Instance instance)
InstanceResolver
InstanceResolver.getInstance(InstanceReference)
.getReference
in interface InstanceResolver
instance
- the instance, must have originated from this resolverInstanceResolver.getReference(Instance)
public Instance getInstance(InstanceReference reference)
InstanceResolver
getInstance
in interface InstanceResolver
reference
- the instance referencenull
if it does not exist
or the reference is invalidInstanceResolver.getInstance(InstanceReference)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a