Converts the RTE externalized form of media reference to internal form.
@param ref Externalize media reference
@return Internal media reference
191833
private String unexternalizeImageRef(String ref) {
    String unexternalizedRef = ref;

    if (StringUtils.isNotEmpty(unexternalizedRef)) {

      // decode if required
      unexternalizedRef = decodeIfEncoded(unexternalizedRef);

      // TODO: implementation has to be aligned with MediaSource implementations!
      // remove default servlet extension that is needed for inline images in RTE
      unexternalizedRef = StringUtils.removeEnd(unexternalizedRef, "/" + JcrConstants.JCR_CONTENT + ".default");
      unexternalizedRef = StringUtils.removeEnd(unexternalizedRef, "/_jcr_content.default");
    }

    return unexternalizedRef;
  }
666194
public JsonNode getRefSchemaNode(String ref) {
        JsonSchema schema = findAncestor();
        JsonNode node = schema.getSchemaNode();

        if (ref.startsWith("#/")) {
            // handle local ref
            String[] keys = ref.substring(2).split("/");
            for (String key : keys) {
                try {
                    key = URLDecoder.decode(key, "utf-8");
                } catch (UnsupportedEncodingException e) {
                }
                Matcher matcher = intPattern.matcher(key);
                if (matcher.matches()) {
                    node = node.get(Integer.parseInt(key));
                } else {
                    node = node.get(key);
                }
                if (node == null){
                    JsonSchema subSchema = schema.fetchSubSchemaNode(validationContext);
                    if (subSchema != null) {
                        node = subSchema.getRefSchemaNode(ref);
                    }
                }
                if (node == null){
                    break;
                }
            }
        }
        return node;
    }
685939
public PdfIndirectReference getReference() throws IOException {
        if (ref != null)
            return ref;
        ref = writer.addToBody(this).getIndirectReference();
        return ref;
    }
666136
public ReferenceStream getReferenceStream()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getReferenceStream");
            SibTr.exit(tc, "getReferenceStream", subscriptionItemStream);
        }
        return subscriptionItemStream;
    }
698297
public static String getTypeFromRef(String ref) {
        Matcher matcher = match(ref);
        return matcher != null ? matcher.group(1) : null;
    }
506452
def get_external_references(self):
        
        node = self.node.find('externalReferences')
        if node is not None:
            ext_refs = CexternalReferences(node)
            for ext_ref in ext_refs:
                yield ext_ref
723298
@Deprecated
  protected final @Nullable String getMediaRef(@NotNull MediaRequest mediaRequest) {
    return getMediaRef(mediaRequest, null);
  }
1046494
@Override
  public void writeRef(int ref)
  {
    require(1);
    
    _buffer[_offset++] = (byte) ConstH3.REF;
    writeUnsigned(ref);
  }
1086465
public static LoadableImageData getImageDataFor(String ref) {
		LoadableImageData imageData;
		checkProperty();
		
		ref = ref.toLowerCase();
		
        if (ref.endsWith(".tga")) {
        	return new TGAImageData();
        } 
        if (ref.endsWith(".png")) {
        	CompositeImageData data = new CompositeImageData();
        	if (usePngLoader) {
        		data.add(new PNGImageData());
        	}
        	data.add(new ImageIOImageData());
        	
        	return data;
        } 
        
        return new ImageIOImageData();
	}
827440
private boolean markAsObsolete(ContentReference ref) {
        if (obsoleteContents.containsKey(ref.getHexHash())) { //This content is already marked as obsolete
            if (obsoleteContents.get(ref.getHexHash()) + obsolescenceTimeout < System.currentTimeMillis()) {
                DeploymentRepositoryLogger.ROOT_LOGGER.obsoleteContentCleaned(ref.getContentIdentifier());
                removeContent(ref);
                return true;
            }
        } else {
            obsoleteContents.put(ref.getHexHash(), System.currentTimeMillis()); //Mark content as obsolete
        }
        return false;
    }
1360958
public Annotation getRef() {
    if (ArgumentMention_Type.featOkTst && ((ArgumentMention_Type)jcasType).casFeat_ref == null)
      jcasType.jcas.throwFeatMissing("ref", "de.julielab.jules.types.ArgumentMention");
    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((ArgumentMention_Type)jcasType).casFeatCode_ref)));}
1280622
public Audio getAIF(String ref) throws IOException {
		return getAIF(ref, ResourceLoader.getResourceAsStream(ref));
	}
31638
public boolean replaceRef(Object oldRef, Object newRef)
        throws IOException
    {
        Integer value = (Integer) _refs.remove(oldRef);

        if (value != null) {
            _refs.put(newRef, value);

            return true;
        }
        else
            return false;
    }
967650
public Audio getMOD(String ref) throws IOException {
		return getMOD(ref, ResourceLoader.getResourceAsStream(ref));
	}
845236
private Reference createDefinitionResourceBindingListenerReference(String refName,
                                                                       String bindingName,
                                                                       String type,
                                                                       @Sensitive Map<String, Object> properties) {
        Boolean transactional = (Boolean) properties.get("transactional");
        Map<String, Object> bindingProperties = Collections.<String, Object> singletonMap("transactional", transactional == null || transactional);

        ResourceBindingImpl binding = resourceBindingListenerManager.binding(refName, bindingName, type, bindingProperties);
        if (binding != null) {
            return new IndirectReference(refName, binding.getBindingName(), type, null, binding.getBindingListenerName(), false);
        }

        return null;
    }
264900
public BatchArtifactRef<BatchArtifacts<T>> getOrCreateRef()
   {
      List<Node> nodeList = childNode.get("ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new BatchArtifactRefImpl<BatchArtifacts<T>>(this, "ref", childNode, nodeList.get(0));
      }
      return createRef();
   }
991732
public static Reference getReference(Serializable object) throws NamingException
    {
        ByteArrayOutputStream outStream;
        try
        {
            outStream = new ByteArrayOutputStream();
            ObjectOutputStream out = new ObjectOutputStream(outStream);
            out.writeObject(object);
            out.close();
        }
        catch (IOException e)
        {
            throw new NamingException(e.getMessage());
        }

        BinaryRefAddr handle = new BinaryRefAddr("com.impetus.kundera.persistence.jta", outStream.toByteArray());
        Reference ret = new Reference(object.getClass().getName(), handle, UserTransactionFactory.class.getName(), null);
        return ret;
    }