This commit is contained in:
Lucio Lelii 2008-11-14 13:05:05 +00:00
parent 0826901222
commit 2a8f33bc50
15 changed files with 324 additions and 11 deletions

26
.ant-targets-build.xml Normal file
View File

@ -0,0 +1,26 @@
[echo]
buildService
buildStubs
deployService
deployStubs
garService
generateStubs
generateStubs.1
generateStubs.2
generateStubs.3
generateStubs.4
generateStubs.5
generateStubs.6
init
jarService
jarStubs
processWSDL.1
processWSDL.2
processWSDL.3
processWSDL.4
processWSDL.5
processWSDL.6
processWSDLs
stubs
undeployService
undeployStubs

View File

@ -4,7 +4,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/GCORELIBS"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/GCUBELIBS"/>
<classpathentry kind="lib" path="/Dependencies/ISREGISTRY/org.gcube.informationsystem.registry.stubs.jar"/>
<classpathentry kind="lib" path="/home/lucio/workspace/Dependencies/ISREGISTRY/org.gcube.informationsystem.registry.stubs.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

123
.fbprefs Normal file
View File

@ -0,0 +1,123 @@
#FindBugs User Preferences
#Tue Nov 04 12:23:33 CET 2008
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
detectorBadAppletConstructor=BadAppletConstructor|false
detectorBadResultSetAccess=BadResultSetAccess|true
detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
detectorBadUseOfReturnValue=BadUseOfReturnValue|true
detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
detectorBooleanReturnNull=BooleanReturnNull|true
detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
detectorCloneIdiom=CloneIdiom|true
detectorComparatorIdiom=ComparatorIdiom|true
detectorConfusedInheritance=ConfusedInheritance|true
detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
detectorCrossSiteScripting=CrossSiteScripting|true
detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
detectorDontUseEnum=DontUseEnum|true
detectorDroppedException=DroppedException|true
detectorDumbMethodInvocations=DumbMethodInvocations|true
detectorDumbMethods=DumbMethods|true
detectorDuplicateBranches=DuplicateBranches|true
detectorEmptyZipFileEntry=EmptyZipFileEntry|true
detectorFinalizerNullsFields=FinalizerNullsFields|true
detectorFindBadCast2=FindBadCast2|true
detectorFindBadForLoop=FindBadForLoop|true
detectorFindCircularDependencies=FindCircularDependencies|false
detectorFindDeadLocalStores=FindDeadLocalStores|true
detectorFindDoubleCheck=FindDoubleCheck|true
detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
detectorFindFinalizeInvocations=FindFinalizeInvocations|true
detectorFindFloatEquality=FindFloatEquality|true
detectorFindHEmismatch=FindHEmismatch|true
detectorFindInconsistentSync2=FindInconsistentSync2|true
detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
detectorFindMaskedFields=FindMaskedFields|true
detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
detectorFindNakedNotify=FindNakedNotify|true
detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
detectorFindNonShortCircuit=FindNonShortCircuit|true
detectorFindNullDeref=FindNullDeref|true
detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
detectorFindOpenStream=FindOpenStream|true
detectorFindPuzzlers=FindPuzzlers|true
detectorFindRefComparison=FindRefComparison|true
detectorFindReturnRef=FindReturnRef|true
detectorFindRunInvocations=FindRunInvocations|true
detectorFindSelfComparison=FindSelfComparison|true
detectorFindSelfComparison2=FindSelfComparison2|true
detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
detectorFindSpinLoop=FindSpinLoop|true
detectorFindSqlInjection=FindSqlInjection|true
detectorFindTwoLockWait=FindTwoLockWait|true
detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
detectorFindUnconditionalWait=FindUnconditionalWait|true
detectorFindUninitializedGet=FindUninitializedGet|true
detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
detectorFindUnreleasedLock=FindUnreleasedLock|true
detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
detectorFindUnsyncGet=FindUnsyncGet|true
detectorFindUselessControlFlow=FindUselessControlFlow|true
detectorFormatStringChecker=FormatStringChecker|true
detectorHugeSharedStringConstants=HugeSharedStringConstants|true
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
detectorIncompatMask=IncompatMask|true
detectorInconsistentAnnotations=InconsistentAnnotations|true
detectorInefficientMemberAccess=InefficientMemberAccess|false
detectorInefficientToArray=InefficientToArray|true
detectorInfiniteLoop=InfiniteLoop|true
detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
detectorInitializationChain=InitializationChain|true
detectorInstantiateStaticClass=InstantiateStaticClass|true
detectorInvalidJUnitTest=InvalidJUnitTest|true
detectorIteratorIdioms=IteratorIdioms|true
detectorLazyInit=LazyInit|true
detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
detectorMethodReturnCheck=MethodReturnCheck|true
detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
detectorMutableLock=MutableLock|true
detectorMutableStaticFields=MutableStaticFields|true
detectorNaming=Naming|true
detectorNumberConstructor=NumberConstructor|true
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
detectorPublicSemaphores=PublicSemaphores|false
detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
detectorRedundantInterfaces=RedundantInterfaces|true
detectorRepeatedConditionals=RepeatedConditionals|true
detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
detectorSerializableIdiom=SerializableIdiom|true
detectorStartInConstructor=StartInConstructor|true
detectorStaticCalendarDetector=StaticCalendarDetector|true
detectorStringConcatenation=StringConcatenation|true
detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
detectorSwitchFallthrough=SwitchFallthrough|true
detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
detectorURLProblems=URLProblems|true
detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
detectorUnnecessaryMath=UnnecessaryMath|true
detectorUnreadFields=UnreadFields|true
detectorUseObjectEquals=UseObjectEquals|false
detectorUselessSubclassMethod=UselessSubclassMethod|false
detectorVarArgsProblems=VarArgsProblems|true
detectorVolatileUsage=VolatileUsage|true
detectorWaitInLoop=WaitInLoop|true
detectorWrongMapIterator=WrongMapIterator|true
detectorXMLFactoryBypass=XMLFactoryBypass|true
detector_threshold=2
effort=default
filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
filter_settings_neg=|
run_at_full_build=true

BIN
cnr@grid5.4dsoft.hu Normal file

Binary file not shown.

BIN
gcube1@pc-simi Normal file

Binary file not shown.

53
resource.xml Normal file
View File

@ -0,0 +1,53 @@
&lt;?xml version='1.0' encoding='UTF-8' standalone='yes' ?&gt;
&lt;Resource&gt;
&lt;ID&gt;lucio-test-6&lt;/ID&gt;
&lt;Type&gt;GenericResource&lt;/Type&gt;
&lt;Profile&gt;
&lt;Name&gt;BrokerXSLT_dc_anylanguage_to_es_anylanguage&lt;/Name&gt;
&lt;Description&gt;XSLT to transform from DC schema to ES schema&lt;/Description&gt;
&lt;Body&gt;
&lt;xsl:stylesheet exclude-result-prefixes=&quot;xsl dc&quot; version=&quot;1.0&quot; xmlns:dc=&quot;http://dublincore.org/documents/dces/&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
&lt;xsl:output indent=&quot;yes&quot; method=&quot;xml&quot; omit-xml-declaration=&quot;yes&quot; /&gt;
&lt;xsl:template match=&quot;/&quot;&gt;
&lt;esTemplate&gt;
&lt;esObject&gt;
&lt;title&gt;
&lt;xsl:value-of select=&quot;normalize-space(dc:ol/dc:title)&quot; /&gt;
&lt;/title&gt;
&lt;description /&gt;
&lt;purpose /&gt;
&lt;provenance&gt;
&lt;xsl:apply-templates select=&quot;dc:ol/dc:creator&quot; /&gt;
&lt;/provenance&gt;
&lt;type&gt;
&lt;xsl:value-of select=&quot;normalize-space(dc:ol/dc:type)&quot; /&gt;
&lt;/type&gt;
&lt;descKeys /&gt;
&lt;timeFrame&gt;
&lt;begin /&gt;
&lt;end&gt;
&lt;xsl:value-of select=&quot;normalize-space(dc:ol/dc:date)&quot; /&gt;
&lt;/end&gt;
&lt;/timeFrame&gt;
&lt;location&gt;
&lt;width /&gt;
&lt;centerLat /&gt;
&lt;centerLon /&gt;
&lt;westBL /&gt;
&lt;eastBL /&gt;
&lt;southBL /&gt;
&lt;northBL /&gt;
&lt;/location&gt;
&lt;suppInfo /&gt;
&lt;/esObject&gt;
&lt;/esTemplate&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match=&quot;dc:ol/dc:creator&quot;&gt;
&lt;creator&gt;
&lt;xsl:value-of select=&quot;normalize-space(.)&quot; /&gt;
&lt;/creator&gt;
&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
&lt;/Body&gt;
&lt;/Profile&gt;
&lt;/Resource&gt;

52
resourcetemp.xml Normal file
View File

@ -0,0 +1,52 @@
<Resource>
<ID>lucio-test-7</ID>
<Type>GenericResource</Type>
<Profile>
<Name>BrokerXSLT_dc_anylanguage_to_es_anylanguage</Name>
<Description>XSLT to transform from DC schema to ES schema</Description>
<Body>
<xsl:stylesheet exclude-result-prefixes="xsl dc" version="1.0" xmlns:dc="http://dublincore.org/documents/dces/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml" omit-xml-declaration="yes"/>
<xsl:template match="/">
<esTemplate>
<esObject>
<title>
<xsl:value-of select="normalize-space(dc:ol/dc:title)"/>
</title>
<description/>
<purpose/>
<provenance>
<xsl:apply-templates select="dc:ol/dc:creator"/>
</provenance>
<type>
<xsl:value-of select="normalize-space(dc:ol/dc:type)"/>
</type>
<descKeys/>
<timeFrame>
<begin/>
<end>
<xsl:value-of select="normalize-space(dc:ol/dc:date)"/>
</end>
</timeFrame>
<location>
<width/>
<centerLat/>
<centerLon/>
<westBL/>
<eastBL/>
<southBL/>
<northBL/>
</location>
<suppInfo/>
</esObject>
</esTemplate>
</xsl:template>
<xsl:template match="dc:ol/dc:creator">
<creator>
<xsl:value-of select="normalize-space(.)"/>
</creator>
</xsl:template>
</xsl:stylesheet>
</Body>
</Profile>
</Resource>

View File

@ -17,25 +17,46 @@ public class FactoryContext extends GCUBEStatefulPortTypeContext{
private FactoryContext() {}
/**
* returns the current context
*
* @return FactoryContext
*/
public static FactoryContext getContext() {
return cache;
}
/**
*
*
* @return the porttype name
*/
public String getJNDIName() {
return PORTTYPE_NAME;
}
/**
*
* @return the namespace
*/
public String getNamespace() {
return "http://gcube-system.org/namespaces/informationsystem/registry";
}
/**
*
* @return the Service name
*/
public String getServiceName() {
return ServiceContext.getContext().getName();
}
/**
*
* @return the ServiceContext
*/
@Override
public GCUBEServiceContext getServiceContext() {
return ServiceContext.getContext();

View File

@ -17,21 +17,35 @@ public class ProfileContext extends GCUBEStatefulPortTypeContext{
protected static final ProfileContext cache = new ProfileContext();
/**
*
* @return profile Context
*/
public static ProfileContext getContext() {
return cache;
}
/**
*
* @return the port type name
*/
public final String getJNDIName() {
return PORTTYPE_NAME;
}
/**
*
* @return the namespace
*/
public final String getNamespace() {
return "http://gcube-system.org/namespaces/informationsystem/registry";
}
/**
*
* @return the ServiceContext
*/
public GCUBEServiceContext getServiceContext() {
return ServiceContext.getContext();
}

View File

@ -27,7 +27,7 @@ import org.gcube.informationsystem.registry.impl.state.RegistryFactoryResource;
/**
* IS-Registry service context
*
* @author Andrea Manzi, Manuele Simi (CNR)
* @author Andrea Manzi, Manuele Simi , Lucio lelii (CNR)
*
*/
public class ServiceContext extends GCUBEServiceContext {
@ -40,6 +40,7 @@ public class ServiceContext extends GCUBEServiceContext {
protected GCUBERIQuery queryRI = null;
public static enum RegistryTopic implements GCUBETopic{CREATE,UPDATE, REMOVE};
//protected GCUBEResourceXPathQuery queryGHN = null;
@ -75,15 +76,27 @@ public class ServiceContext extends GCUBEServiceContext {
private ServiceContext() {}
/**
*
* @return ServiceContext
*/
public static ServiceContext getContext() {
return cache;
}
/**
* @return the JNDI name
*/
public String getJNDIName() {
return JNDI_NAME;
}
/**
*
* @return GCUBEProducer
*/
public GCUBEProducer<RegistryTopic, GCUBEResource> getTopicProducer(){
return topicProducer;
}

View File

@ -35,6 +35,7 @@ public class RegistryConfiguration {
abstract public String getClazz();
}
/** The Resource Type */
public static enum ResourceType {
RunningInstance() {public GCUBEResource getResourceClass() throws Exception {return GHNContext.getImplementation(GCUBERunningInstance.class);}},
ExternalRunningInstance() {public GCUBEResource getResourceClass() throws Exception {return GHNContext.getImplementation(GCUBEExternalRunningInstance.class);}},

View File

@ -9,7 +9,7 @@ import org.w3c.dom.Document;
public class RegistryPersistenceDelegate extends GCUBEWSFilePersistenceDelegate<ProfileResource> {
protected void onLoad(ProfileResource resource, ObjectInputStream ois) throws Exception {
protected void onLoad(ProfileResource resource, ObjectInputStream ois) throws Exception {
super.onLoad(resource, ois);
resource.setProfile((Document)ois.readObject());

View File

@ -61,12 +61,17 @@ public class ProfileResource extends GCUBEWSResource {
return new String[] {ProfileRP};
}
/* Constructor
/**
* Constructor
* @throws Exception Exception
*/
public ProfileResource() throws Exception{};
/**
* initialize the resource
* @param params Object
*/
@Override
public void initialise(Object... params) throws ResourceException {
GCUBEResource resource = (GCUBEResource) params[0];
@ -241,7 +246,13 @@ public class ProfileResource extends GCUBEWSResource {
}
/**
* updates the resource
*
* @param resource
* @throws Exception
*/
@SuppressWarnings("unchecked")
public void updateResource(GCUBEResource resource) throws Exception{