Package com.day.cq.dam.commons.util
Class S73DHelper
- java.lang.Object
-
- com.day.cq.dam.commons.util.S73DHelper
-
public class S73DHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description S73DHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
get3DMimeType(Asset asset)
Returns the mime type string for a 3D assetstatic java.lang.String
get3DMimeType(java.lang.String fileName)
Returns the mime type string for an asset or file path based on the extensionstatic java.lang.String[]
getDependencyPaths(Resource resource)
Get a list of dependencies.static java.lang.String
getProgressOperation(Resource resource)
Returns the progress operation for the given resourcestatic java.lang.String
getProgressValue(Resource resource)
Returns the progress value for the given resourcestatic java.lang.String
getS7Type(Resource resource)
Returns the S7 type for the given resource.static boolean
has3DMimeTypeDC(Resource resource)
Returns true if the metadata based mime type is recognized as a 3D resource - uses DC_FORMATstatic boolean
has3DMimeTypeJCR(Resource resource)
Returns true if the metadata based mime type is recognized as a 3D resource - uses JCR_FORMATstatic boolean
hasModel(Resource resource)
Does the resource contain a model folder - indicating 3D ingestion has been appliedstatic boolean
is3DMimeType(Resource resource)
Checks whether the given resource represent an S7 3D model or not.static boolean
isIncomplete(Resource resource)
Does the resource have unresolved required dependenciesstatic boolean
isS73D(Resource resource)
Checks whether the given resource represent an S7 3D model or not.static boolean
isUnResolved(Resource resource)
Does the resource have unresolved dependenciesstatic boolean
isV3DInstalled(Session session)
-
-
-
Method Detail
-
isV3DInstalled
public static boolean isV3DInstalled(Session session)
-
getS7Type
public static java.lang.String getS7Type(Resource resource)
Returns the S7 type for the given resource.- Parameters:
resource
- resource instance- Returns:
- the S7 type or null if the type is missing
-
isS73D
public static boolean isS73D(Resource resource)
Checks whether the given resource represent an S7 3D model or not.- Parameters:
resource
- resource instance- Returns:
- true if the resource is marked as a 3D resource, false otherwise
-
hasModel
public static boolean hasModel(Resource resource)
Does the resource contain a model folder - indicating 3D ingestion has been applied- Parameters:
resource
- resource instance- Returns:
- true if a model directory exists, otherwise false
-
is3DMimeType
public static boolean is3DMimeType(Resource resource)
Checks whether the given resource represent an S7 3D model or not.- Parameters:
resource
- resource instance- Returns:
- true if the resource is marked as a 3D resource, false otherwise
-
getDependencyPaths
public static java.lang.String[] getDependencyPaths(Resource resource)
Get a list of dependencies.- Parameters:
resource
- resource instance- Returns:
- a string array of dependency paths or null if not 3D or no dependencies
-
isUnResolved
public static boolean isUnResolved(Resource resource)
Does the resource have unresolved dependencies- Parameters:
resource
- resource instance- Returns:
- true if a 3D resource with unresolved dependencies, otherwise false
-
isIncomplete
public static boolean isIncomplete(Resource resource)
Does the resource have unresolved required dependencies- Parameters:
resource
- resource instance- Returns:
- true if a 3D resource with unresolved dependencies, otherwise false
-
getProgressValue
public static java.lang.String getProgressValue(Resource resource)
Returns the progress value for the given resource- Parameters:
resource
- resource instance- Returns:
- percentage string if the resource represent a S7 model and has a progress value empty string otherwise
-
getProgressOperation
public static java.lang.String getProgressOperation(Resource resource)
Returns the progress operation for the given resource- Parameters:
resource
- resource instance- Returns:
- operation string if the resource represent a S7 model and has a progress value empty string otherwise
-
has3DMimeTypeDC
public static boolean has3DMimeTypeDC(Resource resource)
Returns true if the metadata based mime type is recognized as a 3D resource - uses DC_FORMAT- Parameters:
resource
- resource- Returns:
- true if set to 3D mime type, false if not
-
has3DMimeTypeJCR
public static boolean has3DMimeTypeJCR(Resource resource)
Returns true if the metadata based mime type is recognized as a 3D resource - uses JCR_FORMAT- Parameters:
resource
- resource- Returns:
- true if set to 3D mime type, false if not
-
get3DMimeType
public static java.lang.String get3DMimeType(Asset asset)
Returns the mime type string for a 3D asset- Parameters:
asset
- asset- Returns:
- mime type string if 3D asset or null if not
-
get3DMimeType
public static java.lang.String get3DMimeType(java.lang.String fileName)
Returns the mime type string for an asset or file path based on the extension- Parameters:
fileName
- filename- Returns:
- mime type string if recognized 3D extension or null if not
-
-