public class SkeletonUtil extends Object
| Constructor and Description |
|---|
SkeletonUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
changeParent(ISkeleton skel,
IResource curParent,
IResource newParent) |
static int |
findTuRefInSkeleton(GenericSkeleton skel)
Finds source reference in the skeleton.
|
static int |
findTuRefInSkeleton(GenericSkeleton skel,
LocaleId locId)
Finds either source or target reference in the skeleton.
|
static int |
getNumParts(GenericSkeleton skel) |
static GenericSkeletonPart |
getPart(GenericSkeleton skel,
int index) |
static String |
getRefId(GenericSkeletonPart part) |
static boolean |
hasTuRef(GenericSkeleton skel)
Determines if a given skeleton contains a source reference in it.
|
static boolean |
hasTuRef(GenericSkeleton skel,
LocaleId locId)
Determines if a given skeleton contains a target reference in a given locale.
|
static boolean |
isExtPropValuePlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isExtSegmentPlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isExtSourcePlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isExtTargetPlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isPropRef(GenericSkeletonPart part) |
static boolean |
isPropValuePlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isRef(GenericSkeletonPart part) |
static boolean |
isReference(GenericSkeletonPart part) |
static boolean |
isSegmentPlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isSegRef(GenericSkeletonPart part) |
static boolean |
isSourcePlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isTargetPlaceholder(GenericSkeletonPart part,
IResource resource) |
static boolean |
isText(GenericSkeletonPart part) |
static boolean |
isTuRef(GenericSkeletonPart part) |
static boolean |
replaceSkeletonPart(GenericSkeleton skel,
int index,
GenericSkeleton replacement)
Replaces a part of a given skeleton with another given skeleton part.
|
static GenericSkeleton[] |
splitSkeleton(GenericSkeleton skel)
Splits a given
GenericSkeleton into 2 parts: before and after the
content placeholder (self-marker). |
public static int findTuRefInSkeleton(GenericSkeleton skel)
skel - the skeleton being sought for the referencepublic static int findTuRefInSkeleton(GenericSkeleton skel, LocaleId locId)
skel - the skeleton being sought for the reference.locId - the locale to search the reference for.public static boolean hasTuRef(GenericSkeleton skel)
skel - the skeleton being sought for the reference.public static boolean hasTuRef(GenericSkeleton skel, LocaleId locId)
skel - the skeleton being sought for the reference.locId - the locale of the target part being sought.public static GenericSkeleton[] splitSkeleton(GenericSkeleton skel)
GenericSkeleton into 2 parts: before and after the
content placeholder (self-marker).skel - the given GenericSkeleton.GenericSkeletons before and after self-marker.public static boolean replaceSkeletonPart(GenericSkeleton skel, int index, GenericSkeleton replacement)
skel - the skeleton which part is being replaced.index - the index of the skeleton part to be replaced.replacement - the given new skeleton part to replace the existing one.public static int getNumParts(GenericSkeleton skel)
public static GenericSkeletonPart getPart(GenericSkeleton skel, int index)
public static boolean isTuRef(GenericSkeletonPart part)
public static boolean isRef(GenericSkeletonPart part)
public static boolean isPropRef(GenericSkeletonPart part)
public static boolean isSegRef(GenericSkeletonPart part)
public static boolean isSourcePlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isTargetPlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isPropValuePlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isSegmentPlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isExtSourcePlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isExtTargetPlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isExtPropValuePlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isExtSegmentPlaceholder(GenericSkeletonPart part, IResource resource)
public static boolean isReference(GenericSkeletonPart part)
public static boolean isText(GenericSkeletonPart part)
public static String getRefId(GenericSkeletonPart part)
Copyright © 2022. All rights reserved.