protected GmlXlinkOptions getResolveStateForNextLevel( GmlXlinkOptions state ) { return new GmlXlinkOptions( null, state.getDepth(), state.getCurrentLevel() + 1, state.getMode(), state.getRemoteTimeoutInMilliseconds() ); } }
/** * Adds a {@link ReferencePatternMatcher} that checks if a url should be skipped or not. * * @param referencePatternMatcher the matcher to add, may be <code>null</code> (all urls are resolved) */ public void setReferencePatternMatcher( ReferencePatternMatcher referencePatternMatcher ) { idContext.setReferencePatternMatcher( referencePatternMatcher ); }
private boolean includeNextLevelInOutput( GmlXlinkOptions resolveState ) { int maxInlineLevels = resolveState.getDepth(); int currentLevel = resolveState.getCurrentLevel(); return maxInlineLevels == -1 || ( maxInlineLevels > 0 && currentLevel < maxInlineLevels ); }
public DefaultGmlXlinkStrategy() { this.remoteXlinkTemplate = "#{}"; this.resolveOptions = new GmlXlinkOptions(); }
@Override public void setProperties( List<Property> props ) throws IllegalArgumentException { getReferencedObject().setProperties( props ); }
/** * Exports the given {@link Feature} (or {@link FeatureCollection}). * * @param feature * feature to be exported, must not be <code>null</code> * @throws XMLStreamException * @throws UnknownCRSException * @throws TransformationException */ public void export( Feature feature ) throws XMLStreamException, UnknownCRSException, TransformationException { export( feature, referenceExportStrategy.getResolveOptions() ); }
/** * Controls the application schema that is assumed when features or feature collections are parsed. * * @param schema * application schema, can be <code>null</code> (use xsi:schemaLocation attribute to build the * application schema) */ public void setApplicationSchema( AppSchema schema ) { this.schema = schema; idContext.setApplicationSchema( schema ); }
@Override public synchronized Feature getReferencedObject() throws ReferenceResolvingException { try { return super.getReferencedObject(); } catch ( ReferenceResolvingException e ) { if ( internalResolver == null ) throw e; return resolveInternalFeature( e ); } }
@Override public ExtraProps getExtraProperties() { return getReferencedObject().getExtraProperties(); }
/** * Exports the given {@link Property}. * * @param prop * property to be exported, must not be <code>null</code> * @throws XMLStreamException * @throws UnknownCRSException * @throws TransformationException */ public void export( Property prop ) throws XMLStreamException, UnknownCRSException, TransformationException { export( prop, referenceExportStrategy.getResolveOptions() ); }
@Override public void setEnvelope( Envelope env ) { getReferencedObject().setEnvelope( env ); }
@Override public Envelope calcEnvelope() { return getReferencedObject().calcEnvelope(); }
@Override public List<Property> getProperties( QName propName ) { return getReferencedObject().getProperties( propName ); }
@Override public FeatureType getType() { return getReferencedObject().getType(); }
@Override public void setId( String id ) { getReferencedObject().setId( id ); }
@Override public void setPropertyValue( QName propName, int occurence, TypedObjectNode value ) { getReferencedObject().setPropertyValue( propName, occurence, value ); }
@Override public Envelope getEnvelope() { return getReferencedObject().getEnvelope(); }
@Override public QName getName() { return getReferencedObject().getName(); }
@Override public List<Property> getProperties() { return getReferencedObject().getProperties(); }
@Override public void setExtraProperties( ExtraProps extraProps ) { getReferencedObject().setExtraProperties( extraProps ); }