Tabnine Logo
XLink.<init>
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Collectors (java.util.stream)
  • JPanel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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