Package com.day.cq.dam.commons.util
Class S73DHelper
java.lang.Object
com.day.cq.dam.commons.util.S73DHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringget3DMimeType(Asset asset) Returns the mime type string for a 3D assetstatic Stringget3DMimeType(String fileName) Returns the mime type string for an asset or file path based on the extensionstatic String[]getDependencyPaths(Resource resource) Get a list of dependencies.static StringgetProgressOperation(Resource resource) Returns the progress operation for the given resourcestatic StringgetProgressValue(Resource resource) Returns the progress value for the given resourcestatic StringReturns the S7 type for the given resource.static booleanhas3DMimeTypeDC(Resource resource) Returns true if the metadata based mime type is recognized as a 3D resource - uses DC_FORMATstatic booleanhas3DMimeTypeJCR(Resource resource) Returns true if the metadata based mime type is recognized as a 3D resource - uses JCR_FORMATstatic booleanDoes the resource contain a model folder - indicating 3D ingestion has been appliedstatic booleanis3DMimeType(Resource resource) Checks whether the given resource represent an S7 3D model or not.static booleanisIncomplete(Resource resource) Does the resource have unresolved required dependenciesstatic booleanChecks whether the given resource represent an S7 3D model or not.static booleanisUnResolved(Resource resource) Does the resource have unresolved dependenciesstatic booleanisV3DInstalled(Session session)
-
Constructor Details
-
S73DHelper
public S73DHelper()
-
-
Method Details
-
isV3DInstalled
-
getS7Type
Returns the S7 type for the given resource.- Parameters:
resource- resource instance- Returns:
- the S7 type or null if the type is missing
-
isS73D
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
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
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
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
Does the resource have unresolved dependencies- Parameters:
resource- resource instance- Returns:
- true if a 3D resource with unresolved dependencies, otherwise false
-
isIncomplete
Does the resource have unresolved required dependencies- Parameters:
resource- resource instance- Returns:
- true if a 3D resource with unresolved dependencies, otherwise false
-
getProgressValue
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
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
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
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
Returns the mime type string for a 3D asset- Parameters:
asset- asset- Returns:
- mime type string if 3D asset or null if not
-
get3DMimeType
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
-