congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.apache.sis.xml
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.sis.xml

Best Java code snippets using org.apache.sis.xml (Showing top 20 results out of 315)

origin: apache/sis

/**
 * Returns all prefixes for the given namespace. For example given the {@code "http://www.isotc211.org/2005/gmd"}
 * namespace from legacy ISO 19139:2007, this method returns {@code "mdb"}, {@code "cit"} and all other prefixes
 * from the new ISO 19115-3:2016 specification which are used in replacement of the legacy {@code "gmd"} prefix.
 */
@Override
public Iterator<String> getPrefixes(final String namespaceURI) {
  return new Prefixes(context, version.exports(), namespaceURI);
}
origin: org.apache.sis.core/sis-utility

/**
 * A method which is common to both {@code Marshaller} and {@code Unmarshaller}.
 * It saves the initial state if it was not already done, but subclasses will
 * need to complete the work.
 */
@SuppressWarnings("rawtypes")
public <A extends XmlAdapter> void setAdapter(final Class<A> type, final A adapter) {
  if (!isPropertySaved(type)) {
    saveProperty(type, getAdapter(type));
  }
}
origin: org.apache.sis.core/sis-utility

/**
 * Wraps this {@code FilteredNamespaces} in a new instance performing the inverse of the replacements
 * specified by the given version.
 */
NamespaceContext inverse(final FilterVersion version) {
  if (toView == version.toView && toImpl == version.toImpl) {
    return this;
  }
  return new FilteredNamespaces(this, version, true);
}
origin: org.apache.sis.core/sis-utility

/**
 * A method which is common to both {@code Marshaller} and {@code Unmarshaller}.
 * It saves the initial state if it was not already done, but subclasses will
 * need to complete the work.
 */
public void setSchema(final Schema schema) {
  if (!isPropertySaved(Schema.class)) {
    saveProperty(Schema.class, getSchema());
  }
}
origin: org.apache.sis.core/sis-utility

  /**
   * Assigns the {@link #id} value (if non-null) to the given object. This method
   * is typically invoked at unmarshalling time in order to assign the ID of this
   * temporary wrapper to the "real" GeoAPI implementation instance.
   *
   * @param  wrapped  the GeoAPI implementation for which to assign the ID.
   */
  public final void copyIdTo(final Object wrapped) {
    if (id != null && wrapped instanceof IdentifiedObject) {
      final IdentifierMap map = ((IdentifiedObject) wrapped).getIdentifierMap();
      if (map != null) {                                  // Should not be null, but let be safe.
        map.put(IdentifierSpace.ID, id);
      }
    }
  }
}
origin: org.apache.sis.core/sis-utility

  /**
   * Invoked on deserialization for replacing the deserialized instance by the unique instance.
   */
  private Object readResolve() throws ObjectStreamException {
    return reason.createNilObject(InternationalString.class);
  }
}
origin: org.apache.sis.core/sis-utility

/**
 * Marks this {@code xlink} as unmodifiable. After this method call, any call to a setter
 * method will throw an {@link UnsupportedOperationException}.
 *
 * <p>After the first call to this method, any subsequent calls have no effect.</p>
 */
public void freeze() {
  if (hashCode == 0) {
    hashCode = hash();
  }
}
origin: org.apache.sis.core/sis-utility

/**
 * Creates a pooled unmarshaller wrapping the given one.
 * Callers shall invoke {@link #reset(Pooled)} after construction for completing the initialization.
 *
 * @param  unmarshaller  the unmarshaller to use for the actual work.
 * @param  template      the {@link PooledTemplate} from which to get the initial values.
 * @throws JAXBException if an error occurred while setting a property.
 */
PooledUnmarshaller(final Unmarshaller unmarshaller, final Pooled template) throws JAXBException {
  super(template);
  this.unmarshaller = unmarshaller;
  initialize(template);
}
origin: org.apache.sis.core/sis-utility

  @Override public void run() {
    removeExpired();
  }
});
origin: org.apache.sis.core/sis-utility

/**
 * Creates a pooled marshaller wrapping the given one.
 * Callers shall invoke {@link #reset(Pooled)} after construction for completing the initialization.
 *
 * @param  marshaller  the marshaller to use for the actual work.
 * @param  template    the {@link PooledTemplate} from which to get the initial values.
 * @throws JAXBException if an error occurred while setting a property.
 */
PooledMarshaller(final Marshaller marshaller, final Pooled template) throws JAXBException {
  super(template);
  this.marshaller = marshaller;
  initialize(template);
}
origin: org.apache.sis.core/sis-metadata

/** Skips all null or nil values. */
@Override boolean isSkipped(final Object value) {
  return (value == null) || (value instanceof NilObject) || NilReason.forObject(value) != null;
}
origin: apache/sis

/**
 * Returns the old namespace for elements (types and properties) in the given namespace.
 * This method is used only for default relocations, i.e. the fallback to apply when no
 * explicit rule has been found.
 */
@Override
final String relocate(final String namespace) {
  return version.exportNS(namespace);
}
origin: apache/sis

/**
 * Returns the new namespace for elements (types and properties) in the given namespace.
 * This method is used only for default relocations, i.e. the fallback to apply when no
 * explicit rule has been found.
 */
@Override
final String relocate(final String namespace) {
  return version.importNS(namespace);
}
origin: apache/sis

/**
 * A method which is common to both {@code Marshaller} and {@code Unmarshaller}.
 * It saves the initial state if it was not already done, but subclasses will
 * need to complete the work.
 */
@SuppressWarnings("rawtypes")
public <A extends XmlAdapter> void setAdapter(final Class<A> type, final A adapter) {
  if (!isPropertySaved(type)) {
    saveProperty(type, getAdapter(type));
  }
}
origin: apache/sis

/**
 * A method which is common to both {@code Marshaller} and {@code Unmarshaller}.
 * It saves the initial state if it was not already done, but subclasses will
 * need to complete the work.
 */
public void setSchema(final Schema schema) {
  if (!isPropertySaved(Schema.class)) {
    saveProperty(Schema.class, getSchema());
  }
}
origin: apache/sis

  /**
   * Invoked on deserialization for replacing the deserialized instance by the unique instance.
   */
  private Object readResolve() throws ObjectStreamException {
    return reason.createNilObject(InternationalString.class);
  }
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns a hash code value for this XLink.
 */
@Override
public int hashCode() {
  int hash = hashCode;
  if (hash == 0) {
    hash = hash();
    // Do not save the hash code value, since it may change.
  }
  return hash;
}
origin: apache/sis

/**
 * Creates a pooled unmarshaller wrapping the given one.
 * Callers shall invoke {@link #reset(Pooled)} after construction for completing the initialization.
 *
 * @param  unmarshaller  the unmarshaller to use for the actual work.
 * @param  template      the {@link PooledTemplate} from which to get the initial values.
 * @throws JAXBException if an error occurred while setting a property.
 */
PooledUnmarshaller(final Unmarshaller unmarshaller, final Pooled template) throws JAXBException {
  super(template);
  this.unmarshaller = unmarshaller;
  initialize(template);
}
origin: apache/sis

/**
 * Marks this {@code xlink} as unmodifiable. After this method call, any call to a setter
 * method will throw an {@link UnsupportedOperationException}.
 *
 * <p>After the first call to this method, any subsequent calls have no effect.</p>
 */
public void freeze() {
  if (hashCode == 0) {
    hashCode = hash();
  }
}
origin: apache/sis

/**
 * Returns a hash code value for this XLink.
 */
@Override
public int hashCode() {
  int hash = hashCode;
  if (hash == 0) {
    hash = hash();
    // Do not save the hash code value, since it may change.
  }
  return hash;
}
org.apache.sis.xml

Most used classes

  • MarshallerPool
    Creates and configures Marshaller or Unmarshaller objects for use with SIS. Users fetch (un)marshall
  • XML
    Provides convenience methods for marshalling and unmarshalling SIS objects. This class defines also
  • IdentifierMap
    A map view of some or all identifiers in an IdentifiedObject. Each java.util.Map.Entry is associated
  • NilObject
    A marker interface for nil XML elements providing an explanation about why the information is absent
  • ValueConverter
    Performs conversions of XML element or attribute values encountered during XML (un)marshalling. Each
  • IdentifiedObject,
  • IdentifierSpace,
  • LegacyCodes,
  • Namespaces,
  • NilReason,
  • ReferenceResolver,
  • Implementation,
  • InputFactory,
  • NilInternationalString,
  • NilObjectHandler,
  • OutputFactory,
  • Pooled,
  • PooledMarshaller,
  • PooledTemplate
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now