Codota Logo
XLink.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.sis.xml.XLink
constructor

Best Java code snippets using org.apache.sis.xml.XLink.<init> (Showing top 15 results out of 315)

  • Common ways to obtain XLink
private void myMethod () {
XLink x =
  • Codota Iconnew XLink()
  • Smart code suggestions by Codota
}
origin: Geomatys/geotoolkit

  @Override
  public XLink anchor(final MarshalContext context, final Object value, final CharSequence text) {
    final URI linkage;
    synchronized (anchors) {
      linkage = anchors.get(value);
    }
    if (linkage != null) {
      final XLink xlink = new XLink();
      xlink.setHRef(linkage);
      return xlink;
    }
    return super.anchor(context, value, text);
  }
});
origin: org.apache.sis.core/sis-utility

/**
 * Returns the {@code xlink}, or {@code null} if none and {@code create} is {@code false}.
 * If the {@code create} argument is {@code true}, then this method will create the XLink
 * when first needed. In the later case, any previous {@code gco:nilReason} will be
 * overwritten since the object is not nil.
 */
private XLink xlink(final boolean create) {
  final ObjectReference ref = reference(create);
  if (ref == null) {
    return null;
  }
  XLink xlink = ref.xlink;
  if (create && xlink == null) {
    ref.xlink = xlink = new XLink();
    xlink.setType(XLink.Type.SIMPLE);           // The "simple" type is fixed in the "gco" schema.
  }
  return xlink;
}
origin: apache/sis

/**
 * Returns the {@code xlink}, or {@code null} if none and {@code create} is {@code false}.
 * If the {@code create} argument is {@code true}, then this method will create the XLink
 * when first needed. In the later case, any previous {@code gco:nilReason} will be
 * overwritten since the object is not nil.
 */
private XLink xlink(final boolean create) {
  final ObjectReference ref = reference(create);
  if (ref == null) {
    return null;
  }
  XLink xlink = ref.xlink;
  if (create && xlink == null) {
    ref.xlink = xlink = new XLink();
    xlink.setType(XLink.Type.SIMPLE);           // The "simple" type is fixed in the "gco" schema.
  }
  return xlink;
}
origin: org.apache.sis.core/sis-utility

final XLink link = new XLink();
link.setHRef(href);
store(IdentifierSpace.XLINK, link);
origin: apache/sis

final XLink link = new XLink();
link.setHRef(href);
store(IdentifierSpace.XLINK, link);
origin: org.apache.sis.core/sis-utility

final String id = Context.getObjectID(context, value);
if (id != null && resolver.canSubstituteByReference(context, type, value, id)) try {
  final XLink link = new XLink();
  link.setHRef(new URI(null, null, id));
  reference = new ObjectReference(null, link);
origin: apache/sis

final String id = Context.getObjectID(context, value);
if (id != null && resolver.canSubstituteByReference(context, type, value, id)) try {
  final XLink link = new XLink();
  link.setHRef(new URI(null, null, id));
  reference = new ObjectReference(null, link);
origin: apache/sis

/**
 * Tests (un)marshalling of an object with a {@code xlink:href} attribute without element definition.
 * The XML fragment is:
 *
 * {@preformat xml
 *   <mdb:MD_Metadata>
 *     <mdb:identificationInfo xlink:href="http://test.net"/>
 *   </mdb:MD_Metadata>
 * }
 *
 * @throws JAXBException if an error occurred during (un)marshalling.
 * @throws URISyntaxException if the URI used in this test is malformed.
 */
@Test
public void testLinkOnly() throws JAXBException, URISyntaxException {
  final XLink xlink = new XLink();
  xlink.setHRef(new URI("http://test.net"));
  final DefaultDataIdentification identification = new DefaultDataIdentification();
  identification.getIdentifierMap().putSpecialized(IdentifierSpace.XLINK, xlink);
  final DefaultMetadata metadata = new DefaultMetadata();
  metadata.setIdentificationInfo(Collections.singleton(identification));
  assertXmlEquals(LINK_ONLY_XML, marshal(metadata), "xmlns:*");
  verify(true, unmarshal(DefaultMetadata.class, LINK_ONLY_XML));
}
origin: apache/sis

final XLink link = new XLink();
link.setType(XLink.Type.SIMPLE);
link.setHRef(new URI("org:apache:sis:href"));
origin: org.apache.sis.core/sis-utility

  return new SpecializedIdentifier<>(IdentifierSpace.HREF, href);
final XLink xlink = new XLink();
xlink.setHRef(href);
return new SpecializedIdentifier<>(IdentifierSpace.XLINK, xlink);
origin: apache/sis

  return new SpecializedIdentifier<>(IdentifierSpace.HREF, href);
final XLink xlink = new XLink();
xlink.setHRef(href);
return new SpecializedIdentifier<>(IdentifierSpace.XLINK, xlink);
origin: apache/sis

final XLink xlink = new XLink();
xlink.setHRef(new URI("http://test.net"));
final DefaultDataIdentification identification = new DefaultDataIdentification();
origin: apache/sis

final XLink link = new XLink();
link.setType(XLink.Type.AUTO);
link.setRole(new URI("org:apache:sis:role"));
link.freeze();
final XLink other = new XLink();
assertFalse(link.equals(other));
assertFalse(link.hashCode() == other.hashCode());
origin: apache/sis

final XLink link = new XLink();
link.setShow(XLink.Show.REPLACE);
link.setActuate(XLink.Actuate.ON_LOAD);
origin: apache/sis

final XLink link = new XLink();
int hashCode = link.hashCode();
assertFalse(hashCode == 0);
org.apache.sis.xmlXLink<init>

Javadoc

Creates a new link. The initial value of all attributes is null.

Popular methods of XLink

  • setHRef
    Sets the URN to a resources.
  • equals
    Compares this XLink with the given object for equality.
  • getHRef
    Returns a URN to an external resources, or to an other part of a XML document, or an identifier.
  • getType
    Returns the type of link. May have one of the following values: * simple: a simple link * extended:
  • hashCode
    Returns a hash code value for this XLink.
  • setActuate
    Sets the desired timing of traversal from the starting resource to the ending resource.
  • setRole
    Sets the URI reference for some description of the arc role.
  • setShow
    Sets the desired presentation of the ending resource on traversal from the starting resource.
  • setTitle
    Sets a human-readable string with a short description for the arc.
  • setType
    Sets the type of link. Any value different than org.apache.sis.xml.XLink.Type#AUTO (including null)
  • append
    Appends the given attribute in the given buffer if the attribute value is not null. If the given val
  • canWrite
    Checks if the given attribute can be set.
  • append,
  • canWrite,
  • fieldMask,
  • getActuate,
  • getArcRole,
  • getFrom,
  • getLabel,
  • getRole,
  • getShow

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • orElseThrow (Optional)
  • runOnUiThread (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • 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