Codota Logo
GMLReference
Code IndexAdd Codota to your IDE (free)

How to use
GMLReference
in
org.deegree.commons.tom.gml

Best Java code snippets using org.deegree.commons.tom.gml.GMLReference (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

@Override
public String requireObject( GMLReference<?> ref, GmlXlinkOptions resolveState ) {
  if ( ref.isLocal() ) {
    return remoteXlinkTemplate.replace( "{}", ref.getId() );
  }
  return ref.getURI();
}
origin: deegree/deegree3

private boolean isResolvable( GMLReference<?> ref ) {
  try {
    ref.getReferencedObject();
    return true;
  } catch ( ReferenceResolvingException e ) {
    return false;
  }
}
origin: deegree/deegree3

/**
 * Resolves all local references that have been added before against the added objects.
 *
 * @throws ReferenceResolvingException
 *             if a local reference cannot be resolved
 */
public void resolveLocalRefs()
            throws ReferenceResolvingException {
  for ( GMLReference<?> ref : localRefs ) {
    String id = ref.getURI().substring( 1 );
    LOG.debug( "Resolving reference to object '" + id + "'" );
    if ( ref.getReferencedObject() == null ) {
      String msg = "Cannot resolve reference to object with id '" + id
             + "'. There is no object with this id in the document.";
      throw new ReferenceResolvingException( msg );
    }
  }
}
origin: deegree/deegree3

@Override
public String handleReference( GMLReference<?> ref ) {
  String uri = ref.getURI();
  LOG.debug( "Encountered reference to object {}.", uri );
  if ( !isGmlIdBasedUri( uri ) ) {
    LOG.debug( "Reference to object {} considered non-rewritable.", uri );
    return uri;
  }
  if ( localReferencesPossible ) {
    LOG.debug( "Exporting potential forward reference to object {} which may or may not be exported later.",
          ref.getURI() );
    try {
      xmlStream.activateBuffering();
    } catch ( XMLStreamException e ) {
      throw new RuntimeException( e.getMessage(), e );
    }
    return "{" + ref.getId() + "}";
  }
  LOG.debug( "Exporting reference to object {} as remote reference.", ref.getId() );
  return remoteXlinkTemplate.replace( "{}", ref.getId() );
}
origin: deegree/deegree3

@Override
public String requireObject( GMLReference<?> ref, GmlXlinkOptions resolveState ) {
  LOG.debug( "Exporting forward reference to object {} which must be included in the output.", ref.getId() );
  objectIdToRef.put( ref.getId(), ref );
  return "#" + ref.getId();
}
origin: deegree/deegree3

@Override
public String requireObject( GMLReference<?> ref, GmlXlinkOptions resolveState ) {
  String uri = ref.getURI();
  LOG.debug( "Exporting forward reference to object {} which must be included in the output.", uri );
  uriToRef.put( uri, ref );
  refToResolveState.put( ref, resolveState );
  return uri;
}
origin: deegree/deegree3

GMLReference<TimeSlice> refObject = null;
if ( specialResolver != null ) {
  refObject = new GMLReference<TimeSlice>( specialResolver, href, xmlStream.getSystemId() );
} else {
  refObject = new GMLReference<TimeSlice>( idContext, href, xmlStream.getSystemId() );
origin: deegree/deegree3

@Override
public String handleReference( GMLReference<?> ref ) {
  if ( localReferencesPossible ) {
    LOG.debug( "Exporting potential forward reference to object {} which may or may not be exported later.",
          ref.getId() );
    // try {
    // xmlStream.activateBuffering();
    // } catch ( XMLStreamException e ) {
    // throw new RuntimeException( e.getMessage(), e );
    // }
    return "{" + ref.getId() + "}";
  }
  LOG.debug( "Exporting reference to object {} as remote reference.", ref.getId() );
  return remoteXlinkTemplate.replace( "{}", ref.getId() );
}
origin: deegree/deegree3

/**
 * Adds a new {@link GMLReference} that has been encountered during the parsing of the GML document.
 *
 * @param ref
 *            GML reference, must not be <code>null</code>
 */
public void addReference( GMLReference<?> ref ) {
  refs.add( ref );
  if ( ref.getURI().startsWith( "#" ) ) {
    localRefs.add( ref );
  }
}
origin: deegree/deegree3

@Override
public String handleReference( GMLReference<?> ref ) {
  if ( ref.isLocal() ) {
    return remoteXlinkTemplate.replace( "{}", ref.getId() );
  }
  return ref.getURI();
}
origin: deegree/deegree3

@Override
public synchronized Feature getReferencedObject()
            throws ReferenceResolvingException {
  try {
    return super.getReferencedObject();
  } catch ( ReferenceResolvingException e ) {
    if ( internalResolver == null )
      throw e;
    return resolveInternalFeature( e );
  }
}
origin: deegree/deegree3

protected void writeAdditionalObjects( GMLStreamWriter gmlStream, WfsXlinkStrategy additionalObjects,
                    QName featureMemberEl, Version requestVersion )
            throws XMLStreamException, UnknownCRSException, TransformationException {
  Collection<GMLReference<?>> nextLevelObjects = additionalObjects.getAdditionalRefs();
  XMLStreamWriter xmlStream = gmlStream.getXMLStream();
  boolean wroteStartSection = false;
  while ( !nextLevelObjects.isEmpty() ) {
    Map<GMLReference<?>, GmlXlinkOptions> refToResolveState = additionalObjects.getResolveStates();
    additionalObjects.clear();
    for ( GMLReference<?> ref : nextLevelObjects ) {
      if ( isResolvable( ref ) && !isObjectAlreadySerialized( gmlStream, ref.getId() ) ) {
        GmlXlinkOptions resolveState = refToResolveState.get( ref );
        Feature feature = (Feature) ref;
        if ( !wroteStartSection ) {
          writeAdditionalObjectsStart( xmlStream, requestVersion );
          wroteStartSection = true;
        }
        writeMemberFeature( feature, gmlStream, xmlStream, resolveState, featureMemberEl );
      }
    }
    nextLevelObjects = additionalObjects.getAdditionalRefs();
  }
  if ( wroteStartSection ) {
    writeAdditionalObjectsEnd( xmlStream, requestVersion );
  }
}
origin: deegree/deegree3

  @Override
  public List<Property> getProperties( QName propName ) {
    return getReferencedObject().getProperties( propName );
  }
}
origin: deegree/deegree3

@Override
public List<Property> getProperties() {
  return getReferencedObject().getProperties();
}
origin: deegree/deegree3

@Override
public GMLObjectType getType() {
  return getReferencedObject().getType();
}
org.deegree.commons.tom.gmlGMLReference

Javadoc

A Reference to a GMLObject, corresponds to a GML property with an xlink:href attribute.

Most used methods

  • getId
  • getReferencedObject
  • getURI
  • <init>
    Creates a new GMLReference instance.
  • isLocal

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • getSystemService (Context)
  • getApplicationContext (Context)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now